id: openwrt-login

info:
  name: Opentwrt Login / Configuration Interface
  author: For3stCo1d,TechbrunchFR
  severity: info
  reference:
    - https://openwrt.org
    - https://github.com/openwrt/luci
  classification:
    cpe: cpe:2.3:o:openwrt:openwrt:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: openwrt
    product: openwrt
    shodan-query:
      - http.title:"OpenWrt - LuCI"
      - http.title:"openwrt - luci"
    fofa-query: title="openwrt - luci"
    google-query: intitle:"openwrt - luci"
  tags: openwrt,router,panel,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}"
      - "{{BaseURL}}/cgi-bin/luci/"

    stop-at-first-match: true
    host-redirects: true
    max-redirects: 2
    matchers:
      - type: word
        part: body
        words:
          - '<title>OpenWrt'
          - "Powered by LuCI"
        condition: or

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '(?i)OpenWrt  ([A-Z0-9.]+)'
# digest: 4b0a00483046022100c272c38f1c051b6d6747124dcb5fb615b9af0c21faeae71365d0c267167eb1ef022100de665f288f266df0be5dee3a19eb36fa6239b3b599d1a383aa89b27446c23bae:922c64590222798bb761d5b6d8e72950