YApi Exploit Save

YApi boolean-based injection exploit.

Project README

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次, 请注意不要把业务打崩
Open Source Agenda is not affiliated with "YApi Exploit" Project. README Source: Anthem-whisper/YApi-Exploit
Stars
59
Open Issues
0
Last Commit
1 year ago
Tags

Open Source Agenda Badge

Open Source Agenda Rating