那个broken web application 后续会慢慢研究的。。。先把工作任务完成。。
工作任务1:搜索类似演示网站
http://code.google.com/p/websecurify/wiki/DemoSites工作任务2:检索XSS自动化扫描工具,开源,了解检测原理
=================================================================
示例网站:http://code.google.com/p/websecurify/wiki/DemoSites
The following websites may be used to compare Websecurify with other automated web application security testing tools:
S.No. | Vulnerable Application | Platform | Remark |
1 | SPI Dynamics (live) | ASP | 漏扫厂商的缺陷demo站点,想学习还是可以玩的。有新花样最好本地玩吧,除非你是活雷锋。 |
2 | Cenzic (live) | PHP | 同1 |
3 | Watchfire (live) | ASPX | 同1 |
4 | Acunetix 1 (live) | PHP | 同1 |
5 | Acunetix 2 (live) | ASP | 同1 |
6 | Acunetix 3 (live) | ASP.Net | 同1 |
7 | PCTechtips Challenge (live) | online hack challenge, just for fun | |
8 | Damn Vulnerable Web Application | PHP/MySQL | 有提供Live CD版,适合懒人 |
9 | Mutillidae | PHP | 针对OWASP的Top 10名单设置针对性的缺陷供你耍,必须推荐 |
10 | The Butterfly Security Project | PHP | |
11 | Hacme Casino | Ruby on Rails | Hacme系列is copyright by McAfee, but toooooooooooold! take it as you will and at your own risk. |
12 | Hacme Bank 2.0 | ASP.NET (2.0) | 同上,不解释。 |
13 | Updated HackmeBank | ASP.NET (2.0) | 链接失效?我没用过。 |
14 | Hacme Books | J2EE | 还是Hacme。。。 |
15 | Hacme Travel | C++ (application client-server) | 又是Hacme。。。不过这个是C++的,比较少见。也许有价值,我没用过 |
16 | Hacme Shipping | ColdFusion MX 7, MySQL | ColdFusion平台的,有针对性的可以搭建一下试试,我没用过 |
17 | OWASP WebGoat | JAVA | 适合教学 |
18 | OWASP Vicnum | PHP, Perl | |
19 | OWASP InsecureWebApp | JAVA | |
20 | OWASP SiteGenerator | ASP.NET | |
21 | Moth | ||
22 | Stanford SecuriBench | JAVA | |
23 | SecuriBench Micro | JAVA | |
24 | BadStore | Perl(CGI) | |
25 | WebMaven/Buggy Bank (very old) | ||
26 | EnigmaGroup (live) | ||
27 | XSS Encoding Skillsx5s (Casaba Watcher) | Fiddler的扩展,辅助XSS漏洞挖掘(多种字符编码转换支持) | |
28 | Google Gruyere(live) (previously Jarlsberg) | 可以在线玩,GAE supported. So, if you are in CH1N4, you may need a VPN or proxy to access it. | |
29 | Exploit- DB | Multi-platform | 最真实的Web App漏洞资料库,totally damn real!看上哪个,直接官网下载对应缺陷版本,本地想怎么玩就怎么玩。 |
30 | exploit-kb-vulnerable-web-app | PHP/MySQL | 文档清晰,易部署,有Vmware Image版,适合懒人 |
“猪在笑”推荐几个手工的辅助工具,个人感觉挺好~
Tool | Category | Remark | Similar |
paros | HTTP代理/HTTP协议调试/spider | 最新开源版3.2.13更新于2006年,后续版本已经完全商业化。但工具的易用性、功能在今天来看都是值得推荐的。支持HTTP协议双向数据查看/修改/过滤是其亮点。 | burp proxy ,Fiddler, live http headers (Firefox addon),Firebug (Many browsers’ addon) |
HackBar | 手工SQL注入辅助 | 方便转码、编码、填充垃圾字符,绕过滤必备 | |
TamperData | HTTP请求参数控制 | 拦截HTTP/HTTPS请求,允许手工修改HTTP请求参数(GET参数、POST字段、cookie等)后再提交 | |
Groundspeed | 客户端安全措施半自动化解除 | 自动检测隐藏表单字段、去除表单验证等,免去自己通过Firebug修改html代码的麻烦 | |
BuiltWith (Chrome扩展) | 网站架构自动分析 | 自动检测和识别当前浏览网站所采用的技术架构,脚本小子的最爱 | |
Google 检索到一份整理好的渗透测试学习资源列表
by http://www.pulog.org/Resources/2242/Pentesting-Vulnerable/
Web Pentesting
Application Name | Company/Developer | URL |
OWASP WebGoat | OWASP | http://www.owasp.org/index.php/OWASP_WebGoat_Project |
OWASP Vicnum | OWASP | http://www.owasp.org/index.php/Category:OWASP_Vicnum_Project |
OWASP InsecureWebApp | OWASP | http://www.owasp.org/index.php/Category:OWASP_Insecure_Web_App_Project |
Web Security DOJO | Maven Security Consulting | http://www.mavensecurity.com/web_security_dojo/ |
Gruyere (antigo Codelab / Jalsberg) | http://google-gruyere.appspot.com/ | |
Hacme Game | NTNU | http://hacmegame.org/ |
SPI Dynamics | SPI Dynamics | http://zero.webappsecurity.com/ |
Acunetix 1 | Acunetix | http://testphp.vulnweb.com/ |
Acunetix 2 | Acunetix | http://testasp.vulnweb.com/ |
Acunetix 3 | Acunetix | http://testaspnet.vulnweb.com/ |
PCTechtips Challenge | PC Tech Tips | http://pctechtips.org/hacker-challenge-pwn3d-the-login-form/ |
Damn Vulnerable Web Application | DVWA | http://dvwa.co.uk/ |
Mutillidae | Iron Geek | http://www.irongeek.com/i.php?page=security/mutillidae-deliberately-vulnerable-php-owasp-top-10 |
The Butterfly Security Project | The Butterfly Security | http://sourceforge.net/projects/thebutterflytmp/ |
Hacme Casino | McAfee | http://www.mcafee.com/us/downloads/free-tools/hacme-casino.aspx |
Hacme Bank 2.0 | McAfee | http://www.mcafee.com/us/downloads/free-tools/hacme-bank.aspx |
Updated HackmeBank | McAfee | http://www.o2-ounceopen.com/technical-info/2008/12/8/updated-version-of-hacmebank.html |
Hacme Books | McAfee | http://www.mcafee.com/us/downloads/free-tools/hacmebooks.aspx |
Hacme Travel | McAfee | http://www.mcafee.com/us/downloads/free-tools/hacmetravel.aspx |
Hacme Shipping | McAfee | http://www.mcafee.com/us/downloads/free-tools/hacmeshipping.aspx |
Moth | Bonsai Sec | http://www.bonsai-sec.com/en/research/moth.php |
Stanford SecuriBench | Standford | http://suif.stanford.edu/%7Elivshits/securibench/ |
SecuriBench Micro | Standford | http://suif.stanford.edu/%7Elivshits/work/securibench-micro/ |
BadStore | BadStore | http://www.badstore.net/ |
WebMaven/Buggy Bank | Maven Security | http://www.mavensecurity.com/webmaven |
EnigmaGroup | Enigma Group | http://enigmagroup.org/ |
XSS Encoding Skills – x5s (Casaba Watcher) | X5S | http://www.nottrusted.com/x5s/ |
Exploit- DB | Exploit DB | http://www.exploit-db.com/webapps |
The Bodgeit Store | The Bodgeit Store | http://code.google.com/p/bodgeit/ |
LampSecurity | MadIrish | http://sourceforge.net/projects/lampsecurity/ |
hackxor | Hackxor | http://hackxor.sourceforge.net/cgi-bin/index.pl |
WackoPicko | WackoPicko | https://github.com/adamdoupe/WackoPicko |
RSnake’s Vulnerability Lab | RSnake | http://ha.ckers.org/weird/ |
War Games
Application Name | Company / Developer | URL |
Hell Bound Hackers | Hell Bound Hackers | http://hellboundhackers.org/ |
Vulnerability Assessment | Kevin Orrey | http://www.vulnerabilityassessment.co.uk/ |
Smash the Stack | Smash the Stack | http://www.smashthestack.org/ |
Over the Wire | Over the Wire | http://www.overthewire.org/wargames/ |
Hack This Site | Hack This Site | http://www.hackthissite.org/ |
Hacking Lab | Hacking Lab | https://www.hacking-lab.com/ |
We Chall | We Chall | https://www.wechall.net/ |
REMnux | REMnux | http://zeltser.com/remnux/ |
Insecure Distributions
Application Name | Company / Developer | URL |
Damm Vulnerable Linux | DVL | http://www.damnvulnerablelinux.org/ |
Metasploitable | Offensive Security | http://blog.metasploit.com/2010/05/introducing-metasploitable.html |
de-ICE | Hacker Junkie | http://www.de-ice.net/ |
Moth | Bonsai SecuritySoftware | http://www.bonsai-sec.com/en/research/moth.php |
PwnOS | Niel Dickson | http://www.neildickson.com/os/ |
Holynix | Pynstrom | http://pynstrom.net/holynix.php |
$ sudo apt-get install libssl-dev openssl
$ cd ratproxy ; make
$ ./ratproxy -v . -w foo.log -d foo.com -lfscm
Sample Usage
VMware安装虚拟机Ubuntu的时候,安装完毕后是命令行模式,得重启后才能进入图形界面。
=======================================================================
下载地址:http://sourceforge.net/projects/xsser/files/xsser_1.6-1.tar.gz/download
下载后用以下指令:
安装:
Ps1:Cem就是先用Hex编码,再转为Str编码,然后再转为Hex编码!
(first, change payload to hexadecimal; second, change to StringFromCharCode the first encoding; third, reencode to Hexadecimal the second encoding)
Ps2:user-agent 也就是用户代理,这个域放置了一些信息如OS版本,CPU类型,浏览器版本,浏览器渲染引擎,浏览器语言,浏览器语言等,可以被web服务器获取,这里我们不想被web服务器获取,所以就设置了下“XSSer!!!”就好啦~~
思考2:--Une为什么要用到这里?Unescape()函数对escape()函数编码过后的字符串进行解码,如果字符串不是编码后的字符串,则会把字符串原封不动的返回。也就是说,字符串被浏览器编码后送到web服务器吗?escape()一般用于脚本向某个页面如a.php这个URL传递参数时编码,可是我用的是XSSer,它在传递参数的时候会编码吗?
这两个问题等我以后深入了解再回来回答。
Ps1: duckduckgo是一个网站,搞搜索引擎的 "duck"。
Ps2: -d DORK 把搜索结果作为攻击的目标URL ( Process search engine dork results as target urls)
Ps3: --De=DORK_ENGINE 指定用到的引擎 for dorking 有这么多:(bing, altavista, yahoo, baidu, yandex, youdao, webcrawler, google, etc.)
--Cw=CRAWLER_WIDTH Deeping level of crawler: 1-5
--Cl Crawl only local target(s) urls (default TRUE)
回答:这个-s其实和post没关系,就是把数据给统计了:
===========================================================================
[*] Statistic:
===========================================================================
--------------------------------------------------
Test Time Duration: 0:00:05.929196
--------------------------------------------------
Total Connections: 2
-------------------------
200-OK: 1 | 404: 0 | 503: 0 | Others: 1
Connec: 50 %
--------------------------------------------------
Total Payloads: 1
-------------------------
Checker: 0 | Manual: 0 | Auto: 1 | DCP: 0 | DOM: 0 | Induced: 0 | XSR: 0 | XSA: 0 | COO: 0
--------------------------------------------------
Total Injections: 1
-------------------------
Failed: 1 | Sucessfull: 0
Accur : 0 %
-------------------------
Total Discovered: 0
-------------------------
Checker: 0 | Manual: 0 | Auto: 0 | DCP: 0 | DOM: 0 | Induced: 0 | XSR: 0 | XSA: 0 | COO: 0
--------------------------------------------------
False positives: 0 | Vulnerables: 0
-------------------------
Mana: 0
--------------------------------------------------
[I] Could not find any vulnerability!. Try another combination or hack it -manually- :)
===========================================================================
Ps2:DOM XSS 攻击原理
Ps3:DOM shadow space (no server logging!) 这个DOM阴影空间貌似在哪里听过?可是就是找不到相关资料。。。终于google到了这篇文章,它讲的是Shadow DOM
什么是Shadow Dom?可能会给你带来点帮助。。。
Ps:根据官方介绍,Is.gd 至今已处理了近 900 万个网址。首页非常简洁,输入需要压缩的网址提交即可。生成缩略网址后系统会计算压缩前后的字符串长度,并给出压缩率。
如果想要让用户预览网页,而不是直接发送缩略网址(有助于用户了解所链接到的网址,防止被钓鱼),只需在缩略网址后添加连接字符 “-” 来开启网页预览功能。
例如,芒果的网址 http://www.mangguo.org 经过压缩后为 http://is.gd/Aqdn,网页预览地址为 http://is.gd/Aqdn-。
注意:缩略网址 URL 中字母区分大小写。
XSSer结果会多了这么一行:
Ps1: --Xsa XSA - Cross Site Agent Scripting
Ps2: --Xsr XSR - Cross Site Referer Scripting