Path traversal / LFI to RCE
Inclusive of both Windows & Linux files
If SSH is running in either Windows/Linux box then we can look for SSH keys in the user directories.
Keys are named according to the algorithm that was used to generate them - if it was RSA, the file will be called id_rsa. Similarly it can be id_ecdsa, etc..
In case of LFI, if we can access server logs (such as Apache), then we can try poisoning the logs to perform code execution and get reverse shell.
Use data:// wrapper to execute commands (if website is using PHP).
In case you have low-priv shell & LFI on web and you want to exploit LFI to get another privilege shell then for that look for writable directories with this command ->
find / -type d -writable 2>/dev/null
LFI in Windows Application -->
To confirm its presence, mostly this works --> ..\..\..\windows\win.ini
Look for interesting files like web.config in default locations such as ---->
https://site.com/download?filename=..\\..\\..\\inetpub\\wwwroot\\web.config
We don't always have to provide C:\ at the starting point !!
Last updated