用Firefox来Hacking Web 2.0程序(图)
网络安全 2021-07-03 09:40www.168986.cn网络安全知识
Introduction //简介
AJAX and interactive web services form the backbone of “web 2.0” applications. This technological transformation brings about new challenges for security professionals.
This article looks at some of the methods, tools and tricks to dissect web 2.0 applications (including Ajax) and discover security holes using Firefox and its plugins. The key learning objectives of this article are to understand the:
web 2.0 application architecture and its security concerns.
hacking challenges such as discovering hidden calls, crawling issues, and Ajax side logic discovery.
discovery of XHR calls with the Firebug tool.
simulation of browser event automation with the Chickenfoot plugin.
debugging of applications from a security standpoint, using the Firebug debugger.
methodical approach to vulnerability detection.
Web 2.0 application overview
The newly coined term “web 2.0” refers to the next generation of web applications that have logically evolved with the adoption of new technological vectors. XML-driven web services that are running on SOAP, XML-RPC and REST are empowering server-side ponents. New applications offer powerful end-user interfaces by utilizing Ajax and rich inter application (Flash) ponents.
This technological shift has an impact on the overall architecture of web applications and the munication mechanism between client and server. At the same time, this shift has opened up new security concerns [ref 1] and challenges.
New worms such as Yamanner, Samy and Spaceflash are exploiting “client-side” AJAX frameworks, providing new avenues of attack and promising confidential information.
500)this.width=500" title="点击这里用新窗口浏览图片" />
Figure 1. Web 2.0 architecture layout.
As shown in Figure 1, the browser processes on the left can be divided into the following layers:
Presentation layer - HTML/CSS provides the overall appearance to the application in the browser window.
Logic & Process - JavaScript running in the browser empowers applications to execute business and munication logic. AJAX-driven ponents reside in this layer.
Transport - XMLHttpRequest (XHR) [ref 2]. This object empowers asynchronous munication capabilities and XML exchange mechanism between client and server over HTTP(S).
The server-side ponents on the right of Figure 1 that typically reside in the corporate infrastructure behind a firewall may include deployed web services along with traditional web application resources. An Ajax resource running on the browser can directly talk to XML-based web services and exchange information without refreshing the page. This entire munication is hidden from the end-user, in other words the end-user would not “feel” any redirects. The use of a “Refresh” and “Redirects” were an integral part of the first generation of web application logic. In the web 2.0 framework they are reduced substantially by implementing Ajax.
Web 2.0 assessment challenges
In this asynchronous framework, the application does not have many “Refreshes” and “Redirects”. As a result, many interesting server-side resources that can be exploited by an attacker are hidden. The following are three important challenges for security people trying to understand web 2.0 applications:
1. Discovering hidden calls - It is imperative that one identify XHR-driven calls generated by the loaded page in the browser. It uses JavaScript over HTTP(S) to make these calls to the backend servers.
2. Crawling challenges - Traditional crawler applications fail on two key fronts: one, to replicate browser behavior and two, to identify key server-side resources in the process. If a resource is aessed by an XHR object via JavaScript, then it is more than likely that the crawling application may not pick it up at all.
3. Logic discovery - Web applications today are loaded with JavaScript and it is difficult to isolate the logic for a particular event. Each HTML page may load three or four JavaScript resources from the server. Each of these files may have many functions, but the event may be using only a very small part of all these files for its execution logic.
We need to investigate and identify the methodology and tools to overe these hurdles during a web application assessment. For the purpose of this article, we will use Firefox as our browser and try to leverage some of its plugins to bat the above challenges.
Discovering hidden calls
Web 2.0 applications may load a single page from the server but may make several XHR object calls when constructing the final page. These calls may pull content or JavaScript from the server asynchronously. In such a scenario, the challenge is to determine all XHR calls and resources pulled from the server. This is information that could help in identifying all possible resources and associated vulnerabilities. Let's start with a simple example.
Suppose we can get today’s business news by visiting a simple news portal located at:
http://example./news.aspx
The page in the browser would resemble the screenshot illustrated below in Figure 2.
500)this.width=500" title="点击这里用新窗口浏览图片" />
Being a web 2.0 application, Ajax calls are made to the server using an XHR object. We can determine these calls by using a tool known as Firebug [ref 3]. Firebug is a plug-in to the Firefox browser and has the ability to identify XHR object calls.
Prior to browsing a page with the plugin, ensure the option to intercept XHR calls is selected, as shown in Figure 3.
500)this.width=500" title="点击这里用新窗口浏览图片" />
With the Firebug option to intercept XMLHttpRequest calls enabled, we browse the same page to discover all XHR object calls made by this particular page to the server. This exchange is shown in Figure 4.
500)this.width=500" title="点击这里用新窗口浏览图片" />
AJAX and interactive web services form the backbone of “web 2.0” applications. This technological transformation brings about new challenges for security professionals.
This article looks at some of the methods, tools and tricks to dissect web 2.0 applications (including Ajax) and discover security holes using Firefox and its plugins. The key learning objectives of this article are to understand the:
web 2.0 application architecture and its security concerns.
hacking challenges such as discovering hidden calls, crawling issues, and Ajax side logic discovery.
discovery of XHR calls with the Firebug tool.
simulation of browser event automation with the Chickenfoot plugin.
debugging of applications from a security standpoint, using the Firebug debugger.
methodical approach to vulnerability detection.
Web 2.0 application overview
The newly coined term “web 2.0” refers to the next generation of web applications that have logically evolved with the adoption of new technological vectors. XML-driven web services that are running on SOAP, XML-RPC and REST are empowering server-side ponents. New applications offer powerful end-user interfaces by utilizing Ajax and rich inter application (Flash) ponents.
This technological shift has an impact on the overall architecture of web applications and the munication mechanism between client and server. At the same time, this shift has opened up new security concerns [ref 1] and challenges.
New worms such as Yamanner, Samy and Spaceflash are exploiting “client-side” AJAX frameworks, providing new avenues of attack and promising confidential information.
500)this.width=500" title="点击这里用新窗口浏览图片" />
Figure 1. Web 2.0 architecture layout.
As shown in Figure 1, the browser processes on the left can be divided into the following layers:
Presentation layer - HTML/CSS provides the overall appearance to the application in the browser window.
Logic & Process - JavaScript running in the browser empowers applications to execute business and munication logic. AJAX-driven ponents reside in this layer.
Transport - XMLHttpRequest (XHR) [ref 2]. This object empowers asynchronous munication capabilities and XML exchange mechanism between client and server over HTTP(S).
The server-side ponents on the right of Figure 1 that typically reside in the corporate infrastructure behind a firewall may include deployed web services along with traditional web application resources. An Ajax resource running on the browser can directly talk to XML-based web services and exchange information without refreshing the page. This entire munication is hidden from the end-user, in other words the end-user would not “feel” any redirects. The use of a “Refresh” and “Redirects” were an integral part of the first generation of web application logic. In the web 2.0 framework they are reduced substantially by implementing Ajax.
Web 2.0 assessment challenges
In this asynchronous framework, the application does not have many “Refreshes” and “Redirects”. As a result, many interesting server-side resources that can be exploited by an attacker are hidden. The following are three important challenges for security people trying to understand web 2.0 applications:
1. Discovering hidden calls - It is imperative that one identify XHR-driven calls generated by the loaded page in the browser. It uses JavaScript over HTTP(S) to make these calls to the backend servers.
2. Crawling challenges - Traditional crawler applications fail on two key fronts: one, to replicate browser behavior and two, to identify key server-side resources in the process. If a resource is aessed by an XHR object via JavaScript, then it is more than likely that the crawling application may not pick it up at all.
3. Logic discovery - Web applications today are loaded with JavaScript and it is difficult to isolate the logic for a particular event. Each HTML page may load three or four JavaScript resources from the server. Each of these files may have many functions, but the event may be using only a very small part of all these files for its execution logic.
We need to investigate and identify the methodology and tools to overe these hurdles during a web application assessment. For the purpose of this article, we will use Firefox as our browser and try to leverage some of its plugins to bat the above challenges.
Discovering hidden calls
Web 2.0 applications may load a single page from the server but may make several XHR object calls when constructing the final page. These calls may pull content or JavaScript from the server asynchronously. In such a scenario, the challenge is to determine all XHR calls and resources pulled from the server. This is information that could help in identifying all possible resources and associated vulnerabilities. Let's start with a simple example.
Suppose we can get today’s business news by visiting a simple news portal located at:
http://example./news.aspx
The page in the browser would resemble the screenshot illustrated below in Figure 2.
500)this.width=500" title="点击这里用新窗口浏览图片" />
Being a web 2.0 application, Ajax calls are made to the server using an XHR object. We can determine these calls by using a tool known as Firebug [ref 3]. Firebug is a plug-in to the Firefox browser and has the ability to identify XHR object calls.
Prior to browsing a page with the plugin, ensure the option to intercept XHR calls is selected, as shown in Figure 3.
500)this.width=500" title="点击这里用新窗口浏览图片" />
With the Firebug option to intercept XMLHttpRequest calls enabled, we browse the same page to discover all XHR object calls made by this particular page to the server. This exchange is shown in Figure 4.
500)this.width=500" title="点击这里用新窗口浏览图片" />
1
上一篇:UNIX主机的入侵
下一篇:黑客在网吧内是如何入侵其他电脑的
网络安全培训
- 网络安全带来的危害 网络安全的弊处
- 如何加强网络安全防范
- 网络安全防护知识内容摘要
- 什么网络安全指的是什么 网络安全指的是什么意
- 网络安全十大公司排名 网络安全十大公司排名绿
- 手机网络安全警示格言 手机网络安全警示教育片
- 网络安全培训心得体会 网络安全知识培训
- 如何树立正确的网络意识 怎么样正确对待网络
- 网络安全大赛是什么意思 网络安全大赛比赛规则
- 世界网络安全公司排名 世界十大网络安全上市公
- 网络安全注意事项知识 网络安全注意事项知识短
- 网络安全常识十条口诀 小学生安全十句话
- 网络安全等级保护三级 网络安全三级等保标准
- 如何增强网络安全防范意识 如何增强网络安全防
- 网络安全注意事项有哪些 网络安全应注意事项
- 网络安全培训感悟 网络安全培训后的收获和感想