Telephaty: Harness the code
-
Upload
navajanegra -
Category
Documents
-
view
325 -
download
0
Transcript of Telephaty: Harness the code
![Page 1: Telephaty: Harness the code](https://reader036.fdocuments.net/reader036/viewer/2022081816/558e32081a28ab0c278b4575/html5/thumbnails/1.jpg)
Telepathy Harness the code
Juan Carlos Montes
![Page 2: Telephaty: Harness the code](https://reader036.fdocuments.net/reader036/viewer/2022081816/558e32081a28ab0c278b4575/html5/thumbnails/2.jpg)
2
Inyecciones comunes
• Pedir memoria en el proceso remoto
• VirtualAllocEx
• Copiar el código a ejecutar en el proceso remoto
• WriteProcessMemory
• Ejecutar el código copiado
• CreateRemoteThread
Proceso A
kernel32.dll
user32.dll
test.dll
Inyector
LoadLibrary
Proceso A
kernel32.dll
user32.dll
test.dll
Proceso A
LoadLibrary
WriteProcessMemory CreateRemoteThread
![Page 3: Telephaty: Harness the code](https://reader036.fdocuments.net/reader036/viewer/2022081816/558e32081a28ab0c278b4575/html5/thumbnails/3.jpg)
3
• Pedir memoria en el proceso remoto
• VirtualAllocEx
• Copiar el nombre de la DLL
• WriteProcessMemory
• Ejecutar LoadLibrary
• CreateRemoteThread
Inyección con Telepathy
Proceso A
kernel32.dll
user32.dll
Proceso A
kernel32.dll
user32.dll
test.dll
Proceso A
test.dll
WriteProcessMemory
CreateRemoteThread
test.dll Telepathy
Valor de Retorno
![Page 4: Telephaty: Harness the code](https://reader036.fdocuments.net/reader036/viewer/2022081816/558e32081a28ab0c278b4575/html5/thumbnails/4.jpg)
4
Características Telepathy
• Inyectar DLLs
• Llamando directamente a LoadLibrary (sin uso de códigos insertados)
• Usar cualquier función del proceso remoto, incluidas sus DLLs
• Llamar funciones, tanto por nombre exportado como por dirección
• Usar parámetros en las funciones
• Recuperar su retorno tanto numérico como texto
• Listar todas los OPCODE CALL (xE8)
• Lista actualizable de todos los CALL del proceso
![Page 5: Telephaty: Harness the code](https://reader036.fdocuments.net/reader036/viewer/2022081816/558e32081a28ab0c278b4575/html5/thumbnails/5.jpg)
5
¿¿Para que??
• Análisis de malware
• Uso de funciones de cifrado reversibles
• Uso de funciones de envió de datos cifrado
• Simulación de recepción de comandos de un panel de control
• …
![Page 6: Telephaty: Harness the code](https://reader036.fdocuments.net/reader036/viewer/2022081816/558e32081a28ab0c278b4575/html5/thumbnails/6.jpg)
6
DEMO 1
![Page 7: Telephaty: Harness the code](https://reader036.fdocuments.net/reader036/viewer/2022081816/558e32081a28ab0c278b4575/html5/thumbnails/7.jpg)
7
![Page 8: Telephaty: Harness the code](https://reader036.fdocuments.net/reader036/viewer/2022081816/558e32081a28ab0c278b4575/html5/thumbnails/8.jpg)
8
DEMO 2
![Page 9: Telephaty: Harness the code](https://reader036.fdocuments.net/reader036/viewer/2022081816/558e32081a28ab0c278b4575/html5/thumbnails/9.jpg)
9
![Page 10: Telephaty: Harness the code](https://reader036.fdocuments.net/reader036/viewer/2022081816/558e32081a28ab0c278b4575/html5/thumbnails/10.jpg)
10
Múltiples parámetros
• Es posible usar CreateRemoteThread indicándole múltiples parámetros:
•NO • Solucion?
• PUSH PARAM1
• PUSH PARAM2
• …
• CALL FUNCTION
• RET
![Page 11: Telephaty: Harness the code](https://reader036.fdocuments.net/reader036/viewer/2022081816/558e32081a28ab0c278b4575/html5/thumbnails/11.jpg)
11
Dudas??
• Dudas??
• Preguntas??
• Donaciones??
• Si, lo publicamos durante las conferencias: https://github.com/intecocert
![Page 12: Telephaty: Harness the code](https://reader036.fdocuments.net/reader036/viewer/2022081816/558e32081a28ab0c278b4575/html5/thumbnails/12.jpg)
12
Gracias!!!
Juan C. Montes
Mail personal: [email protected]
Mail CERT: [email protected]
Twitter: @jcmontes_tec