← Back to SOC feed Coverage →

Rule to detect the presence of an or several attachments

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

Hunt Hypothesis

The presence of suspicious attachments in network traffic or stored files may indicate phishing attempts or the delivery of malicious payloads. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential threats hidden within seemingly legitimate email or file-sharing activities.

YARA Rule

rule with_attachment : mail {
	meta:
		author = "Antonio Sanchez <[email protected]>"
		reference = "http://laboratorio.blogs.hispasec.com/"
		description = "Rule to detect the presence of an or several attachments"
	strings:
		$attachment_id = "X-Attachment-Id"
	condition:
		$attachment_id
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 1 string patterns in its detection logic.

References

False Positive Guidance

Original source: https://github.com/Yara-Rules/rules/blob/main/email/attachment.yar