Giter VIP home page Giter VIP logo

yapi-exploit's Introduction

YApi-Exploit

YApi boolean-based injection exploit.

声明

本工具仅用于合法的测试,请明确您对于目标是否得到了授权

请勿用于任何非法用途,否则后果自负

用法

❯ python exp.py -h

__  _____          _    ______           __      _ __
\ \/ /   |  ____  (_)  / ____/  ______  / /___  (_) /_
 \  / /| | / __ \/ /  / __/ | |/_/ __ \/ / __ \/ / __/
 / / ___ |/ /_/ / /  / /____>  </ /_/ / / /_/ / / /_
/_/_/  |_/ .___/_/  /_____/_/|_/ .___/_/\____/_/\__/
        /_/                   /_/


usage: python3 exp.py [-h] [-shell] [-target TARGET] [-proxy PROXY] [-action ACTION] [-salt SALT] [-sleep SLEEP]
                      [-timeout TIMEOUT] [-token TOKEN] [-uid UID] [-id ID] [-entoken ENTOKEN] [-cmd CMD]

optional arguments:
  -h, --help        show this help message and exit
  -shell            交互式操作, 如果使用这个参数则无需输入其他任何参数
  -target TARGET    目标站点, 比如: http://127.0.0.1:3000/
  -proxy PROXY      HTTP代理, 比如: http://127.0.0.1:8080/, 默认为空
  -action ACTION    要执行操作, 有如下几个操作:
                     encrypt_token              从token和uid加密得到encrypted token
                     decrypt_token              解密encrypted token, 得到uid和token
                     check_token_validity       检测当前token是否可用
                     get_alive_api_list         获取所有支持GET和POST方法的API
                     get_token_by_inject        通过布尔盲注获得一个(加密之前的)token
                     get_id_uid_by_token        通过一个(加密之前的)token获得项目id和作者uid
                     execute_command            通过pre_script执行命令, 需要项目id和一个(加密过后的)token
  -salt SALT        YApi用于加密uid和token的盐, 默认为'abcde'
  -sleep SLEEP      每个请求的间隔的秒数, 默认为0.2
  -timeout TIMEOUT  请求超时时间, 默认为3
  -token TOKEN      加密之前的token, 如果你有的话
  -uid UID          项目作者的uid, 如果你有的话
  -id ID            项目id, 如果你有的话
  -entoken ENTOKEN  加密之后的token, 如果你有的话
  -cmd CMD          要执行的命令, 无回显

注意事项

  • 利用条件
    • YApi version < v1.11.0
    • 需要项目存在测试集合X, 且X中的接口数量大于0
  • 暂不考虑自动添加测试合集并加入接口的功能
  • pre_script
    • 这个参数会在所有接口测试的时候执行, 也就是说:当测试合集X中的接口数量为n, 你的命令会被执行n次, 请注意不要把业务打崩

yapi-exploit's People

Contributors

anthem-whisper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.