Merhaba dll, Assagida verecegim codeyi dosya adini (iframetara.php) seklinde kayitet. ''index.php''nin bulundugu klasore gonder.


<?

// o7 Dedicated Genel Tarama
// turkishdesign@msn.com

$path = $_SERVER['DOCUMENT_ROOT'];
$debug = true;

$extensions = Array();
$extensions[] = 'htm';
$extensions[] = 'html';
$extensions[] = 'tml';
$extensions[] = 'txt';
$extensions[] = 'php';
$extensions[] = 'hp4';
$extensions[] = 'hp5';
$extensions[] = '.pl';


// CODELER ILE OYNAMAYINIZ

// declare variables
$report = '';

// output html headers
renderhead();

// set counters
$dircount = 0;
$filecount = 0;
$infected = 0;

// load virus defs from flat file
if (!check_defs('virus.def'))
	trigger_error("Virus.def vulnerable to overwrite, please change permissions", E_USER_ERROR);
$defs = load_defs('virus.def', $debug);

// scan specified root for specified defs
file_scan($path, $defs, $debug);

// output summary
echo '<h1>Tarama tamamlandi</h2>';
echo '<div id=summary>';
echo '<p><strong>Taranan Klasor:</strong> ' . $dircount . '</p>';
echo '<p><strong>Taranan Dosya:</strong> ' . $filecount . '</p>';
echo '<p class=r><strong>Virus Bulasan:</strong> ' . $infected . '</p>';
echo '</div>';

// output full report
echo $report;


function file_scan($folder, $defs, $debug = true) {
	// hunts files/folders recursively for scannable items
	global $dircount, $report;
	$dircount++;
	if ($debug)
		$report .= '<p class="d">Scanning folder $folder ...</p>';
	if ($d = @dir($folder)) {
		while (false !== ($entry = $d->read())) {
			$isdir = @is_dir($folder.'/'.$entry);
			if (!$isdir and $entry!='.' and $entry!='..') {
				virus_check($folder.'/'.$entry,$defs,$debug);
			} elseif ($isdir  and $entry!='.' and $entry!='..') {
				file_scan($folder.'/'.$entry,$defs,$debug);
			}
		}
		$d->close();
	}
}

function virus_check($file, $defs, $debug = true) {
	global $filecount, $infected, $report, $extensions;

	// find scannable files
	$scannable = 0;
	foreach ($extensions as $ext) {
		if (substr($file,-3)==$ext)
			$scannable = 1;
	}

	// compare against defs
	if ($scannable) {
		// affectable formats
		$filecount++;
		$data = file($file);
		$data = implode('\r\n', $data);
		$clean = 1;
		foreach ($defs as $virus) {
			if (strpos($data, $virus[1])) {
				// file matches virus defs
				$report .= '<p class="r">Infected: ' . $file . ' (' . $virus[0] . ')</p>';
				$infected++;
				$clean = 0;
			}
		}
		if (($debug)&&($clean))
			$report .= '<p class="g">Clean: ' . $file . '</p>';
	}
}

function load_defs($file, $debug = true) {
	// reads tab-delimited defs file
	$defs = file($file);
	$counter = 0;
	$counttop = sizeof($defs);
	while ($counter < $counttop) {
		$defs[$counter] = explode('	', $defs[$counter]);
		$counter++;
	}
	if ($debug)
		echo '<p>Loaded ' . sizeof($defs) . ' virus definitions</p>';
	return $defs;
}

function check_defs($file) {
	// check for >755 perms on virus defs
	clearstatcache();
	$perms = substr(decoct(fileperms($file)),-2);
	if ($perms > 55)
		return false;
	else
		return true;
}

function renderhead() {
?>

<html>
<head>
<title>Virus-Trojan Arama</title>
<style type="text/css">
h1 {
	font-family: arial;
}

p {
	font-family: arial;
	padding: 0;
	margin: 0;
	font-size: 10px;
}

.g {
	color: #009900;
}

.r {
	color: #990000;
	font-weight: bold;
}

.d {
	color: #ccc;
}

#summary {
	border: #333 solid 1px;
	background: #f0efca;
	padding: 10px;
	margin: 10px;
}

#summary p {
	font-size: 12px;
}
</style>
</head>

<body>

<?
}
?>

</body>
</html>
Daha sonra

Crazy Toolbar IE Exploit	crazy-toolbar.com
JS.Scob.Trojan	217.107.218.147
Yukarda 2'ncisini belirttigim codeyi bir text belgesine yapistir ve adini sqlinj.txt olarak ayarla ve index.php'nin oldugu dizine gonder sqlinj.txt dosyasinin CHMOD degerini 0644 Uyarla. sqlinj.txt dosyasinda ben 2 tane sql inj iframe ekledim sunucuna bulasan site adini icine yaz ve kayitla. Daha sonra iframetara.php calistir. iframeleri teker teker bulacaktir. rahatlikla kaldirabilirsin.

Iyi calismalar.