Skip to content

Commit

Permalink
Update spam_image_hidden_element.yml (#2309)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoomequipd authored Jan 14, 2025
1 parent 5ddd3e8 commit 5607dfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions detection-rules/spam_image_hidden_element.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ source: |
or
// the hidden span/div is before the body/meta
regex.contains(body.html.raw,
'<(?:span|div)[^\>]*style=\x22[^\x22]*\s*(?:display\s*\x3a\s*none|visibility\s*\x3a\s*hidden)\x3b[^\x22]*\x22(?:\s*\w+=\"\w+\")*>\s*\<(?:body|meta)'
'<(?:span|div)[^\>]*style=\x22[^\x22]*\s*(?:display\s*\x3a\s*none|visibility\s*\x3a\s*hidden)\x3b[^\x22]*\x22(?:\s*\w+=\"\w+\")*>\s*\<(?:body|meta|(?:<?div[^\>]+\>\s*(?:[^\<]*|<[a-z]+>\s*)<\/div>\s*){2,})'
)
// the length of the inner text is greather than or equal to 10x more than the display text
// this attempts to generically cover multiple methods of hidding text
// this attempts to generically cover multiple methods of hiding text
or length(body.html.inner_text) >= (length(body.html.display_text) * 10)
)
)
Expand Down

0 comments on commit 5607dfb

Please sign in to comment.