🟥
LSWSec - Offensive
  • Introduction
  • File transfer
    • Transferring Files
      • Transferring Files - Linux
      • Transferring Files - Windows
  • Recon
    • Passive information Gathering
      • Website
      • Finding SubDomains
        • DNS
        • DNS Zone Transfer
    • Subdomain Enumeration
    • OSINT
      • Email
      • People
      • Social Media
      • Username and Accounts
      • Passwords
      • Business
      • Image and Location
    • Active Information Gathering
      • Nmap
      • Netcat
      • ss
      • Unknown Port Scanning
      • Footprinting
        • FTP
        • SMB
        • NFS
        • DNS
    • Vulnerability Searching
  • Ports
    • 21 - FTP
    • 22 - SSH
    • 23 - Telnet
    • 25 - SMTP
    • 69 - TFTP
    • 80 - HTTP
    • 88 - Kerberos
    • 110 - Pop3
    • 111 - RPCBind
    • 119 - NNTP
    • 135 - MSRPC
    • 139/445 - SMB
      • PSExec
      • Nmap
      • Other tools
    • 143/993 - IMAP
    • 161/162 - SNMP
    • 389/636 - LDAP
    • 443 - HTTPS
    • 554 - RTSP
    • 587 - Submission
    • 631 - Cups
    • 1433 - MsSQL
    • 2049 - NFS
    • 3306 - MySQL
    • 3389 - RDP
  • Web
    • useful information
    • Web Proxy
      • Burp
    • Web Content Discovery
    • SQL
    • Web Fuzzing with FFUF
      • Directory Fuzzing
      • Domain Fuzzing
      • Paramater fuzzing
    • Local File Inclusion
      • LFI
      • Basic Bypass
    • Authentication Bypass
    • IDOR
  • Priv-esc
    • Windows
      • mimikatz
  • Pivoting
    • Info
    • Locating other machines
    • proxy
    • SSH tunneling/port forwarding
    • plink
    • socat
    • chisel
    • sshuttle
    • connecting to windows environments with a user account
  • Command and Control
    • powershell empire
    • Armitage
  • Active Directory
    • Debugging DNS
    • NTLM Authenticated Services
    • LDAP Bind Credentials
Powered by GitBook
On this page
  1. Web

Local File Inclusion

  • Local file inclusion can give access to local files hosted on the server

  • these are common within templating engines which make every webpage look the same.

  • what out for url formats like /index.php?page=about

  • PHP

    • include() can be used to load a local or remote file

    • if it is taken from a user-controlled paramater, the code does not explicitly filter and sanitize the user input.

    • other vulnerable functions are:

      • include_once(), require(), require_once(), file_get_contents()

  • NodeJS

    • Look for render() to read files

  • java

    • In Java code, look for include or import

  • .Net

    • Response.WriteFile

    • html.Partial

    • include

Function
Read Content
Execute
Remote URL

PHP

include()/include_once()

Y

Y

Y

require()/require_once()

Y

Y

N

file_get_contents()

Y

N

Y

fopen()/file()

Y

N

N

NodeJS

fs.readFile()

Y

N

N

fs.sendFile()

Y

N

N

res.render()

Y

Y

N

Java

include

Y

N

N

import

Y

Y

Y

.NET

@Html.Partial()

Y

N

N

@Html.RemotePartial()

Y

N

Y

Response.WriteFile()

Y

N

N

include

Y

Y

Y

PreviousParamater fuzzingNextLFI

Last updated 9 months ago