← Back to SOC feed Coverage →

Detect a VBE file inside a byte sequence

yara LOW Yara-Rules
community
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Yara-Rules →
Retrieved: 2026-05-12T11:00:00Z · Confidence: medium

Hunt Hypothesis

A VBE file embedded in a byte sequence may indicate an adversary attempting to execute malicious code through a Visual Basic for Applications macro. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential exploitation of document-based attack vectors that could lead to persistent access or data exfiltration.

YARA Rule

rule Contains_VBE_File : maldoc
{
    meta:
        author = "Didier Stevens (https://DidierStevens.com)"
        description = "Detect a VBE file inside a byte sequence"
        method = "Find string starting with #@~^ and ending with ^#~@"
    strings:
        $vbe = /#@~\^.+\^#~@/
    condition:
        $vbe
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 1 string patterns in its detection logic.

False Positive Guidance

Original source: https://github.com/Yara-Rules/rules/blob/main/maldocs/Maldoc_Contains_VBE_File.yar