1
+ name : " Credential Phishing: Image as content, short or no body contents"
2
+ description : |
3
+ This rule identifies incoming messages with minimal links, all image attachments and either empty, brief
4
+ or the body text is only a warning banner/disclaimer. It also checks for truncated PNG images or logos in addition
5
+ to high-confidence credit theft intentions.
6
+ type : " rule"
7
+ severity : " medium"
8
+ source : |
9
+ type.inbound
10
+ and length(body.current_thread.links) < 2
11
+ and 0 < (length(attachments)) < 3
12
+ and (
13
+ // body text is very short
14
+ (
15
+ 0 <= (length(body.current_thread.text)) < 10
16
+ or body.current_thread.text is null
17
+ )
18
+ or (
19
+ length(body.current_thread.text) < 900
20
+ // or body is most likely all warning banner (text contains the sender and common warning banner language)
21
+ and (
22
+ (
23
+ strings.contains(body.current_thread.text, sender.email.email)
24
+ and strings.contains(body.current_thread.text, 'caution')
25
+ )
26
+ or regex.icontains(body.current_thread.text,
27
+ "intended recipient's use only|external email|sent from outside|you don't often"
28
+ )
29
+ // this is an attempt as negating cases where the email signature is the majority of the email body length
30
+ or any(attachments,
31
+ (.file_type in $file_types_images)
32
+ and any(ml.nlu_classifier(beta.ocr(.).text).intents,
33
+ .name == "cred_theft" and .confidence == "high"
34
+ )
35
+ // the credential theft image must be 2.5x the amount of text as the body itself
36
+ and (
37
+ length(beta.ocr(.).text) / (
38
+ length(body.current_thread.text) + 0.0
39
+ )
40
+ ) > 2.5
41
+ )
42
+ )
43
+ )
44
+ )
45
+ and (
46
+ any(attachments,
47
+ (.file_type in $file_types_images)
48
+ and (
49
+ any(file.explode(.),
50
+ any(.scan.exiftool.fields, .value == "Truncated PNG image")
51
+ or any(ml.logo_detect(..).brands, .name is not null)
52
+ or any(ml.nlu_classifier(.scan.ocr.raw).intents,
53
+ .name == "cred_theft" and .confidence == "high"
54
+ )
55
+ )
56
+ )
57
+ )
58
+ )
59
+ attack_types :
60
+ - " Credential Phishing"
61
+ tactics_and_techniques :
62
+ - " Evasion"
63
+ - " Image as content"
64
+ detection_methods :
65
+ - " Computer Vision"
66
+ - " Content analysis"
67
+ - " File analysis"
68
+ - " Header analysis"
69
+ - " Natural Language Understanding"
70
+ - " Optical Character Recognition"
71
+ id : " d9602a2d-1a78-5211-a64a-2c9d4b0fbb1e"
72
+ og_id : " 01313f38-d0d1-5240-b407-8f9158639277"
73
+ testing_pr : 3024
74
+ testing_sha : ab2b8ac6a72cc893ed438acffded712c43ec11c4
0 commit comments