• 简体中文
  • 平台代理

    GZCTF 自带对于流量的 WebSocket-TCP 转发功能和对应的流量记录能力,可以通过相关配置项进行开启。

    配置

    appsettings.json 中,找到 ContainerProvider 节点,进行如下配置:

    {
      "ContainerProvider": {
        "PortMappingType": "PlatformProxy",
        "EnableTrafficCapture": false,
        "DockerConfig": {
          // optional, change it to the actual network if you use docker
          "ChallengeNetwork": "challenges"
        }
      }
    }

    使用

    在平台代理开启后,可以使用平台的 /api/proxy/{guid} 接口进行 TCP over WebSocket 流量转发。

    可用任意支持此方式的程序进行连接,或使用推荐客户端:WebSocketReflectorX 进行本地端口代理,从而进行无感交互。

    注意事项

    采用 Docker 单机作为后端且使用 PlatformProxy 端口映射类型时,为了使得 GZCTF 顺利访问题目容器,需要额外手动创建一个网络:

    docker network create challenges -d bridge --subnet 192.168.133.0/24

    设置配置项 ChallengeNetwork 为对应的网络名称,并需要在 compose.yml 中桥接外部网络,例如:

    services:
      gzctf:
        ...
        networks:
        - default
        - challenges
    
    networks:
      challenges:
        external: true