Detection rules › Sublime MQL
Brand impersonation: UK government Home Office
Detects messages impersonating UK government agencies (Home Office, UK Visas and Immigration, gov.uk) that contain links not leading to legitimate gov.uk domains or show credential theft language, from senders not authenticated as official government domains.
Threat classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | BEC/Fraud, Credential Phishing |
| Tactics and techniques | Impersonation: Brand, Social engineering, Lookalike domain |
Event coverage
Rule body MQL
type.inbound
// UK government agencies in display name or subject with homograph protection
and (
any([
strings.replace_confusables(sender.display_name),
strings.replace_confusables(subject.subject)
],
strings.ilike(.,
"*sponsorship management system*",
"*Sponsor Management System*"
)
// exact match of high confidence
or . in~ ("Home Office", "uk home office", "UK Visas and Immigration")
)
// image is srced from the actual home office URL
or strings.icontains(body.html.raw,
'"https://www.points.homeoffice.gov.uk/gui-sms-jsf/images/'
)
// observed footers in messages
or 2 of (
strings.icontains(body.current_thread.text, '© Crown Copyright '),
strings.icontains(body.current_thread.text, '© 2025 Home Office'),
strings.icontains(body.current_thread.text, '© UK Visas and Immigration'),
regex.icontains(body.current_thread.text, ' [||–-—] Home Office'),
regex.icontains(body.current_thread.text,
' [|–-—] UK Visas and Immigration'
),
strings.icontains(body.current_thread.text,
'This is an automated message from UK Visas and Immigration.'
),
strings.icontains(body.current_thread.text,
'This is an automated notification from the Home Office'
),
regex.icontains(body.current_thread.text,
'You(?: are|''re) receiving this notification as a registered SMS user'
),
regex.icontains(body.current_thread.text,
'If you are not the designated.{0,50}SMS user'
),
)
)
// Not from legitimate UK government domains
and not (
sender.email.domain.tld == "gov.uk" and headers.auth_summary.dmarc.pass
)
//
and (
// there are links that do not link to "gov.uk"
not all(body.links, .href_url.domain.tld == "gov.uk")
// OR credential theft intent detected
or any(ml.nlu_classifier(body.current_thread.text).intents,
.name == "cred_theft" and .confidence in ("medium", "high")
)
// link based indicators
or any(body.links,
// suspicious display text
(
.display_text in (
"Access SMS",
"Login to SMS",
"Log in to SMS",
"Access UKVI Account"
)
and .href_url.domain.tld != "gov.uk"
)
// there are mismatched links
or (
.display_url.domain.tld == "gov.uk"
and .href_url.domain.tld != "gov.uk"
and .mismatched
)
// the path refers to the uk stuff
or (
.href_url.domain.tld != "gov.uk"
and strings.icontains(.href_url.path, 'gov.uk')
)
)
)
// no previous threads
and not (length(headers.references) > 0 or length(body.previous_threads) > 0)
// negate a high amount of links or newsletters
and not (
length(body.links) > 20
or any(ml.nlu_classifier(body.html.display_text).topics,
.name == "Newsletters and Digests"
)
)
// High-trust domain exclusion
and (
(
sender.email.domain.root_domain in $high_trust_sender_root_domains
and not headers.auth_summary.dmarc.pass
)
or sender.email.domain.root_domain not in $high_trust_sender_root_domains
)
Detection logic
Scope: inbound message.
Detects messages impersonating UK government agencies (Home Office, UK Visas and Immigration, gov.uk) that contain links not leading to legitimate gov.uk domains or show credential theft language, from senders not authenticated as official government domains.
- inbound message
any of:
any of
[strings.replace_confusables(sender.display_name), strings.replace_confusables(subject.subject)]where any holds:. matches any of 2 patterns
*sponsorship management system**Sponsor Management System*
- . in ('Home Office', 'uk home office', 'UK Visas and Immigration')
- body.html.raw contains '"https://www.points.homeoffice.gov.uk/gui-sms-jsf/images/'
at least 2 of:
- body.current_thread.text contains '© Crown Copyright '
- body.current_thread.text contains '© 2025 Home Office'
- body.current_thread.text contains '© UK Visas and Immigration'
- body.current_thread.text matches ' [||–-—] Home Office'
- body.current_thread.text matches ' [|–-—] UK Visas and Immigration'
- body.current_thread.text contains 'This is an automated message from UK Visas and Immigration.'
- body.current_thread.text contains 'This is an automated notification from the Home Office'
- body.current_thread.text matches "You(?: are|'re) receiving this notification as a registered SMS user"
- body.current_thread.text matches 'If you are not the designated.{0,50}SMS user'
not:
all of:
- sender.email.domain.tld is 'gov.uk'
- headers.auth_summary.dmarc.pass
any of:
not:
all of
body.linkswhere:- .href_url.domain.tld is 'gov.uk'
any of
ml.nlu_classifier(body.current_thread.text).intentswhere all hold:- .name is 'cred_theft'
- .confidence in ('medium', 'high')
any of
body.linkswhere any holds:all of:
- .display_text in ('Access SMS', 'Login to SMS', 'Log in to SMS', 'Access UKVI Account')
- .href_url.domain.tld is not 'gov.uk'
all of:
- .display_url.domain.tld is 'gov.uk'
- .href_url.domain.tld is not 'gov.uk'
- .mismatched
all of:
- .href_url.domain.tld is not 'gov.uk'
- .href_url.path contains 'gov.uk'
none of:
- length(headers.references) > 0
- length(body.previous_threads) > 0
none of:
- length(body.links) > 20
any of
ml.nlu_classifier(body.html.display_text).topicswhere:- .name is 'Newsletters and Digests'
any of:
all of:
- sender.email.domain.root_domain in $high_trust_sender_root_domains
not:
- headers.auth_summary.dmarc.pass
- sender.email.domain.root_domain not in $high_trust_sender_root_domains
Inspects: body.current_thread.text, body.html.display_text, body.html.raw, body.links, body.links[].display_text, body.links[].display_url.domain.tld, body.links[].href_url.domain.tld, body.links[].href_url.path, body.links[].mismatched, body.previous_threads, headers.auth_summary.dmarc.pass, headers.references, sender.display_name, sender.email.domain.root_domain, sender.email.domain.tld, subject.subject, type.inbound. Sensors: ml.nlu_classifier, regex.icontains, strings.icontains, strings.ilike, strings.replace_confusables. Reference lists: $high_trust_sender_root_domains.
Indicators matched (27)
| Field | Match | Value |
|---|---|---|
strings.ilike | substring | *sponsorship management system* |
strings.ilike | substring | *Sponsor Management System* |
[strings.replace_confusables(sender.display_name), strings.replace_confusables(subject.subject)][] | member | Home Office |
[strings.replace_confusables(sender.display_name), strings.replace_confusables(subject.subject)][] | member | uk home office |
[strings.replace_confusables(sender.display_name), strings.replace_confusables(subject.subject)][] | member | UK Visas and Immigration |
strings.icontains | substring | "https://www.points.homeoffice.gov.uk/gui-sms-jsf/images/ |
strings.icontains | substring | © Crown Copyright |
strings.icontains | substring | © 2025 Home Office |
strings.icontains | substring | © UK Visas and Immigration |
regex.icontains | regex | [||–-—] Home Office |
regex.icontains | regex | [|–-—] UK Visas and Immigration |
strings.icontains | substring | This is an automated message from UK Visas and Immigration. |
15 more
strings.icontains | substring | This is an automated notification from the Home Office |
regex.icontains | regex | You(?: are|'re) receiving this notification as a registered SMS user |
regex.icontains | regex | If you are not the designated.{0,50}SMS user |
sender.email.domain.tld | equals | gov.uk |
body.links[].href_url.domain.tld | equals | gov.uk |
ml.nlu_classifier(body.current_thread.text).intents[].name | equals | cred_theft |
ml.nlu_classifier(body.current_thread.text).intents[].confidence | member | medium |
ml.nlu_classifier(body.current_thread.text).intents[].confidence | member | high |
body.links[].display_text | member | Access SMS |
body.links[].display_text | member | Login to SMS |
body.links[].display_text | member | Log in to SMS |
body.links[].display_text | member | Access UKVI Account |
body.links[].display_url.domain.tld | equals | gov.uk |
strings.icontains | substring | gov.uk |
ml.nlu_classifier(body.html.display_text).topics[].name | equals | Newsletters and Digests |