YApi基于布尔值的注入EXP

作者:Sec-Labs | 发布时间:

项目地址

https://github.com/Anthem-whisper/YApi-Exploit

YApi-Exploit

YApi基于布尔值的注入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          要执行的命令, 无回显

9bea6f6907183502

 

标签:工具分享, EXP脚本, Yapi