Schneider Electric UnityPro PLC simulator remote code execution vulnerability
The PLC simulator in Schneider Electric Unity Pro L accepts unauthenticated UMAS commands to program a new strategy, allowing an attacker to replace the strategy logic with shellcode and achieve code execution when the simulator is started.
Originally disclosed on Cisco Talos
An exploitable remote code execution vulnerability exists in the UMAS strategy programming functionality of the Schneider Electric Unity Pro L Programming Software PLC Simulator. A specially crafted sequence of UMAS commands sent to the software’s PLC simulator can cause a modified strategy to be programmed, resulting…
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the PLC simulator does not authenticate or authorise UMAS commands, allowing anyone to take a reservation and upload a new strategy.
Impact
An unauthenticated attacker could achieve remote code execution on the host running the PLC simulator when the simulator is switched into start mode.
What the attacker needed
PLC simulator running and listening on port 502; Simulator switched into start mode
The fix
The vendor patched the vulnerability.
How it was found
- Send a TAKE_PLC_RESERVATION request to obtain a valid session and additional privilege.
- Send an INITIALIZE_UPLOAD command to indicate that a new program will follow.
- Send the first block of data using an UPLOAD_BLOCK command.
- Send a command with function code 0x6D.
- Send the new strategy in chunks of size 0x3F4 using UPLOAD_BLOCK, resending the first block.
- Send an END_STRATEGY_UPLOAD request to indicate the last block has been sent.
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 report has not been written yet. The Original tab links to the source.
A PLC simulator is software that mimics a programmable logic controller, used for testing. The simulator listens on a network port and accepts commands without checking who sent them. An attacker can send a series of commands to upload a malicious program, and when the simulator runs it, the attacker's code executes on the computer.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.