Skip to content
RCE Write-up Advanced

Hack Stories Hacking Hackers Ep 1

A government server was vulnerable to insecure deserialization, allowing the attacker to read configuration files and gain administrator access to a web hosting management panel. The attacker then installed backdoors and moved laterally to other systems.

c0d3x27 Follow

Published on infosecwriteups.com

I come from the bug bounty era when companies used to pay researchers, and not everyone was trying to replicate the next man. Now, everything has changed, to the point where Remote Code Executions (RCE) are getting paid as little as $2k, and so-called bounty hunters just collect other people’s work and replicate it.

c0d3x27, on infosecwriteups.com

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 application deserialized untrusted session data without validation, and a local file inclusion flaw allowed reading of configuration files.

Impact

The attacker gained unauthorized access to critical system resources, sensitive data, and a management panel, and could move laterally to many other servers and services.

What the attacker needed

Access to the vulnerable server

How it was found

  1. Analyse the application structure and data flow to find the serialization mechanism.
  2. Send a crafted payload to exploit the deserialization process.
  3. Use a PHP filter to read the configuration file and obtain admin credentials.
  4. Log into the web hosting management panel with the stolen credentials.
  5. Install backdoors, including one using existing user credentials from the server.
  6. Use the server as a pivot for lateral movement to other systems.

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.

Insecure deserialization is when an application turns stored data back into objects without checking it is safe, so an attacker can sneak in harmful data. Here, the attacker used that flaw to read a configuration file containing admin credentials, then logged into a hosting control panel and set up secret backdoors.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by c0d3x27

View all

9 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.