在docker容器中运行或一键运行GourdScanV2 (windows版)

2016-10-27 12:01:07 41 22745 1


看到论坛@v0new 会员发了篇在docker容器中运行kali linux (windows版)
听说有些人在win运行GourdScanV2失败. 我也来发篇如何运行或一键运行GourdScanV2.


0x01 下载安装 Docker
https://github.com/docker/toolbox/releases/download/v1.12.2/DockerToolbox-1.12.2.exe
GourdScanV2 docker镜像
https://pan.baidu.com/s/1jINkSdS

安装步骤同样略过.安装完成后桌面会产生了四个图标,首次打开或关闭虚拟机后.Docker Quickstart Terminal如下图.



docker打开虚拟机设置完成后出现命令栏.


0x02 获取当前docker默认路径,然后到跳转到下载好的GourdScanV2镜像目录.

$ pwd
$ cd C:/Users/Administrator/Desktop/vbox
$ ls


导入镜像文件,查看导入镜像状态.

$ cat gourdscan.tar | docker import - gourdscan:v2.0

$ docker images


0x03 运行GourdScanV2

$ docker run -d --name gourdscan -p 10022:22 -p 10086:10086 -p 10080:80 gourdscan:v2.0 /usr/sbin/sshd -D


获取GourdScanV2 root

$ docker exec -it gourdscan bash


多开五个Docker Quickstart Terminal窗口获取root后执行命令:

root@abce5902f9c8:/# redis-server ~/GourdScanV2/redis.conf
root@abce5902f9c8:/# cd ~/GourdScanV2/gdscan_scapy/&& python ~/GourdScanV2/gdscan_scapy/mix_proxy.py 0.0.0.0 10086 或者 cd ~/GourdScanV2/gdscan_scapy/ && python ~/GourdScanV2/gdscan_scapy/proxy_io.py 10086
root@abce5902f9c8:/# cd ~/GourdScanV2/ScanerUI && python app.py --address=0.0.0.0 --port=80
root@abce5902f9c8:/# cd ~/sqlmap/ && python sqlmapapi.py -s -H 127.0.0.1 -p 8776
root@abce5902f9c8:/# cd ~/GourdScanV2/gdscan_worker/ && python selfscan.py

运行图详细如下:







0x04 运行完了这里之后你已经拥有GourdScanV2神器~.
访问http://127.0.0.1:10080/ 证明一下.



0x05 浏览器http代理
设置为127.0.0.1:10086就可以使用被动扫描.




0x06 如访问不了vbox需要设置转发端口




0x07 一键运行GourdScanV2
这样运行太麻烦了.作为懒人的我.一键运行适合我多点.如果你像我一样就直接忽略以上几个步骤,下载一键运行脚本.
只需要做的0x01,0x02两个步骤即可,五个窗口打开后可关闭,是可以后台运行的.只支持X64运行.其他的自行测试与修改,只是写好一个列子.


证书生成问题,留给其他人解决.



附一些docker 常用命令笔记说明:
docker run -t -i <image> 用镜像创建一个容器
docker pull image 拉拽镜像
docker images 查看可用镜像
docker ps 查看运行的容器
docker ps -a 查看所有的容器
docker stop <container id> 停止该容器
docker start <container id> 开始该容器
docker attach <container id>与该容器交互
docker commit <container id> <new id>创建当前运行镜像的新的镜像(包含改变)
docker rm <container id>删除容器
docker rmi <image name>删除镜像
docker cp <container Id>:/file/path/within/container /host/path/target 从Docker容器内拷贝文件到主机上
sudo docker save -o ubuntu_14.04.tar ubuntu:14.04 导出镜像文件
sudo docker load --input ubuntu_14.04.tar 导入镜像文件
docker exec -it <container id> /bin/sh   与容器交互
docker inspect <container id>    容器信息
docker build -t apache-php2 .     Dockerfile创建镜像
docker tag <container id> username/name:devel 修改镜像的标签
docker cp <containerId>:/file/path/within/container /host/path/target  从容器内拷贝文件到主机上

TCV 3

关于作者

uncia96篇文章1001篇回复

评论41次

要评论?请先  登录  或  注册
  • 21楼
    2016-10-28 20:11
    笑忘洛神

    是不是我太笨了 =。= 问题又出现了$ docker exec -it gourdscan bashroot@ac62000cef35:/# redis-server ~/GourdScanV2/redis.conf127:M 28 Oct 11:58:41.982 # Creating Server TCP listening socket 127.0.0.1:6379: bind: Address already in useroot@ac62000cef35:/# cd ~/GourdScanV2/gdscan_scapy/ && python ~/GourdScanV2/gdscan_scapy/proxy_io.py 10086 _____ _ / ____| | | | | __ ___ _ _ _ __ __| | | | |_ | / _ \ | | | | | '__| / _` | | |__| | | (_) | | |_| | | | | (_| | \_____| \___/ \__,_| |_| \__,_| Cond0r@Codescan Ver 2.0Starting HTTP proxy on port 10086Traceback (most recent call last): File "/root/GourdScanV2/gdscan_scapy/proxy_io.py", line 271, in <module> run_proxy(port) File "/root/GourdScanV2/gdscan_scapy/proxy_io.py", line 260, in run_proxy app.listen(port) File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1850, in listen server.listen(port, address) File "/usr/local/lib/python2.7/dist-packages/tornado/tcpserver.py", line 126, in listen sockets = bind_sockets(port, address=address) File "/usr/local/lib/python2.7/dist-packages/tornado/netutil.py", line 194, in bind_sockets sock.bind(sockaddr) File "/usr/lib/python2.7/socket.py", line 228, in meth return getattr(self._sock,name)(*args)socket.error: Address already in useroot@ac62000cef35:~/GourdScanV2/gdscan_scapy# cd ~/GourdScanV2/ScanerUI && python app.py --address=0.0.0.0 --port=80Traceback (most recent call last): File "app.py", line 28, in <module> main() File "app.py", line 24, in main http_server.listen(port=options.port, address=options.address) File "/usr/local/lib/python2.7/dist-packages/tornado/tcpserver.py", line 126, in listen sockets = bind_sockets(port, address=address) File "/usr/local/lib/python2.7/dist-packages/tornado/netutil.py", line 194, in bind_sockets sock.bind(sockaddr) File "/usr/lib/python2.7/socket.py", line 228, in meth return getattr(self._sock,name)(*args)socket.error: Address already in useroot@ac62000cef35:~/GourdScanV2/ScanerUI# cd ~/sqlmap/ && python sqlmapapi.py -s -H 127.0.0.1 -p 8776 Running REST-JSON API server at '127.0.0.1:8776'.. Admin ID: ece2a9a71a48a1f24248530da9f959f4 IPC database: /tmp/sqlmapipc-6ZBaYR REST-JSON API server connected to IPC database Using adapter 'wsgiref' to run bottle Address already in use ('127.0.0.1:8776')root@ac62000cef35:~/sqlmap# cd ~/GourdScanV2/gdscan_worker/ && python selfscan.py一脸尴尬 所有命令我都执行了啊为啥不能访问http://127.0.0.1:10080/(再次求问,虚心求教)

    1

    要开多个shell窗口,或者每条命令都加个 nohup 让它后台运行才行

  • 20楼
    2016-10-28 20:08

    一键运行脚本我也忍着割肉的决心买了,,,,还是不知道怎么用==(感觉自己有些像白痴了,望解答==)

  • 19楼
    2016-10-28 20:02

    是不是我太笨了 =。= 问题又出现了

    $ docker exec -it gourdscan bash root@ac62000cef35:/# redis-server ~/GourdScanV2/redis.conf 127:M 28 Oct 11:58:41.982 # Creating Server TCP listening socket 127.0.0.1:6379: bind: Address already in use root@ac62000cef35:/# cd ~/GourdScanV2/gdscan_scapy/ && python ~/GourdScanV2/gdscan_scapy/proxy_io.py 10086     _____                              _   / ____|                            | |  | |  __    ___    _   _   _ __    __| |  | | |_ |  / _ \  | | | | | '__|  / _` |  | |__| | | (_) | | |_| | | |    | (_| |   \_____|  \___/   \__,_| |_|     \__,_|      Cond0r@Codescan      Ver 2.0   Starting HTTP proxy on port 10086 Traceback (most recent call last):   File "/root/GourdScanV2/gdscan_scapy/proxy_io.py", line 271, in <module>     run_proxy(port)   File "/root/GourdScanV2/gdscan_scapy/proxy_io.py", line 260, in run_proxy     app.listen(port)   File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1850, in listen     server.listen(port, address)   File "/usr/local/lib/python2.7/dist-packages/tornado/tcpserver.py", line 126, in listen     sockets = bind_sockets(port, address=address)   File "/usr/local/lib/python2.7/dist-packages/tornado/netutil.py", line 194, in bind_sockets     sock.bind(sockaddr)   File "/usr/lib/python2.7/socket.py", line 228, in meth     return getattr(self._sock,name)(*args) socket.error: [Errno 98] Address already in use root@ac62000cef35:~/GourdScanV2/gdscan_scapy# cd ~/GourdScanV2/ScanerUI && python app.py --address=0.0.0.0 --port=80 Traceback (most recent call last):   File "app.py", line 28, in <module>     main()   File "app.py", line 24, in main     http_server.listen(port=options.port, address=options.address)   File "/usr/local/lib/python2.7/dist-packages/tornado/tcpserver.py", line 126, in listen     sockets = bind_sockets(port, address=address)   File "/usr/local/lib/python2.7/dist-packages/tornado/netutil.py", line 194, in bind_sockets     sock.bind(sockaddr)   File "/usr/lib/python2.7/socket.py", line 228, in meth     return getattr(self._sock,name)(*args) socket.error: [Errno 98] Address already in use root@ac62000cef35:~/GourdScanV2/ScanerUI# cd ~/sqlmap/ && python sqlmapapi.py -s -H 127.0.0.1 -p 8776 [11:59:46] [INFO] Running REST-JSON API server at '127.0.0.1:8776'.. [11:59:46] [INFO] Admin ID: ece2a9a71a48a1f24248530da9f959f4 [11:59:46] [DEBUG] IPC database: /tmp/sqlmapipc-6ZBaYR [11:59:46] [DEBUG] REST-JSON API server connected to IPC database [11:59:46] [DEBUG] Using adapter 'wsgiref' to run bottle [11:59:46] [ERROR] Address already in use ('127.0.0.1:8776') root@ac62000cef35:~/sqlmap# cd ~/GourdScanV2/gdscan_worker/ && python selfscan.py
    一脸尴尬 所有命令我都执行了啊 为啥不能访问http://127.0.0.1:10080/ (再次求问,虚心求教)

  • 18楼
    2016-10-28 19:45
    笑忘洛神

    在 0x03 运行GourdScanV2 这条命令上出了问题 (不懂该怎么办,这问题在您看来可能有些白痴)回显如下求解 (刚刚明明成功执行了,重启机器再来也不行)

    1
    uncia

    你已经启动过了。只能删除此虚拟机。docker kill gourdscandocker rm gourdscan重新运行试试.不用导入了.

    2
  • 17楼
    2016-10-28 13:37
    exp1oit

    我试了下,打开网页会出现 500: Internal Server Error

    1
    uncia

    github被墙.只能代理.下载.

    2
    exp1oit

    可软件我已经下载了啊

    3

    建议你用一键脚本解决.

  • 16楼
    2016-10-28 11:30
    exp1oit

    我试了下,打开网页会出现 500: Internal Server Error

    1
    uncia

    github被墙.只能代理.下载.

    2

    可软件我已经下载了啊

  • 15楼
    2016-10-28 11:18
    exp1oit

    我试了下,打开网页会出现 500: Internal Server Error

    1

    github被墙.只能代理.下载.

  • 14楼
    2016-10-28 11:17

    我试了下,打开网页会出现 500: Internal Server Error

  • 13楼
    2016-10-28 09:52
    笑忘洛神

    在 0x03 运行GourdScanV2 这条命令上出了问题 (不懂该怎么办,这问题在您看来可能有些白痴)回显如下求解 (刚刚明明成功执行了,重启机器再来也不行)

    1

    你已经启动过了。只能删除此虚拟机。 docker kill gourdscan docker rm gourdscan 重新运行试试.不用导入了.

  • 12楼
    2016-10-27 23:12

    在 0x03 运行GourdScanV2 这条命令上出了问题 (不懂该怎么办,这问题在您看来可能有些白痴) 回显如下 求解 (刚刚明明成功执行了,重启机器再来也不行)

  • 11楼
    2016-10-27 19:20

    一直没时间折腾,对docker又不熟····楼主这篇我点赞。

  • 10楼
    2016-10-27 17:18
    xiaix

    另外给个建议,不需要多开五个Docker Quickstart Terminal窗口获取root后执行命令的,只需要在同一个窗口内使用nohup让每条命令在后台运行即可:root@29142751e7bf:/# nohup redis-server ~/GourdScanV2/redis.conf &root@29142751e7bf:/# cd ~/GourdScanV2/gdscan_scapy/root@29142751e7bf:~/GourdScanV2/gdscan_scapy# nohup python ~/GourdScanV2/gdscan_scapy/mix_proxy.py 0.0.0.0 10086 &root@29142751e7bf:~/GourdScanV2/gdscan_scapy# cd ~/GourdScanV2/ScanerUIroot@29142751e7bf:~/GourdScanV2/ScanerUI# nohup python app.py --address=0.0.0.0 --port=80root@29142751e7bf:~/GourdScanV2/ScanerUI# cd ~/sqlmap/root@29142751e7bf:~/sqlmap# nohup python sqlmapapi.py -s -H 127.0.0.1 -p 8776 &

    1

    补充的不错~,考虑到运行后是否有报错.

  • 9楼
    2016-10-27 15:51

    另外给个建议,不需要多开五个Docker Quickstart Terminal窗口获取root后执行命令的,只需要在同一个窗口内使用nohup让每条命令在后台运行即可:

    root@29142751e7bf:/# nohup redis-server ~/GourdScanV2/redis.conf & root@29142751e7bf:/# cd ~/GourdScanV2/gdscan_scapy/ root@29142751e7bf:~/GourdScanV2/gdscan_scapy# nohup python ~/GourdScanV2/gdscan_scapy/mix_proxy.py 0.0.0.0 10086 & root@29142751e7bf:~/GourdScanV2/gdscan_scapy# cd ~/GourdScanV2/ScanerUI root@29142751e7bf:~/GourdScanV2/ScanerUI# nohup python app.py --address=0.0.0.0 --port=80 root@29142751e7bf:~/GourdScanV2/ScanerUI# cd ~/sqlmap/ root@29142751e7bf:~/sqlmap# nohup python sqlmapapi.py -s -H 127.0.0.1 -p 8776 &

  • 8楼
    2016-10-27 15:41

    话说导入镜像时直接用 docker import gourdscan.tar gourdscan:v2.0 不就行了嘛,为啥要先cat呢?

  • 7楼
    2016-10-27 14:56
    aimet

    能不能写个ubuntu一键运行

    1

    有示列子,自己修改个sh来启动自动运行.

  • 6楼
    2016-10-27 14:52

    能不能写个ubuntu一键运行

  • 5楼
    2016-10-27 14:32

    按照表哥的步骤成功安装,买个附件感谢下1!!

  • 4楼
    2016-10-27 13:05
    Andre

    听说网卡抓包尽量不要用sqlmap,会造成死循环

    1

    没发现什么问题.

  • 3楼
    2016-10-27 12:41

    听说网卡抓包尽量不要用sqlmap,会造成死循环

  • 2楼
    2016-10-27 12:27
    歲月無聲

    Uncia‮牛牛,排版有點亂呀,支持https嗎?

    1

    支持.证书需要自己生成.还没玩https