Skip to content

Conversation

@carlospolop
Copy link
Collaborator

🤖 Automated Content Update

This PR was automatically generated by the HackTricks News Bot based on a technical blog post.

📝 Source Information

🎯 Content Summary

Check Point Research (CPR) found three Windows GDI/GDI+ parsing bugs reachable via EMF/EMF+ that enable out‑of‑bounds (OOB) reads/writes, remote code execution (RCE), and information disclosure. All were discovered through an EMF/EMF+ fuzzing campaign and fixed on Patch Tuesdays in May, July, and August 2025. The post provides record layouts, crash stacks, affected module versions, and patch‑diff details.


CVE‑2025‑30388 — Geometry Gone Rogue (GDI+, EMF+; OOB R/W → RCE/Info‑leak)🔧 Technical Details

Clipping state corruption to steer later memory ops (CVE‑2025‑30388). Precede drawing with an EmfPlusSetTSClip containing invalid RECTs to corrupt clip geometry. Then issue records like DrawString/FillRects/FillClosedCurve so scan ops write/read out‑of‑bounds. Use an EmfPlusClear first to prefill the destination with attacker‑chosen ARGB (A=0xFF preserves RGB), controlling the dword written by AlphaMultiply_sRGB. Rendering artifacts (e.g., FillRects) can leak heap bytes if pixels are observable.

Scan‑line height overrun via malformed rectangles (CVE‑2025‑53766). Craft EmfPlusDrawRects with EmfPlusRect values that push Y beyond the bitmap’s bottom. Because EpScanBitmap::NextBuffer() (pre‑patch) didn’t clamp requested lines, rasterization proceeds past bounds and writes OOB. Control the write value by setting an EmfPlu...

🤖 Agent Actions

I analyzed the Check Point Research blog and the HackTricks repository. The most appropriate place to add the new content is the existing page:
src/generic-methodologies-and-resources/basic-forensic-methodology/specific-software-file-type-tricks/structural-file-format-exploit-detection.md

What I did:

  • Read relevant sections in the repository to maintain style and structure:
    • structural-file-format-exploit-detection.md
    • pdf-file-analysis.md
    • office-file-analysis.md
    • zips-tricks.md
    • png-tricks.md
    • specific-software-file-type-tricks/README.md
  • Updated structural-file-format-exploit-detection.md by adding a new subsection:
    • “EMF/EMF+ – Windows GDI/GDI+ structural exploitation patterns (CVE‑2025‑30388/53766/47984)”
    • Provided exploitation-aware structural detection heuristics for:
      • EMF+ clipping state corruption via EmfPlusSetTSClip leading to OOB R/W (CVE-2025-30388)
      • EMF+ scan-line height overrun via EmfPlusDrawRects leading to OOB write (CVE-2025-53766)
      • EMR_STARTDOC pointer/offset mismatch leading to OOB read (CVE-2025-47984)
    • Included pseudo-logic and practical triage steps that match HackTricks’ style
    • Added operational telemetry hints (GDI+/GDI32 symbols, GdipGetImageThumbnail path)
    • Kept it concise and highly technical per guidelines
  • Included EMF/EMF+ in the “Implementation patterns and performance” analyzer list
  • Updated the References section with:
    • The CPR blog URL
    • Microsoft EMF+ record specifications for the records discussed
    • RECT documentation

Files modified:

  • src/generic-methodologies-and-resources/basic-forensic-methodology/specific-software-file-type-tricks/structural-file-format-exploit-detection.md

Rationale:

  • The blog provides deep technical details and exploitation patterns for EMF/EMF+/GDI/GDI+, including specific record types, patch diffs, call stacks, and control of OOB write values—ideal for “Structural File‑Format Exploit Detection.”
  • Adding a targeted EMF/EMF+ subsection aligns with the existing structure and adds high-value structural heuristics to detect/prevent similar exploit patterns across samples.

No new file was created, and only one existing file was updated, keeping the content focused and discoverable. The final page now contains actionable detection logic for EMF/EMF+ threats, including the three vulnerabilities and practical forensics triage guidance.


This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.

📚 Repository Maintenance

  • MD files processed: 907
  • MD files fixed: 1

All .md files have been checked for proper formatting (headers, includes, etc.).

@carlospolop
Copy link
Collaborator Author

🔗 Additional Context

Original Blog Post: https://research.checkpoint.com/2025/drawn-to-danger-windows-graphics-vulnerabilities-lead-to-remote-code-execution-and-memory-exposure/

Content Categories: Based on the analysis, this content was categorized under "Generic Methodologies & Resources > Basic Forensic Methodology > Specific Software/File-Type Tricks > Structural File Format Exploit Detection (add a subsection: EMF/EMF+ (Windows GDI/GDI+) exploitation patterns)".

Repository Maintenance:

  • MD Files Formatting: 907 files processed (1 files fixed)

Review Notes:

  • This content was automatically processed and may require human review for accuracy
  • Check that the placement within the repository structure is appropriate
  • Verify that all technical details are correct and up-to-date
  • All .md files have been checked for proper formatting (headers, includes, etc.)

Bot Version: HackTricks News Bot v1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants