[Blog] CVE-2015-0935: PHP Object Injection in Bomgar Remote Support Portal
The Bomgar Remote Support Portal deserialized untrusted data in PHP, allowing an attacker to craft a serialized object that, when processed, could write arbitrary files and execute PHP code. An unauthenticated attacker could reach one vulnerable endpoint, while authenticated users could access multiple others.
code-white.com
Published on code-white.com
Serialization is often used to convert objects into a string representation for communication or to save them for later use. However, deserialization in PHP has certain side effects, which can be exploited by an attacker who is able to provide the data to be deserialized.
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 called PHP's unserialize() on user-supplied data without validating it, allowing object injection.
Impact
An attacker could write arbitrary files and execute arbitrary PHP code on the server, potentially leading to full compromise.
What the attacker needed
Access to a vulnerable endpoint; Ability to send serialized data; For unauthenticated: a particular access token
The fix
The vulnerability was fixed by Bomgar, though the text does not detail the fix.
How it was found
- Craft a serialized Tracer object that includes a Logger and a Log_file instance with chosen filename and payload.
- Send the serialized object to a vulnerable endpoint that calls unserialize on user input.
- The Tracer destructor triggers a log write, creating a file with the payload at the chosen path.
- Optionally, use a second serialized object with a class name like _tmp_poc to include and execute the written PHP file.
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.
When a PHP application takes data from a user and turns it back into an object, it can accidentally let the user control which code runs. Here, the portal did this without checking the data, so an attacker could make the server create objects that write files or run code. This is dangerous because it can lead to full control of 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.