Detection rules › Sublime MQL

Open redirect: Hakumonkai.org

Severity
high
Type
rule
Source
github.com/sublime-security/sublime-rules

Detects inbound messages containing links or attachments with URLs that utilize the hakumonkai.org domain's redirect functionality (/fukkou/ref.php) to redirect users to external domains through the 'url' parameter.

Threat classification

Sublime's own taxonomy (not MITRE ATT&CK).

CategoryValues
Attack typesCredential Phishing
Tactics and techniquesOpen redirect

Event coverage

Rule body MQL

type.inbound
and (
  any(body.links,
      (
        .href_url.domain.root_domain == "hakumonkai.org"
        and .href_url.path == "/fukkou/ref.php"
        and any(.href_url.query_params_decoded["url"],
                strings.parse_url(.).domain.valid
        )
      )
  )
  or any(filter(attachments, .file_type == "pdf"),
         any(file.explode(.),
             any(.scan.url.urls,
                 (
                   .domain.root_domain == "hakumonkai.org"
                   and .path == "/fukkou/ref.php"
                   and any(.query_params_decoded["url"],
                           strings.parse_url(.).domain.valid
                   )
                 )
             )
         )
  )
)

Detection logic

Scope: inbound message.

Detects inbound messages containing links or attachments with URLs that utilize the hakumonkai.org domain's redirect functionality (/fukkou/ref.php) to redirect users to external domains through the 'url' parameter.

  1. inbound message
  2. any of:
    • any of body.links where all hold:
      • .href_url.domain.root_domain is 'hakumonkai.org'
      • .href_url.path is '/fukkou/ref.php'
      • any of .href_url.query_params_decoded['url'] where:
        • strings.parse_url(.).domain.valid
    • any of filter(attachments) where:
      • any of file.explode(.) where:
        • any of .scan.url.urls where all hold:
          • .domain.root_domain is 'hakumonkai.org'
          • .path is '/fukkou/ref.php'
          • any of .query_params_decoded['url'] where:
            • strings.parse_url(.).domain.valid

Inspects: attachments[].file_type, body.links, body.links[].href_url.domain.root_domain, body.links[].href_url.path, body.links[].href_url.query_params_decoded['url'], type.inbound. Sensors: file.explode, strings.parse_url.

Indicators matched (5)

FieldMatchValue
body.links[].href_url.domain.root_domainequalshakumonkai.org
body.links[].href_url.pathequals/fukkou/ref.php
attachments[].file_typeequalspdf
file.explode(filter(attachments)[])[].scan.url.urls[].domain.root_domainequalshakumonkai.org
file.explode(filter(attachments)[])[].scan.url.urls[].pathequals/fukkou/ref.php