File Inclusion Vuln

File inclusion Vuln

  • Checking LFI on Windows server

    instead of /etc/passwd use C:/Windows/System32/drivers/etc/hosts

  • PHP Wrappers

    PHP provides several protocol wrappers1 that we can use to exploit directory traversal and local file inclusion vulnerabilities. These filters give us additional flexibility when attempting to inject PHP code via LFI vulnerabilities.

    We can use the data2 wrapper to embed inline data as part of the URL with plaintext or base643 encoded data. This wrapper provides us with an alternative payload when we cannot poison a local file with PHP code.

  • LFI through alternate way

    if ../../../etc/passwd don’t work then

    • ' and die(show_source('/etc/passwd')) or ‘

    • for command use shell

      • ' and die(system("<command>")) or ‘

    https://h0j3n.medium.com/vulnhub-assertion-1-0-1-eb78a0cb9216

Last updated