Giter Site home page Giter Site logo

x1ongsec / bytectf2021-final-seo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sqlsec/bytectf2021-final-seo

0.0 0.0 0.0 7.15 MB

字节跳动 CTF 2021 线下决赛的一道 Web 题源码,主要考察 SSRF

License: Apache License 2.0

Shell 19.10% PHP 74.24% Hack 6.14% Dockerfile 0.52%

bytectf2021-final-seo's Introduction

部署靶场

git clone https://github.com/sqlsec/ByteCTF2021-Final-SEO.git
cd ByteCTF2021-Final-SEO/Dockerfile
docker-compose up -d

默认占用外网的 80 端口,内网的网段为 172.73.23.1/24,如有冲突请自行更改。

index

攻击思路

  1. 找到含义 SSRF 的漏洞接口,绕过前端校验,可以直接扫描探测内网信息。

  2. 为了快速定位内网的网段,网站还预留的文件下载漏洞,可以通过文件下载 hosts 之类的文件,拿到当前网段的信息。

  3. 使用 SSRF 漏洞的接口,通过 gopher 协议攻击内网的 MySQL 服务器,使用 UDF 提权可以拿下内网 MySQL 权限

  4. 内网 MySQL 根目录下存放着 flag,直接 UDF 命令执行读取即可

题目亮点

  1. 前端功能场景尽量模拟了真实的 SSRF 漏洞情况
  2. 通过 JS 去请求 API 接口,比较符合目前主流的开发场景
  3. 多个没有 SSRF 漏洞的干扰接口,需要选手耐心去过一些这些接口
  4. 配合文件下载漏洞可以快速定位内网服务器的当前网段
  5. 考察选手 SSRF 在内网中的实际信息收集,需要选手自己去找到内网的 MySQL 资产
  6. 考察选手 MySQL 的攻击思路,这里只要考擦使用 SSRF 进行内网 MySQL 的 UDF 提权
  7. Docker-compose 搭建,比赛的时候维护和修复会比较方便

bytectf2021-final-seo's People

Contributors

sqlsec avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.