【滲透神器系列】搜索引擎

     搜索引擎是我平常工做中用得最多的一款工具,國內經常使用的搜索引擎包括Baidu,sougou,bing等。但我本篇要紀錄的並非這些經常使用的搜索引擎,而是信息安全從業人員必備的幾款網絡搜索引擎。本篇要介紹的搜索引擎包括:Shodan,censys,鍾馗之眼,Google,FoFa,Dnsdb等。介紹的內容主要是這幾款搜索引擎的一些高級語法,掌握高級語法會讓搜索結果更準確。php

Google搜索引擎

這裏之因此要介紹google搜索引擎,是由於它有別於百度、搜狗等內容搜索引擎,其在安全界有着非同通常的地位,甚至專門有一名詞爲google hacking用來形容google與安全非同尋常的關係。html

Index of/  使用它能夠直接進入網站首頁下的全部文件和文件夾中。
intext:  將返回全部在網頁正文部分包含關鍵詞的網頁。
intitle:  將返回全部網頁標題中包含關鍵詞的網頁。
cache:  搜索google裏關於某些內容的緩存。
define:  搜索某個詞語的定義。
filetype:  搜索指定的文件類型,如:.bak,.mdb,.inc等。
info:  查找指定站點的一些基本信息。
inurl:  搜索咱們指定的字符是否存在於URL中。
Link:  link:thief.one能夠返回全部和thief.one作了連接的URL。
site:  site:thief.one將返回全部和這個站有關的URL。nginx

+  把google可能忽略的字列如查詢範圍。
-  把某個字忽略,例子:新加 -坡。
~  贊成詞。
.  單一的通配符。
*  通配符,可表明多個字母。
「」  精確查詢。web

搜索不一樣國家網站

inurl:tw  臺灣
inurl:jp  日本
 

利用google暴庫

利用goole能夠搜索到互聯網上能夠直接下載到的數據庫文件,語法以下:數據庫

inurl:editor/db/ 
inurl:eWebEditor/db/ 
inurl:bbs/data/ 
inurl:databackup/ 
inurl:blog/data/ 
inurl:\boke\data 
inurl:bbs/database/ 
inurl:conn.asp 
inc/conn.asp
Server.mapPath(「.mdb」)
allinurl:bbs data
filetype:mdb inurl:database
filetype:inc conn
inurl:data filetype:mdb
intitle:"index of" data

利用goole搜索敏感信息

利用google能夠搜索一些網站的敏感信息,語法以下:windows

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
inurl:service.pwd

利用google搜索C段服務器信息

此技巧來自lostwolf緩存

site:218.87.21.*

可經過google可獲取218.87.21.0/24網絡的服務信息。安全

shodan搜索引擎

shodan網絡搜索引擎偏向網絡設備以及服務器的搜索,具體內容可上網查閱,這裏給出它的高級搜索語法。
地址:https://www.shodan.io/bash

搜索語法

  • hostname:  搜索指定的主機或域名,例如 hostname:」google」
  • port:  搜索指定的端口或服務,例如 port:」21」
  • country:  搜索指定的國家,例如 country:」CN」
  • city:  搜索指定的城市,例如 city:」Hefei」
  • org:  搜索指定的組織或公司,例如 org:」google」
  • isp:  搜索指定的ISP供應商,例如 isp:」China Telecom」
  • product:  搜索指定的操做系統/軟件/平臺,例如 product:」Apache httpd」
  • version:  搜索指定的軟件版本,例如 version:」1.6.2」
  • geo:  搜索指定的地理位置,例如 geo:」31.8639, 117.2808」
  • before/after:  搜索指定收錄時間先後的數據,格式爲dd-mm-yy,例如 before:」11-11-15」
  • net:  搜索指定的IP地址或子網,例如 net:」210.45.240.0/24」

以上內容參考:http://xiaix.me/shodan-xin-shou-ru-keng-zhi-nan/服務器

censys搜索引擎

censys搜索引擎功能與shodan相似,如下幾個文檔信息。
地址:https://www.censys.io/

https://www.censys.io/certificates/help 幫助文檔
https://www.censys.io/ipv4?q=  ip查詢
https://www.censys.io/domain?q=  域名查詢
https://www.censys.io/certificates?q= 證書查詢

搜索語法

默認狀況下censys支持全文檢索。

  • 23.0.0.0/8 or 8.8.8.0/24  可使用and or not
  • 80.http.get.status_code: 200  指定狀態
  • 80.http.get.status_code:[200 TO 300]  200-300之間的狀態碼
  • location.country_code: DE  國家
  • protocols: (「23/telnet」 or 「21/ftp」)  協議
  • tags: scada  標籤
  • 80.http.get.headers.server:nginx  服務器類型版本
  • autonomous_system.description: University  系統描述
  • 正則

鍾馗之眼

鍾馗之眼搜索引擎偏向web應用層面的搜索。
地址:https://www.zoomeye.org/

搜索語法

  • app:nginx  組件名
  • ver:1.0  版本
  • os:windows  操做系統
  • country:」China」  國家
  • city:」hangzhou」  城市
  • port:80  端口
  • hostname:google  主機名
  • site:thief.one  網站域名
  • desc:nmask  描述
  • keywords:nmask’blog  關鍵詞
  • service:ftp  服務類型
  • ip:8.8.8.8  ip地址
  • cidr:8.8.8.8/24  ip地址段

FoFa搜索引擎

FoFa搜索引擎偏向資產搜索。
地址:https://fofa.so

搜索語法

  • title=」abc」 從標題中搜索abc。例:標題中有北京的網站。
  • header=」abc」 從http頭中搜索abc。例:jboss服務器。
  • body=」abc」 從html正文中搜索abc。例:正文包含Hacked by。
  • domain=」qq.com」 搜索根域名帶有qq.com的網站。例: 根域名是qq.com的網站。
  • host=」.gov.cn」 從url中搜索.gov.cn,注意搜索要用host做爲名稱。
  • port=」443」 查找對應443端口的資產。例: 查找對應443端口的資產。
  • ip=」1.1.1.1」 從ip中搜索包含1.1.1.1的網站,注意搜索要用ip做爲名稱。
  • protocol=」https」 搜索制定協議類型(在開啓端口掃描的狀況下有效)。例: 查詢https協議資產。
  • city=」Beijing」 搜索指定城市的資產。例: 搜索指定城市的資產。
  • region=」Zhejiang」 搜索指定行政區的資產。例: 搜索指定行政區的資產。
  • country=」CN」 搜索指定國家(編碼)的資產。例: 搜索指定國家(編碼)的資產。
  • cert=」google.com」 搜索證書(https或者imaps等)中帶有google.com的資產。

高級搜索:

  • title=」powered by」 && title!=discuz
  • title!=」powered by」 && body=discuz
  • ( body=」content=\」WordPress」 || (header=」X-Pingback」 && header=」/xmlrpc.php」 && body=」/wp-includes/「) ) && host=」gov.cn」

Dnsdb搜索引擎

dnsdb搜索引擎是一款針對dbs解析的查詢平臺。
地址:https://www.dnsdb.io/

搜索語法

DnsDB查詢語法結構爲條件1 條件2 條件3 …., 每一個條件以空格間隔, DnsDB 會把知足全部查詢條件的結果返回給用戶.

域名查詢條件

域名查詢是指查詢頂級私有域名全部的DNS記錄, 查詢語法爲domain:.
例如查詢google.com 的全部DNS記錄: domain:google.com.
域名查詢能夠省略domain:.

主機查詢條件

查詢語法:host:
例如查詢主機地址爲mp3.example.com的DNS記錄: host:map3.example.com
主機查詢條件與域名查詢查詢條件的區別在於, 主機查詢匹配的是DNS記錄的Host值

按DNS記錄類型查詢

查詢語法: type:.
例如只查詢A記錄: type:a
使用條件:必須存在domain:或者host:條件,纔可使用type:查詢語法

按IP限制

查詢語法: ip:
查詢指定IP: ip:8.8.8.8, 該查詢與直接輸入8.8.8.8進行查詢等效
查詢指定IP範圍: ip:8.8.8.8-8.8.255.255
CIDR: ip:8.8.0.0/24
IP最大範圍限制65536個

條件組合查詢的例子

查詢google.com的全部A記錄: google.com type:a

 

from: http://thief.one/2017/05/19/1/

相關文章
相關標籤/搜索