First encounter
An exposed Eclipse Equinox OSGi console accepted Telnet connections and offered exec and fork commands that run arbitrary operating system commands. An attacker who could reach the port could run commands and obtain a shell on the host.
quentinkaiser.be
Published on quentinkaiser.be
I recently came upon a Telnet-based service that was previously unidentified by network scanning tools. This blog post describes my encounter with this service and how I used Nmap fingerprinting and scripting capabilities to add detection, and Metasploit to gain command execution on it.
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 the OSGi console was exposed on a network interface without authentication and included command-execution features (exec and fork) enabled by default.
Impact
An attacker with network access to the console could execute arbitrary commands and gain a shell on the host.
What the attacker needed
Network access to the OSGi console port; console reachable without authentication
The fix
The console should not be exposed on untrusted networks and should require authentication; the text does not state that a fix was applied.
How it was found
- Connect to the Telnet service on the host.
- Use the help command to discover the exec and fork commands.
- Run a command through fork to start a reverse or bind 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.
The OSGi console is a management interface for Java software that, when left open on a network port, lets anyone who connects run commands on the machine. Because it runs with the service's permissions, an attacker can start a shell and take control of the host.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.