Exploitation

for i in $(seq 0 12); do echo -n '| base64 -d';done
Charix!2#4%6&8(0

Gaining Access

Method 2: phpinfo.php Race Condition

The following document outlines a race condition that can turn an LFI vulnerability to remote code execution (RCE). Ther server side components need the following.

  • An LFI vulnerability

  • Any Script that displays the output of PHPInfo() configuration

We have both of these conditions.

Replace the payload to include a php reverse shell

Method 3 Log Poisoning

Log Poisoning is a common technique used to gain RCE from an LFI vulnerability. This is how it works:

  • the attacker attempts to inject malicious input to the server log

  • using the LFI vulnerability, the attacker calls the server log thereby executing the injected malicious code.

On freeBSD, it saves the log file on

Modifying useragent with the follwoing code will estabilsh a reverse shell

Last updated