Google hacks

De wiki.nexiat.fr
Aller à la navigation Aller à la recherche

🔒 Contenu de sécurité — usage encadré

Cette page décrit la technique OSINT du « Google dorking » à des fins exclusivement pédagogiques et professionnelles (formation, préparation de certification, montée en compétence défensive).

Ces techniques ne doivent être mises en œuvre que dans un laboratoire isolé ou sur un système pour lequel vous disposez d'une autorisation écrite explicite du propriétaire. Les employer contre un système tiers sans autorisation est une infraction pénale (art. 323-1 et suivants du Code pénal). Voir les avertissements généraux.

Fiche express
Domaine OSINT — Google dorking / Google hacking
Principe Requêtes ciblées via les opérateurs des moteurs
Voir aussi Metagoofil, Footprinting tools

Google est un outil de collecte d'informations bien plus puissant qu'il n'y paraît : bien requêté, il expose serveurs vulnérables, pages de connexion, messages d'erreur bavards, fichiers de mots de passe et répertoires ouverts. Le Google hacking (ou dorking) repose sur trois idées :

  • Query string — construire des requêtes complexes ;
  • Vulnerable sites — trouver des sites exposant une faille donnée ;
  • Google operators — repérer une chaîne bien précise (mot de passe, chaîne de connexion...).

Références : http://www.googleguide.com/ · http://www.googleguide.com/advanced_operators.html · GHDB (johnny.ihackstuff.com) · détection des dorks (honey dorks) : http://www.information-security.fr/honey-dorks-ou-la-detection-des-recherches-via-les-google-dorks/

Paramètres d'URL de recherche

Google accepte des paramètres dans l'URL de recherche :

q=requete        # chaîne de recherche principale
start=xxx        # commence les résultats au numéro xxx
num=yyy          # nombre de résultats par page
filter={0|1}     # filtre (ou non) les doublons
safe={active|off}# active/désactive SafeSearch
lr=lang_fr       # restreint à une langue (lang_fr, lang_en, lang_de, lang_ru...)
hl=fr            # langue de l'interface Google (≠ langue des résultats)

Exemple :

http://www.google.fr/search?q='to be or not to be'&start=5&num=10&filter=0

Opérateurs logiques

NOT ou -   : exclusion   (ex. -windows exclut le mot windows)
AND ou +   : inclusion
OR  ou |   : ou

Liste des opérateurs

  • inurl: — pages dont l'URL contient le motif (ex. inurl:admin)
  • filetype: — pages liant un fichier du type indiqué (ex. filetype:pdf)
  • intext: — recherche un motif dans le contenu (ex. intext:mysql_connect)
  • site: — restreint la recherche à un site
  • link: — pages contenant un lien vers le motif
  • cache: — version mise en cache par Google (permet de visiter discrètement un site)
  • define: — définition du terme
  • intitle: — recherche dans la balise <title>
  • ext: — recherche par extension de fichier
  • [X]...[Y] — recherche dans un intervalle (ex. page 1...100)
  • info: — informations sur un site (ex. info:www.kernel.org)
  • related: — sites sémantiquement liés (ex. related:www.kernel.org)

Exemples de requêtes

# pages contenant mot de passe + identifiant
admin +(password | passwd) +(username | login)

# fichiers .inc appelant mysql_connect, hors pages classiques
inurl:.inc +intext:mysql_connect -inurl:(.php|.html|.htm|.asp)

# recherche restreinte à un site
site:microsoft.com +inurl:microsoft.com -www.microsoft.com

# listing de répertoires (topologie d'un domaine)
-inurl:(.php|.html|.asp|.htm) intitle:'Index Of' +'last modified' +'parent directory'

# fichiers .htpasswd
ext:htpasswd -inurl:(.html|.htm|.asp|.php) intext:admin


# sous-domaines publics
allinurl: -www site:domain.tld

Ne pas oublier le fichier robots.txt, qui liste les pages qu'un site demande d'exclure de l'index — donc autant de chemins intéressants : http://website.tld/robots.txt

Automatisation

  • Gooscan — recherche de vulnérabilités via l'API.
  • Goolag — automatisation de l'API Google.
  • Googlepedia — extension Firefox.

Autres outils : Metagoofil (http://www.edge-security.com), Goolink Scanner, SiteDigger (http://www.foundstone.com), Google Hack Honeypot (http://ghh.sourceforge.net), BiLE Suite (http://www.sensepost.com).

Recherche de docs et d'e-mails

Extraction de métadonnées de documents : Metagoofil.

Recherche d'adresses e-mail par nom :

"nom prenom" ("@gmail.com" | "@hotmail.com" | "@yahoo.com")

Localiser des serveurs par version

Apache 1.3.0-1.3.9    intitle:Test.Page.for.Apache "It.worked!" "this.web.site!"
Apache 1.3.11-1.3.26  intitle:Test.Page.for.Apache "seeing.this.instead"
Apache 2.0            intitle:Simple.page.for.Apache "Apache.Hook.Functions"
Apache SSL/TLS        intitle:test.page "Hey, it worked!" "SSL/TLS-aware"

IIS 4.0   intitle:welcome.to.IIS.4.0
IIS 4.0   allintitle:Welcome to Windows NT 4.0 Option Pack
IIS 4.0   allintitle:Welcome to Internet Information Server
IIS 5.0   allintitle:Welcome to Windows 2000 Internet Services
IIS 6.0   allintitle:Welcome to Windows XP Server Internet Services
IIS 7.0   intitle:index.of name size

Mots de recherche Apache

Fichiers et chemins typiques d'une arborescence Apache exposée :

.htaccess       .htpasswd       access_log      error_log
cgi             cgi-bin         cgi-pub         cgi-script
htdocs          httpd           httpd.pid       icons
index.html      manual          phf             printenv
server-info     server-status   test-cgi        tmp
~root           ~ftp            ~nobody

Recueil de dorks (édition 2019)

Sélection de Google dorks publiés en 2019 (interfaces d'admin, fichiers de configuration, sauvegardes, journaux, clés et secrets exposés) :

inurl:"/vpn/tmindex.html" vpn
intext:"Powered by GetSimple" -site:get-simple.info
inurl:"/fuel/login"
intitle:"index of" intext:"Includes wordpress"
intitle:"netscaler gateway" intext:password "please log on"
inurl:users.json + "username"
inurl:old "index of" "wp-config.php"
inurl:9000 AND intext:"Continuous Code Quality"
s3 site:amazonaws.com filetype:sql
intext:"wordpress" filetype:xls login & password
intitle:"Outlook Web Access" | "Outlook Web app" -office.com -microsoft.com
intext:"Sign in with your organizational account" login -github.com
"/FTPSVC2" intitle:"index of"
intitle:"index of" "W3SVC1"
inurl:"CookieAuth.dll?GetLogon?" intext:log on
s3 site:amazonaws.com filetype:xls login
s3 site:amazonaws.com filetype:xls password
intext:backup.sql intitle:index.of
intext:user.sql intitle:index.of
inurl:jsmol.php
intitle:"Pi-hole Admin Console"
filetype:inc php -site:github.com -site:sourceforge.net
filetype:php "Notice: Undefined variable: data in" -forum
intitle:"WAMPSERVER homepage" "Server Configuration" "Apache Version"
intitle:"report" ("qualys" | "acunetix" | "nessus" | "netsparker" | "nmap") filetype:pdf
filetype:git -github.com inurl:"/.git"
intitle:"iLO Login" intext:"Integrated Lights-Out 3"
filetype:svn -gitlab -github inurl:"/.svn"
"please sign in" "sign in" "gophish" +"login"
intitle:"LaserJet" "Device status" "Supplies summary"
inurl:github.com intext:.ftpconfig -issues
inurl:bc.googleusercontent.com intitle:index of
inurl:/login.rsp
site:global.gotomeeting.com inurl:recording
inurl:/web-console/ServerInfo.jsp | inurl:/status?full=true
inurl:/CFIDE/administrator/index.cfm
intitle:"oracle bi publisher enterprise login"
"keyed alike" site:gov filetype:pdf
inurl:"/Shop/auth/login"
inurl:office365 AND intitle:"Sign In | Login | Portal"
intext:"config" intitle:"Index of .ssh"
inurl:"cs.html?url="
inurl:+CSCOE+/logon.html
inurl:login.txt filetype:txt
jmeter.log filetype:log
intitle:settings.py intext:EMAIL_USE_TLS -git -stackoverflow
inurl:wp-config.php intext:DB_PASSWORD -stackoverflow -wpbeginner
intext:"@gmail.com" AND intext:"@yahoo.com" filetype:sql
intext:"the WordPress" inurl:wp-config ext:txt
site:mil ext:cfm inurl:login.cfm
site:connect.garmin.com inurl:"/modern/profile/"
intitle:"qBittorrent Web UI" inurl:8080
intext:"series Network Configuration" AND intext:"canon"
inurl:ctl/Login/Default.aspx
inurl:TOP/PRTINFO.HTML
intitle:"index of" scada
inurl:/clusters intitle:"kafka Manager"
inurl:7474/browser intitle:Neo4j
intitle:OmniDB intext:"user. pwd. Sign in."
inurl:wp-login.php?action=register
"Powered by ViewVC 1.0.3"
inurl:_vti_bin/sites.asmx?wsdl
intitle:" - Revision" + "subversion version"
inurl:"swagger-ui/index.html"
intitle:livezilla "Server Time"
intitle:"docker" intitle:"index of" config
inurl:wls-wsat intext:"weblogic.wsee.wstx.wsat"
ext:env intext:APP_ENV= | intext:APP_DEBUG= | intext:APP_KEY=
inurl:"/wp-json/" -wordpress
inurl:"/saml2?SAMLRequest="
filetype:reg reg HKEY_CURRENT_USER intext:password
inurl:login intext:"reset your password"
inurl:login.do? | shoplogin.do | adminlogin
filetype:txt $9$ JunOS
filetype:txt line vty 0 4
intitle:"Log in - WhatsUp Gold"
inurl:"standalone.xml" intext:"password>"
intitle:Login inurl:login.php intext:admin/admin
intext:pure-ftpd.conf intitle:index of
intext:my.cnf intitle:index of
inurl:logs/gravityforms
inurl:robots.txt intext:Disallow: /web.config
inurl:"build.xml" intext:"tomcat.manager.password"
inurl:/yum.log | intitle:yum.log + ext:log
inurl:"trello.com" and intext:"username" and intext:"password"
intext:"define('DB_NAME'," ext:txt
intitle:backup+index of
inurl:conf/tomcat-users.xml -github
ext:ppk ssh key -github.com -gitlab
inurl:wp-config.bak
inurl:login.php.bak
intitle:"index of" ".travis.yml" | ".travis.xml"
intitle:"index of" "laravel.log" | "main.yaml" | "server.cfg"
"ansible.log" | "playbook.yaml" | ".ansible.cfg" intitle:"index of"
intext:"rabbit_password" | "service_password" filetype:conf
intitle:"index of" "config.yml" | "config.xml" intext:login | auth
intitle:"index of" ".gitignore"
intitle:index.of id_rsa -id_rsa.pub
inurl:configuration.php and intext:"var $password="
inurl:/dbcp.properties + filetype:properties -github.com
inurl:"/jira/login.jsp" intitle:"JIRA login"
filetype:xls | xlsx intext:cisco -cisco.com site:.gov
intext:define('AUTH_KEY', ' wp-config.php filetype:txt
inurl:wp-config-backup.txt
"password.xlsx" ext:xlsx
"username.xlsx" ext:xlsx
filetype:env intext:REDIS_PASSWORD
filetype:env intext:AWS_SECRET
inurl:"/logon.aspx?ReturnUrl="
"MAIL_PASSWORD" filetype:env
"database_password" filetype:yml "config/parameters.yml"
intitle:"netsparker scan report" ext:pdf
inurl::5601/app/kibana
allinurl:awstats.pl?config=
intitle:"Burp Scanner Report" | "Report generated by Burp Scanner"
inurl:"plesk-stat"
inurl:"/xmlrpc.php?rsd" & ext:php
"[LocalizedFileNames]" inurl:"desktop.ini" ext:ini -git -wiki
"[Tera Term]" inurl:"teraterm.ini" ext:ini -git
inurl:"main.php?action=db"
intitle:"Solr Admin" "Solr Query Syntax"
intitle:"Index Of" intext:sftp-config.json
ext:pem "PRIVATE KEY" -site:facebook.com -example -test
inurl:"/etc/fail2ban/" + ext:conf
inurl:"server-status" "Server Version: Apache/" "Server uptime:"
"database_password" filetype:yml "config/parameters.yml"
intitle:"index of" .env
intitle:"index of" docker-compose.yml
filetype:sql intext:password intext:username intext:INSERT INTO `users` VALUES
ext:pem "PRIVATE KEY"
intitle:"index of" "/bitcoin/"
intitle:"index of" ".pem"
intitle:"index of" "id_rsa"
intitle:"index of" "Login Data"
inurl:"/App.Config" + ext:config + "password=" -github -git
intitle:"Statistics Report for HAProxy"
intext:"PuTTY log" ext:log "password" -supportforums -github
"whoops! there was an error." "db_password"

Voir aussi