前言
Pigat(Passive Intelligence Gathering Aggregation Tool)被動信息收集聚合工具,該工具通過爬取目標URL在第三方網站比如備案查詢網站、子域名查詢網站的結果來對目標進行被動信息收集。
開發此工具的初衷就是平時在使用一些第三方的網站進行目標信息收集的時候,往往需要利用多個網站進行目標信息的收集,比如通過在線的Whois信息查詢網站、在線的CMS信息查詢網站、目標在Shodan上的信息等等,如此一來,就會增加很多重複的工作量,因此便開發了此工具,將平時常用的網站聚合到一個工具裡。
該工具在2020年3月21日更新至2.0版本,該版本採用Scrapy框架開發,協程處理,運行速度更快,並且支持文件導出功能,同時修復了多個Bug,增加了多個功能。
功能描述
☑️ 被動收集備案信息
☑️ 被動收集 Whois 信息
☑️ 被動收集子域名信息
☑️ 被動收集子域名 IP 信息
☑️ 被動收集子域名 CMS 信息
☑️ 被動收集子域名 Shodan 信息
☑️ 被動收集子域名漏洞信息
使用方法
1、安裝MongoDB
這一步可自行百度,如果不是在本地主機安裝,則需要在安裝MongoDB之後修改setting.py文件的第72行,將數據庫的URL及端口改為自己設置的即可,默認配置如下:
<code> MONGO_DB_URI = 'mongodb://localhost:27017'/<code>
2、安裝第三方模塊文件
<code> pip3 install -r requirements.txt/<code>
3、開始運行
<code> python3 start.py -u target.com/<code>
幫助
<code> -u :指定要被動收集的url
-o : 導出被動收集結果,支持 CSV、JSON、XML 等格式,結果將保存到 ./output 目錄下
-a : 直接被動收集所有結果,沒有步驟提示信息,並默認導出 result.csv 文件
-h : 查看幫助/<code>
示例
python3 start.py -u teamssix.com
<code> - - - - - - - - - - - - - - - - - - - - - - - - - - -
操作編號:
[1] 被動收集備案信息
[2] 被動收集 Whois 信息
[3] 被動收集子域名信息
[4] 被動收集子域名 IP 信息
[5] 被動收集子域名 CMS 信息
[6] 被動收集子域名 Shodan 信息
[7] 被動收集子域名漏洞信息
[8] 退出程序
備註:第 3 步執行一次後才可執行 4、5、6 步,第 6 步執行一次後才可執行第 7 步,否則運行會出現錯誤提示。
- - - - - - - - - - - - - - - - - - - - - - - - - - -
[2020-03-21 13:36:35] 請輸入你的操作步驟 :/<code>
python3 start.py -u teamssix.com -a
<code> [2020-03-21 13:45:50] 正在被動收集 freebuf.com 的備案信息……
[2020-03-21 13:45:50] 備案網站名稱:黑客與極客
[2020-03-21 13:45:50] 備案單位類型:企業
[2020-03-21 13:45:50] 備案單位名稱:上海鬥象信息科技有限公司
[2020-03-21 13:45:50] 備案網站首頁:www.freebuf.com
[2020-03-21 13:45:50] 備案許可證號:滬ICP備13033796號-1
[2020-03-21 13:45:50] 備案審核時間:2019/7/17
[2020-03-21 13:45:56] 正在被動收集 freebuf.com 的 Whois 信息……
[2020-03-21 13:45:56] 註冊商:Alibaba Cloud Computing (Beijing) Co., Ltd.
[2020-03-21 13:45:56] 註冊郵箱:[email protected]
[2020-03-21 13:45:56] 註冊電話:+86.95187
[2020-03-21 13:45:56] 註冊網址:http://www.net.cn
[2020-03-21 13:45:56] 註冊商 Whois 服務器:grs-whois.hichina.com
[2020-03-21 13:45:56] DNS 解析服務器:['F1G1NS1.DNSPOD.NET', 'F1G1NS2.DNSPOD.NET']
[2020-03-21 13:45:56] 註冊日期:2010-08-21T15:24:37Z
[2020-03-21 13:45:56] 到期日期:2021-08-21T15:24:37Z
[2020-03-21 13:45:56] 更新日期:2020-02-27T02:03:14Z
[2020-03-21 13:46:04] 正在被動收集 freebuf.com 的子域信息……
[2020-03-21 13:46:04] 搜索"freebuf.com"查詢結果為:29條。響應時間:5.204秒,搜索結果共 2 頁
[2020-03-21 13:46:04] zhuanlan.freebuf.com 專欄 - FreeBuf 互聯網安全新媒體平臺 | 關注黑客與極客 200
[2020-03-21 13:46:04] you3enter.freebuf.com 空
[2020-03-21 13:46:04] www.freebuf.com FreeBuf互聯網安全新媒體平臺 200
……此處內容太多,省略……
[2020-03-21 13:46:06] ai.freebuf.com 空
[2020-03-21 13:46:06] freebuf.com FreeBuf互聯網安全新媒體平臺 200
[2020-03-21 13:46:09] 正在被動收集 freebuf.com 的子域 IP 信息……
[2020-03-21 13:46:09] 提示:如果出現大量無法判斷 IP 的情況,請嘗試更換自己的IP
[2020-03-21 13:46:09] freebuf.com wittest.freebuf.com 123.57.248.123
[2020-03-21 13:46:09] freebuf.com www.freebuf.com 123.57.145.69
……此處內容太多,省略……
[2020-03-21 13:46:12] freebuf.com ai.freebuf.com 無法判斷 IP
[2020-03-21 13:46:14] freebuf.com static.freebuf.com 39.96.250.248
[2020-03-21 13:46:17] 正在被動收集 freebuf.com 的子域 CMS 信息……
[2020-03-21 13:46:18] freebuf.com static.freebuf.com Apache 2.2.21
[2020-03-21 13:46:19] freebuf.com wittest.freebuf.com WitAwards 2017互聯網安全年度評選 源
……此處內容太多,省略……
[2020-03-21 13:46:28] freebuf.com bar.freebuf.com FreeBuf小酒館 Apache 2.2.21
[2020-03-21 13:46:29] freebuf.com company.freebuf.com FreeBuf.COM | 企業空間 jQuery 2.0.3 Twitter Bootstrap Tengine PHP
[2020-03-21 13:47:23] 正在被動收集 freebuf.com 的子域 shodan 信息……
[2020-03-21 13:47:23] 如果您的 api 輸入錯誤,可到數據庫中修改
[2020-03-21 13:47:26] freebuf.com 123.57.145.69 ['www.freebuf.com', 'search.freebuf.com'] China Aliyun Computing Co. None [80]
[2020-03-21 13:47:26] freebuf.com 182.254.150.199 ['freebuf.com', 'freebuf.com'] China Tencent cloud computing None [443] ['CVE-2016-6291', 'CVE-2016-6290', 'CVE-2016-6292', 'CVE-2016-4473', 'CVE-2016-6294', 'CVE-2016-6297',
'CVE-2016-5767', 'CVE-2016-5768', 'CVE-2016-5769', 'CVE-2018-10547', 'CVE-2018-10546', 'CVE-2019-9641', 'CVE-2016-6295', 'CVE-2018-10548', 'CVE-2018-19520', 'CVE-2018-19396', 'CVE-2016-7478', 'CVE-2016-5766', 'CVE-2018-19935', 'CVE-2016-
6296', 'CVE-2018-17082', 'CVE-2018-10545', 'CVE-2019-9639', 'CVE-2019-9638', 'CVE-2019-9637', 'CVE-2015-8994', 'CVE-2018-14883', 'CVE-2016-5773', 'CVE-2016-5772', 'CVE-2016-5771', 'CVE-2016-5770', 'CVE-2016-6289', 'CVE-2018-19395', 'CVE-2
019-6977', 'CVE-2018-20783', 'CVE-2016-7568', 'CVE-2018-19518', 'CVE-2016-5399', 'CVE-2019-9023', 'CVE-2019-9020', 'CVE-2019-9021', 'CVE-2017-16642', 'CVE-2019-9024', 'CVE-2018-15132', 'CVE-2018-10549']
[2020-03-21 13:47:46] freebuf.com 123.57.248.123 ['wittest.freebuf.com', 'wittest.freebuf.com'] China Aliyun Computing Co. None [80, 443, 2222] ['CVE-2012-0021', 'CVE-2017-15906', 'CVE-2011-4317', 'CVE-2017-7679', 'CVE-201
6-0777', 'CVE-2018-1312', 'CVE-2011-3368', 'CVE-2012-3499', 'CVE-2012-4558', 'CVE-2013-1896', 'CVE-2011-5000', 'CVE-2016-8612', 'CVE-2014-1692', 'CVE-2012-4557', 'CVE-2014-0098', 'CVE-2017-7668', 'CVE-2012-0814', 'CVE-2013-6438', 'CVE-201
2-2687', 'CVE-2011-4415', 'CVE-2012-0031', 'CVE-2010-5107', 'CVE-2013-2249', 'CVE-2016-10708', 'CVE-2011-3607', 'CVE-2017-3167', 'CVE-2011-4327', 'CVE-2012-0053', 'CVE-2012-0883', 'CVE-2017-3169', 'CVE-2014-0231', 'CVE-2013-1862', 'CVE-20
16-4975', 'CVE-2010-4478', 'CVE-2010-4755']
[2020-03-21 13:47:54] freebuf.com 39.96.250.248 ['zhuanlan.freebuf.com', 'shop.freebuf.com', 'wit.freebuf.com', 'my.freebuf.com', 'open.freebuf.com', 'static.freebuf.com', 'live.freebuf.com', 'job.freebuf.com', 'prize.freebuf.com'
, 'www.freebuf.com', 'fit.freebuf.com', 'api.freebuf.com', 'chat.freebuf.com', 'bar.freebuf.com', 'company.freebuf.com', 'wit.freebuf.com', 'prize.freebuf.com', 'zhuanlan.freebuf.com', 'open.freebuf.com', 'live.freebuf.com', 'job.freebuf.
com', 'fit.freebuf.com', 'my.freebuf.com', 'shop.freebuf.com', 'api.freebuf.com', 'chat.freebuf.com', 'company.freebuf.com', 'bar.freebuf.com', 'static.freebuf.com'] China Aliyun Computing Co. None [5000, 6666, 8334, 8080, 8081,
7443, 8086, 8087, 8090, 10000, 9201, 9000, 8106, 9003, 53, 443, 8000, 8001, 8002, 8009, 81, 82, 83, 7001, 4443, 8800, 7777, 1000, 9200, 6001, 8181, 8443, 9002]
[2020-03-21 13:47:57] 正在被動收集 freebuf.com 的漏洞詳情信息……
[2020-03-21 13:47:58] freebuf.com CVE-2016-6291 高危 PHPext/exif/exif.c文件安全漏洞 182.254.150.199 ['freebuf.com'] http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-201607-929
[2020-03-21 13:47:58] freebuf.com CVE-2016-6292 中危 PHPext/exif/exif.c文件安全漏洞 182.254.150.199 ['freebuf.com'] http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-201607-930
[2020-03-21 13:47:58] freebuf.com CVE-2016-4473 高危 PHP安全漏洞 182.254.150.199 ['freebuf.com'] http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-201610-062
[2020-03-21 13:47:58] freebuf.com CVE-2016-5768 高危 PHPmbstring擴展整數溢出漏洞 182.254.150.199 ['freebuf.com'] http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-201606-559
[2020-03-21 13:47:58] freebuf.com CVE-2016-6297 中危 PHPext/zip/zip_stream.c文件整數溢出漏洞 182.254.150.199 ['freebuf.com'] http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-201607-935
……此處內容太多,省略……/<code>
運行截圖
![【工具分享】Pigat v2.0正式發佈](http://p2.ttnews.xyz/loading.gif)
![【工具分享】Pigat v2.0正式發佈](http://p2.ttnews.xyz/loading.gif)
下載地址
<code> https://github.com/teamssix/pigat/releases/<code>
寫在最後
因為我沒有太多的開發經驗,因此該工具難免存在有問題以及不恰當的地方,希望各位大佬在使用的過程中碰到問題能夠多多反饋。
⭐️開發不易,還望大佬們走過路過順手給個star,小弟將不勝感激。
閱讀更多 TeamsSix 的文章