Chuyển đến nội dung chính
Giảm 50% tất cả các gói, có thời hạn. Khởi điểm từ $2.48/mo
CTFd

CTFd

CTFd là framework Capture The Flag mã nguồn mở để tổ chức các cuộc thi bảo mật, phòng thí nghiệm đào tạo và khóa học. Có thể tùy chỉnh với plugin và giao diện, và dễ dàng thiết lập cho nhóm ở mọi quy mô.

Tổng quan

6.7k

Sao GitHub

17

Lượt xem trang

Giấy phép Apache-2.0 Phiên bản Latest OS Ubuntu Server 24.04 LTS Min RAM 1 GB IP IPV4

Truy cập

  1. Open the CTFd URL: https://<SERVER-IP>
  2. Chấp nhận cảnh báo chứng chỉ tự ký.
  3. Hoàn thành trình hướng dẫn cài đặt một lần.
  4. Tạo tài khoản quản trị viên.
  5. Cấu hình CTF của bạn.

File và thư mục quan trọng

  • Đường dẫn cài đặt: /root/ctfd
  • Tệp Compose: /root/ctfd/docker-compose.yml
  • Tệp môi trường: /root/ctfd/.env
  • Uploads: /root/ctfd/.data/CTFd/uploads
  • Nhật ký: /root/ctfd/.data/CTFd/logs
  • MariaDB Data: /root/ctfd/.data/mysql
  • Dữ liệu Redis: /root/ctfd/.data/redis
  • Cấu hình Nginx: /etc/nginx/sites-available/ctfd
  • Chứng chỉ SSL: /etc/nginx/ssl/ctfd.crt
  • Khóa riêng SSL: /etc/nginx/ssl/ctfd.key

Quản lý Docker

Kiểm tra các container:

docker ps

Xem log:

cd /root/ctfd
docker compose logs -f

Khởi động lại các dịch vụ:

cd /root/ctfd
docker compose restart

Dừng dịch vụ:

cd /root/ctfd
docker compose down

Bắt đầu dịch vụ:

cd /root/ctfd
docker compose up -d

Quản lý Nginx

Cấu hình kiểm thử:

nginx -t

Khởi động lại Nginx:

systemctl restart nginx

Tải lại Nginx:

systemctl reload nginx

Kiểm tra trạng thái Nginx:

systemctl status nginx

Kích hoạt SSL với một tên miền

1. Trỏ tên miền của bạn về IP máy chủ.

2. Chỉnh sửa cấu hình Nginx và thay thế server_name _; with your domain in both HTTP and HTTPS blocks:

vim /etc/nginx/sites-available/ctfd

3. Cài đặt 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. Thay thế các đường dẫn SSL trong cấu hình Nginx:

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

Thêm trong Bảo mật

Ứng dụng liên quan.

Deploy CTFd now. Từ $2.48/tháng.