viernes, 4 de marzo de 2011

VI Búsqueda y explotación de vulnerabilidades

6.- Búsqueda y explotación de vulnerabilidades.

Existen numerosas formas de buscar vulnerabilidades que afecten a un sistema, la más sencilla es, buscar en google vulnerabilidades para un determinado programa o servicio.
Por ejemplo, en la imagen anterior, tras realizar el telnet a rediris, se puede ver que emplea la versión 0.9.8g de OpenSSL, como recordaba que la versión actual era la 1.0.0 busqué vulnerabilidades para este servicio en google encontrándome entre otras cosas los dos siguientes enlaces:
  • http://195.30.6.166/news/vulnerabilities.html: en este enlace podemos ver la lista de vulnerabilidades y revisiones de openssl. Entre otras cosas nos encontramos que a Junio de 2010 rediris está ejecutando una versión de openSSL del 2008 sin actualizar; en esta misma página podemos ver un buen conjunto de vulnerabilidades para esta versión que van desde fallos que permitirían denegaciones de servicios hasta revelar la información encriptada.
  • http://www.ulises2k.com.ar/textos/laboratorio_practico_de_explicacion_de_la_vulnerabilidad_de_libssl_en_debian: guía paso a paso, inicialmente pensada como práctica de laboratorio en la que se puede ver cómo explotar las vulnerabilidades de openSSL y explicación de cómo podrían ser empleadas para revelar el contenido encriptado y esto emplearse para capturar usuarios y contraseñas de usuarios autenticados.
También podríamos buscar vulnerabilidades empleando alguno de los programas que nos permiten realizar esta tarea de manera automatizada. Al margen de los programas que emplearé en el siguiente punto mucho más completos, podemos encontrar en Internet numerosos programas y script para otros, que nos permiten buscar vulnerabilidades conocidas para algunos servicios o programas. Uno de ellos es Nikto (http://www.cirt.net/nikto2), un escáner para servidores web que permite chequear versiones desfasadas de más de 950 servidores, problemas específicos en más de 260 servidores y unos 6100 ficheros/CGIs que pueden resultar potencialmente peligrosos en cualquier servidor web.
A continuación podemos ver una “pequeña parte” del resultado de escánear el servidor web simulado en el honeypot de un compañero:
perl nikto.pl -h 80.103.112.96
- ***** SSL support not available (see docs for SSL install instructions) *****
- Nikto v2.1.1
---------------------------------------------------------------------------
+ Target IP: 80.103.112.96
+ Target Hostname: 96.pool80-103-112.dynamic.orange.es
+ Target Port: 80
+ Start Time: 2010-06-25 21:03:53
---------------------------------------------------------------------------
+ Server: Apache/1.3.23 (Unix) (SuSE/Linux) ApacheJServ/1.2.2 mod_fastcgi/2.2.2 mod_perl/1.34 PHP/4.1.0 mod_ssl/2.8.7 OpenSSL/0.9.6c
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ Apache/1.3.23 appears to be outdated (current is at least Apache/2.2.15). Apache 1.3.42 and 2.0.63 are also current.
+ Number of sections in the version string differ from those in the database, the server reports: apachejserv/1.2.2 while the database has: 1.1.2.105. This may cause false positives.
+ mod_fastcgi/2.2.2 appears to be outdated (current is at least 2.4.6)
+ Number of sections in the version string differ from those in the database, the server reports: mod_perl/1.34 while the database has: 5.8. This may cause false positives.
+ mod_perl/1.34 appears to be outdated (current is at least 5.8)
+ PHP/4.1.0 appears to be outdated (current is at least 5.3.2)
+ Number of sections in the version string differ from those in the database, the server reports: mod_ssl/2.8.7 while the database has: 2.8.31. This may cause false positives.
+ Number of sections in the version string differ from those in the database, the server reports: openssl/0.9.6c while the database has: 1.0.0. This may cause false positives.
+ OpenSSL/0.9.6c appears to be outdated (current is at least 1.0.0) (may depend on server version)
+ OSVDB-838: Apache/1.3.23 - Apache 1.x up 1.2.34 are vulnerable to a remote DoS and possible code execution. http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-0392.
+ OSVDB-4552: Apache/1.3.23 - Apache 1.3 below 1.3.27 are vulnerable to a local buffer overflow which allows attackers to kill any process on the system. http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-0839.
+ OSVDB-2733: Apache/1.3.23 - Apache 1.3 below 1.3.29 are vulnerable to overflows in mod_rewrite and mod_cgi. http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0542.
+ PHP/4.1.0 mod_ssl/2.8.7 OpenSSL/0.9.6c - PHP below 4.3.3 may allow local attackers to safe mode and gain access to unauthorized files. http://www.securityfocus.com/bid/8201.
+ ETag header found on server, inode: 844678, size: 0, mtime: 0xba4fe6a1e
+ ERROR: /vgn/jsp/previewer returned an error: error reading HTTP response
+ ERROR: /vgn/jsp/style returned an error: opening stream: can't connect (timeout): Operación en curso
+ ERROR: /vgn/legacy/edit returned an error: error reading HTTP response
+ ERROR: /webtop/wdk/samples/index.jsp returned an error: error reading HTTP response
+ ERROR: /WEB-INF/web.xml returned an error: opening stream: can't connect (timeout): Operación en curso
+ ERROR: /forum/admin/wwforum.mdb returned an error: opening stream: can't connect (timeout): Operación en curso
+ ERROR: /newuser?Image=../../database/rbsserv.mdb returned an error: error reading HTTP response
+ ERROR: /shopdbtest.asp returned an error: error reading HTTP response
+ ERROR: / returned an error: invalid HTTP response
+ ERROR: / returned an error: invalid HTTP response
+ ERROR: // returned an error: invalid HTTP response
+ /themes/mambosimple.php?detection=detected&sitename=</title><script>alert(document.cookie)</script>: Mambo PHP Portal/Server is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html.
+ /index.php?option=search&searchword=<script>alert(document.cookie);</script>: Mambo Site Server 4.0 build 10 is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html.
+ /emailfriend/emailnews.php?id=\"<script>alert(document.cookie)</script>: Mambo PHP Portal/Server is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html.
+ /emailfriend/emailfaq.php?id=\"<script>alert(document.cookie)</script>: Mambo PHP Portal/Server is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html.
+ /emailfriend/emailarticle.php?id=\"<script>alert(document.cookie)</script>: Mambo PHP Portal/Server is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html.
+ /administrator/upload.php?newbanner=1&choice=\"<script>alert(document.cookie)</script>: Mambo PHP Portal/Server is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html.
+ /administrator/popups/sectionswindow.php?type=web&link=\"<script>alert(document.cookie)</script>: Mambo PHP Portal/Server is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html.
+ /administrator/gallery/view.php?path=\"<script>alert(document.cookie)</script>: Mambo PHP Portal/Server is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html.
+ /administrator/gallery/uploadimage.php?directory=\"<script>alert(document.cookie)</script>: Mambo PHP Portal/Server is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html.
+ /administrator/gallery/navigation.php?directory=\"<script>alert(document.cookie)</script>: Mambo PHP Portal/Server is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html.



 << Anterior                                                                                                                Siguiente >>

Para ver el resto de manuales puede acudir al índice de temas de seguridad en el enlace

No hay comentarios: