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

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: 490a00463044022100d7aa19220fe96977edea75885a95fa0e1ed4cf931489b474f02d62b0c3eeb56b021f5c31b4945fd71e1bbdd306cb2eefffb9e1f8ff958895ee4032e6aa3df9d74e:922c64590222798bb761d5b6d8e72950