Researchers find 134 flaws in the way Word, PDFs, handle scripts

‘Cooperative mutation’ spots problems that checking code alone will miss

Black Hat Asia Security researchers have devised a tool that detects flaws in the way apps like Microsoft Word and Adobe Acrobat process JavaScript, and it's proven so effective they've found 134 bugs – 59 of them considered worthy of a fix by vendors, 33 assigned a CVE number, and 17 producing bug bounty payments totaling $22,000.

The tool is named "Cooper" – a reference to the "Cooperative mutation" technique employed by the tool.

Speaking at the Black Hat Asia conference in Singapore, PhD student Xu Peng of the Chinese Academy of Sciences – one of the tool's co-authors – explained that the likes of Word and Acrobat accept input from scripting languages. Acrobat, for example, allows JavaScript to manipulate PDF files.

Making that happen requires the PDF both to define native PDF objects and to parse JavaScript code. The native objects are processed by Acrobat modules, and an embedded JavaScript engine handles the scripts. A "binding layer" does the translation.

In his talk and a paper [PDF] describing Cooper, Xu and his collaborators assert the binding code "is prone to inconsistent semantics and security holes, which lead to severe vulnerabilities."

That bit about severe vulns is not just bluster. Cooper identified CVE-2021-21028 and – a pair of 8.8/10 rated flaws in Acrobat.

Xu said Cooper can find such flaws because the cooperative mutation technique it uses "simultaneously modifies the script code and the related document objects to explore various code paths of the binding code." That approach contrasts with other defensive techniques that check for flaws in scripts.

As explained on the tool's GitHub page, Cooper has three components:

  • Object Clustering In the beginning, Cooper parses the given sample documents to extract native objects. To reduce the object search space, Cooper categorizes objects into different classes based on their attributes.
  • Relationship Inference Then, Cooper produces a large number of documents by combining different object classes and API groups, and records the execution results of the embedded scripts. Based on the success rate of the script execution and the distribution of object classes, Cooper infers the relationships between API groups and object classes.
  • Relationship-Guided Mutation Finally, Cooper leverages the inferred relationship to guide the object selection, script generation and object mutation.

Cooper is therefore in some ways an elaborate fuzzing tool – inferring the relationships guides the process of searching for conditions under which scripts, apps, and the binding layer produce unwanted and/or dangerous behaviour.

The tool is itself a set of scripts – in Python – and is yours for the asking here.

The project was created by Xu Peng and Professor Purui Su, both of the Chinese Academy of Sciences, security researcher Yanhao Wang from the QI-ANXIN Technology Research Institute, and Hong Hu, an assistant professor at Pennsylvania State University. ®

Other stories you might like

  • Microsoft fixes under-attack Windows zero-day Follina
    Plus: Intel, AMD react to Hertzbleed data-leaking holes in CPUs

    Patch Tuesday Microsoft claims to have finally fixed the Follina zero-day flaw in Windows as part of its June Patch Tuesday batch, which included security updates to address 55 vulnerabilities.

    Follina, eventually acknowledged by Redmond in a security advisory last month, is the most significant of the bunch as it has already been exploited in the wild.

    Criminals and snoops can abuse the remote code execution (RCE) bug, tracked as CVE-2022-30190, by crafting a file, such as a Word document, so that when opened it calls out to the Microsoft Windows Support Diagnostic Tool, which is then exploited to run malicious code, such spyware and ransomware. Disabling macros in, say, Word won't stop this from happening.

    Continue reading
  • Cisco warns of security holes in its security appliances
    Bugs potentially useful for rogue insiders, admin account hijackers

    Cisco has alerted customers to another four vulnerabilities in its products, including a high-severity flaw in its email and web security appliances. 

    The networking giant has issued a patch for that bug, tracked as CVE-2022-20664. The flaw is present in the web management interface of Cisco's Secure Email and Web Manager and Email Security Appliance in both the virtual and hardware appliances. Some earlier versions of both products, we note, have reached end of life, and so the manufacturer won't release fixes; it instead told customers to migrate to a newer version and dump the old.

    This bug received a 7.7 out of 10 CVSS severity score, and Cisco noted that its security team is not aware of any in-the-wild exploitation, so far. That said, given the speed of reverse engineering, that day is likely to come. 

    Continue reading
  • Google battles bots, puts Workspace admins on alert
    No security alert fatigue here

    Google has added API security tools and Workspace (formerly G-Suite) admin alerts about potentially risky configuration changes such as super admin passwords resets.

    The API capabilities – aptly named "Advanced API Security" – are built on top of Apigee, the API management platform that the web giant bought for $625 million six years ago.

    As API data makes up an increasing amount of internet traffic – Cloudflare says more than 50 percent of all of the traffic it processes is API based, and it's growing twice as fast as traditional web traffic – API security becomes more important to enterprises. Malicious actors can use API calls to bypass network security measures and connect directly to backend systems or launch DDoS attacks.

    Continue reading

Biting the hand that feeds IT © 1998–2022