如何优雅的进行Google Hacking

admin 2021年12月30日22:23:13评论146 views字数 4613阅读15分22秒阅读模式

0x00 前言

说到搜索引擎,相信任何人都不会陌生,它包含着我们生活中方方面面的知识,存储着数亿计的信息,每当有人来问我东西的时候我只想说:

如何优雅的进行Google Hacking

 

越来越多的hack搜索引擎的出现比如Fofa,ZoomEye,Shodan成为了我们渗透时的利器,它们进行合理的分类整理来达到有效利用目的,但在我看来往往信息的复杂程度越高,信息的价值度也回越高,杂乱出奇迹,这也是个真理。

 

0x01 介绍

Google是一个伟大的信息收集工具,在如今的互联网时代,想想看一个人可以轻易的从搜索引擎中获取你详细的个人信息是件多么叫人激动又害怕的事情。Google也可以当作我们的第二个“社工库”。

搜索引擎的组成:

  1. 爬行器(机器人、蜘蛛)

  2. 索引生成器

  3. 查询检索器

 

Google基本关键词

  • Intext         搜索出现的关键词

  • Inurl         搜索包含关键词的url

  • Intitle         搜索包含关键词的标题

  • 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 ] 

如何优雅的进行Google Hacking

如何优雅的进行Google Hacking

 

2.正文中的猫腻

正文的话就各式各样了,试试login?admin?内容编辑?往往会有意想不到的收获。

示例:

intitle:"index" intext:"Login to the Administrative Interface"

如何优雅的进行Google Hacking

如何优雅的进行Google Hacking


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"

如何优雅的进行Google Hacking

如何优雅的进行Google Hacking

 

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:mdb

 

For sql database dumps

  • Inurl:nuke filetype:sql

  • Filetype: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 –”the

 

For 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 mdb


5.缓存?快照?

cache 没有突破口时可能是一大杀器

通过爬虫,快照,在管理者不经意的情况下记录下敏感信息。

案例:曾经碰到过一个学生可能都比较熟悉的名为教育技术服务平台的信息泄露,它们无意中把自己gitlab公开在外网,当然没有任何防范爬虫的措施,虽然设有登陆密码但是可以通过google快照来查看里面的各种敏感代码。

如何优雅的进行Google Hacking

如何优雅的进行Google Hacking

 

0x03 混合实战

就像前面说的,杂乱出奇迹,混合的google语法往往更能从杂乱中提取出精华。

在实战挖洞中,合理的运用Google Hacking来找自己想要的信息,一些敏感信息、口令文件、演示信息、未授权访问、较弱的子站等就会一一浮出水面。

ps:我们所说的Google Hacking不是一味的使用google,而是强调搜索引擎可以对我们达到的巨大帮助,有时试试百度,必应,ZoomEye也会有不小收获 如何优雅的进行Google Hacking


案例1:

百度某子站未授权

inurl:qyy.baidu.com intext:组件

如何优雅的进行Google Hacking


案例2:

酷狗繁星某页面被爬虫爬到的url中泄露密码

inurl:fanxing.kugou.com/username

如何优雅的进行Google Hacking 如何优雅的进行Google Hacking

 

案例3:

携程某处用户敏感信息泄露

inurl:Order.aspx?TmpOrderid=

如何优雅的进行Google Hacking

如何优雅的进行Google Hacking

如何优雅的进行Google Hacking

 

案例4:

支付宝某管理页面未授权访问

site:alipay.com intext:信息管理 系统 编辑

如何优雅的进行Google Hacking

如何优雅的进行Google Hacking

 

案例5:

未授权phpmyadmin

inurl:.php? intext:CHARACTER_SETS,COLLATIONS, ?intitle:phpmyadmin

如何优雅的进行Google Hacking

如何优雅的进行Google Hacking

 

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 Hacking

 

参考资料:

《Google hacking for penetration testers》

http://resources.infosecinstitute.com/google-hacking-for-fun-and-profit-i/

http://zone.wooyun.org/

http://www.cnblogs.com/xuanhun/p/3910134.html


⚠️注意:本文涉及到的相关厂商漏洞均已通知厂商修补完毕!


本文作者:whitecell-club  侦探911

文章欢迎转载,转载请保留作者与出处

团队首页:whitecell-club.org


如何优雅的进行Google Hacking


本文始发于微信公众号(WhiteCellClub):如何优雅的进行Google Hacking

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年12月30日22:23:13
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   如何优雅的进行Google Hackinghttps://cn-sec.com/archives/490241.html

发表评论

匿名网友 填写信息