0%

docker安装蜜罐

docker安装蜜罐

QQ群:397745473

基于Paramiko的高交互SSH蜜罐

github: https://github.com/ohmyadd/wetland

docer: https://hub.docker.com/r/ohmyadd/wetland/

参考文档: https://www.freebuf.com/sectool/145527.html

1
docker pull ohmyadd/wetland

安装MHN

参考文档: https://wooyun.js.org/drops/%E8%9C%9C%E7%BD%90%E7%BD%91%E7%BB%9C.html

拉取一个debian镜象

1
2
3
4
5
6
docker search ubuntu
docker pull ubuntu:18.04
docker pull ubuntu:14.04
docker pull ubuntu:16.04
docker images
docker pull txt3rob/mht-docker

https://hub.docker.com/r/txt3rob/mht-docker/

1
2
3
4
5
6
7
8
9
10
11
12
docker run -p 10000:10000 -p 8080:80 -p 3000:3000 -p 8089:8089 --name mhn -t -i txt3rob/mht-docker

docker run -p 10000:10000 -p 8080:80 -p 8443:443 -p 3000:3000 -p 8091:8091 --name mhnsrv --hostname=mhnsrv01 -t -i ubuntu:14.04 /bin/bash


docker run -i -t --privileged=true -p 192.168.13.128:22:22/tcp --name cowrie1 ubuntu:16.04/bin/bash

pip install tld --ignore-installed six




1
2
3
4
5
6
7
8
9
docker run -it -d -p 1122:22 -p 1444:1444 ubuntu (old)
docker run -it -d -p 1122:22 -p 3000:3000 ubuntu:16.04 (new) 把服务器的1122端口映射到docker的22上



开机启动:
如果创建时未指定 --restart=always ,可通过update 命令设置
docker update --restart=always xxx
docker run --restart=always -it -d -p 1443:1443 -p 8834:8834 leishianquan/awvs-nessus:v2
1
2
3
4
5
6
7
8
9
10
11
12
docker ps -a
docker exec -it 容器id /bin/bash
docker exec -it f175bd270545 /bin/bash

安装必要软件:
apt-get update && apt-get install -y lsb-release && apt-get clean all
apt-get install sudo
apt-get -y update;apt-get -y upgrade;apt-get install curl net-tools wget vim dos2unix git dbus mongodb -y
apt-get install openssh-server
/etc/init.d/ssh start
/etc/init.d/dbus start

1
2
3
4
5
6
7
8
9
10
11
12
# 操作系统:ubuntu16.04

# 下载
apt-get install software-properties-common
python2

git clone https://github.com/threatstream/mhn.git

# 安装过程有点久,需要安装很多软件包
cd mhn && ./install.sh

# 配置服务器信息,这里的邮箱与密码就是安装完成后的Web后台密码

错误E: Unable to locate package python-pip

1
2
3
4
5
6
7
apt-get update
apt-get install software-properties-common
apt install python2
python2.7 get-pip.py
注释掉: apt-get install -y python-pip
升级python
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

报错2

1
2
Note, selecting 'python-dev-is-python2' instead of 'python-dev'
E: Unable to locate package python-pip
1
2
3
4
5
6
7
8
apt-get install python-dev-is-python2
apt-get install python-dev


修改: ./install_hpfeeds.sh
apt-get -y install libffi-dev build-essential python-pip python-dev git libssl-dev supervisor
改成:
apt-get -y install libffi-dev build-essential python-dev-is-python2 git libssl-dev supervisor

报错3

1
2
W: Size of file /var/lib/apt/lists/esm.ubuntu.com_ubuntu_dists_trusty-infra-security_main_binary-amd64_Packages.gz is not what the server reported 348577 348799
E: GPG error: http://downloads-distro.mongodb.org dist InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)

Docker 安装 HFISH

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
参考: https://hub.docker.com/r/imdevops/hfish
参考: https://hub.docker.com/r/hfishs/hub

参考: https://www.bookstack.cn/read/hfish/d805c8202babfae2.md

docker pull imdevops/hfish

单点部署:
docker run -d --name hfish -p 21:21 -p 22:22 -p 23:23 -p 3306:3306 -p 6379:6379 -p 8080:8080 -p 8989:8989 -p 9000:9000 -p 9001:9001 -p 11211:11211 imdevops/hfish:latest

docker ps -a
docker exec -it 容器名 sh
docker exec -it ccb30e30585e sh
docker exec -it ccb30e30585e /bin/bash

21 为 FTP 端口
22 为 SSH 端口
23 为 Telnet 端口
3306 为 Mysql 端口
6379 为 Redis 端口
8080 为 暗网 端口
8989 为 插件 端口
9000 为 Web 端口
9001 为 系统管理后台 端口
11211 为 Memcache 端口以上端口根据实际需要决定是否打开,并注意端口冲突。


主节点管理端部署
docker run -d -it -p 8080:8080 -p 8989:8989 -p 9000:9000 -p 9001:9001 -p 6379:6379 7da65a1950f0


客户端子节点部署
docker run -d -it -p 7879:7879 -p 6379:6379 -p 8080:8080 -p 8989:8989 -p 9000:9000 -p 11211:11211 -e CLUSTER_IP=192.168.123.49:6379 -e NODE_NAME=clinet 7da65a1950f0

QQ群:397745473

欢迎关注我的其它发布渠道