Skip to content

Commit

Permalink
Update inline_image_as_message.yml (#1104)
Browse files Browse the repository at this point in the history
  • Loading branch information
morriscode authored Dec 11, 2023
1 parent df55407 commit ecf32d9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions detection-rules/inline_image_as_message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ severity: "low"
source: |
type.inbound
and length(body.html.raw) < 200
and length(body.links) > 0
and (
(
length(body.links) > 0
// as of 20220116 there's a link parsing bug with .png inline images, so ignore those
and any(body.links, not strings.ilike(.href_url.url, "*.png"))
)
// as of 20220116 there's a link parsing bug with .png inline images, so ignore those
any(body.links, not strings.ilike(.href_url.url, "*.png"))
// cid images are treated as attachments, so we're looking for more than 1
or (length(attachments) > 1 and any(attachments, .file_type not in $file_types_images))
or (
length(attachments) > 1
and any(attachments, .file_type not in $file_types_images)
)
)
and strings.ilike(body.html.raw, "*img*cid*")
and (
Expand Down

0 comments on commit ecf32d9

Please sign in to comment.