Skip to content
RCE Write-up Advanced

Unauthenticated RCE as QSECOFR via IBM i Management Central

An authentication bypass in IBM i Management Central's packet protocol on port 5555 allowed an unauthenticated attacker to impersonate the QSECOFR profile and execute arbitrary CL commands, achieving remote code execution as the root-equivalent user.

pz Follow

Published on blog.silentsignal.eu

We discovered and developed an exploit for a pre-authentication remote code execution vulnerability in IBM i Management Central (MGTC). The vulnerability allows an unauthenticated attacker to execute arbitrary CL commands as QSECOFR – the root-equivalent profile on IBM i – by abusing the MGTC packet protocol on port…

pz, on blog.silentsignal.eu

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 server trusted a client-supplied 'verify' flag to skip password validation and then set the execution context to an unauthenticated 'userId', allowing impersonation of any user including QSECOFR.

Impact

An unauthenticated attacker could execute arbitrary CL commands as QSECOFR, the root-equivalent profile, leading to full system compromise.

What the attacker needed

Management Central service active on port 5555; Network access to port 5555

The fix

The server should not trust a client-supplied verify flag to skip authentication and should not set the execution context from an unauthenticated userId; Management Central should be disabled or ports blocked if not needed.

How it was found

  1. Perform the custom binary handshake on port 5555, sending a WIN32 OS name and the manipulated key.
  2. Send a McCreateRequest packet with authentication data where verify=0 and type=3, and userId set to QSECOFR, containing a command definition with the desired CL command.
  3. Send McStartRequest packets for objectId values 2 through 20 to trigger execution of the created task.
  4. The command executes as QSECOFR, confirmed by checking the output file ownership.

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.

Management Central is a service on IBM i that lets administrators run commands and manage systems remotely. The service trusted a flag sent by the client that said 'skip password checking', so an attacker could pretend to be the all-powerful QSECOFR user without any credentials and run any command on the server.

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 pz

View all

12 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.