The hunt for a Microsoft Silverlight 0-day
A vulnerability in Microsoft Silverlight's BinaryReader class allowed a user-defined Decoder to manipulate an index variable, leading to memory corruption and potential code execution. An attacker could exploit this to run arbitrary code on a victim's machine.
securelist.com
Published on securelist.com
Perhaps one of the most explosively discussed subjects of 2015 was the compromise and data dump of Hacking Team, the infamous Italian spyware company.
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 BinaryReader class trusted a user-supplied Decoder to return a valid index, but the index was not re-validated after the call, allowing an out-of-bounds write.
Impact
An attacker could execute arbitrary code on the victim's machine, potentially leading to full system compromise.
What the attacker needed
Victim runs Silverlight; Victim visits malicious page
How it was found
- Create a custom Decoder class that returns an incorrect value from GetChars.
- Pass this Decoder to BinaryReader.Read, which calls InternalReadChars.
- The incorrect index causes an out-of-bounds memory write, allowing memory modification.
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.
Silverlight is a browser plugin that runs rich internet applications. A bug in how it reads data let a malicious program trick it into writing outside its intended memory area, which could let an attacker run their own code on your computer.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.