分享一款基于Pocsuite的漏洞扫描系统
作者:媒体转发 时间:2018-05-07 09:29
PS:本项目仅用于测试、学习使用,不得用于其他非法目的。
本项目是一款基于 Flask 应用框架的在线漏洞扫描系统,同时集成了渗透测试常用的端口扫描、子域名爆破等功能,后端漏洞扫描采用的是知道创宇安全团队的开源漏洞测试框架 Pocsuite。
项目地址:https://github.com/jeffzh3ng/InsectsAwake
主要功能 漏洞扫描漏洞扫描通过调用创宇的 Pocsuite 进行扫描,扫描插件通过 Seebug 可以获取,或者自己编写。

扫描目标只能是单个 IP 或者 URL,不支持网段扫描(公司是中小型公司,就忘写这块需求了),默认有80余个插件,大多是 Seebug 的免费PoC
任务周期可以选择临时、每日、每周或每月
资产管理添加各系统或部门网络资产

可以通过各资产库创建漏洞扫描任务,同样资产库只能是单个 IP 或者 URL。
开启端口发现功能后,后端会定时调用 nmap 对资产进行端口扫描,需要扫描的端口可以在设置里进行配置
域名发现功能即子域名爆破功能,但目前功能尚不完善,只能通过配置字典进行暴力猜解,域名字典可以在设置处进行配置,项目 tests 文件夹内提供了一份子域名字典(字典来源 ring04h 的 wydomain 项目)

安装演示所使用的操作系统为 Ubuntu 16.04
获取项目源码 git clone https://github.com/jeffzh3ng/InsectsAwake.git 安装 Python 及 pip sudo apt update sudo apt install python python-pip 安装 MongoDB sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 echo "deb [ arch=amd64,arm64,ppc64el,s390x ] xenial/mongodb-enterprise/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.listecho "deb "$(lsb_release -sc)"/mongodb-enterprise/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise-3.4.list echo "deb "$(lsb_release -sc)"/mongodb-enterprise/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise-3.4.list sudo apt-get update sudo apt-get install -y mongodb-enterprise其他系统安装参考官方手册:
https://docs.mongodb.com/manual/installation/
安装 Python 依赖包 cd InsectsAwake sudo pip install pip -U sudo pip install -r requirements.txt 安装 Nmap sudo apt install nmap或者源码安装
配置数据库启动数据库
sudo service mongod start mongo --host 127.0.0.1:27017添加用户
use InsectsAwake db.createUser({user:'you username',pwd:'you password',roles:[{role:'dbOwner',db:'InsectsAwake'}]}) exit 修改扫描器配置扫描器配置文件路径:InsectsAwake-Project/instance/config.py
class Config(): WEB_USER = 'admin' // 扫描器登录用户 WEB_PASSWORD = 'whoami' // 扫描器登录密码 WEB_HOST = '127.0.0.1' // 本地访问 WEB_PORT = 5000 // Web服务端口 POCSUITE_PATH = basedir + '/../InsectsAwake/views/modules/scanner/pocsuite_plugin/' class ProductionConfig(Config): DB_HOST = '127.0.0.1' // 数据库地址 DB_PORT = 27017 // 数据库端口 DB_USERNAME = 'testuser' // 数据库用户 DB_PASSWORD = 'testpwd' // 数据库密码 DB_NAME = 'test' // 数据库名 // 数据库集合名 PLUGIN_DB = 'test_plugin_info' TASKS_DB = 'test_tasks' VULNERABILITY_DB = 'test_vuldb' ASSET_DB = 'test_asset' CONFIG_DB = 'test_config' SERVER_DB = 'test_server' SUBDOMAIN_DB = 'test_subdomain' DOMAIN_DB = 'test_domain' WEEKPASSWD_DB = 'test_weekpasswd' 初始化数据库 cd /InsectsAwake/migration python start.py 运行系统完成依赖安装、数据库配置及修改扫描器配置后
sudo ./run.sh restart

