Job scam with specific salary pattern

Detects job scam content that includes specific weekly salary mentions (e.g., '$XXX weekly' patterns) in either the current email thread or previous thread conversations, while excluding legitimate income verification services.

Sublime rule (View on GitHub)

  1name: "Job scam with specific salary pattern"
  2description: "Detects job scam content that includes specific weekly salary mentions (e.g., '$XXX weekly' patterns) in either the current email thread or previous thread conversations, while excluding legitimate income verification services."
  3type: "rule"
  4severity: "low"
  5source: |
  6  type.inbound
  7  and (
  8    ( // job scam in current thread
  9      any(ml.nlu_classifier(body.current_thread.text).intents,
 10          .name in ("job_scam") and .confidence != "low"
 11      )
 12      // and salary mention in current thread
 13      and regex.icontains(body.current_thread.text,
 14                          '\$\d{3} weekly',
 15                          'week \$\d{3}',
 16                          'weekly(?:\s+\w+){0,4}\s+\$\d{3}[^\d]'
 17      )
 18    )
 19  
 20    // job scam in previous thread
 21    or any(body.previous_threads,
 22           any(ml.nlu_classifier(.text).intents,
 23               .name in ("job_scam") and .confidence != "low"
 24           )
 25           // and salary mention in previous thread
 26           and regex.icontains(.text,
 27                               '\$\d{3} weekly',
 28                               'week \$\d{3}',
 29                               'weekly(?:\s+\w+){0,4}\s+\$\d{3}[^\d]'
 30           )
 31    )
 32    // job scam lure delivered as a PDF with an empty email body
 33    or (
 34      coalesce(length(body.current_thread.text), 0) == 0
 35      and length(attachments) == 1
 36      and (
 37        any(filter(attachments, .file_type == "pdf"),
 38            any(file.explode(.),
 39                // specific weekly salary pattern in the OCR
 40                regex.icontains(.scan.ocr.raw,
 41                                '\$\d{3,}(?:\s+\w+){0,3}\s+week',
 42                                'week(?:\s+\w+){0,3}\s+\$\d{3,}',
 43                                'weekly(?:\s+\w+){0,4}\s+\$\d{3}[^\d]',
 44                                '\$\d{3,}[\s.,;:-]{0,8}week'
 45                )
 46                and (
 47                  regex.icontains(.scan.ocr.raw,
 48                                  'fully remote',
 49                                  'remote\b[\s-]*(?:work|position|role|job|employee|worker|assistant|opportunit)',
 50                                  'remotely',
 51                                  'work[\s-]?from[\s-]?home',
 52                                  'equal opportunity employer',
 53                                  'how to apply',
 54                                  'submit (?:your )?application',
 55                                  'open to all (?:majors|backgrounds|students)',
 56                                  'employment opportunity',
 57                                  '\bhiring\b'
 58                  )
 59                  or any(ml.nlu_classifier(.scan.ocr.raw).intents,
 60                         .name in ("job_scam") and .confidence != "low"
 61                  )
 62                )
 63                and not regex.icontains(.scan.ocr.raw,
 64                                        'unemployment',
 65                                        'monetary (?:re)?determination',
 66                                        'weekly benefit amount',
 67                                        'supplemental unemployment',
 68                                        'work search activit'
 69                )
 70            )
 71        )
 72        // job scam lure delivered as a DOCX with no previous threads
 73        or (
 74          length(body.previous_threads) == 0
 75          and any(filter(attachments, .file_type == "docx"),
 76                  any(file.explode(.),
 77                      regex.icontains(.scan.strings.raw,
 78                                      '\$\d{3,}(?:\s+\w+){0,3}\s+week',
 79                                      'week(?:\s+\w+){0,3}\s+\$\d{3,}',
 80                                      'weekly(?:\s+\w+){0,4}\s+\$\d{3}[^\d]',
 81                                      '\$\d{3,}[\s.,;:-]{0,8}week'
 82                      )
 83                      and (
 84                        regex.icontains(.scan.strings.raw,
 85                                        'fully remote',
 86                                        'remote\b[\s-]*(?:work|position|role|job|employee|worker|assistant|opportunit)',
 87                                        'remotely',
 88                                        'work[\s-]?from[\s-]?home',
 89                                        'equal opportunity employer',
 90                                        'how to apply',
 91                                        'submit (?:your )?application',
 92                                        'open to all (?:majors|backgrounds|students)',
 93                                        'employment opportunity',
 94                                        '\bhiring\b'
 95                        )
 96                        or any(ml.nlu_classifier(.scan.strings.raw).intents,
 97                               .name in ("job_scam") and .confidence != "low"
 98                        )
 99                      )
100                      and not regex.icontains(.scan.strings.raw,
101                                              'unemployment',
102                                              'monetary (?:re)?determination',
103                                              'weekly benefit amount',
104                                              'supplemental unemployment',
105                                              'work search activit'
106                      )
107                  )
108          )
109        )
110      )
111    )
112  )
113  and length(body.current_thread.links) < 10
114  
115  // negating income / job verification senders
116  and not (
117    sender.email.domain.root_domain in (
118      'loandepot.com',
119      'sofi.com',
120      'lensa.com',
121      'indeed.com',
122      'ziprecruiter.com',
123      'glassdoor.com',
124      'postjobfree.com',
125      'jobplacements.com'
126    )
127    and headers.auth_summary.dmarc.pass
128  )  
129attack_types:
130  - "BEC/Fraud"
131tactics_and_techniques:
132  - "Social engineering"
133detection_methods:
134  - "Content analysis"
135  - "Natural Language Understanding"
136  - "Header analysis"
137  - "Sender analysis"
138id: "af7f9e21-54a1-5bba-a70d-e4d52a13eae3"
to-top