ctf平台的搭建

一、购买服务器,或自用虚拟机

二、安装ctf平台相关环境

换源:我个人用的ubuntu18.04,个人通过个人喜好来进行源的修改

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

 安装环境

apt update
apt upgrade && apt-dist-upgrade
apt install git
apt install docker docker-compose
apt install sqlite
apt install python-pip python3-pip
pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

#进入个人目录
git clone https://github.com/CTFd/CTFd.git
cd CTFd
docker-compose up -d

可以使用命令 docker-compose ps查看运行的容器

这时就可以查看自己的平台了:访问方式:

ip:8000

注意如果是云服务器的话,记得在安全组开放端口,下面搭建题目环境也是一样

如果你想停止运行平台的话,在CTFd目录下执行

docker-compose stop

即可

三、搭建题目环境

我搭建的是pwn平台,所以说一下pwn平台的而搭建思路

我使用的是pwn_deploy_chroot,详情可以到我上面的链接去查看,感谢大佬提供这么棒的一个环境

首先

git clone https://github.com/giantbranch/pwn_deploy_chroot.git

然后将所有pwn题放进bin目录中

然后

python initialize.py
docker-compose up --build -d

 如果出现了问题,就删除flags.txt重新搭建环境

 

 

你可能感兴趣的:(安全の其他)