id: twitter-phish

info:
  name: Twitter/X phishing Detection
  author: rxerium
  severity: info
  description: |
    A Twitter/X phishing website was detected
  reference:
    - https://twitter.com
    - https://x.com
  metadata:
    max-request: 1
  tags: phishing,twitter,x,osint,discovery
http:
  - method: GET
    path:
      - "{{BaseURL}}"

    host-redirects: true
    max-redirects: 2

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'Sign in to X'
          - 'Log in to X'
          - 'Sign in to Twitter'
          - 'Log in to Twitter'
        condition: or

      - type: word
        part: body
        words:
          - 'type="password"'
          - "type='password'"
        condition: or

      - type: status
        status:
          - 200

      - type: dsl
        dsl:
          - '!contains(host,"twitter.com")'
          - '!regex("(^|\\.)x\\.com$", host)'
          - '!contains(host,"twimg.com")'
        condition: and
# digest: 4a0a00473045022100e00c9f3550c4f7088aab1de380187dba23ad26248ce461c9192dd43c92eb4fbc02205b2f68131d0d554bc092e8a1b38eb2cf4785fbfec1f3b1614c6a8a934ee8baf0:922c64590222798bb761d5b6d8e72950