1. because of its good interaction, Ajax is very attractive in previous years. GoogleSuggest and GoogleMaps [ref1] are some famous early Ajax exploitation. Now, enterprises are considering how they can use Ajax, and web developers are learning about it.
1. Enable
Ajax is very attractive in years due to its excellent interactivity. Google Suggest and Google Maps [ref 1] are some well-known early Ajax exploitation. Enterprises are now considering how they can use Ajax. web developers are learning about it, security experts are thinking about how to make it secure, and hackers are thinking about how to invade. All the skills that can increase server throughput, generate more dynamic page transmission, and provide more web utilization for the ultimate user must be presented in this category.
The next step of Ajax is called Web 2.0 ". The goal of this article is to first introduce some security suggestions on modern Ajax web skills. Although Ajax exploitation is difficult to test, security experts already have a majority of related methods and tools. The author will discuss whether the current trend requires a complete network update. applying Ajax also means that we will face some new security titles. We will start with the Ajax technique, and then discuss the security impact caused by the application of Ajax.
2. get started with Ajax
Normal web exploitation programs work in synchronization mode. after a web request, a response causes some actions at the presentation layer. For example, click the link or submit button to generate a request with corresponding parameters to the web server. The traditional "click and wait" method limits the interaction between applications. The application of the Ajax (Asychronous Javascript and XML) technique relieves this title. In this article, Ajax is defined as a method for generating asynchronous calls to the web server without causing complete webpage updates. This interaction is achieved through three different components: client scripting language, XmlHttpRequest (XHR) object and XML.
Let me briefly differentiate these components. In the request response, the client scripting language is used to initialize server calls and program access, and update the DOM of the client browser. JavaScript is widely used on clients because it is widely used by famous browsers. The second component is an XHR object, which is the most important part. In JavaScript, XHR objects are used to send requests to web servers after the scenario, and HTTP is used as the transmission intermediary. Followed by the third component, its application is necessary: XML is the data pattern of information exchanged.
Many site applications use JSON (JavaScript Object Notation) instead of XML, because it is easier to parse and does not require so much governance costs. To parse JSON by using JavaScript, you only need to pass it to the eval () function briefly. On the other hand, someone may use XPath to parse the returned XML. Similarly, there are still many "Ajax sites" that do not apply XML or JSON, but simply send unformatted dynamic inserts into the old HTML fragments of the web page.
Therefore, Ajax is not a new skill trademark, but a joint use of existing skills, promoting the development of highly interactive web application. As a matter of fact, all these components have been presented for years and become apparent with the announcement of Internet Explorer 5.0. Developers have created a lot of Ajax exploitation, such as the "prompt" text box (like Google Suggest) and actively update the data list. All XHR requests are still performed by the server-side framework of the model, such as the selection of the scale such as J2EE,. NET and PHP. Figure 1 below shows the asynchronous feature legend of Ajax exploitation program:
Figure 1. Ajax asynchronous order
3. Ajax Security exploitation
Now we have recalled the basis of Ajax. Let's discuss its security meaning. In the scope of web exploitation, Ajax itself has not introduced new security vulnerabilities. These exploitation programs face the same title as the classic web exploitation program. Unfortunately, the best implementation of Ajax in common has not yet been developed, leaving a lot of room for errors. It includes security authentication, authorization, access control, and input check. [Ref 2]. Some ambush categories involving Ajax applications include:
· Client security control
Some people think that client program attachment may lead to some well-known titles. [Ref 2]. One possibility is that the developer can control the security of damage through the client. As mentioned above, Ajax applications require a considerable number of scripting languages. Today, Web developers write real code on both the server side and the client side at the same time, which may attract developers who want to implement client security control. This method is very unreliable because attackers can correct any code running on their client computers when testing and exploiting program vulnerabilities. Security control should be fully performed on the server or regularly upgraded on the server.
· Increasing attack surface
The second challenge is to protect the ever-increasing attack surface. Ajax inevitably increases the overall complexity of the system. In the process of using Ajax, developers may need to write a large number of server-side pages, each of which performs some small functions in all programs (such as to take the initiative to complete a user's city and state domain, search for the zip code ). These small pages will each become an additional attack target for hackers, and an additional point needs to be protected to ensure that new security vulnerabilities are not introduced. This may seem like a well-known multi-key security point of view entering a room: Protecting a room with only one door is more difficult than protecting a room with ten doors.
· Gap between connecting users and servers
Ajax is a method by which developers can shorten the gap between the ultimate user and the service-oriented architecture interface. [Ref 3] adding a loose and engaging service-based architecture has many advantages in the enterprise environment and is a very promising method. With the development of more service-based endpoints and the introduction of Ajax, the possibility of providing more mobile processing to the ultimate user is increased.
Generally, many internal web services (compared with all services on the Internet) are designed as B2B. Therefore, designers and developers often do not consider the interaction of actual users. This lack of foresight leads to some bad security assumptions in the design process. For example, the original designer may assume that security authentication, authorization and input check will be performed by other middle-level systems. Once someone promises "external users" to directly call these services through Ajax applications, an extra proxy is introduced. An actual example of this type of application is the consistency check of Microsoft's Atlas [ref 4] and web services at the same time. Developers can now write JavaScript to import XML and accurately call web services from the client browser. In the past, this was done by the proxy and server.
· XSS
Another unfortunate fact is that attackers are more creative (in other words, more dangerous) by exploiting the vulnerabilities of cross-site scripting (XSS ). [Ref 5] Hackers used to apply the XSS vulnerability in a single thread environment. when the attack was executed, the user's browser was waiting. This waiting status provides a clue for users who may mistakenly perform the program. With the introduction of Ajax, an attacker can exploit cross-site scripting vulnerabilities in a more confidential way. When you use a program that promises Ajax to check your Email, malicious code may send an Email to all your friends, and your browser will not leave any visible traces.
To address this issue, you must perform a sufficient number of targeted security tests before placing programs in the product. Even if the Ajax program is a web application, due to the highly interactive nature of the exploitation program, an existing security testing method may not be enough.
4. how does Ajax work?
When testing a normal web exploitation program, an intrusion tester starts from the footprint exploitation program. The goal of the Footprint stage is to capture requests and responses so that the tester knows how the program communicates with the server and the responses it receives. This information is recorded in the log by a local proxy such as Burp [ref 6] or Paros [ref 7. The footprint stage must be as comprehensive as possible, so tester logs send a request to all pages of the application.
Then, the tester will start the system error injection process, manually or apply an active tool to test the parameters uploaded from the web server.