Google Hack语法的探索与应用
0x00 前言
說到搜索引擎,相信任何人都不會陌生,它包含著我們生活中方方面面的知識,存儲著數億計的信息,每當有人來問我東西的時候我只想說:
越來越多的hack搜索引擎的出現比如Fofa,ZoomEye,Shodan成為了我們滲透時的利器,它們進行合理的分類整理來達到有效利用目的,但在我看來往往信息的復雜程度越高,信息的價值度也回越高,雜亂出奇跡,這也是個真理。
0x01 介紹
Google是一個偉大的信息收集工具,在如今的互聯網時代,想想看一個人可以輕易的從搜索引擎中獲取你詳細的個人信息是件多么叫人激動又害怕的事情。Google也可以當作我們的第二個“社工庫”。
搜索引擎的組成:
爬行器(機器人、蜘蛛) 索引生成器 查詢檢索器Google基本關鍵詞
Intext 搜索出現的關鍵詞
Inurl 搜索包含關鍵詞的
urlIntitle 搜索包含關鍵詞的標題
Site 搜索包含關鍵詞的站點
filetype 搜索包含關鍵詞的文件類型
Link 對于頁面包含的外部鏈接搜索
Daterange 搜索特定的日期范圍
Google基本規則
Google 不分大小寫Google 可以使用通配符:*表示一個詞/字Google 會智能地保留一些內容,比如一些過時的詞,一些不適合呈現的內容(比如違法信息)最常用的:”關鍵字” ,雙引號會使Google強制搜索包含關鍵字的內容布爾操作符:AND(+) NOT(-) OR(|),AND 現在已不需要,多個關鍵字google會都匹配到
0x02 Google Hacking常用語法
1.標題中的貓膩
標題一般是一個網站內容的高度概括,比如后臺登陸?WEBSHELL?
示例:
intitle:“WSO 2.4” [ Sec. Info ], [ Files ], [ Console ], [ Sql ], [ Php ], [ Safe mode ], [ String tools ], [ Bruteforce ], [ Network ], [ Self remove ]
2.正文中的貓膩
正文的話就各式各樣了,試試login?admin?內容編輯?往往會有意想不到的收獲。
示例:
intitle:“index” intext:“Login to the Administrative Interface”
3.關鍵網站/網址的搜索
網站->site:
網址->inurl:
site 往往我們在對一個大型廠商進行測試時,除了利用工具進行域名爆破,還可以通過Google來幫助 比如:site:qq.com
inurl 是In-系指令中最強大的一個,換句話說,這個高級指令能夠直接從網站的URL入手挖掘信息,只要略微了解普通網站的URL格式,就可以極具針對性地找到你所需要的資源--甚至隱藏內容。網站構建者通常將某一類信息集中在一個網站的目錄中,所以搜索URL中的詞本身就是對某一方面內容的一個限定。如果在加上一定的詞進行組配,搜索結果將更貼近需求。
示例:
site:xxx.com inurl:phpmyadmin/index.php & (intext:username & password & “Welcome to”)
4.文檔類型的搜索
filetype 愛查資料的人應該不陌生,當它配合上我們其他的關鍵詞時有意思的東西可能就會出現。
目標文件類型:.pwl口令文件、.tmp臨時文件、.cfg配置文件、.ini系統文件、.hlp幫助文件、.dat數據文件、.log日志文件、.par交換文件
示例:
filetype:sql site:com and “insert into” admin “2014”
other:
FOR documents Filetype:xls username password email Filetype:xls inurl: “password.xls” Filetype;xls private Inurl:admin filetype:xls Filetype:xls inurl:contact Filetype:xls inurl: “email.xls” Allinurl:admin mdb Filetype:mdb inurl:users.mdb Inurl:email filetype:mdb Inurl:backup filetype:mdb Inurl:profiles filetype:mdb Inurl:*db filetype:mdbFor sql database dumps Inurl:nuke filetype:sFiletype:sql password Filetype:sql “indetified by” –cvs “#dumping data for table username user users password” “#mysql dump” filetype:sql “#phpmyadmin mysql-dump” filetype:txt “#phpmyadmin mysql-dump” “insert into” –”theFor database files Filetype:cfm “cfapplication name ” password Filetype:mdb inurl:user.mdb Inurl:email filetype:mdb Inurl:forum filetype:mdb Inurl:/db/main.mdb Inurl:profiles filetype:mdb Filetype:asp dbq=”* server.mappath(“mdb”)” Allinurl;admin mdb5.緩存 快照
cache 沒有突破口時可能是一大殺器
通過爬蟲,快照,在管理者不經意的情況下記錄下敏感信息。
案例:曾經碰到過一個學生可能都比較熟悉的名為教育技術服務平臺的信息泄露,它們無意中把自己gitlab公開在外網,當然沒有任何防范爬蟲的措施,雖然設有登陸密碼但是可以通過google快照來查看里面的各種敏感代碼。
0x03 混合實戰
就像前面說的,雜亂出奇跡,混合的google語法往往更能從雜亂中提取出精華。
在實戰挖洞中,合理的運用Google Hacking來找自己想要的信息,一些敏感信息、口令文件、演示信息、未授權訪問、較弱的子站等就會一一浮出水面。
ps:我們所說的Google Hacking不是一味的使用google,而是強調搜索引擎可以對我們達到的巨大幫助,有時試試百度,必應,ZoomEye也會有不小收獲
案例1:
百度某子站未授權
inurl:qyy.baidu.com intext:組件
案例2:
酷狗繁星某頁面被爬蟲爬到的url中泄露密碼
inurl:fanxing.kugou.com/username
inurl:Order.aspx?TmpOrderid=
案例4:
支付寶某管理頁面未授權訪問
site:alipay.com intext:信息管理 系統 編輯
案例5:
未授權phpmyadmin
inurl:.php? intext:CHARACTER_SETS,COLLATIONS, ?intitle:phpmyadmin
0x04 更多關鍵詞
site:xxxx.com intext:管理 //查看后臺 site:xxxx.com inurl:login site:xxxx.com intitle:管理 site:a2.xxxx.com filetype:asp //查看服務器使用的程序 site:a2.xxxx.com filetype:php site:a2.xxxx.com filetype:aspx site:a3.xxxx.com filetype:asp site:a2.xxxx.com inurl:file //查看上傳漏洞 site:a3.xxxx.com inurl:load site:xxx.com//搜集域名 intext:*@xxxx.com//搜集郵箱 site:Github.com sa password//github泄露 site:Github.com root password site:Github.com User ID='sa';Password site:Github.com smtp site:Github.com smtp @qq.com site:Github.com smtp @126.com site:Github.com smtp @163.com site:Github.com smtp @sina.com.cn site:Github.com smtp password site:Github.com String password smtp inurl:auth_user_file.txt//敏感信息泄露 inurl:orders.txt inurl:”wwwroot/*.” inurl:adpassword.txt inurl:webeditor.php inurl:file_upload.php inurl:gov filetype:xls “restricted” index of ftp +.mdb allinurl:/cgi-bin/ +mailto 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 inurl:forward filetype:forward –cvs filetype:mail intext:password subject filetype:eml intext:password subject filetype:mbx intext:password subject filetype:mbx intext:password subject總結
以上是生活随笔為你收集整理的Google Hack语法的探索与应用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Office Web Apps 非专业测
- 下一篇: 如何快速将多个文件合并为一个文件?