利用crawlergo-to-xray實現自動化漏洞被動掃描平台搭建


一、xray的安裝和配置

1.下載linux下的xray可執行文件
[root@instance-7q32v011 opt]#
2.解壓文件
[root@instance-7q32v011 opt]# unzip   xray_linux_amd64.zip
3.運行xray可執行文件生成證書和配置文件
[root@instance-7q32v011 opt]# ./xray_linux_amd64  genca
4.配置 config.yaml 
[root@instance-7q32v011 crawlergo-to-xray]# vi config.yaml 
這里主要配置認證登錄的username以及password和cookie值,針對登錄系統爬蟲。

二、Server醬的配置

1.登入:用GitHub賬號 登入網站,就能獲得一個 SCKEY(在「 發送消息」頁面)
     
2.綁定:點擊「 微信推送」,掃碼關注同時即可完成綁定


3.發消息:往  http://sc.ftqq.com/SCKEY.send  發GET請求,就可以在微信里收到消息啦
如生成這樣的get請求:
https://sc.ftqq.com/SCU100930Te4d1xxxxxxxxxxxxxxxxx5e1fc35edd9f5bac3e2.send(記下這個地址,后面需要)


三、啟動webhook和修改配置

[root@instance-7q32v011 opt]# git clone https://github.com/undefinedsec/crawlergo-to-xray.git
[root@instance-7q32v011 opt]# cd crawlergo-to-xray/
[root@instance-7q32v011 crawlergo-to-xray]# vi webhook.py 
下面主要對其requests.post中參數值進行修改,修改為上面得到的get請求值。
[root@instance-7q32v011 crawlergo-to-xray]# python3 webhook.py
[root@instance-7q32v011 crawlergo-to-xray]# nohup python3 webhook.py > webhook.log 2>&1 &

[root@instance-7q32v011 crawlergo-to-xray]# tail -f webhook.log

四、啟動xray和修改配置

啟動xray並查看日志(需要自行修改xray的配置文件以及命令行中的的配置,建議在xray里面配置username和password,以及[xray_port和webhook_port端口)
1. nohup ./xray_linux_amd64 webscan --listen  127.0.0.1:7777 --webhook-output  http://127.0.0.1:5000/webhook     --html-output xray.html > xray.log 2>&1 &
2.查看xray日志
[root@instance-7q32v011 crawlergo-to-xray]# tail -f xray.log


五、下載和安裝linux版本的chrome

1.[root@instance-7q32v011 ~]
[root@instance-7q32v011 ~] rpm -ivh google-chrome-stable_current_x86_64.rpm  --nodeps --force
[root@instance-7q32v011 ~] whice google-chrome-stable

六、啟動crawlergo和修改配置

[root@instance-7q32v011 crawlergo-to-xray]# vi crawlergo.py
一般修改chorme的路徑地址以及代理IP地址
如果需要更准確的爬蟲,需要設置cookie和user-agent信息以及加上代理的ip和用戶名和密碼,cookieh和user-agent值可以通過登錄系統后,xyay的代理IP和用戶名和密碼,可以根據前面設置的xray的配置獲得。
抓包獲取
./crawlergo" , "-c" , "/usr/bin/google-chrome" , "-t" , "10" , "-f" , "smart" , "--fuzz-path" , "--output-mode" , "json" , "--ignore-url-keywords" , "quit,exit,logout" , "--custom-headers" , simplejson . dumps ( headers ), "--robots-path" , "--log-level" , "debug" , "--push-to-proxy" , "http://xray_username:xray_password@xray_ip:xray_port" , target
以及
headers = {
                "User-Agent": "",
                "Cookie": ""
            }
[root@instance-7q32v011 crawlergo-to-xray]# vi targets.txt
[root@instance-7q32v011 crawlergo-to-xray]# nohup python3 crawlergo.py > crawlergo.log 2>&1 &
[root@instance-7q32v011 crawlergo-to-xray]# tail -f crawlergo.log

七,最終可以在微信端查看到漏洞情況








免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM