id: adfs-detect

info:
  name: ADFS Detect
  author: Adam Crosser,Mys7ic
  severity: info
  description: Detects ADFS with forms-based authentication enabled.
  metadata:
    max-request: 1
  tags: tech,adfs,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/adfs/ls/idpinitiatedsignon.aspx"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '/adfs/portal/css/style.css'

    extractors:
      - type: regex
        part: body
        name: domain
        group: 1
        regex:
          - 'var\s+userNameValue\s*=\s*''([^\\]*)\\'
# digest: 490a00463044022029762993a08e5ee33cf75a212e072848839f843670d132ab85e1831f8d8197bf02201637469407acfce351f54066bd76b3a5e922703260a7db1d13728950ea262af0:922c64590222798bb761d5b6d8e72950