Watchdog整合多款安全工具并以web形式展现,它辅助渗透测试人员对IT资产进行资产管理。功能有:
1、子域名扫描:oneforall
2、端口服务扫描:shodan+异步socket+nmap(ip数据库、CDN判断)
3、URL可用探测
4、驱动浏览器爬虫采集数据:crawlergo
5、被动漏洞扫描:xray
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.shsh Miniconda3-latest-Linux-x86_64.sh # 根据提示进行安装
conda create --name python python=3.8 # 创创建环境conda activate python # 激活环境,现在你应该在python3.8环境中
apt-get updateapt install build-essential libssl-dev libffi-dev python3-dev # python相关环境apt install nmap # 安装nmapsudo apt-get install chromium-browser # 安装chromium浏览器
git clone https://github.com/CTF-MissFeng/Watchdog.gitcd Watchdogpip install -r requirements.txt
apt install postgresql postgresql-contrib # 安装postgres数据库sudo -u postgres psql # 进入psql命令行\password postgres # 设置postgres用户密码
参考:http://lazybios.com/2016/11/how-to-make-postgreSQL-can-be-accessed-from-remote-client/修改postgresql.conf修改pg_hba.conf现在使用数据库管理工具连接postgresql数据库,应该可以连接成功。在创建一个空的src数据库
vim Watchdog/web/config.py # 修改数据库连接配置vim Watchdog/client/database.py # 修改数据库连接配置
cd Watchdogexport FLASK_APP=app.py:APP # 配置flaskAPPflask --help # 现在你应该可以Commands看到有3个自定义命令flask createdb # 创建数据库flask createuser # 创建测试账户,root/[email protected]flask run -p 80 -h 0.0.0.0 # 启动后,打开该服务器外网ip,访问http://外网ip 是否可以成功访问并登录web环境ontrol + C 结束flask运行,使用后台运行nohup flask run -p 80 -h 0.0.0.0 > web.log 2>&1 &
vim client/subdomain/oneforall/config.py # 必须配置shodan api,其他参数自己选填# 启动子域名扫描cd client/subdomain/oneforallnohup python -u sbudomain_run.py > dns.log 2>&1 &cat dns.log # 查看日志是否正常# 启动端口扫描cd client/portscannohup python -u portscan_run.py > port.log 2>&1 &cat port.log # 查看日志是否正常# 启动url扫描cd client/urlscan/url_probenohup python -u urlscan_run.py > url.log 2>&1 &cat url.log # 查看日志是否正常# 启动xraycd client/urlscan/xraynohup python -u xray_run.py > xray.log 2>&1 &cat xray.log # 查看日志是否正常
https://github.com/CTF-MissFeng/Watchdog
推荐阅读