阳子
阳子
Published on 2024-05-27 / 90 Visits
0
0

部署Gophish

Linux部署

注意:以下方式采用1panel部署

1、访问连接:https://1panel.cn/docs/installation/online_installation/,安装1panel面板,访问面板后台。

curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh

2、安装进程守护supervisor

apt-get install supervisor

3、上传Gophish文件

推荐上传路径为/gophish

4、创建进程守护

创建一个进程守护,目录选择文件上传的路径,启动命令为目录中的执行程序gophish(可能需要通过chmod 命令为程序提权),创建后查看进程守护日志获取密码(从Github上下载的最新版本密码自动生成)。

5、创建域名访问

安装OpenResty;添加管理网站,反向代理https://127.0.0.1:3333;添加钓鱼页面,反向代理https://127.0.0.1:8080。

Docker离线部署

下载docker的安装文件

https://download.docker.com/linux/static/stable/x86_64/

docker-26.1.3.tgz                     2024-05-16 12:47:10 70.3 MiB

将docker-26.1.3.tgz文件上传到linux系统上,用ftp工具上传即可

解压

tar -zxvf docker-26.1.3.tgz

4、将解压出来的docker文件复制到 /usr/bin/ 目录下

cp docker/* /usr/bin/

5、进入/etc/systemd/system/目录,并创建docker.service文件

cd /etc/systemd/system/
touch docker.service

6、打开docker.service文件,将以下内容复制

vim docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
​
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd --selinux-enabled=false --insecure-registry=192.168.200.128
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
​
[Install]
WantedBy=multi-user.target

注意: --insecure-registry=192.168.200.128 此处改为你自己服务器ip

给docker.service文件添加执行权限

chmod 777 /etc/systemd/system/docker.service

重新加载配置文件(每次有修改docker.service文件时都要重新加载下)

systemctl daemon-reload

启动

systemctl start docker

设置开机启动

systemctl enable docker.service

查看docker状态

systemctl enable docker.service

离线加载镜像

docker load -i my_image.tar #请求改文件绝对路径
docker run -it -d --rm --name gophish -p 3333:3333 -p 8003:80 -p 8004:8080 gophish:latest #镜像请提前下载


Comment