Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create attachment_html_with_long_timeout.yml #2245

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions detection-rules/attachment_html_with_long_timeout.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Attachment: HTML file with abnormally long timeout"
description: "Detects inbound messages containing HTML attachments that use abnormally long setTimeout functions as a potential sandbox evasion technique."
type: "rule"
severity: "high"
source: |
type.inbound
and any(attachments,
(
.file_extension in~ ("html", "htm", "shtml", "dhtml")
or .file_type == "html"
)
and regex.icontains(file.parse_html(.).raw,
'setTimeout\(\(\) =>.*?\d{4}\);'
)
)
and not headers.return_path.domain.root_domain == "phriendlyphishing.com"
attack_types:
- "Malware/Ransomware"
- "Credential Phishing"
tactics_and_techniques:
- "HTML smuggling"
- "Scripting"
detection_methods:
- "File analysis"
- "HTML analysis"
- "Header analysis"
id: "dc11f4fe-480f-5136-b02d-c69c5a65f85e"
Loading