LFI2RCE via Segmentation Fault
Last updated
Last updated
Leer & oefen AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Leer & oefen GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Volgens die skrywe https://spyclub.tech/2018/12/21/one-line-and-return-of-one-line-php-writeup/ (tweede deel) en https://hackmd.io/@ZzDmROodQUynQsF9je3Q5Q/rJlfZva0m?type=view, het die volgende payloads 'n segmentasiefout in PHP veroorsaak:
You should know that if you send a POST request containing a file, PHP will create a temporary file in /tmp/php<something>
with the contents of that file. This file will be automatically deleted once the request was processed.
If you find a LFI and you manage to trigger a segmentation fault in PHP, the temporary file will never be deleted. Therefore, you can search for it with the LFI vulnerability until you find it and execute arbitrary code.
You can use the docker image https://hub.docker.com/r/easyengine/php7.0 for testing.
Leer & oefen AWS Hacking:HackTricks Opleiding AWS Red Team Expert (ARTE) Leer & oefen GCP Hacking: HackTricks Opleiding GCP Red Team Expert (GRTE)