我在江北学安全(四) 渗透测试资源总览 和 XSS扫描系统原理

来源:互联网 发布:360doc个人图书馆 知乎 编辑:程序博客网 时间:2024/04/30 01:30

那个broken web application 后续会慢慢研究的。。。先把工作任务完成。。

工作任务1:搜索类似演示网站

http://code.google.com/p/websecurify/wiki/DemoSites

工作任务2:检索XSS自动化扫描工具,开源,了解检测原理

=================================================================

(一 )工作任务1:搜索类似演示网站

示例网站:http://code.google.com/p/websecurify/wiki/DemoSites

Details

The following websites may be used to compare Websecurify with other automated web application security testing tools:

  • http://demo.testfire.net
  • http://testphp.vulnweb.com
  • http://testasp.vulnweb.com
  • http://testaspnet.vulnweb.com
  • http://zero.webappsecurity.com
  • http://crackme.cenzic.com
  • http://www.webscantest.com
Google检索到“猪在笑”总结的这些演示网站

S.No.Vulnerable ApplicationPlatformRemark1SPI Dynamics (live)ASP漏扫厂商的缺陷demo站点,想学习还是可以玩的。有新花样最好本地玩吧,除非你是活雷锋。2Cenzic (live)PHP同13Watchfire (live)ASPX同14Acunetix 1 (live)PHP同15Acunetix 2 (live)ASP同16Acunetix 3 (live)ASP.Net同17PCTechtips Challenge (live)online hack challenge, just for fun8Damn Vulnerable Web ApplicationPHP/MySQL有提供Live CD版,适合懒人9MutillidaePHP针对OWASP的Top 10名单设置针对性的缺陷供你耍,必须推荐10The Butterfly Security ProjectPHP 11Hacme CasinoRuby on RailsHacme系列is copyright by McAfee, but toooooooooooold! take it as you will and at your own risk.12Hacme Bank 2.0ASP.NET (2.0)同上,不解释。13Updated HackmeBankASP.NET (2.0)链接失效?我没用过。14Hacme BooksJ2EE还是Hacme。。。15Hacme TravelC++ (application client-server)又是Hacme。。。不过这个是C++的,比较少见。也许有价值,我没用过16Hacme ShippingColdFusion MX 7, MySQLColdFusion平台的,有针对性的可以搭建一下试试,我没用过17OWASP WebGoatJAVA适合教学18OWASP VicnumPHP, Perl 19OWASP InsecureWebAppJAVA 20OWASP SiteGeneratorASP.NET 21Moth 22Stanford SecuriBenchJAVA 23SecuriBench MicroJAVA 24BadStorePerl(CGI) 25WebMaven/Buggy Bank (very old)  26EnigmaGroup (live)  27XSS Encoding Skillsx5s (Casaba Watcher) Fiddler的扩展,辅助XSS漏洞挖掘(多种字符编码转换支持)28Google Gruyere(live) (previously Jarlsberg) 可以在线玩,GAE supported. So, if you are in CH1N4, you may need a VPN or proxy to access it.29Exploit- DBMulti-platform最真实的Web App漏洞资料库,totally damn real!看上哪个,直接官网下载对应缺陷版本,本地想怎么玩就怎么玩。30exploit-kb-vulnerable-web-appPHP/MySQL文档清晰,易部署,有Vmware Image版,适合懒人

“猪在笑”推荐几个手工的辅助工具,个人感觉挺好~

ToolCategoryRemarkSimilarparosHTTP代理/HTTP协议调试/spider最新开源版3.2.13更新于2006年,后续版本已经完全商业化。但工具的易用性、功能在今天来看都是值得推荐的。支持HTTP协议双向数据查看/修改/过滤是其亮点。burp proxy ,Fiddler, live http headers (Firefox addon),Firebug (Many browsers’ addon)HackBar手工SQL注入辅助方便转码、编码、填充垃圾字符,绕过滤必备
TamperDataHTTP请求参数控制拦截HTTP/HTTPS请求,允许手工修改HTTP请求参数(GET参数、POST字段、cookie等)后再提交
Groundspeed客户端安全措施半自动化解除自动检测隐藏表单字段、去除表单验证等,免去自己通过Firebug修改html代码的麻烦
BuiltWith (Chrome扩展)网站架构自动分析自动检测和识别当前浏览网站所采用的技术架构,脚本小子的最爱

Google 检索到一份整理好的渗透测试学习资源列表

by http://www.pulog.org/Resources/2242/Pentesting-Vulnerable/

Web Pentesting

Application NameCompany/DeveloperURLOWASP WebGoatOWASPhttp://www.owasp.org/index.php/OWASP_WebGoat_ProjectOWASP VicnumOWASPhttp://www.owasp.org/index.php/Category:OWASP_Vicnum_ProjectOWASP InsecureWebAppOWASPhttp://www.owasp.org/index.php/Category:OWASP_Insecure_Web_App_ProjectWeb Security DOJOMaven Security Consultinghttp://www.mavensecurity.com/web_security_dojo/Gruyere (antigo Codelab / Jalsberg)Googlehttp://google-gruyere.appspot.com/Hacme GameNTNUhttp://hacmegame.org/SPI DynamicsSPI Dynamicshttp://zero.webappsecurity.com/Acunetix 1Acunetixhttp://testphp.vulnweb.com/Acunetix 2Acunetixhttp://testasp.vulnweb.com/Acunetix 3Acunetixhttp://testaspnet.vulnweb.com/PCTechtips ChallengePC Tech Tipshttp://pctechtips.org/hacker-challenge-pwn3d-the-login-form/Damn Vulnerable Web ApplicationDVWAhttp://dvwa.co.uk/MutillidaeIron Geekhttp://www.irongeek.com/i.php?page=security/mutillidae-deliberately-vulnerable-php-owasp-top-10The Butterfly Security ProjectThe Butterfly Securityhttp://sourceforge.net/projects/thebutterflytmp/Hacme CasinoMcAfeehttp://www.mcafee.com/us/downloads/free-tools/hacme-casino.aspxHacme Bank 2.0McAfeehttp://www.mcafee.com/us/downloads/free-tools/hacme-bank.aspxUpdated HackmeBankMcAfeehttp://www.o2-ounceopen.com/technical-info/2008/12/8/updated-version-of-hacmebank.htmlHacme BooksMcAfeehttp://www.mcafee.com/us/downloads/free-tools/hacmebooks.aspxHacme TravelMcAfeehttp://www.mcafee.com/us/downloads/free-tools/hacmetravel.aspxHacme ShippingMcAfeehttp://www.mcafee.com/us/downloads/free-tools/hacmeshipping.aspxMothBonsai Sechttp://www.bonsai-sec.com/en/research/moth.phpStanford SecuriBenchStandfordhttp://suif.stanford.edu/%7Elivshits/securibench/SecuriBench MicroStandfordhttp://suif.stanford.edu/%7Elivshits/work/securibench-micro/BadStoreBadStorehttp://www.badstore.net/WebMaven/Buggy BankMaven Securityhttp://www.mavensecurity.com/webmavenEnigmaGroupEnigma Grouphttp://enigmagroup.org/XSS Encoding Skills – x5s (Casaba Watcher)X5Shttp://www.nottrusted.com/x5s/Exploit- DBExploit DBhttp://www.exploit-db.com/webappsThe Bodgeit StoreThe Bodgeit Storehttp://code.google.com/p/bodgeit/LampSecurityMadIrishhttp://sourceforge.net/projects/lampsecurity/hackxorHackxorhttp://hackxor.sourceforge.net/cgi-bin/index.plWackoPickoWackoPicko

https://github.com/adamdoupe/WackoPicko

RSnake’s Vulnerability LabRSnakehttp://ha.ckers.org/weird/

 

War Games

Application NameCompany / DeveloperURLHell Bound HackersHell Bound Hackershttp://hellboundhackers.org/Vulnerability AssessmentKevin Orreyhttp://www.vulnerabilityassessment.co.uk/Smash the StackSmash the Stackhttp://www.smashthestack.org/Over the WireOver the Wirehttp://www.overthewire.org/wargames/Hack This SiteHack This Sitehttp://www.hackthissite.org/Hacking LabHacking Labhttps://www.hacking-lab.com/We ChallWe Challhttps://www.wechall.net/REMnuxREMnuxhttp://zeltser.com/remnux/

 

Insecure Distributions

Application NameCompany / DeveloperURLDamm Vulnerable LinuxDVLhttp://www.damnvulnerablelinux.org/MetasploitableOffensive Securityhttp://blog.metasploit.com/2010/05/introducing-metasploitable.htmlde-ICEHacker Junkiehttp://www.de-ice.net/MothBonsai SecuritySoftwarehttp://www.bonsai-sec.com/en/research/moth.phpPwnOSNiel Dicksonhttp://www.neildickson.com/os/HolynixPynstromhttp://pynstrom.net/holynix.php

(二)工作任务2:XSS自动化扫描器系统原理

1.Google到一个关于xss的扫描器,sourceforge的xsser,以下是它的简介:

Cross Site "Scripter" is an automatic -framework- to detect, exploit and report XSS vulnerabilities in web-based applications.
大概就是说它是个自动扫描利用漏洞并且报告之的东东,和我要找的符合。
下载地址:http://sourceforge.net/projects/xsser/files/latest/download
源码checkout地址:svn://svn.code.sf.net/p/xsser/code
这个是XSSer的用法:http://blog.csdn.net/xihuanqiqi/article/details/8072323

2.Google把自己的内部审计XSS的工具开源了 ratproxy

 Google 推出一套免費的 Web 安全評估工具,叫做 RatProxy,這套工具可以檢測、分析您的網站是否有安全性漏洞或網頁是否有被入侵,目前可支援 Linux, FreeBSD, MacOS X, 與 Windows (Cygwin) 等執行環境(反正就是 Unix-like 的環境啦)。
RatProxy 可偵測到的漏洞包括 Cross-site Scripting (XSS, 跨網站指令碼)、指令碼惡意置入(script inclusion issues), 惡意網頁內容(content serving problems), insufficient XSRF 以及 XSS 防護(XSS defenses) 等。
ratproxy地址:http://code.google.com/p/ratproxy/#ratproxy

以下是Google到的Ratproxy用法:
Ratproxy 工作流程:
  • 1) 运行脚本后,会在本地启动一个代理服务器,默认端口是 8080 ;
  • 2) 浏览器设置这个地址 ([url]http://localhost:8080[/url])为 代理地址 ;
  • 3) 浏览要测试的 Web 页面,进行实际登录,填写表单等操作(这些动作会被代理服务器捕捉并做点"手脚"发给待检测的页面),ratproxy 会在后台记录相关的 Log ;
  • 4) 用 ratproxy 提供的工具解析 Log 并输出 <acronym title="HyperText" markup="" language "="" style="padding: 0px; margin: 0px; ">HTML 进行分析;
  • 5) 修正比较严重的问题后,跳回到第一步,直到评估通过为止。
在我的 Ubuntu 下测试了一下,需要说一下的是,本地系统需要安装 libssl-dev 与 openssl 。
$ sudo apt-get install libssl-dev openssl 
$ cd ratproxy ; make
然后就可以提交类似:
$ ./ratproxy -v . -w foo.log -d foo.com -lfscm 

3.Google到 XSSDetect 是一款微软公司为开发人员提供针对跨站脚本攻击的静态分析工具

XSSDetect是精简版的.NET代码分析工具,原本供微软内部人员寻找应用软件的安全漏洞之用,大概是受开源思想影响,现在已经可以免费下载了。
下载地址:http://tel1.hackol.com/2010/hackol.com-4910-XSSDetectSetup.rar
下完就能傻瓜化安装了
这是XSSDetect的用法:

Sample Usage

  1. Launch Visual Studio
  2. Open a solution containing at least on C#, J# or VB.NET project
  3. Build the solution
  4. Click on Tools | XSSDetect Code Analysis, the Summary View dockable tool window activates
  5. Verify/edit the current settings (click on General Settings, Rules or Target Assemblies on the toolbar of the Summary View)
  6. Start the code analysis (use the Analyze button on the toolbar)
  7. After the analysis is complete, the Summary View tool window shows the results, and the output window shows information and error messages
  8. Double click on a result item in the Summary View to activate the Detail View
  9. In the Detail View, double click on a dataflow item to display the corresponding source line
  10. Use the "Previous" and "Next" buttons in the Detail View to display other result items 
看到这个Launch Visual Studio就知道这个要用VS啦,挺麻烦的说。。。
看了下资料,发现这个XSSer的资料多一些,还是中文版的,就研究它了。

(三)研究XSSer系统运行原理

1.先在虚拟机上安装好相关软件如Ihttp://xsser.sourceforge.net/所说的:
Installation

XSSer runs on many platforms. It requires Python and the following libraries:


- python-pycurl - Python bindings to libcurl
- python-beautifulsoup - error-tolerant HTML parser for Python
- python-libxml2 - Python bindings for the GNOME XML library
- python-geoip - Python bindings for the GeoIP IP-to-country resolver library


On Debian-based systems (ex: Ubuntu), run:


sudo apt-get install python-pycurl python-beautifulsoup python-libxml2 python-geoip 


Ps:如果有些安装不了,那是因为有些软件包需要升级。具体怎么升级可以看看:
Ubuntu 更新源 源地址和相关操作

Ubuntu apt-get 详解


Ps:如果你下载了XSSer的包,里面有个 /doc/INSTALL,别看了,里面的信息太老了,竟然要用到Python-xml,哎。


2.熟悉用法,看看: 

XSSer(超强XSS攻击利器)使用说明中文版 




原创粉丝点击