当前位置:网站首页>Analysis and recurrence of network security vulnerabilities
Analysis and recurrence of network security vulnerabilities
2022-07-28 08:37:00 【Great safety home】
Preface
4 month 6 Day and 5 month 18 Japan ,VMware Two official safety announcements show , Related to its products CVE Up to 10 individual , There are many CVSSv3 score 9.8 High risk vulnerability ! Such a high rate of hole exit , It attracted the attention of the author . The author will discuss CVE-2022-22954 VMware Workspace ONE Access SSTI RCE Analyze vulnerabilities carefully .
Vulnerability description
according to 4 month 6 Japan VMware Official safety bulletin , The official has updated and solved the safety problems of many products . among CVE-2022-22954,CVSS The score is 9.8, The hazard level is serious . The vulnerability is due to VMware Workspace ONE Access and Identity Manager Contains a server-side template injection vulnerability , A malicious attacker with network access can perform remote code execution .
Scope of utilization
VMware Workspace ONE Access 21.08.0.1, 21.08.0.0,20.10.0.1, 20.10.0.0
VMware Identity Manager(vIDM) 3.3.6, 3.3.5, 3.3.4, 3.3.3
VMware vRealize Automation(vIDM) 7.6
VMware Cloud Foundation (vIDM) 4.x
Vulnerability analysis
Use the built-in function to calculate the string as FTL expression ,FTL Expressions can access variables , And call Java Method , for example “1+2”?eval Will return a number 3, therefore ?eval The previous string is from an untrusted source , May become an attack medium .
stay Vmware Medium endusercatalog-ui-1.0-SNAPSHOT-classes.jar Self contained template customError.ftl It's called freemarker Engine eval Function to render errObj, This led to this SSTI Inject holes .
【 Help safe learning , All resources are obtained from one by one 】
① Network Security Learning Route
②20 Penetration test ebook
③ Safe attack and defense 357 Page notes
④50 A security attack and defense interview guide
⑤ Safety red team penetration Kit
⑥ information gathering 80 Search syntax
⑦100 Three actual cases of vulnerability
⑧ Internal video resources of the safety factory
⑨ Calendar year CTF Analysis of the flag race
Environment building
The location of the source code of this vulnerability analysis :/opt/vmware/horizon/workspace/webapps/catalog-portal/WEB-INF/lib.
Dynamic mode
We have located the security problem , Next, look for rendering customError.ftl The relevant code of the template .
stay com.vmware.endusercatalog.ui.web.UiErrorController#handleGenericError Function .
errorObj Pass in by the parameter .
lookup handleGenericError The callee relationship of the function is found .
handleGenericError The function is affected by two requestMapping Where the controller is UiErrorController call .
Follow up what appears getErrorPage function , be located com.vmware.endusercatalog.ui.web.UiErrorController#getErrorPage.
Except for direct use handleGenericError Function to get the template to be rendered , There is still handleUnauthorizedError Functions are judged by conditions , Only one branch enters handleGenericError
How to construct parameters ?
In two requestMapping in , Among them /ui/view/error by API Interface , Direct access cannot be extracted from the request javax.servlet.error.message, Therefore, it is impossible to control errorObj.
seek /ui/view/error Other calls to , be located com.vmware.endusercatalog.ui.web.UiApplicationExceptionResolver#resolveException function .
Existence is right javax.servlet.error.message The process of assignment .
see resolveException The callee relationship of the function , Above by handleAnyGenericException Function call .
among @ExceptionHandler indicate , This is the exception handler , When the program directly throws Exception Type of exception will enter handleAnyGenericException, And then by calling resolveException function , Assign a value , Will eventually return /ui/view/error.
And in the handleAnyGenericException in , Get into resolveException Different parameters will be passed in according to the type of exception , If the exception class is not LocalizationParamValueException Subclasses are passed into uiRequest.getRequestId(), So we need to throw when the parameters are controllable LocalizationParamValueException Exception class or its subclass exception , such errorObj what is needed Attribute errorJson come from LocalizationParamValueException Anomalous getArgs.
stay LocalizationParamValueException function , If you can control the parameters that throw exceptions , You can put the payload Pass in errorObj.
stay endusercatalog-auth-1.0-SNAPSHOT.jar in com.vmware.endusercatalog.auth.InvalidAuthContextException, There is one. InvalidAuthContextException abnormal , Inherited from LocalizationParamValueException.
stay com.vmware.endusercatalog.auth.AuthContext Exception thrown in constructor .
Generate AuthContext The place of the object is AuthContextPopulationInterceptor In the interceptor , And all parameters are obtained from the request , Here the injection point can be constructed .
But normally , stay endusercatalog-auth-1.0-SNAPSHOT.jar Interceptor class in cannot access class .
But in com.vmware.endusercatalog.ui.UiApplication, Use @ComponentScan Annotation declaration will automatically com.vmware.endusercatalog.auth The class of the package is assembled into bean Containers .
In the bag com.endusercatalog.ui.config.WebConfig You can find .
Constructable url.
Through the above analysis , Constructible payload, To carry out an order .
Loophole recurrence

Repair suggestions
边栏推荐
- PHP基础知识 - PHP 使用 PDO
- C轮融资已完成!思迈特软件领跑国内BI生态赋能,产品、服务竿头一步
- PHPUnit在Window下如何配置
- uniapp上下滑屏切换支持视频和图片轮播实现,类似抖音效果
- PostgreSQL is the world's most advanced open source relational database
- VK1620温控仪/智能电表LED数显驱动芯片3/4线接口内置 RC振荡器,提供技术支持
- 2022 Niuke multi school first problem solving Report
- GBASE亮相联通云巡展(四川站) 以专业赋能云生态
- GBase 8a MPP与银河麒麟(x86版)完成深度适配
- 博客搭建七:hugo
猜你喜欢

No super high-rise buildings | new regulations: what information does it reveal that no new buildings above 500 meters should be built?

学术界爆火的类脑智能,啥时候能落地?来听行业大咖怎么说丨量子位·对撞派 x 时识科技...

Export SQL server query results to excel table

Characteristics of EMC EMI beads

CarSim simulation quick start (10) - Modeling of braking system

The five pictures tell you: why is there such a big gap between people in the workplace?

C#,入门教程——程序运行时的调试技巧与逻辑错误探针技术与源代码

Prescan quick start to master the transportation elements in lesson 14, prescan

MCU IO port controls 12V voltage on and off, MOS and triode circuit

tkMapper的使用-超详细
随机推荐
一篇文章搞懂数据仓库:元数据分类、元数据管理
uniapp---- 获取当前位置的经纬度等信息的详细步骤(包含小程序)
GBASE亮相联通云巡展(四川站) 以专业赋能云生态
Can‘t connect to server on ‘IP‘ (60)
leetcode/数组中和为0的三个不同数
2022 Niuke multi school second problem solving Report
Sliding screen switching on uniapp supports video and image rotation, similar to Tiktok effect
ASP. Net core foundation IV
阿里巴巴内部面试资料
2018年1月西邻雪山自驾游攻略
Pyspark changes the column order and saves it into iceberg database
ASP. Net core foundation VIII
Blog building 7: Hugo
Unity中队列(Queue)的简单使用
MCU IO port controls 12V voltage on and off, MOS and triode circuit
Prescan quick start to proficient in lecture 17, speed curve editor
阻塞队列LinkedBlockingQueue 源码解析
竞赛:糖尿病遗传风险检测挑战赛(科大讯飞)
PHPUnit在Window下如何配置
【OpenCV】生成透明的PNG图像