搭建被动式漏洞扫描系统:GourdScanV2
github地址:https://github.com/ysrc/GourdScanV2
Gourdscan 是一款开源由国人写的被动式漏洞扫描系统
<h4>Installation</h4>
有多种安装方式,这里使用docker部署
<h6>为了大家获取镜像方便这里给出百度云盘的地址:https://pan.baidu.com/s/1miDOr8W</h6>
注:这个镜像的ssh帐号是root
密码是gourdscan_admin123>-<
</br>
<h5>Linux用户使用wget下载百度云可以这样写命令:</h5>
$~ wget -c --referer=https://pan.baidu.com/s/1miDOr8W -O ubuntu14.04.tar.gz "https://xxxxxxxxxxxxxxxxxxxx"(这是你的实际下载地址)
注:此处-c 为断点续传,--referer为百度云分享地址,-O为指定输出文件,后面接浏览器下载文件的下载地址。
![](https://img.haomeiwen.com/i5765738/7eb6e4973d030c31.png)
</br>
<h5>
下载完成后,导入镜像
$~ cat ubuntu14.04.tar.gz | docker import - gourdscan:v2.0
</h5>
![](https://img.haomeiwen.com/i5765738/e6c50cee356fe81a.png)
<h5>
运行容器
$~ docker run -d --name gourdscan -p 10022:22 -p 10086:10086 -p 10080:80 gourdscan:v2.0 /usr/sbin/sshd -D
![](https://img.haomeiwen.com/i5765738/1a640b74f9425719.png)
然后需要打开多个终端,使用ssh登录先
$~ ssh -p 10022 root@192.168.xx.xx
如:ssh -p 10022 root@192.168.1.100
</h5>
可以在每个命令开头加上nohup ,结尾加上& 使进程在后台进行
<h6>第一个终端:</h6>
root@a38a955e4119:/# redis-server ~/GourdScan_v2/redis.conf
![](https://img.haomeiwen.com/i5765738/c32064672a0a1c8c.png)
<h6>第二个终端:</h6>
root@a38a955e4119:~# cd ~/GourdScanV2/gdscan_scapy/ && python ~/GourdScanV2/gdscan_scapy/proxy_io.py 10086
![](https://img.haomeiwen.com/i5765738/484af830f9488568.png)
<h6>第三个终端:</h6>
root@a38a955e4119:~# cd ~/GourdScanV2/ScanerUI && python app.py --address=0.0.0.0 --port=80
![](https://img.haomeiwen.com/i5765738/36991ac1712fbf7d.png)
<h6>第四个终端:</h6>
root@a38a955e4119:~# cd ~/sqlmap/ && python sqlmapapi.py -s -H 127.0.0.1 -p 8776
![](https://img.haomeiwen.com/i5765738/3ba23d1675f869b7.png)
<h6>第五个终端:</h6>
root@a38a955e4119:~# cd ~/GourdScanV2/gdscan_worker/ && python selfscan.py
![](https://img.haomeiwen.com/i5765738/bfba6a338eefb16d.png)
<h1>搭建完成:View on http://yourip:10080</h1>
![](https://img.haomeiwen.com/i5765738/92f99e4c5180bbfb.png)
![](https://img.haomeiwen.com/i5765738/01701a01a1aa4740.png)
![](https://img.haomeiwen.com/i5765738/3b64e00cf0abd87b.png)
![](https://img.haomeiwen.com/i5765738/11f3541d097c177d.png)
</br></br>
<h4>或者你也可以自行构建镜像</h4>
$~ git clone https://github.com/ysrc/GourdScanV2
![](https://img.haomeiwen.com/i5765738/175fe02b8243fa8e.png)
$~ cd GourdScanV2
$~ vim Dockerfile #修改dockerfile文件,更换源
修改处一:更换ubuntu源
- RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse">/etc/apt/sources.list
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse">>/etc/apt/sources.list
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse">>/etc/apt/sources.list
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse">>/etc/apt/sources.list
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse">>/etc/apt/sources.list
RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse">>/etc/apt/sources.list
RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse">>/etc/apt/sources.list
RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse">>/etc/apt/sources.list
RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse">>/etc/apt/sources.list
RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse">>/etc/apt/sources.list
<h4>如:</h4>
![](https://img.haomeiwen.com/i5765738/d1ffe48f9ab3cb30.png)
修改处二:添加豆瓣源
添加 -i https://pypi.tuna.tsinghua.edu.cn/simple
<h4>如:</h4>
![](https://img.haomeiwen.com/i5765738/d5bfa6220a1983b4.png)
<h3>开始构建</h3>
$~ docker build -t gourdscan:2.1 .
![](https://img.haomeiwen.com/i5765738/9f39fbc35f158edf.png)
<h5>运行容器</h5>
$~ docker run -d -p 10000:22 -p 8000:8000 -p 10086:10086 -p 10806:10806 gourdscan:2.1 /usr/sbin/sshd -D
![](https://img.haomeiwen.com/i5765738/cfd5539641e1b49f.png)
<h4>登入服务器,修改相关操作</h4>
$ ssh root@localhost -p 10000
用户名: root,密码: Y3rc_admin
这个密码在dockerfile可以进行修改,但是需要重新构建噢:
![](https://img.haomeiwen.com/i5765738/d6b48a5261bbf3e5.png)
![](https://img.haomeiwen.com/i5765738/213be6261eebf1b7.png)
执行
(这个步骤会报错,貌似是因为redis-server的版本与redis.conf的版本不一致导致的,反正我暂时是没有解决的,望redis开发者能够在评论区解答)
$~ redis-server ~/gourdscan/conf/redis.conf
$~ gourdscan
![](https://img.haomeiwen.com/i5765738/f824bfa95584e0bb.png)
</br>
<h2>使用打包好的镜像,更容易成功进入容器噢~</h2>