Home › Intelligence › Brief
BREACH BRIEF🟡 Medium ThreatIntel

Orphaned VBA Projects Discovered Inside AutoCAD DWG Files Enable Hidden Code Execution

SANS researchers found DWG files where the header pointer to an embedded VBA OLE container is zero, yet the macro remains on disk and can be extracted with brute‑force tools. This reveals a gap in file‑integrity controls for engineering drawings, underscoring the need for deeper artifact inspection.

LiveThreat™ Intelligence · 📅 November 23, 2026· 📰 isc.sans.edu
🟡
Severity
Medium
TI
Type
ThreatIntel
🎯
Confidence
High
🏢
Affected
2 sector(s)
✅
Actions
2 recommended
📰
Source
isc.sans.edu

Orphaned VBA Projects Discovered Inside AutoCAD DWG Files Enable Hidden Code Execution

What Happened — Researchers from the SANS Internet Storm Center published a technical note on 14 Oct 2026 describing a subtle artifact in AutoCAD drawing files (.dwg). VBA (Visual Basic for Applications) macros can be embedded in a DWG file via an OLE container. Normally the DWG header includes a 32‑bit pointer at offset 0x24 that indicates the location of this OLE block; tools such as the author’s autocad.py script use the pointer to extract the macro for analysis.

In two newly examined DWG samples the pointer value is zero, which would normally signal “no VBA project”. However, a brute‑force scan of the file revealed a fully‑formed OLE container with a VBA project still present. The embedded macro is invisible to AutoCAD because the application relies on the header pointer to decide whether to load VBA code. Consequently, the macro cannot execute when the file is opened in a default AutoCAD installation (which does not include VBA support anyway), but the code remains on disk and could be harvested, repurposed, or later activated if the environment changes (e.g., VBA add‑on installed).

The author demonstrated the extraction technique using a pipeline of open‑source utilities: cut-bytes.py to carve the DWG based on the pointer, oledump.py to dump OLE streams, and the custom autocad.py script to locate the pointer. When the pointer is zero, cut-bytes.py returns nothing, but oledump.py still finds the OLE block. The note includes sample commands and screenshots of the pointer value, the hidden OLE header, and the successful extraction via oledump.py.

The root cause of the “orphaned” state is not fully understood. The author hypothesizes that the AutoLISP command


(dictremove (namedobjdict) "ACAD_VBA")

may clear the pointer without deleting the underlying OLE stream, leaving the macro orphaned. Because a default AutoCAD install does not ship with VBA support, many users never see the macro, yet the file still carries executable code that could be activated on a system where VBA is later added.

The note emphasizes that security tools which rely solely on header pointers will miss these hidden macros. Analysts are urged to augment DWG inspection with brute‑force OLE carving or to use oledump.py directly on suspect files.

No public incidents of malicious exploitation have been reported yet, but the technique expands the attack surface for supply‑chain or insider threats that embed malicious VBA in engineering drawings, a format widely exchanged in architecture, engineering, and construction (AEC) firms.

Why It Matters for Trust & Control Assurance — The finding highlights a gap in file‑integrity verification and artifact‑level monitoring; organizations should ensure controls that detect hidden code beyond standard metadata checks.

Who Is Affected — AEC firms, engineering consultancies, manufacturers, and any organization that exchanges AutoCAD DWG files as part of design or procurement workflows.

Recommended Actions

  • Incorporate full‑file carving (e.g., OLE stream extraction) into your DWG malware‑scanning pipeline.
  • Validate that any VBA‑related pointers in DWG headers are consistent with the presence (or absence) of OLE containers; flag mismatches for manual review.
  • Update internal file‑acceptance policies to require verification of embedded macros, especially when VBA add‑ons are installed on workstations.
  • Log all DWG ingestion events and retain hash‑based evidence of the inspection outcome for audit readiness.

Source: SANS Internet Storm Center – Orphaned VBA Projects Inside DWG Files

Technical Notes

  • Attack Vector: Hidden VBA macro embedded in OLE container inside DWG; activation requires VBA runtime.
  • Tools Mentioned: autocad.py (pointer extraction), cut-bytes.py (byte carving), oledump.py (OLE stream analysis).
  • File Structure: 32‑bit pointer at offset 0x24 → 16‑byte header → embedded OLE file length → VBA project.
  • Detection: Pointer zero → standard tools miss macro; brute‑force OLE search or oledump.py reveals it.
  • Mitigation: Use dictremove to clean VBA entries and delete the OLE stream, or employ comprehensive carving.
📰 Original Source
https://isc.sans.edu/diary/rss/33420 ↗

This LiveThreat Intelligence Brief is an independent analysis. Read the original reporting at the link above.

From the Verisq platform · Trust Operations

Misconfigurations are control gaps in disguise.

Verisq AI Trust Operations turns findings like this into mapped controls with continuous evidence, keeping your audit readiness current instead of point-in-time.

Map your controls with Verisq AI Trust Operations →