← Back to SOC feed Coverage →

Detect UserForm object in MS Office document

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-12T23:00:00Z · Confidence: medium

Hunt Hypothesis

The presence of a UserForm object in an MS Office document may indicate an attempt to embed malicious code for execution within a document. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential document-based attacks that could bypass traditional detection mechanisms.

YARA Rule

rule Contains_UserForm_Object
{
	meta:
		author = "Martin Willing (https://evild3ad.com)"
		description = "Detect UserForm object in MS Office document"
		reference = "https://msdn.microsoft.com/en-us/library/office/gg264663.aspx"
		date = "2016-03-05"
		filetype = "Office documents"
		
	strings:
		$a = "UserForm1"
		$b = "TextBox1"
		$c = "Microsoft Forms 2.0"
	
	condition:
	 	all of them
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 3 string patterns in its detection logic.

References

False Positive Guidance

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