FIST Conference Abril/Madrid 2005



  Protección contra
  Hacking con Google



  Pedro Pablo Pérez García
  Gonzalo Álvarez Marañón
INDICE
 o   Introducción
 o   Recopilación de información
 o   Protección de la información
 o   Conclusiones




CONFERENCIAS FIST           -2-     NeuroCrypt, S.L.
Anatomía de un ataque
                                  Localizar el Objetivo


                              Recopilación de Información


                                    Acceso Remoto


                                     Acceso Local

               “Escalada de
               privilegios”          ADMIN


                               Borrado de Huellas / Pistas


                                Mantenimiento de Acceso




CONFERENCIAS FIST                                 -3-        NeuroCrypt, S.L.
2.- Recopilación
 o Recopilación en remoto

     
         Pasivo
             – Tradicional
             – Buscador


        Activo


 o Recopilación in situ


CONFERENCIAS FIST            -4-   NeuroCrypt, S.L.
2.- Recopilación
 o   www.iana.org            : Asigna Direcciones
 o   www.ripe.net            : Direcciones IP ( Europa )
 o   www.arin.net            : Direcciones IP ( America / Africa )
 o   www.apnic.net           : Direcciones IP ( Asia / Pacifico )

 o www.allwhois.com          : Todos los dominios
 o www.nic.es                : Dominios .es

 o www.sec.gov               : Información Empresarial ( EDGAR )
 o www.axesor.es             : Información Empresarial ( BORME )
 o www.nomefio.com           : Información Empresarial ( BORME )

 o www.paginasamarillas.es   : Números de Telefono ( España )
 o www.globalyp.com          : Números de Telefono ( Mundial )
 o www.infobel.com           : Números de Telefono ( Inversa )


CONFERENCIAS FIST                -5-                     NeuroCrypt, S.L.
2.- Recopilación




CONFERENCIAS FIST   -6-   NeuroCrypt, S.L.
2.- Recopilación




CONFERENCIAS FIST   -7-   NeuroCrypt, S.L.
2.- Recopilación

    Parámetros:
           SITE: Sitio
           FILETYPE: Tipo de fichero especifico
           LINK: Enlaces
           CACHE: Caché de google
           INTITLE:Título de la página
           INURL: Dirección de la página
           RELATED: Relativo
           DEFINE: Definición
           PHONEBOOK: Direcciones

    Caracteres:
           Incluir/Excluir : (+) (-)
           Frase exacta : (“)
           Comodines : (.) (*)



CONFERENCIAS FIST                      -8-        NeuroCrypt, S.L.
2.- Recopilación

    Servidor proxy:
           www.google.es/translate?u=http://www.playboy.com&langpair=en|en

    Navegación anónima:
           Uso del caché

    Cabeza de puente:
           Indexar página con miles de URL de ataque




CONFERENCIAS FIST                     -9-                  NeuroCrypt, S.L.
2.- Recopilación
    Crawl:          site: www.microsoft.com
                    site: microsoft.com –www.microsoft.com


    Listados:       intitle: Index.of/admin
                    intitle: index.of apache server at
                    allintitle: "index of/root"

    Páginas 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.- Recopilación




CONFERENCIAS FIST   -11-   NeuroCrypt, S.L.
2.- Recopilación
    Documentos:       intitle:"Apache HTTP Server"
                      intitle:"documentation"


    Errores:          intitle:"Error using Hypernews" "Server Software"
                      "HTTP_USER_AGENT=Googlebot"
                      "HTTP_USER_AGENT=Googlebot" TNS_ADMIN

    CGI Scanner:      inurl:/iisadmpwd/


    PortScanning:     inurl:5800
                      "VNC Desktop" inurl:5800
                      inurl:webmin inurl:10000

    Fingerprinting:   intitle:”the page cannot be found” “please * *
                      following” “Internet * Services”



CONFERENCIAS FIST               -12-                      NeuroCrypt, S.L.
2.- Recopilación




CONFERENCIAS FIST   -13-   NeuroCrypt, S.L.
2.- Recopilación
    Login:          inurl:/admin/login.asp



          Específicos como MS Outlook OWA :

          inurl:/outlook      "Exchange Users Only“
          +intitle:Outlook Web Access -inurl:microsoft
          allintitle:Outlook Web Access Logon



    ¿OTROS?

                    ColdFusion página administrador
                    Citrix Metaframe
                    Windows Remote Desktop


CONFERENCIAS FIST                       -14-             NeuroCrypt, S.L.
2.- Recopilación




CONFERENCIAS FIST   -15-   NeuroCrypt, S.L.
2.- Recopilación

    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.- Recopilación




CONFERENCIAS FIST   -17-   NeuroCrypt, S.L.
2.- Recopilación
    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.- Recopilación




CONFERENCIAS FIST   -19-   NeuroCrypt, S.L.
2.- Recopilación
    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                service.pwd                 users.pwd
          authors.pwd                  administrators.pwd          shtml.dll
          shtml.exe                    fpcount.exe                 default.asp
          showcode.asp                 sendmail.cfm                getFile.cfm
          imagemap.exe



CONFERENCIAS FIST                       -20-                     NeuroCrypt, S.L.
2.- Recopilación




CONFERENCIAS FIST   -21-   NeuroCrypt, S.L.
2.- Recopilación




CONFERENCIAS FIST   -22-   NeuroCrypt, S.L.
2.- Recopilación
    Automático: SITEDIGGER (FOUNDSTONE)




CONFERENCIAS FIST        -23-             NeuroCrypt, S.L.
2.- Recopilación
   MAS: johnny.ihackstuff.com/index.php?module=prodreviews




CONFERENCIAS FIST              -24-              NeuroCrypt, S.L.
2.- Recopilación




CONFERENCIAS FIST   -25-   NeuroCrypt, S.L.
3.- Protección

     o Política de seguridad
     o Proteger el servidor web
     o Auditoría de hacking Google
     o Eliminación de páginas de Google
     o Google Hack Honeypot (GHH)




CONFERENCIAS FIST      -26-         NeuroCrypt, S.L.
Política de seguridad

     o Publicación de información en la web
     o Envío de mensajes a listas/grupos de
       noticias
           No archivar mensajes en grupos de noticias
           No revelar información acerca de sistemas,
            arquitectura, personal, etc.
     o Política de seguridad web
     o Auditoría periódica de hacking Google

CONFERENCIAS FIST            -27-           NeuroCrypt, S.L.
Proteger el servidor web
 o No hacer accesible información privada (indexación)
 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 Protección mediante contraseña
CONFERENCIAS FIST                 -28-    NeuroCrypt, S.L.
Proteger el servidor web
     o Eliminación de páginas y aplicaciones
       predeterminadas
           Directorios, archivos y aplicaciones de ejemplo
     o Adecuada gestión de errores
           Mensaje de error significativo al usuario
           Información de diagnóstico al administrador
           NINGUNA información al atacante
        
            Consistencia entre los mensajes de error
        
            Detección de errores repetitivos


CONFERENCIAS FIST                -29-              NeuroCrypt, S.L.
Auditoría de hacking Google
     o Gooscan
           Para Linux
           Viola la política de Google
     o Athena:
        
            Para .NET
           Viola la política de Google
     o Sitedigger
        
            Similar a Athena
        
            Basado en la API de Google
     o Wikto
           Escáner de vulnerabilidades
CONFERENCIAS FIST                -30-     NeuroCrypt, S.L.
Eliminación de páginas de
     Google
     o Eliminación en local
     o Eliminación de la caché de Google desde
       la página de eliminaciones
       services.google.com/urlconsole/controller
           Dirigirle al archivo robots.txt
           Utilizar una directiva META
           Opción de eliminación 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 sólo para Apache y PHP
     o Una vez instalado, se debe hacer que
       Google lo indexe
     o Los logs registran quién visita el sitio a
       través de Google (Google hackers)
     o Se puede personalizar
     o Incorporará un visor especializado
CONFERENCIAS FIST        -32-          NeuroCrypt, S.L.
4.- Conclusiones


     o Auditor  Google como herramienta fácil
       para obtener información

     o Administrador  Minimizar el grado de
       información accesible



CONFERENCIAS FIST       -33-        NeuroCrypt, S.L.
¿Preguntas?




     o http://www.iec.csic.es/~gonzalo/

CONFERENCIAS FIST        -34-         NeuroCrypt, 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.

Proteccion Contra Hacking con Google

  • 1.
    FIST Conference Abril/Madrid2005 Protección contra Hacking con Google Pedro Pablo Pérez García Gonzalo Álvarez Marañón
  • 2.
    INDICE o Introducción o Recopilación de información o Protección de la información o Conclusiones CONFERENCIAS FIST -2- NeuroCrypt, S.L.
  • 3.
    Anatomía de unataque Localizar el Objetivo Recopilación de Información Acceso Remoto Acceso Local “Escalada de privilegios” ADMIN Borrado de Huellas / Pistas Mantenimiento de Acceso CONFERENCIAS FIST -3- NeuroCrypt, S.L.
  • 4.
    2.- Recopilación oRecopilación en remoto  Pasivo – Tradicional – Buscador  Activo o Recopilación in situ CONFERENCIAS FIST -4- NeuroCrypt, S.L.
  • 5.
    2.- Recopilación o www.iana.org : Asigna Direcciones o www.ripe.net : Direcciones IP ( Europa ) o www.arin.net : Direcciones IP ( America / Africa ) o www.apnic.net : Direcciones IP ( Asia / Pacifico ) o www.allwhois.com : Todos los dominios o www.nic.es : Dominios .es o www.sec.gov : Información Empresarial ( EDGAR ) o www.axesor.es : Información Empresarial ( BORME ) o www.nomefio.com : Información Empresarial ( BORME ) o www.paginasamarillas.es : Números de Telefono ( España ) o www.globalyp.com : Números de Telefono ( Mundial ) o www.infobel.com : Números de Telefono ( Inversa ) CONFERENCIAS FIST -5- NeuroCrypt, S.L.
  • 6.
  • 7.
  • 8.
    2.- Recopilación Parámetros: SITE: Sitio FILETYPE: Tipo de fichero especifico LINK: Enlaces CACHE: Caché de google INTITLE:Título de la página INURL: Dirección de la página RELATED: Relativo DEFINE: Definición PHONEBOOK: Direcciones Caracteres: Incluir/Excluir : (+) (-) Frase exacta : (“) Comodines : (.) (*) CONFERENCIAS FIST -8- NeuroCrypt, S.L.
  • 9.
    2.- Recopilación Servidor proxy: www.google.es/translate?u=http://www.playboy.com&langpair=en|en Navegación anónima: Uso del caché Cabeza de puente: Indexar página con miles de URL de ataque CONFERENCIAS FIST -9- NeuroCrypt, S.L.
  • 10.
    2.- Recopilación Crawl: site: www.microsoft.com site: microsoft.com –www.microsoft.com Listados: intitle: Index.of/admin intitle: index.of apache server at allintitle: "index of/root" Páginas 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.
  • 11.
  • 12.
    2.- Recopilación Documentos: intitle:"Apache HTTP Server" intitle:"documentation" Errores: intitle:"Error using Hypernews" "Server Software" "HTTP_USER_AGENT=Googlebot" "HTTP_USER_AGENT=Googlebot" TNS_ADMIN CGI Scanner: inurl:/iisadmpwd/ PortScanning: inurl:5800 "VNC Desktop" inurl:5800 inurl:webmin inurl:10000 Fingerprinting: intitle:”the page cannot be found” “please * * following” “Internet * Services” CONFERENCIAS FIST -12- NeuroCrypt, S.L.
  • 13.
  • 14.
    2.- Recopilación Login: inurl:/admin/login.asp Específicos como MS Outlook OWA : inurl:/outlook "Exchange Users Only“ +intitle:Outlook Web Access -inurl:microsoft allintitle:Outlook Web Access Logon ¿OTROS? ColdFusion página administrador Citrix Metaframe Windows Remote Desktop CONFERENCIAS FIST -14- NeuroCrypt, S.L.
  • 15.
  • 16.
    2.- Recopilación 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.
  • 17.
  • 18.
    2.- Recopilación 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.
  • 19.
  • 20.
    2.- Recopilación 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 service.pwd users.pwd authors.pwd administrators.pwd shtml.dll shtml.exe fpcount.exe default.asp showcode.asp sendmail.cfm getFile.cfm imagemap.exe CONFERENCIAS FIST -20- NeuroCrypt, S.L.
  • 21.
  • 22.
  • 23.
    2.- Recopilación Automático: SITEDIGGER (FOUNDSTONE) CONFERENCIAS FIST -23- NeuroCrypt, S.L.
  • 24.
    2.- Recopilación MAS: johnny.ihackstuff.com/index.php?module=prodreviews CONFERENCIAS FIST -24- NeuroCrypt, S.L.
  • 25.
  • 26.
    3.- Protección o Política de seguridad o Proteger el servidor web o Auditoría de hacking Google o Eliminación de páginas de Google o Google Hack Honeypot (GHH) CONFERENCIAS FIST -26- NeuroCrypt, S.L.
  • 27.
    Política de seguridad o Publicación de información en la web o Envío de mensajes a listas/grupos de noticias  No archivar mensajes en grupos de noticias  No revelar información acerca de sistemas, arquitectura, personal, etc. o Política de seguridad web o Auditoría periódica de hacking Google CONFERENCIAS FIST -27- NeuroCrypt, S.L.
  • 28.
    Proteger el servidorweb o No hacer accesible información privada (indexación) 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 Protección mediante contraseña CONFERENCIAS FIST -28- NeuroCrypt, S.L.
  • 29.
    Proteger el servidorweb o Eliminación de páginas y aplicaciones predeterminadas  Directorios, archivos y aplicaciones de ejemplo o Adecuada gestión de errores  Mensaje de error significativo al usuario  Información de diagnóstico al administrador  NINGUNA información al atacante  Consistencia entre los mensajes de error  Detección de errores repetitivos CONFERENCIAS FIST -29- NeuroCrypt, S.L.
  • 30.
    Auditoría de hackingGoogle o Gooscan  Para Linux  Viola la política de Google o Athena:  Para .NET  Viola la política de Google o Sitedigger  Similar a Athena  Basado en la API de Google o Wikto  Escáner de vulnerabilidades CONFERENCIAS FIST -30- NeuroCrypt, S.L.
  • 31.
    Eliminación de páginasde Google o Eliminación en local o Eliminación de la caché de Google desde la página de eliminaciones services.google.com/urlconsole/controller  Dirigirle al archivo robots.txt  Utilizar una directiva META  Opción de eliminación de enlaces antiguos CONFERENCIAS FIST -31- NeuroCrypt, S.L.
  • 32.
    Google Hack Honeypot o GHH emula el comportamiento de firmas GHDB para ser encontrado por Google o Por ahora sólo para Apache y PHP o Una vez instalado, se debe hacer que Google lo indexe o Los logs registran quién visita el sitio a través de Google (Google hackers) o Se puede personalizar o Incorporará un visor especializado CONFERENCIAS FIST -32- NeuroCrypt, S.L.
  • 33.
    4.- Conclusiones o Auditor  Google como herramienta fácil para obtener información o Administrador  Minimizar el grado de información accesible CONFERENCIAS FIST -33- NeuroCrypt, S.L.
  • 34.
    ¿Preguntas? o http://www.iec.csic.es/~gonzalo/ CONFERENCIAS FIST -34- NeuroCrypt, S.L.
  • 35.
    Creative Commons Attribution-NoDerivs2.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.