JBoss 6 RCE Exploitation and Privilege Escalation via Misconfigured "sudo find" Command
A legacy JBoss 6 instance exposed an unauthenticated remote code execution service on port 4446, allowing the attacker to gain a low-privileged shell. After finding plaintext credentials in a user's home directory, the attacker switched to the jboss user and abused a sudo rule permitting the find binary as root to escalate to full root access.
meetcyber.net
Published on meetcyber.net
JBoss Application Server is a widely used open-source Java-based application server designed to host enterprise-grade web applications. It supports Java EE specifications and is commonly deployed in environments requiring scalable backend services.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely an outdated JBoss 6 remoting service exposed without authentication, combined with plaintext credentials stored in a home directory and an overly permissive sudo rule for find.
Impact
An unauthenticated attacker could run code on the server, and by chaining the exposed credentials and sudo misconfiguration could gain full root access to the host.
What the attacker needed
Network access to port 4446; vulnerable JBoss 6 instance; sudo rule allowing find as root
The fix
The JBoss instance should be upgraded or removed from exposure, credentials should not be stored in plaintext, and the sudo rule for find should be removed or restricted.
How it was found
- Map the target IP to a domain name in the hosts file
- Scan exposed services with naabu and Nmap and find an HTTP service on port 8080
- Confirm JBoss 6 via the Administration Console link
- Run the JBoss remoting unified invoker RCE module against port 4446 to obtain a shell
- Read the note file in the jboss home directory to obtain plaintext credentials and switch user
- Check sudo privileges and abuse find as root to spawn a root shell
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
An old application server called JBoss 6 was left running with a known flaw that lets anyone on the network run their own commands on the machine without logging in. Once inside as a normal user, the attacker found a password written in a text file and used it to become another user, then took advantage of a rule that let that user run a common file-search tool with full administrator rights to become the top-level administrator.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.