Tackling Privilege Escalation with Offense and Defense
Analysts investigate attack surfaces and defenses concerning Tackling Privilege Escalation with Offense and Defense.
Summary
Tackling Privilege Escalation with Offense and Defense: Adobe Acrobat JavaScript API Restrictions Bypass
**Overview**
Abdul and Edgar (security researchers at Trend Micro), present research on privilege escalation vulnerabilities in Adobe Acrobat's JavaScript API. The talk combines offensive and defensive perspectives: offensive research identifying exploitation techniques, defensive remediation ensuring Adobe's security. Rather than targeting a single vulnerability type, the research examines the Acrobat attack surface—a complex ecosystem of plugins, parsers, and JavaScript APIs that interact to process PDF files. The Acrobat JavaScript engine, based on an old version of Mozilla's SpiderMonkey (1.8), exposes rich automation APIs but enforces separation between privileged contexts (console) and non-privileged contexts (embedded PDF scripts). The research demonstrates how attackers can leverage JavaScript API restrictions bypasses to escalate privileges, force parsing of various file formats through JavaScript, and trigger memory corruption bugs in image parsers, font handlers, and format converters. The vulnerability explosion in Acrobat (from few reports in 2014 to hundreds annually by 2019) reflects both increased researcher attention and Acrobat's massive attack surface.
**Technical Details**
Acrobat Architecture and Attack Surface:
1. **Core Components**: - Main DLL: AcroRd32.dll (32-bit) or equivalent; loaded automatically on startup; handles most functionality - Plugins: DLL files with API extension that provide specialized functionality - Backend DLLs: Perform actual parsing and processing
2. **Key Plugins and Attack Vectors**: - Scripting plugin: Handles all JavaScript code embedded in PDF files; can trigger parsing of other components - XPS-to-PDF: Converts XPS files to PDF; killed recently due to high vulnerability count - Image conversion: Converts image files (not images embedded in PDFs) to PDF; enabled in Acrobat only - AcroForm: Handles XFA forms - Annotations: Handles PDF annotations - HTML-to-PDF: Converts HTML to PDF; enabled in Acrobat only
3. **Backend Processing Components**: - AxSLE: Handles XSLT parsing; based on abandoned open-source Libxslt project - CoolType: Font parsing - JP2K Codec: JPEG 2000 image parsing - WebKit AG: HTML-to-PDF conversion; based on old WebKit version - Onyx32: Index file creation and searching; killed due to vulnerabilities but DLL still present
4. **JavaScript-Centric Attack Surface**: - Scripting plugin gateway: Through JavaScript (via Scripting plugin), attackers can trigger parsing of image files, XSLT, fonts, JPEG 2000 - API surface: Scripting plugin exposes rich set of APIs for automation, annotations, collaboration, form manipulation - Heap spraying capability: JavaScript enables precise heap manipulation—craft JavaScript to force parsing of specific file types, trigger heap overflow with controlled layout - Cascading exploitation: Find vulnerability in backend parser (e.g., JPEG 2000), use JavaScript to trigger parsing with crafted input, exploit vulnerability
5. **Acrobat vs. Reader API Differences**: - Not all APIs available in free Reader version - Paid Acrobat version has significantly more functionality - Certain plugins only enabled in Acrobat - Creates complexity: vulnerability may be exploitable only in full Acrobat, not Reader
6. **Vulnerability Evolution (2014-2019)**: - 2014 (IE Vulnerability Rush): Few Acrobat vulnerabilities reported; Trend Micro CDI bounty program focused on other areas - Late 2014/Early 2015: Internal audit of Acrobat JavaScript engine using fuzzing techniques from IE research - Initial discoveries: Memory corruption bugs (use-after-free, out-of-bounds reads/writes, type confusions) - Post-2015: Vulnerability reports accelerated year-over-year - 2019: Peak year for vulnerability submissions - 2019-2020: Slight decline as Adobe deployed mitigations (XPS-to-PDF killed, CFG enabled for plugins)
7. **Memory Corruption Vulnerability Types Found**: - Use-after-free: JavaScript or parser features enable freeing memory still referenced - Stack overflow: Writing beyond stack boundaries - Out-of-bounds reads: Reading memory outside allocated buffers - Out-of-bounds writes: Writing to unintended memory locations - Type confusion: Treating memory as one type when it's another
8. **Acrobat JavaScript Engine Architecture**: - Based on SpiderMonkey version 1.8 (old, spin-off version) - Exposes rich API set for PDF automation - Two execution contexts: privileged (console) and non-privileged (embedded PDF scripts) - Privileged APIs marked with "S" in Adobe's JavaScript API reference - Non-privileged scripts cannot directly call privileged APIs
9. **Privilege Separation Model**: - Privileged context: Console execution; full access to all APIs - Non-privileged context: Embedded PDF scripts; restricted to subset of APIs - Security boundary: APIs marked as privileged require explicit privilege elevation - Vulnerability opportunity: API restrictions bypass enables non-privileged scripts to call privileged APIs
10. **Mitigation Efforts**: - Control Flow Guard (CFG): Deployed on plugin DLLs to prevent ROP chains - Feature removal: Disabling vulnerable plugins like XPS-to-PDF, reducing attack surface - API restrictions: Enforcing privilege separation - Incomplete coverage: Some areas still missing CFG or other mitigations
**Defense & Takeaways**
Defending Acrobat installations and reducing PDF processing risks: (1) Disable unnecessary plugins—if XPS-to-PDF or HTML-to-PDF features not required, disable via registry or configuration; reduces attack surface; (2) Run Acrobat in restricted context—execute PDFs in VMs or sandboxes; limit damage if compromise occurs; (3) Isolate sensitive PDF processing—dedicated systems for processing untrusted PDFs; no user data or sensitive systems on same instance; (4) Keep Acrobat patched—vulnerabilities reported regularly; patches deployed frequently; apply security updates within days of release; (5) Monitor for exploitation—detect unusual behavior: unexpected plugin loading, heavy image processing, XSLT parsing with untrusted input; (6) Reduce user access—disable or restrict JavaScript execution in PDF if not needed; block API calls via policy if supported; (7) User training—warn users about opening PDFs from untrusted sources; PDFs are as dangerous as executable files; (8) Web protection—disable JavaScript in web browsers for PDF rendering; use sandboxed PDF.js instead of native readers when possible; (9) Audit deployed mitigations—verify that CFG, ASLR, DEP enabled on all Acrobat processes; confirm plugins compiled with mitigations; (10) Consider alternative readers—evaluate other PDF readers for critical use cases; compare attack surface, mitigation deployment, update frequency; (11) Content Security Policy—for web-based PDFs, implement CSP to restrict JavaScript capabilities; (12) Application whitelisting—restrict which executables and DLLs can run; prevent loading of unexpected plugins; (13) Memory protections—enable all available memory protection features (ASLR, DEP, CFG); (14) Monitor JavaScript execution—log JavaScript execution in Acrobat; flag suspicious patterns (API calls to file I/O, system access, plugin loading); (15) Incident response—maintain procedures for detecting Acrobat compromise; check for persistence mechanisms, lateral movement, data exfiltration. The critical insight: Acrobat's JavaScript engine is a powerful automation platform that inadvertently becomes an attack platform. The engine's ability to trigger parsing of multiple file formats (images, fonts, XSLT, HTML) enables attackers to leverage vulnerabilities in backend parsers through JavaScript. Privilege separation attempts to restrict dangerous APIs to privileged contexts (console), but API restriction bypasses enable escalation. Vulnerability proliferation (from dozens to hundreds annually) reflects both increased researcher interest and the enormous attack surface—hundreds of features, plugins, parsers, and interactions create exponential complexity. Defense must be layered: disable unnecessary features, apply patches immediately, run Acrobat in restricted contexts, and monitor for exploitation attempts. Organizations should evaluate whether PDF processing really requires such feature richness or if simpler, focused PDF readers with smaller attack surfaces would be appropriate for their use cases.
Related talks
Wild West Hackin' Fest·45 min
Analysts investigate attack surfaces and defenses concerning Privilege Escalation FTW.
Black Hat Asia·27 min
Tianze Ding
Engineers explore architecture and security mechanisms for CertifiedDCOM: The Privilege Escalation Journey to Domain Admin with DCOM.
Black Hat USA·28 min
Eric Woodruff
Analysts investigate attack surfaces and defenses concerning UnOAuthorized: A Technique to Privilege Escalation to Global Administrator.


