FIST Conference Abril/Madrid 2005
Proteccin contra Hacking con Google
Pedro Pablo Prez Garca Gonzalo lvarez Maran
INDICE
o o o o Introduccin Recopilacin de informacin Proteccin de la informacin Conclusiones
CONFERENCIAS FIST
-2-
NeuroCrypt, S.L.
Anatoma de un ataque
Localizar el Objetivo
Recopilacin de Informacin
Acceso Remoto
Acceso Local Escalada de privilegios
ADMIN
Borrado de Huellas / Pistas
Mantenimiento de Acceso
CONFERENCIAS FIST
-3-
NeuroCrypt, S.L.
2.- Recopilacin
o Recopilacin en remoto
Pasivo
Tradicional Buscador
Activo
o Recopilacin in situ
CONFERENCIAS FIST
-4-
NeuroCrypt, S.L.
2.- Recopilacin
o o o o www.iana.org www.ripe.net www.arin.net www.apnic.net : Asigna Direcciones : Direcciones IP ( Europa ) : Direcciones IP ( America / Africa ) : Direcciones IP ( Asia / Pacifico ) : Todos los dominios : Dominios .es : Informacin Empresarial ( EDGAR ) : Informacin Empresarial ( BORME ) : Informacin Empresarial ( BORME ) : Nmeros de Telefono ( Espaa ) : Nmeros de Telefono ( Mundial ) : Nmeros de Telefono ( Inversa )
o www.allwhois.com o www.nic.es o www.sec.gov o www.axesor.es o www.nomefio.com o www.paginasamarillas.es o www.globalyp.com o www.infobel.com
CONFERENCIAS FIST
-5-
NeuroCrypt, S.L.
2.- Recopilacin
CONFERENCIAS FIST
-6-
NeuroCrypt, S.L.
2.- Recopilacin
CONFERENCIAS FIST
-7-
NeuroCrypt, S.L.
2.- Recopilacin
Parmetros:
SITE: Sitio FILETYPE: Tipo de fichero especifico LINK: Enlaces CACHE: Cach de google INTITLE:Ttulo de la pgina INURL: Direccin de la pgina RELATED: Relativo DEFINE: Definicin PHONEBOOK: Direcciones
Caracteres:
Incluir/Excluir : (+) (-) Frase exacta : () Comodines : (.) (*)
CONFERENCIAS FIST
-8-
NeuroCrypt, S.L.
2.- Recopilacin
Servidor proxy:
www.google.es/translate?u=http://www.playboy.com&langpair=en|en
Navegacin annima:
Uso del cach
Cabeza de puente:
Indexar pgina con miles de URL de ataque
CONFERENCIAS FIST
-9-
NeuroCrypt, S.L.
2.- Recopilacin
Crawl: Listados:
site: www.microsoft.com site: microsoft.com www.microsoft.com
intitle: Index.of/admin intitle: index.of apache server at allintitle: "index of/root"
Pginas por defecto:
intitle:test.page.for.apache "it worked" allintitle:Netscape FastTrack Server Home Page intitle:"Welcome to Windows 2000 Internet Services" intitle:welcome.to.IIS.4.0 allintitle:Welcome to Windows XP Server Internet Services allintitle:"Welcome to Internet Information Server" allintitle:Netscape Enterprise Server Home Page allintitle:Netscape FASTTRACK Server Home Page
CONFERENCIAS FIST
-10-
NeuroCrypt, S.L.
2.- Recopilacin
CONFERENCIAS FIST
-11-
NeuroCrypt, S.L.
2.- Recopilacin
Documentos: Errores:
intitle:"Apache HTTP Server" intitle:"documentation"
intitle:"Error using Hypernews" "Server Software" "HTTP_USER_AGENT=Googlebot" "HTTP_USER_AGENT=Googlebot" TNS_ADMIN inurl:/iisadmpwd/
CGI Scanner: PortScanning:
inurl:5800 "VNC Desktop" inurl:5800 inurl:webmin inurl:10000 intitle:the page cannot be found please * * following Internet * Services
Fingerprinting:
CONFERENCIAS FIST
-12-
NeuroCrypt, S.L.
2.- Recopilacin
CONFERENCIAS FIST
-13-
NeuroCrypt, S.L.
2.- Recopilacin
Login:
inurl:/admin/login.asp
Especficos como MS Outlook OWA : inurl:/outlook "Exchange Users Only +intitle:Outlook Web Access -inurl:microsoft allintitle:Outlook Web Access Logon
OTROS?
ColdFusion pgina administrador Citrix Metaframe Windows Remote Desktop
CONFERENCIAS FIST
-14-
NeuroCrypt, S.L.
2.- Recopilacin
CONFERENCIAS FIST
-15-
NeuroCrypt, S.L.
2.- Recopilacin
Otros :
inurl:"auth_user_file.txt" "Index of /admin" "Index of /password" "Index of /mail" "Index of /" +passwd "Index of /" +password.txt "Index of /" +.htaccess index of ftp +.mdb allinurl:/cgi-bin/ +mailto alliurl:phpinfo.php administrators.pwd.index authors.pwd.index service.pwd.index filetype:config web gobal.asax index http://www.googlemania.com/googledoorks.php http://johnny.ihackstuff.com
CONFERENCIAS FIST
-16-
NeuroCrypt, S.L.
2.- Recopilacin
CONFERENCIAS FIST
-17-
NeuroCrypt, S.L.
2.- Recopilacin
Otros :
allintitle: "index of/admin" allintitle: "index of/root" allintitle: sensitive filetype:doc allintitle: restricted filetype :mail allintitle: restricted filetype:doc site:gov inurl:passwd filetype:txt inurl:admin filetype:db inurl:iisadmin inurl:"auth_user_file.txt" inurl:"wwwroot/*." WS_FTP.LOG top secret site:mil confidential site:mil allinurl:winnt/system32/ (get cmd.exe) allinurl:/bash_history
CONFERENCIAS FIST
-18-
NeuroCrypt, S.L.
2.- Recopilacin
CONFERENCIAS FIST
-19-
NeuroCrypt, S.L.
2.- Recopilacin
Otros :
intitle:"Index of" .sh_history intitle:"Index of" .bash_history intitle:"index of" passwd intitle:"index of" people.lst intitle:"index of" pwd.db intitle:"index of" etc/shadow intitle:"index of" spwd intitle:"index of" master.passwd intitle:"index of" htpasswd intitle:"index of" members OR accounts intitle:"index of" user_carts OR user_cart _vti_inf.html authors.pwd shtml.exe showcode.asp imagemap.exe service.pwd administrators.pwd fpcount.exe sendmail.cfm users.pwd shtml.dll default.asp getFile.cfm
CONFERENCIAS FIST
-20-
NeuroCrypt, S.L.
2.- Recopilacin
CONFERENCIAS FIST
-21-
NeuroCrypt, S.L.
2.- Recopilacin
CONFERENCIAS FIST
-22-
NeuroCrypt, S.L.
2.- Recopilacin
Automtico: SITEDIGGER (FOUNDSTONE)
CONFERENCIAS FIST
-23-
NeuroCrypt, S.L.
2.- Recopilacin
MAS: johnny.ihackstuff.com/index.php?module=prodreviews
CONFERENCIAS FIST
-24-
NeuroCrypt, S.L.
2.- Recopilacin
CONFERENCIAS FIST
-25-
NeuroCrypt, S.L.
3.- Proteccin
o Poltica de seguridad o Proteger el servidor web o Auditora de hacking Google o Eliminacin de pginas de Google o Google Hack Honeypot (GHH)
CONFERENCIAS FIST
-26-
NeuroCrypt, S.L.
Poltica de seguridad
o Publicacin de informacin en la web o Envo de mensajes a listas/grupos de noticias
No archivar mensajes en grupos de noticias No revelar informacin acerca de sistemas, arquitectura, personal, etc.
o Poltica de seguridad web o Auditora peridica de hacking Google
CONFERENCIAS FIST -27NeuroCrypt, S.L.
Proteger el servidor web
o No hacer accesible informacin privada (indexacin) o No permitir listados de directorios o Bloqueo de buscadores mediante robots.txt
User-agent: googlebot Disallow: /directorio/archivos
o No indexar:
<META NAME="GOOGLEBOT" CONTENT="NOINDEX, NOFOLLOW">
o No almacenar en cach:
<META NAME=GOOGLEBOT CONTENT=NOARCHIVE> <META NAME=GOOGLEBOT CONTENT=NOSNIPPET>
o Proteccin mediante contrasea
CONFERENCIAS FIST -28NeuroCrypt, S.L.
Proteger el servidor web
o Eliminacin de pginas y aplicaciones predeterminadas
Directorios, archivos y aplicaciones de ejemplo
o Adecuada gestin de errores
Mensaje de error significativo al usuario Informacin de diagnstico al administrador NINGUNA informacin al atacante Consistencia entre los mensajes de error Deteccin de errores repetitivos
CONFERENCIAS FIST
-29-
NeuroCrypt, S.L.
Auditora de hacking Google
o Gooscan
Para Linux Viola la poltica de Google
o Athena:
Para .NET Viola la poltica de Google
o Sitedigger
Similar a Athena Basado en la API de Google
o Wikto
Escner de vulnerabilidades
CONFERENCIAS FIST -30NeuroCrypt, S.L.
Eliminacin de pginas de Google
o Eliminacin en local o Eliminacin de la cach de Google desde la pgina de eliminaciones services.google.com/urlconsole/controller
Dirigirle al archivo robots.txt Utilizar una directiva META Opcin de eliminacin de enlaces antiguos
CONFERENCIAS FIST
-31-
NeuroCrypt, S.L.
Google Hack Honeypot
o GHH emula el comportamiento de firmas GHDB para ser encontrado por Google o Por ahora slo para Apache y PHP o Una vez instalado, se debe hacer que Google lo indexe o Los logs registran quin visita el sitio a travs de Google (Google hackers) o Se puede personalizar o Incorporar un visor especializado
CONFERENCIAS FIST -32NeuroCrypt, S.L.
4.- Conclusiones
o Auditor Google como herramienta fcil para obtener informacin o Administrador Minimizar el grado de informacin accesible
CONFERENCIAS FIST
-33-
NeuroCrypt, S.L.
Preguntas?
o http://www.iec.csic.es/~gonzalo/
CONFERENCIAS FIST -34NeuroCrypt, S.L.
Creative Commons Attribution-NoDerivs 2.0
You are free: to copy, distribute, display, and perform this work to make commercial use of this work Under the following conditions: Attribution. You must give the original author credit.
No Derivative Works. You may not alter, transform, or build upon this work. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the author. Your fair use and other rights are in no way affected by the above. This work is licensed under the Creative Commons Attribution-NoDerivs License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
CONFERENCIAS FIST
-35-
NeuroCrypt, S.L.