본문으로 건너뛰기
50% 할인 모든 플랜, 기간 한정. 시작 가격 $2.48/mo
CTFd

CTFd

CTFd는 보안 대회, 트레이닝 랩, 강의를 운영하기 위한 오픈소스 Capture The Flag 프레임워크입니다. 플러그인과 테마로 커스터마이즈 가능하며, 어떤 크기의 팀에도 쉽게 설정할 수 있습니다.

한눈에 보기

6.7k

GitHub 스타

17

페이지 조회수

라이선스 Apache-2.0 버전 Latest OS Ubuntu Server 24.04 LTS Min RAM 1 GB IP IPV4

접근

  1. Open the CTFd URL: https://<SERVER-IP>
  2. 자체 서명 인증서 경고를 수락하세요.
  3. 일회성 설정 마법사를 완료하세요.
  4. 관리자 계정을 만드세요.
  5. CTF를 구성하세요.

중요한 파일과 디렉토리

  • 설치 경로: /root/ctfd
  • Compose 파일: /root/ctfd/docker-compose.yml
  • 환경 파일: /root/ctfd/.env
  • Uploads: /root/ctfd/.data/CTFd/uploads
  • 로그: /root/ctfd/.data/CTFd/logs
  • MariaDB Data: /root/ctfd/.data/mysql
  • Redis 데이터: /root/ctfd/.data/redis
  • Nginx 설정: /etc/nginx/sites-available/ctfd
  • SSL 인증서: /etc/nginx/ssl/ctfd.crt
  • SSL 개인 키: /etc/nginx/ssl/ctfd.key

Docker 관리

컨테이너 확인:

docker ps

로그 보기:

cd /root/ctfd
docker compose logs -f

서비스 재시작:

cd /root/ctfd
docker compose restart

서비스 중지:

cd /root/ctfd
docker compose down

서비스 시작:

cd /root/ctfd
docker compose up -d

Nginx 관리

테스트 구성:

nginx -t

Nginx 재시작:

systemctl restart nginx

Nginx 다시 로드:

systemctl reload nginx

Nginx 상태 확인:

systemctl status nginx

도메인으로 SSL 활성화

1. 도메인을 서버 IP로 지정하세요.

2. Nginx 설정 파일 열고 다음 항목 교체 server_name _; with your domain in both HTTP and HTTPS blocks:

vim /etc/nginx/sites-available/ctfd

3. Certbot 설치:

apt install -y certbot python3-certbot-nginx

4. Generate a Let's Encrypt certificate:

certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com

5. Nginx 설정의 SSL 경로 교체:

vim /etc/nginx/sites-available/ctfd
# Before:
    # ssl_certificate     /etc/nginx/ssl/ctfd.crt;
    # ssl_certificate_key /etc/nginx/ssl/ctfd.key;
# After:
    # ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
    # ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;

6. Reload Nginx:

systemctl reload nginx

보안의 더 보기

관련 앱.

Deploy CTFd now. 월 $2.48부터.