<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-529498189364947716</atom:id><lastBuildDate>Thu, 19 Dec 2024 03:20:20 +0000</lastBuildDate><category>asterisk</category><category>backtrack</category><category>fail2ban</category><category>herramientas</category><category>linux</category><category>metasploit</category><category>nessus</category><category>seguridad</category><title>El Blog de D-Virus</title><description></description><link>http://d-virus.blogspot.com/</link><managingEditor>noreply@blogger.com (Daniel Rodriguez)</managingEditor><generator>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-529498189364947716.post-2735524225694733131</guid><pubDate>Thu, 16 Jun 2011 10:34:00 +0000</pubDate><atom:updated>2011-06-16T06:27:28.475-05:00</atom:updated><title>Hydra 6.4</title><description>&lt;a href=&quot;http://images.hotfixed.net/images/hydra6qkq.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 600px; height: 170px;&quot; src=&quot;http://images.hotfixed.net/images/hydra6qkq.png&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;http://www.thc.org/thc-hydra/&quot;&gt;Hydra&lt;/a&gt; es una herramienta desarrollada por &lt;a href=&quot;http://www.thc.org/&quot;&gt;The Hackers Choice&lt;/a&gt; para probar  contraseñas de diferentes servicios de red utilizando fuerza bruta, puede ser utilizado en Linux, Windows/Cygwin, Solaris 11, FreeBSD 8.1 and OSX.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Dentro de los servicios soportados en la versión 6.4 se encuentran:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;afp cisco cisco-aaa cisco-enable cvs firebird ftp[s] http[s]-{head|get} http[s]-{get|post}-form http-proxy icq irc imap ldap2 ldap3[-{cram|digest}md5] mssql mysql ncp nntp oracle oracle-listener oracle-sid pcnfs pop3 pcanywhere postgres rexec rlogin rsh sapr3 sip smb smtp smtp-enum snmp socks5 ssh svn teamspeak telnet vnc vmauthd xmpp AFP, Subversion/SVN, Firebird, LDAP2, Cisco AAA&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Esta versión ya cuenta con soporte para IPv6&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;Instalación en Linux:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Desde una terminal como usuario root ejecutamos los siguientes comandos:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;Descargamos Hydra&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;wget http://www.thc.org/releases/hydra-6.4-src.tar.gz&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; &quot;&gt;tar -zxvf hydra-6.4-src.tar.gz &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;cd hydra-6.4-src&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Compilamos Hydra&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;./configure &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;make&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;make install&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;y listo!!!&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Ejemplo hydra modo consola: &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;hydra -l john -p doe 192.168.0.1 imap PLAIN -s 143&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Para ejecutarlo gráficamente:&lt;/div&gt;&lt;div&gt;xhydra&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;En Target seleccionamos el host objetivo, o una lista de host, podemos seleccionar modo IPv6, puerto y protocolo.&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxhOc8IpvdiAiUyoVi77BFK6wfsO8aFbY7xROsSKk5Asx4_TRVWNPrXO1HddpOgs2vUzGlMqQrIP3dWYPEbYCibZ-rbjRTObNzeL31bneC-hbS9M5z_z48NTrfUK7izEt00_7zuTamRKcI/s1600/Selection_004.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxhOc8IpvdiAiUyoVi77BFK6wfsO8aFbY7xROsSKk5Asx4_TRVWNPrXO1HddpOgs2vUzGlMqQrIP3dWYPEbYCibZ-rbjRTObNzeL31bneC-hbS9M5z_z48NTrfUK7izEt00_7zuTamRKcI/s400/Selection_004.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5618774453478545330&quot; style=&quot;cursor: pointer; width: 378px; height: 400px; &quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Luego en la sección Passwords seleccionamos el nombre de usuario o una lista de nombre, un password o una lista de passwords&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 16px; &quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlCcuto-1FHn0kSOMPjcjdJlBYD4ngiCDaBf4JMyaoTtIRyCLlBAP4dA2PLHl-x5jyh5DzdRVnpxMyp6IvNtndwAyUe4GOYN4GVa8Lz_60xrPGWkO0dokHJobq6ZIqVCiDnmfUuOM5wPII/s1600/Selection_003.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlCcuto-1FHn0kSOMPjcjdJlBYD4ngiCDaBf4JMyaoTtIRyCLlBAP4dA2PLHl-x5jyh5DzdRVnpxMyp6IvNtndwAyUe4GOYN4GVa8Lz_60xrPGWkO0dokHJobq6ZIqVCiDnmfUuOM5wPII/s400/Selection_003.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5618774672963776722&quot; style=&quot;cursor: pointer; width: 377px; height: 400px; &quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;En las siguientes pestañas podemos personalizar tiempos, proxy , versiones de SNMP entre otros aspectos, para iniciar el ataque de fuerza bruta vamos a la pestaña start, y damos click sobre start hydra.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Para más información visita: &lt;a href=&quot;http://www.thc.org/thc-hydra/&quot;&gt;http://www.thc.org/thc-hydra/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</description><link>http://d-virus.blogspot.com/2011/06/hydra-64.html</link><author>noreply@blogger.com (Daniel Rodriguez)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxhOc8IpvdiAiUyoVi77BFK6wfsO8aFbY7xROsSKk5Asx4_TRVWNPrXO1HddpOgs2vUzGlMqQrIP3dWYPEbYCibZ-rbjRTObNzeL31bneC-hbS9M5z_z48NTrfUK7izEt00_7zuTamRKcI/s72-c/Selection_004.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-529498189364947716.post-218631593660353921</guid><pubDate>Wed, 15 Jun 2011 23:19:00 +0000</pubDate><atom:updated>2011-06-15T18:22:06.782-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">backtrack</category><category domain="http://www.blogger.com/atom/ns#">herramientas</category><category domain="http://www.blogger.com/atom/ns#">metasploit</category><category domain="http://www.blogger.com/atom/ns#">nessus</category><title>Nessus + Metasploit en Backtrack 5</title><description>&lt;a href=&quot;http://www.tenable.com/nessus/&quot; target=&quot;_blank&quot;&gt;Nessus&lt;/a&gt; es una aplicación para el escaneo de vulnerabilidades, una herramienta indispensable para auditorias de seguridad informática, Disponible para Linux, Windows, BSD, Mac OS X y Solaris.&lt;br /&gt;&lt;br /&gt;En este artículo veremos los pasos para instalar Nessus 4.4 .1  en Backtrack 5, los mismos pasos sirven para instalarlo en Ubuntu o Debian.&lt;br /&gt;&lt;br /&gt;Ingresamos a &lt;a href=&quot;http://www.tenable.com/download/&quot; target=&quot;_blank&quot;&gt;http://www.tenable.com/download/&lt;/a&gt; y seleccionamos la plataforma linux, luego aceptamos los terminos de la licencia para acceder a las opciones de descarga en donde seleccionaremos la versión de nessus para nuestro sistema operativo. En este caso descargaremos la versión para Ubuntu 10.04&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_010.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1555&quot; title=&quot;nessus ubuntu 10.04&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_010.png&quot; alt=&quot;nessus ubuntu 10.04&quot; width=&quot;269&quot; height=&quot;50&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Luego abrimos una Terminal, ubicamos la ruta donde descargamos el archivo y ejecutamos:&lt;br /&gt;&lt;br /&gt;sudo dpkg -i Nessus-4.4.1-ubuntu910_i386.deb&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Luego vamos a crear el usuario para administrar Nessus, ejecutamos:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;/opt/nessus/sbin/nessus-adduser&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Ingresamos el Login (usuario) el password con su confirmación y  habilitamos el usuario como administrador de Nessus, debemos ver algo como esto:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_0111.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1556&quot; title=&quot;usuario nessus&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_0111.png&quot; alt=&quot;usuario nessus&quot; width=&quot;610&quot; height=&quot;119&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_012.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1557&quot; title=&quot;admin nessus&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_012.png&quot; alt=&quot;admin nessus&quot; width=&quot;610&quot; height=&quot;204&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Registramos nessus&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Debemos registrarnos en el sitio de Nessus, puedes hacerlo siguiendo este enlace &lt;a href=&quot;http://www.tenable.com/register/&quot; target=&quot;_blank&quot;&gt;http://www.tenable.com/register/&lt;/a&gt;, Ingresamos a la opción HomeFeed, la cual es gratuita para uso personal.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_013.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1559&quot; title=&quot;nessus home&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_013.png&quot; alt=&quot;nessus home&quot; width=&quot;414&quot; height=&quot;259&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Diligenciamos el formulario, luego recibiremos un código en la cuenta de correo registrada.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_014.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1560&quot; title=&quot;registro nessus&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_014.png&quot; alt=&quot;registro nessus&quot; width=&quot;572&quot; height=&quot;332&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;En la terminal ejecutamos:&lt;br /&gt;&lt;br /&gt;sudo /opt/nessus/bin/nessus-fetch --register XXXX-XXXX-XXXX-XXXX-XXXX&lt;br /&gt;&lt;pre&gt;&lt;strong&gt;Nota: Reemplaza las XXXX por el código de registro&lt;/strong&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;strong&gt;Si todo sale bien recibiras el siguiente mensaje:&lt;/strong&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&lt;strong&gt;Your activation code has been registered properly - thank you.&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Luego del registro comenzará la actualización de los plugins de nessus, &lt;strong&gt;no canceles el proceso&lt;/strong&gt;, aunque no muestra nada espera hasta que salga algo como esto.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_015.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1562&quot; title=&quot;Actualizando plugins nessus&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_015.png&quot; alt=&quot;Actualizando plugins nessus&quot; width=&quot;625&quot; height=&quot;96&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;&lt;strong&gt;Iniciando Nessus:&lt;/strong&gt;&lt;/h2&gt;&lt;br /&gt;Luego de que se instalen los plugins vamos a iniciar el servicio de nessus, ejecutamos el comando:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;/etc/init.d/nessusd start&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Verificando el puerto&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Para verificar que nessus se esté ejecutando colocamos el comando:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;netstat -ntpl | grep nessusd&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_016.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1563&quot; title=&quot;proceso nessusd &quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_016.png&quot; alt=&quot;proceso nessusd&quot; width=&quot;557&quot; height=&quot;42&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Debemos verificar que nessus se encuentre corriendo en el puerto 8834.  Si esto es correcto ingresamos con nuestro navegador web a &lt;strong&gt;https://localhost:8834&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_017.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1564&quot; title=&quot;Selection_017&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_017-e1305737823746.png&quot; alt=&quot;&quot; width=&quot;580&quot; height=&quot;334&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Integrando Nessus con Metasploit&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Ejecutamos metasploit en nuestra consola&lt;br /&gt;&lt;br /&gt;cd /etc/pentest/framework3&lt;br /&gt;&lt;br /&gt;msfconsole&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_018.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1566&quot; title=&quot;Metasploit&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_018.png&quot; alt=&quot;Metasploit&quot; width=&quot;550&quot; height=&quot;264&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cargamos el módulo nessus desde metasploit  con el comando&lt;strong&gt; load nessus&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_019.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1567&quot; title=&quot;load nessus&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_019.png&quot; alt=&quot;load nessus&quot; width=&quot;577&quot; height=&quot;131&quot; /&gt;&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Nos conectamos a nuestro nessus con las credenciales configuradas en los pasos anteriores, ejecutamos:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;nessus_connect usuario:password@127.0.0.1 ok&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Donde usuario es el usuario que configuramos en la instalación de nessus y el password correspondiente. Si los datos son correctos debemos recibir el siguiente mensaje.&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_020.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1568&quot; title=&quot;conexión nessus&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_020.png&quot; alt=&quot;conexión nessus&quot; width=&quot;514&quot; height=&quot;41&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Ahora podemos lanzar un escaneo con nessus desde metasploit, primero debemos verificar las políticas disponibles o crear una desde la interfaz web de nessus.&lt;br /&gt;&lt;br /&gt;Para listar las politicas ejecutamos &lt;strong&gt;nessus_polycy_list&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_021.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1569&quot; title=&quot;Listado de políticas&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_021.png&quot; alt=&quot;Listado de políticas&quot; width=&quot;411&quot; height=&quot;187&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Para crear un escaneo ejecutamos  &lt;strong&gt;nessus_scan_new -idPolicy NombreEscaneo host o red&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Ejemplo:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt; &lt;/strong&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_022.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1570&quot; title=&quot;Nessus + metasploit scan&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_022-e1305742510806.png&quot; alt=&quot;Nessus + metasploit scan&quot; width=&quot;580&quot; height=&quot;43&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;En este caso lanzamos un escaneo llamado Escaneo2 utilizando la política 1 hacia la red 192.168.0.0/24 , luego con el comando &lt;strong&gt;nessus_report_list&lt;/strong&gt; generamos un reporte de los escaneos ejecutados.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_023.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1571&quot; title=&quot;Reporte nessus&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_023-e1305742705254.png&quot; alt=&quot;Reporte nessus&quot; width=&quot;580&quot; height=&quot;108&quot; /&gt;&lt;/a&gt;copiamos el ID del escaneo realizado y podemos sacar un reporte de los hosts y el número de vulnerabilidades encontradas.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_025.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1572&quot; title=&quot;reporte host nessus&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_025-e1305743283957.png&quot; alt=&quot;reporte host nessus&quot; width=&quot;580&quot; height=&quot;140&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Una vez identificados los host vamos a realizar un reporte del host que nos interese, para eso ejecutamos:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;nessus_report_host_ports &amp;lt;hostname&amp;gt; &amp;lt;report id&amp;gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_026.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1574&quot; title=&quot;Reporte por host nessus&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2011/05/Selection_026-e1305743671593.png&quot; alt=&quot;Reporte por host nessus&quot; width=&quot;580&quot; height=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Eso es todo, juega con los diferentes comandos disponibles para nessus desde la consola de metasploit.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Saludos!!!&lt;/strong&gt;</description><link>http://d-virus.blogspot.com/2011/06/nessus-metasploit-en-backtrack-5.html</link><author>noreply@blogger.com (Daniel Rodriguez)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-529498189364947716.post-2181869799229665973</guid><pubDate>Wed, 15 Jun 2011 23:11:00 +0000</pubDate><atom:updated>2011-06-15T18:23:05.216-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">asterisk</category><category domain="http://www.blogger.com/atom/ns#">fail2ban</category><category domain="http://www.blogger.com/atom/ns#">linux</category><category domain="http://www.blogger.com/atom/ns#">seguridad</category><title>Asegurando Asterisk con Fail2Ban</title><description>Actualmente es muy común encontrar sistemas de telefonía ip basados en asterisk en las empresas, estos sistemas tienen grandes ventajas como ahorro en costos, en teléfonos, permite mayor escalabilidad, y otras ventajas. Pero como todo sistema nada puede ser perfecto, los servidores asterisk son muy utilizados también por hackers y compañias que utilizan estos servicios para realizar llamadas a múltiples destinos desde nuestro PBX.&lt;br /&gt;&lt;br /&gt;Existen varias herramientas que permiten escanear servicios SIP y mostrarnos las extensiones y contraseñas configuradas, con esto registrar extensiones y realizar llamadas.&lt;br /&gt;&lt;br /&gt;Hoy veremos como asegurar nuestros servidores Asterisk con una herramienta llamada Fail2Ban, la cual crea reglas de iptables dependiendo de la conexiones  y comportamientos que se registren en los logs de nuestros servicios.&lt;div&gt;&lt;h1&gt;Instalación Debian/Ubuntu&lt;/h1&gt;&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;apt-get install python iptables fail2ban&lt;/pre&gt;&lt;br /&gt;&lt;h1&gt;Instalación CentOS&lt;/h1&gt;&lt;br /&gt;Primero instalaremos python  e iptables&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt; yum install python iptables&lt;/pre&gt;&lt;br /&gt;Nos ubicamos en la carpeta /usr/src/&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt; cd /usr/src/&lt;/pre&gt;&lt;br /&gt;Descargamos, Desempaquetamos e instalamos  Fail2Ban&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt; wget http://ufpr.dl.sourceforge.net/project/fail2ban/fail2ban-stable/fail2ban-0.8.4/fail2ban-0.8.4.tar.bz2&lt;/pre&gt;&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;tar -xjf fail2ban-0.8.4.tar.bz2&lt;/pre&gt;&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;cd fail2ban-0.8.4&lt;/pre&gt;&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;python setup.py install&lt;/pre&gt;&lt;br /&gt;Instalamos el script para que funcione como un servicio y le damos permisos para su ejecución&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;cp /usr/src/fail2ban-0.8.4/files/redhat-initd /etc/init.d/fail2ban&lt;/pre&gt;&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;chmod 755 /etc/init.d/fail2ban&lt;/pre&gt;&lt;br /&gt;&lt;h1&gt;Configuración&lt;/h1&gt;&lt;br /&gt;Ahora ingresamos a la carpeta de archivos para los filtros de Fail2Ban&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;cd /etc/fail2ban/filter.d&lt;/pre&gt;&lt;br /&gt;Creamos el archivo asterisk.conf&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;vi asterisk.conf&lt;/pre&gt;&lt;br /&gt;Pegamos en el archivo la siguiente información&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;# Fail2Ban configuration file&lt;br /&gt;#&lt;br /&gt;#&lt;br /&gt;# $Revision: 250 $&lt;br /&gt;#&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;[INCLUDES]&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;# Read common prefixes. If any customizations available -- read them from&lt;br /&gt;# common.local&lt;br /&gt;#before = common.conf&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;[Definition]&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#_daemon = asterisk&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;# Option:  failregex&lt;br /&gt;# Notes.:  regex to match the password failures messages in the logfile. The&lt;br /&gt;#          host must be matched by a group named &quot;host&quot;. The tag &quot;&amp;lt;HOST&amp;gt;&quot; can&lt;br /&gt;#          be used for standard IP/hostname matching and is only an alias for&lt;br /&gt;#          (?:::f{4,6}:)?(?P&amp;lt;host&amp;gt;\S+)&lt;br /&gt;# Values:  TEXT&lt;br /&gt;#&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;failregex = NOTICE.* .*: Registration from &#39;.*&#39; failed for &#39;&amp;lt;HOST&amp;gt;&#39; - Wrong password&lt;br /&gt;NOTICE.* .*: Registration from &#39;.*&#39; failed for &#39;&amp;lt;HOST&amp;gt;&#39; - No matching peer found&lt;br /&gt;NOTICE.* .*: Registration from &#39;.*&#39; failed for &#39;&amp;lt;HOST&amp;gt;&#39; - Username/auth name mismatch&lt;br /&gt;NOTICE.* .*: Registration from &#39;.*&#39; failed for &#39;&amp;lt;HOST&amp;gt;&#39; - Device does not match ACL&lt;br /&gt;NOTICE.* .*: Registration from &#39;.*&quot; .* failed for &#39;&amp;lt;HOST&amp;gt;&#39; - Peer is not supposed to register&lt;br /&gt;NOTICE.* .*: &amp;lt;HOST&amp;gt; failed to authenticate as ‘.*’$&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt; NOTICE.* .*: No registration for peer &#39;.*&#39; \(from &amp;lt;HOST&amp;gt;\)&lt;br /&gt;NOTICE.* .*: Host &amp;lt;HOST&amp;gt; failed MD5 authentication for &#39;.*&#39; (.*)&lt;br /&gt;NOTICE.* .*: Failed to authenticate user .*@&amp;lt;HOST&amp;gt;.*&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;# Option:  ignoreregex&lt;br /&gt;# Notes.:  regex to ignore. If this regex matches, the line is ignored.&lt;br /&gt;# Values:  TEXT&lt;br /&gt;#&lt;br /&gt;ignoreregex =&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Ahora editamos el archivo jail.conf (archivo de configuración de Fail2Ban)&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;cd /etc/fail2ban/&lt;/pre&gt;&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;vi jail.conf&lt;/pre&gt;&lt;br /&gt;Colocamos la siguiente información:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;[asterisk-iptables]&lt;br /&gt;enabled  = true&lt;br /&gt;filter   = asterisk&lt;br /&gt;action   = iptables-allports[name=ASTERISK, protocol=all]&lt;br /&gt;sendmail-whois[name=ASTERISK, dest=root@localhost, sender=fail2ban@pbx.dyndns.org]&lt;br /&gt;logpath  = /var/log/asterisk/messages&lt;br /&gt;maxretry = 5&lt;br /&gt;bantime = 1800&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;En la parte inicial de este archivo de configuración es importante que coloquemos nuestra dirección ip para que no nos bloquee el fail2ban, en el campo default búscamos el parámetro ignoreip y allí colocamos nuestras direcciones ip separadas por espacios. La siguiente imágen sirve de ejemplo:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2010/09/Pantallazo-root@trixbox1-etc-fail2ban.png&quot;&gt;&lt;img class=&quot;alignnone size-full wp-image-763&quot; title=&quot;Fail2ban&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2010/09/Pantallazo-root@trixbox1-etc-fail2ban.png&quot; alt=&quot;Fail2ban&quot; width=&quot;664&quot; height=&quot;473&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Ahora editamos el archivo logger.conf de asterisk&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;vi /etc/asterisk/logger.conf&lt;/pre&gt;&lt;br /&gt;Agregamos la siguiente información&lt;br /&gt;[general]&lt;br /&gt;dateformat=%F %T&lt;br /&gt;Verificamos que el campo messages tenga el parámetro notice.&lt;br /&gt;&lt;br /&gt;luego de ejecutar estos dos pasos debe quedar algo como esto:&lt;br /&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2010/09/Pantallazo-root@trixbox1-etc-fail2ban-1.png&quot;&gt;&lt;img class=&quot;alignnone size-full wp-image-764&quot; title=&quot;fail2ban - asterisk&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2010/09/Pantallazo-root@trixbox1-etc-fail2ban-1.png&quot; alt=&quot;fail2ban - asterisk&quot; width=&quot;576&quot; height=&quot;439&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Para que Asterisk tome los cambios ejecutamos:&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;asterisk -rx &quot;logger reload&quot;&lt;/pre&gt;&lt;br /&gt;Iniciamos los servicios iptables y fail2ban&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;/etc/init.d/iptables start&lt;/pre&gt;&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;/etc/init.d/fail2ban start&lt;/pre&gt;&lt;br /&gt;&lt;h1&gt;Probando el funcionamiento:&lt;/h1&gt;&lt;br /&gt;Para las pruebas he configurado un softphone con una extensión iax y un password cualquiera.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: monospace; line-height: normal; font-size: 12px;&quot;&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2010/09/zoiper.png&quot;&gt;&lt;img class=&quot;alignnone size-full wp-image-775&quot; title=&quot;zoiper&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2010/09/zoiper.png&quot; alt=&quot;Zoiper&quot; width=&quot;600&quot; height=&quot;247&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Al verificar los logs del /var/log/asterisk/messages, aparecieron estos registros:&lt;br /&gt;&lt;br /&gt;[2010-09-30 11:59:04] NOTICE[2935] chan_iax2.c: No registration for peer &#39;1005&#39; (from 186.80.111.59)&lt;br /&gt;&lt;br /&gt;[2010-09-30 11:59:04] NOTICE[2940] chan_iax2.c: No registration for peer &#39;1005&#39; (from 186.80.111.59)&lt;br /&gt;&lt;br /&gt;[2010-09-30 11:59:07] NOTICE[2934] chan_iax2.c: No registration for peer &#39;1005&#39; (from 186.80.111.59)&lt;br /&gt;&lt;br /&gt;Con estos datos Fail2Ban se encarga de crear las reglas de iptables, como podemos ver luego de realizar 3 conexiones fallidas a nuestra PBX, se cra una regla de Iptables que Banea la ip desde donde se realizó la prueba.&lt;br /&gt;&lt;pre id=&quot;terminal&quot;&gt;iptables -L&lt;/pre&gt;&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;http://hotfixed.net/wp-content/uploads/2010/09/iptables-asterisk.png&quot;&gt;&lt;img class=&quot;alignnone size-full wp-image-766&quot; title=&quot;iptables-asterisk&quot; src=&quot;http://hotfixed.net/wp-content/uploads/2010/09/iptables-asterisk.png&quot; alt=&quot;iptables-asterisk&quot; width=&quot;524&quot; height=&quot;72&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Bueno, como vemos Fail2Ban es una herramienta de gran ayuda para proteger nuestros servidores asterisk, próximamente veremos nuevas formas de asegurar nuestros servidores de telefonía ip.&lt;/div&gt;</description><link>http://d-virus.blogspot.com/2011/06/asegurando-asterisk-con-fail2ban.html</link><author>noreply@blogger.com (Daniel Rodriguez)</author><thr:total>0</thr:total></item></channel></rss>