google hack 之 查询语法
@font-face { font-family: Wingdings }
@font-face { font-family: 宋体 }
@font-face { font-family: “Cambria Math” }
@font-face { font-family: Calibri }
@font-face { font-family: 微软雅黑 }
@font-face { font-family: 华文隶书 }
@font-face { font-family: 华文楷体 }
@font-face { font-family: “Segoe UI” }
@font-face { font-family: “Trebuchet MS” }
@font-face { font-family: “@微软雅黑” }
@font-face { font-family: “@华文楷体” }
@font-face { font-family: “@宋体” }
@font-face { font-family: “@华文隶书” }
p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 10pt 0; text-indent: 10pt; line-height: 115%; font-size: 12pt; font-family: “Calibri”, “sans-serif” }
h2 { mso-style-link: “标题 2 Char”; margin: 10pt 0 0.0001pt; text-align: center; text-indent: 10pt; line-height: 115%; background: rgba(219, 229, 241, 1); border: none; padding: 0; font-size: 14pt; font-family: “Calibri”, “sans-serif”; text-transform: uppercase; letter-spacing: 0.75pt; font-weight: normal }
h3 { mso-style-link: “标题 3 Char”; margin: 15pt 0 0.0001pt; text-indent: 10pt; line-height: 115%; border: none; padding: 0; font-size: 11pt; font-family: “Calibri”, “sans-serif”; color: rgba(36, 63, 96, 1); text-transform: uppercase; letter-spacing: 0.75pt; font-weight: normal }
h4 { mso-style-name: “标题 4\,代码”; mso-style-link: “标题 4 Char\,代码 Char”; margin: 3pt 0 0.0001pt; text-indent: 10pt; background: rgba(218, 238, 243, 1); border: none; padding: 0; font-size: 11pt; font-family: “Calibri”, “sans-serif”; color: rgba(31, 73, 125, 1); letter-spacing: 0.5pt; font-weight: normal }
h5 { mso-style-link: “标题 5 Char”; margin: 15pt 0 0.0001pt; text-indent: 10pt; line-height: 115%; border: none; padding: 0; font-size: 11pt; font-family: “Calibri”, “sans-serif”; color: rgba(54, 95, 145, 1); text-transform: uppercase; letter-spacing: 0.5pt; font-weight: normal }
h6 { mso-style-link: “标题 6 Char”; margin: 15pt 0 0.0001pt; text-indent: 10pt; line-height: 115%; border: none; padding: 0; font-size: 11pt; font-family: “Calibri”, “sans-serif”; color: rgba(54, 95, 145, 1); text-transform: uppercase; letter-spacing: 0.5pt; font-weight: normal }
p.MsoHeading7, li.MsoHeading7, div.MsoHeading7 { mso-style-link: “标题 7 Char”; margin: 15pt 0 0.0001pt; text-indent: 10pt; line-height: 115%; font-size: 11pt; font-family: “Calibri”, “sans-serif”; color: rgba(54, 95, 145, 1); text-transform: uppercase; letter-spacing: 0.5pt }
p.MsoHeading8, li.MsoHeading8, div.MsoHeading8 { mso-style-link: “标题 8 Char”; margin: 15pt 0 0.0001pt; text-indent: 10pt; line-height: 115%; font-size: 9pt; font-family: “Calibri”, “sans-serif”; text-transform: uppercase; letter-spacing: 0.5pt }
p.MsoHeading9, li.MsoHeading9, div.MsoHeading9 { mso-style-link: “标题 9 Char”; margin: 15pt 0 0.0001pt; text-indent: 10pt; line-height: 115%; font-size: 9pt; font-family: “Calibri”, “sans-serif”; text-transform: uppercase; letter-spacing: 0.5pt; font-style: italic }
p.MsoToc1, li.MsoToc1, div.MsoToc1 { margin: 10pt 0; text-indent: 10pt; line-height: 115%; font-size: 12pt; font-family: “Calibri”, “sans-serif” }
p.MsoToc2, li.MsoToc2, div.MsoToc2 { margin: 10pt 0 10pt 21pt; text-indent: 10pt; line-height: 115%; font-size: 12pt; font-family: “Calibri”, “sans-serif” }
p.MsoToc3, li.MsoToc3, div.MsoToc3 { margin: 10pt 0 10pt 42pt; text-indent: 10pt; line-height: 115%; font-size: 12pt; font-family: “Calibri”, “sans-serif” }
p.MsoHeader, li.MsoHeader, div.MsoHeader { mso-style-link: “页眉 Char”; margin: 10pt 0; text-align: center; text-indent: 10pt; line-height: 115%; layout-grid-mode: char; border: none; padding: 0; font-size: 9pt; font-family: “Calibri”, “sans-serif” }
p.MsoFooter, li.MsoFooter, div.MsoFooter { mso-style-link: “页脚 Char”; margin: 10pt 0; text-indent: 10pt; line-height: 115%; layout-grid-mode: char; font-size: 9pt; font-family: “Calibri”, “sans-serif” }
p.MsoCaption, li.MsoCaption, div.MsoCaption { margin: 10pt 0; text-indent: 10pt; line-height: 115%; font-size: 8pt; font-family: “Calibri”, “sans-serif”; color: rgba(54, 95, 145, 1); font-weight: bold }
p.MsoTitle, li.MsoTitle, div.MsoTitle { mso-style-link: “标题 Char”; margin: 36pt 0 10pt; text-indent: 10pt; line-height: 115%; font-size: 26pt; font-family: “Calibri”, “sans-serif”; color: rgba(79, 129, 189, 1); text-transform: uppercase; letter-spacing: 0.5pt }
p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle { mso-style-link: “副标题 Char”; margin: 10pt 0 50pt; text-indent: 10pt; font-size: 12pt; font-family: “Calibri”, “sans-serif”; color: rgba(89, 89, 89, 1); text-transform: uppercase; letter-spacing: 0.5pt }
a:link, span.MsoHyperlink { color: rgba(0, 0, 255, 1); text-decoration: underline }
a:visited, span.MsoHyperlinkFollowed { color: rgba(128, 0, 128, 1); text-decoration: underline }
em { color: rgba(36, 63, 96, 1); text-transform: uppercase; letter-spacing: 0.25pt; font-style: normal }
p.MsoDocumentMap, li.MsoDocumentMap, div.MsoDocumentMap { mso-style-link: “文档结构图 Char”; margin: 10pt 0; text-indent: 10pt; line-height: 115%; font-size: 9pt; font-family: 宋体 }
p { margin-right: 0; margin-left: 0; font-size: 12pt; font-family: 宋体 }
pre { mso-style-link: “HTML 预设格式 Char”; margin: 0 0 0.0001pt; text-indent: 10pt; font-size: 12pt; font-family: 宋体 }
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate { mso-style-link: “批注框文本 Char”; margin: 0 0 0.0001pt; text-indent: 10pt; font-size: 9pt; font-family: “Calibri”, “sans-serif” }
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing { mso-style-link: “无间隔 Char”; margin: 0 0 0.0001pt; text-indent: 10pt; font-size: 12pt; font-family: “Calibri”, “sans-serif” }
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph { margin: 10pt 0 10pt 36pt; text-indent: 10pt; line-height: 115%; font-size: 12pt; font-family: “Calibri”, “sans-serif” }
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst { margin: 10pt 0 0.0001pt 36pt; text-indent: 10pt; line-height: 115%; font-size: 12pt; font-family: “Calibri”, “sans-serif” }
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle { margin: 0 0 0.0001pt 36pt; text-indent: 10pt; line-height: 115%; font-size: 12pt; font-family: “Calibri”, “sans-serif” }
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast { margin: 0 0 10pt 36pt; text-indent: 10pt; line-height: 115%; font-size: 12pt; font-family: “Calibri”, “sans-serif” }
p.MsoQuote, li.MsoQuote, div.MsoQuote { mso-style-link: “引用 Char”; margin: 10pt 0; text-indent: 10pt; line-height: 115%; font-size: 12pt; font-family: “Calibri”, “sans-serif”; font-style: italic }
p.MsoIntenseQuote, li.MsoIntenseQuote, div.MsoIntenseQuote { mso-style-link: “明显引用 Char”; margin: 10pt 57.6pt 0.0001pt 64.8pt; text-align: justify; text-justify: inter-ideograph; text-indent: 10pt; line-height: 115%; border: none; padding: 0; font-size: 12pt; font-family: “Calibri”, “sans-serif”; color: rgba(79, 129, 189, 1); font-style: italic }
span.MsoSubtleEmphasis { color: rgba(36, 63, 96, 1); font-style: italic }
span.MsoIntenseEmphasis { color: rgba(36, 63, 96, 1); text-transform: uppercase; letter-spacing: 0.5pt; font-weight: bold }
span.MsoSubtleReference { color: rgba(79, 129, 189, 1); font-weight: bold }
span.MsoIntenseReference { color: rgba(79, 129, 189, 1); text-transform: uppercase; font-weight: bold; font-style: italic }
span.MsoBookTitle { letter-spacing: 0.45pt; font-weight: bold; font-style: italic }
p.MsoTocHeading, li.MsoTocHeading, div.MsoTocHeading { margin: 10pt 0 0.0001pt; text-align: center; text-indent: 10pt; line-height: 115%; background: rgba(79, 129, 189, 1); border: none; padding: 0; font-size: 24pt; font-family: “Calibri”, “sans-serif”; color: rgba(255, 255, 255, 1); text-transform: uppercase; letter-spacing: 0.75pt; font-weight: bold }
span.Char { mso-style-name: “页眉 Char”; mso-style-link: 页眉 }
span.Char0 { mso-style-name: “页脚 Char”; mso-style-link: 页脚 }
span.1Char { mso-style-name: “标题 1 Char”; mso-style-link: “标题 1”; font-family: “微软雅黑”, “sans-serif”; color: rgba(255, 255, 255, 1); text-transform: uppercase; letter-spacing: 0.75pt; background: rgba(79, 129, 189, 1); font-weight: bold }
span.Char1 { mso-style-name: “文档结构图 Char”; mso-style-link: 文档结构图; font-family: 宋体 }
span.2Char { mso-style-name: “标题 2 Char”; mso-style-link: “标题 2”; font-family: 华文隶书; text-transform: uppercase; letter-spacing: 0.75pt; background: rgba(219, 229, 241, 1) }
span.3Char { mso-style-name: “标题 3 Char”; mso-style-link: “标题 3”; color: rgba(36, 63, 96, 1); text-transform: uppercase; letter-spacing: 0.75pt }
span.4Char { mso-style-name: “标题 4 Char\,代码 Char”; mso-style-link: “标题 4\,代码”; color: rgba(31, 73, 125, 1); letter-spacing: 0.5pt; background: rgba(218, 238, 243, 1) }
span.5Char { mso-style-name: “标题 5 Char”; mso-style-link: “标题 5”; color: rgba(54, 95, 145, 1); text-transform: uppercase; letter-spacing: 0.5pt }
span.6Char { mso-style-name: “标题 6 Char”; mso-style-link: “标题 6”; color: rgba(54, 95, 145, 1); text-transform: uppercase; letter-spacing: 0.5pt }
span.7Char { mso-style-name: “标题 7 Char”; mso-style-link: “标题 7”; color: rgba(54, 95, 145, 1); text-transform: uppercase; letter-spacing: 0.5pt }
span.8Char { mso-style-name: “标题 8 Char”; mso-style-link: “标题 8”; text-transform: uppercase; letter-spacing: 0.5pt }
span.9Char { mso-style-name: “标题 9 Char”; mso-style-link: “标题 9”; text-transform: uppercase; letter-spacing: 0.5pt; font-style: italic }
span.Char2 { mso-style-name: “标题 Char”; mso-style-link: 标题; color: rgba(79, 129, 189, 1); text-transform: uppercase; letter-spacing: 0.5pt }
span.Char3 { mso-style-name: “副标题 Char”; mso-style-link: 副标题; color: rgba(89, 89, 89, 1); text-transform: uppercase; letter-spacing: 0.5pt }
span.Char4 { mso-style-name: “无间隔 Char”; mso-style-link: 无间隔 }
span.Char5 { mso-style-name: “引用 Char”; mso-style-link: 引用; font-style: italic }
span.Char6 { mso-style-name: “明显引用 Char”; mso-style-link: 明显引用; color: rgba(79, 129, 189, 1); font-style: italic }
span.Char7 { mso-style-name: “批注框文本 Char”; mso-style-link: 批注框文本 }
span.HTMLChar { mso-style-name: “HTML 预设格式 Char”; mso-style-link: “HTML 预设格式”; font-family: 宋体 }
span.Char8 { mso-style-name: “编号 Char”; mso-style-link: 编号; font-family: “Times New Roman”, “serif” }
p.a, li.a, div.a { mso-style-name: 编号; mso-style-link: “编号 Char”; margin: 0 0 0.0001pt; text-indent: 0; line-height: 150%; font-size: 10.5pt; font-family: “Times New Roman”, “serif” }
span.sentence { mso-style-name: sentence }
p.a0, li.a0, div.a0 { mso-style-name: 图; mso-style-link: “图 Char”; margin: 0 0 0.0001pt; text-align: center; text-indent: 24pt; font-size: 12pt; font-family: “Calibri”, “sans-serif” }
span.Char9 { mso-style-name: “图 Char”; mso-style-link: 图 }
span.apple-converted-space { mso-style-name: apple-converted-space }
.MsoChpDefault { font-size: 11pt; font-family: “Calibri”, “sans-serif” }
.MsoPapDefault { margin: 10pt 0; line-height: 115% }
@page WordSection1 { size: 595.3pt 841.9pt margin-top: 72pt margin-right: 90pt margin-bottom: 72pt margin-left: 90pt layout-grid: 15.6pt }
div.WordSection1 { page: WordSection1 }
ol { margin-bottom: 0 }
ul { margin-bottom: 0 }
文/玄魂
谷歌网页搜索技术,大部分在百度等搜索引擎中也适用。同样,这些搜索技术是来源于传统数据库检索技术,因而,对这部分的学习,能为后续章节的数据库检索奠定基础,并能获得直观的认识。本部分结合应用实例的讲解也能让我们加深信息检索对解决实际问题、提高搜索效率的认知。
欢迎访问玄魂的博客
同许多搜索引擎一样,当直接在搜索框中输入搜索词时,谷歌默认进行模糊搜索,并能对长短语或语句进行自动拆分成小的词进行搜索。
示例:
kali linux 渗透测试
1.2 短语精确搜索
给关键词加上半角引号实现精确搜索,不进行分词。
示例:“kali linux web渗透测试“
1.3通配符
谷歌的通配符是星号“*”,必须在精确搜索符双引号内部使用。用通配符代替关键词或短语中无法确定的字词。
示例:“kali * web渗透测试“
1.4 点号匹配任意字符
与通配符星号“*”不一样的是,点号“.”匹配的是字符,不是字、短语等内容。保留的字符有[、(、–等。
示例:
1.5 布尔逻辑
布尔逻辑是许多检索系统的基本检索技术,在搜索引擎中也一样适用,在谷歌网页搜索中需要注意的是:谷歌和许多搜索引擎一样,多个词间的逻辑关系默认的是逻辑与(空格)。当用逻辑算符的时候,词与逻辑算符之间用需要空格分隔,包括后面讲的各种语法,均要有空格。逻辑非是特例,即减号必须与对应的词连在一起。对于复杂的逻辑关系,可用括号分组。
逻辑与
示例:渗透测试玄魂的博客
示例:渗透测试 AND 玄魂的博客
逻辑或
示例:“玄魂的博客” (kali | node)
上图显示的结果为搜索结果中必须包含“玄魂的博客”同时包含“kali”或者“node”的网页。
逻辑非
示例:“玄魂的博客” -kali
上图中显示结果为包含“玄魂的博客”同时不包含“kali”的网页内容。
1.6约束条件
加号“+”用于强制搜索,即必须包含加号后的内容。一般与精确搜索符一起应用。
示例:“玄魂的博客” +”愚蠢的人类“
1.7 数字范围
用两个点号“..”表示一个数字范围。一般应用于日期、货币、尺寸、重量、高度等范围的搜索。用作范围时最好给一定的含义。
示例:kali linux 2010年..2014年
1.8 括号分组
逻辑组配时分组,避免逻辑混乱。括号“()”是分组符号。
示例:见上文 1.5节。
2.1 标题中搜索
通常标题是内容的高度概括,在标题中搜索的结果准确率会更高。谷歌搜索中限定搜索网页或文档标题的语法是:intitle或allintitle。allintitle是intitle的变体,相当于在各个搜索词前加上intitle。二者差别不明显,我们一般直接用intitle。
示例:intitle:”WSO 2.4″ [ Sec. Info ], [ Files ], [ Console ], [ Sql ], [ Php ], [ Safe mode ], [ String tools ], [ Bruteforce ], [ Network ], [ Self remove ]
上图 为使用intitle属性查找网站上被黑客上传的WSO后门网页。打开个别网页可以发现webshell。
2.2 正文中搜索
仅仅在网页或文档的正文部分搜索。谷歌搜索中限定搜索网页或文档正文的语法是:intext或allintext。
示例:intitle:”index” intext:”Login to the Administrative Interface”
此示例结合intitle和intext寻找Web2Py的管理后台。
打开一个链接。
2.3网址中搜索
谷歌搜索中限定搜索网址的语法是:inurl。是In-系指令中最强大的一个,换句话说,这个高级指令能够直接从网站的URL入手挖掘信息,只要略微了解普通网站的URL格式,就可以极具针对性地找到你所需要的资源--甚至隐藏内容。网站构建者通常将某一类信息集中在一个网站的目录中,所以搜索URL中的词本身就是对某一方面内容的一个限定。如果在加上一定的词进行组配,搜索结果将更贴近需求。
示例:inurl:phpmyadmin/index.php & (intext:username & password & “Welcome to”)
该示例通过url中的特征路径和页面的中的特殊文本,寻找安装有phpmyadmin的站点的对应管理入口。
打开其中的一个链接,如下:
2.4 锚链链接搜索
在做网站中有时候用锚点来链接一个页面中的其它部分内容,这样方便浏览和定位。也就是说锚点链接的内容通常是网页内容中重要的章节或内容的开始部分,因而对它们的搜索也更能反映网页的主题内容,提高搜索结果的准确度。对于熟悉网页制作的人来说,可以从网页源代码中查看有锚点的HTML代码
谷歌网页搜索在锚链链接中语法是:inanchor或allinanchor。搜索范围限制在页面的链接锚点描述文本进行搜索。
示例:inanchor:修改密码
2.5 文档类型限定
谷歌网页搜索不仅仅能搜索网页,还能搜索各种文档,通过文档类型限定只对文档进行搜索,从而不显示页面的内容。语法是:filetype。这个语法非常有用,我们在网上常常要找一些范文或参考资料的时候常用这个语法。filetype是根据文件后缀搜索特定文件类型,比如支持的文档有:pdf、ppt、doc、xls等;网页文件:htm、asp、php等。
示例:filetype:sql site:com and “insert into” admin “2014”
本示例通过filetype 查找sql文件,并且希望得到的结果为插入admin用户的脚本。搜索结果如下:
打开其中的一个链接,我们可以看到sql的内容。
3.1搜索谷歌缓存的页面(快照信息)
用cache语法的一般情况是:当一个链接无法访问时(或信息被屏蔽时);当信息已经被修改,想看以前的信息时。
示例:cache:www.xuanhun521.com
3.2 相关网址
related语法对于发现某一类信息非常有用,比如当你用related搜索一个图书馆网址的时候会出来大量图书馆的网站,如【related:lib.nit.net.cn】;当搜索某期刊网址的时候,能搜索出大量给学科领域的相关期刊,如【related:www.lis.ac.cn】。
示例:related:www.kali.org
3.3 link
搜索所有链接到某个特定URL上的页面.
例如,想搜索所有链接www.xuanhun521.com的页面,但要排除本站网页。
示例:link:www.xuanhun521.com -site:www.xuanhun521.com
3.4 site
搜索范围限制在某网站或顶级域名中。
示例:site:www.xuanhun521.com
4.1 混合搜索范例
第一个示例,我们通过下面的查询语句,查找可以未经授权就可以访问的phpMyAdmin的后台页面。
inurl:.php? intext:CHARACTER_SETS,COLLATIONS, ?intitle:phpmyadmin
寻找一个页面,点开看看:
第二个示例,我们搜索可能存在openssl心脏出血漏洞的站点。
这个搜索可谓一举多得,因为apache暴露ssl版本的页面一般是可枚举的目录页面,在这样的页面中我们可以探究网站的组织目录。
原文链接:http://www.xuanhun521.com/Blog/2014/8/13/google-hack-%E4%B9%8B-%E6%9F%A5%E8%AF%A2%E8%AF%AD%E6%B3%95
ps:对此文章感兴趣的读者,可以加qq群:Hacking:303242737;Hacking-2群:147098303;Hacking-3群:31371755;hacking-4群:201891680;Hacking-5群:316885176