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重新搭建環境

 

 

發佈了70 篇原創文章 · 獲贊 18 · 訪問量 1萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章