Skip to content
RCE Write-up Intermediate

Legally hacking a Government Satellite?

A web application on a government satellite system had an unauthenticated command injection vulnerability in a file-reading parameter, allowing arbitrary command execution. The attacker could execute commands, read files, and potentially schedule satellite operations.

RiotSecTeam Follow

Published on letshack.xyz

He claimed it was a Satellite and potentially was the towns internet connectivity point. I decided to investigate the security of the Web Application as it had no authentication, surprisingly.

RiotSecTeam (@RiotSecTeam), Josh, on letshack.xyz

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

The application passed user input directly into a shell command using shell_exec(), without sanitising it.

Impact

An attacker could execute arbitrary commands, read files, and potentially modify satellite scheduling jobs, though the researchers refrained from doing so.

What the attacker needed

No authentication required; access to the web application

The fix

The application should avoid passing user input to shell commands; instead, use functions like file_get_contents() with a fixed file path.

How it was found

  1. Found an unauthenticated web application on an IP address from Shodan.
  2. Noticed a parameter 'f' that included a local file or directory.
  3. Injected a command using shell metacharacters to execute arbitrary commands.
  4. Used Python to spawn a reverse shell because direct shell access was blocked.
  5. Performed source code analysis and found another command injection in next.php via the 'u' parameter.

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 web application took a file name from the user and passed it directly to a system command without checking it. This let an attacker run their own commands on the server, like reading files or starting a remote shell.

What is RCE?

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

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.