The present application claims priority from Japanese application P2005-186694 filed on Jun. 27, 2005, the content of which is hereby incorporated by reference into this application.
The present invention relates to a communication information monitoring apparatus which can be preferably applied to an information security, for example, and in particular, to a technique for protecting a system from an attack in a system providing a service via a network.
With the development of the network technique such as the Internet and intranet, a plenty of systems currently provide serves to clients via a network. As a system providing a service via such a network, for example, the Web application is used.
When using the web application, a client transmits a request message to the Web application. The Web application returns a response message for it. The request message and the response message are transmitted and received by using the HTTP (HyperText Transfer Protocol). Moreover, the response message contains a Web page described by using the HTML (HyperText Markup Language).
The request message transmitted by a client may contain various parameters. These parameters are contained, for example, in POST payload, URL query, and cookie. These parameters are used in various processes in the web application. For example, they are used as a part of the SQL (Structured Query Language) statement for accessing the database or contained in a web page to be transmitted to a client.
Thus, the parameter transmitted from a client affects the operation of the web application. Accordingly, if an unauthorized command or script is described in the parameter, the web application may perform an operation out of predetermined operations. For this, the parameter contained in the request message is often used for attacking the web application. As a technique for attacking the web application using a parameter, for example, there are the cross site scripting (hereinafter, referred to as XSS) attack and the SQL injection.
When the web application includes the received parameter directly in the response web page, there may exist vulnerability against the XSS attack. When the XSS attack is successful, the unauthorized script described in the parameter is included in the web page returned by the web application and executed on the client. This may cause a significant problem such as wiretap and alteration of the cookie.
When the web application uses the received parameter as a part of the SQL statement for accessing the database, there may exist vulnerability against the SQL injection. When the SQL injection is successful, the character string described in the parameter issues an SQL statement having a meaning other than the predetermined ones. This may cause a significant problem such as spoofing and leak of important data.
In order to prevent attack to the web application using the parameter, it is effective to check whether the parameter transmitted from the client includes an unauthorized character string. The system for checking the parameter included in the request message is, for example, called web application firewall (hereinafter, referred to as WAF) and used already in practice.
Hereinafter, explanation will be given on an example of parameter check with reference to
The client transmits a request message to the web application 104. The security filter 103 cuts off the request message transmitted from the client and performs a parameter check. The check is executed according to a predetermined check rule 105.
There are various methods for checking a parameter. For example, a character string which may cause a security problem may be set in advance as an inhibited character string in the check rule 105. In this case, the security filter cuts off the request from the client and checks whether the parameter includes the inhibited character string.
That is, when the inhibited character string is included, the request is transferred directly to the web application. When the inhibited character string is included, the request is rejected and an error is returned to the client 101. By performing such a parameter check, it is possible to protect the system from the attack to the web application.
Here, in order to effectively function the security filter 103, it is necessary to set an appropriate check rule 105. However, the setting of the check rule 105 is often a complicated work. That is, in order to specify an inhibited character string, it is necessary to have detailed knowledge of each attack method. For this, setting of the check rule requires knowledge of sophisticated security.
Moreover, the character string used in the XSS attack is different from the character string used in the SQL injection. Accordingly, for the parameter which may be used in the XSS attack, a check rule for the XSS attack should be set while for the parameter which may be used in the SQL injection, a check rule for the SQL injection should be set.
Consequently, in order to set an appropriate check rule for protecting the system from the attack to the web application, it is necessary to have detailed knowledge of the web application. Thus, the setting of the check-rule is a sophisticated work requiring both of the knowledge of security and knowledge of the web application.
As a technique associated with setting of such a check rule, there is known a technique for analyzing a response message, for example, so as to limit the range which the parameter may be in for example, U.S. Pat. No. 6,311,278.
Moreover, as a technique for detecting vulnerability of the XSS attack, there is a technique for inserting a trace value into the request message and analyzing the response message obtained as a result, thereby checking whether the web application has vulnerability against the XSS attack (for example, see JP-A-2004-164617).
That is, the technique for setting the check rule and the technique for checking whether vulnerability against the XSS attack is present are known from U.S. Pat. No. 6,311,278 and JP-A-2004-164617.
However, the technique disclosed in U.S. Pat. No. 6,311,278 has a problem that for a parameter having a high degree of freedom of description, it is possible to limit the value and sufficient check may not be executed. Moreover, the technique disclosed in JP-A-2004-164617 has a problem that only the analysis of the response message is performed and it is impossible to detect an attach executing an unauthorized command in the web application such as the SQL injection.
The present invention is for solving the aforementioned problems. The object of the present invention is to easily create an appropriate check rule without having a detailed knowledge of the security and web application.
In order to achieve the aforementioned object, the communication information monitoring apparatus according to the present invention includes a pseudo-client, a monitoring unit, and a unification unit.
That is, the present invention traces a parameter by the pseudo-client and the monitoring unit so as to specify the position where the parameter is used. The pseudo-client sets a trace value as a parameter value and transmits a request message for the system providing a service to a client via a network. That is, the pseudo-client 501 transmits a request message including a trace value as a parameter to the web application and analyzes the response message returned from the web application. The monitoring unit monitors whether the trace value is used as various positions in the system. Thus, it is possible to identify the positions where the parameter in the request message is used.
Furthermore, the unification unit generates an appropriate check rule according to the trace result by the pseudo-client and the monitoring unit and according to the predetermined check policy. The check policy has an appropriate check rule set to be used in the positions where the parameter is used. That is, in the check policy 510, correspondence between the parameter use purpose and the check process is registered. Accordingly, by correlating the check policy to the trace result where the parameter use position is described, it is possible to easily generate an appropriate check rule.
By using the aforementioned invention, even a person having no sophisticated security knowledge or detailed system information can easily create a check rule. Moreover, by applying the present invention, it is expected to reduce the number of system configuration steps and the number of setting mistakes.
Other objects, features and advantages of the invention will become apparent from the following description of the embodiments of the invention taken in conjunction with the accompanying drawings.
Description will now be directed to preferred embodiments of the present invention with reference to the attached drawings.
Hereinafter, explanation will be given on an embodiment of the web application as an example of a system providing a service to a client. However, the present invention is not to be limited to the web application. Moreover, in the example given below, a parameter check is performed by a security filter existing outside the web application. However, the present invention can also be applied to a parameter check performed inside the web application.
[Outline of the Entire System]
[Hardware Configuration of Computer]
The web application 104, the security filter 103, the communication information monitoring device 201 can be realized by a general computer 301 as shown in
The computer 301 is connected to a network 102 such as the Internet via the communication device 105. In the computer 301, the CPU executes a predetermined program called by the memory 306, thereby realizing the respective functions. The web application 104, the security filter 103, and the communication information monitoring device 201 may be executed in different computers or in a single computer.
[Internal Configuration of Web Application]
Processes executed by a job processing unit 403 greatly differ depending on the web application. For example, in the web application of the online shopping, processes such as a commodity search and a commodity purchase are performed. A job database 404 stores various data required for executing jobs. For example, commodity data is stored in the job database 404. The job processing unit 403 generates an SQL statement for accessing the job database 404 by using a parameter contained in the request message.
A database access unit 402 accesses the job database 404 according to the SQL statement generated by the job processing unit 403 and performs processes such as search and update. Moreover, the job processing unit 403 generates a web page to be returned to a client, by using an access result to the job database 4094 and a parameter contained in the request message. The generated web page is returned to the client by the HTTP processing unit 401.
[Internal Configuration of Communication Information Monitoring Device]
[Pseudo-Client]
As will be detailed below, the pseudo-client 501 transmits a request message containing a trace value as a parameter to the web application and analyzes a response message returned from the web application. The pseudo-client 501 includes a screen view I/O processing unit 504, a request generation unit 505, a response analysis unit 507, and an HTTP processing unit 506. The HTTP processing unit 506 transmits a request message and receives a response message.
The response analysis unit 507 analyzes a response message returned from the web application and generates a parameter list which will be explained below. The screen view I/O processing unit 504 displays on the screen the analysis result obtained by the response analysis unit 507 and receives a user input. The request generation unit generates a request message containing a trace value as a parameter.
[Monitoring Unit]
The monitoring unit 502 monitors whether the trace value transmitted by the pseudo-client 501 is used in various places in the system. In this embodiment, as an example of the monitoring process, explanation will be given on the SQL statement monitoring and the response message monitoring. If necessary, monitoring can be performed in other places.
An SQL statement monitoring unit 508 monitors the SQL statement used when the job database 404 is accessed. The SQL monitoring is realized, for example, by linking with the database access unit 402 or monitoring the communication between database access unit 402 and the job database 404. Moreover, the SQL statement may be monitored by a method other than this.
A response monitoring unit 509 monitors response data returned from the web application 104. The monitoring of the response message can be realized, for example, by linking with the HTTP processing unit 506 of the pseudo-client 501 or monitoring the communication between the web application 104 and the pseudo-client 501. Moreover, the response data may be monitored by a method other than this.
[Unification Unit]
The unification unit 503 generates a check rule 105 according to the processing result obtained by the pseudo-client 501 and the monitoring unit 502 and the check policy 510 registered in advance. In the check policy, the parameter use purpose is registered while being correlated with the check processing.
Hereinafter, referring to the flowchart of
When an instruction is inputted, firstly, in Step S601, the user inputs URL of the web application to the pseudo-client 501. Next, in Step S602, the pseudo-client 501 transmits a request message to the web application 104 in the same way as the ordinary browser and receives a response message. Here, an example of the response message returned from the web application is shown in
The response message shown in
In the message shown in
Moreover, Line 06 to Line 18 are enclosed by form tags. This indicates that the contents enclosed by the form tags are one form. The action attribute (Line 06) of the form tag represents the URL of the transmission destination of the input content. Moreover, the method attribute (Line 07) of the form tag represents the HTTP method used when transmitting the input content.
Furthermore, Line 09 to Line 12 are enclosed by select tags. This indicates that the content enclosed by the select tags is one select box. The select box is one of the parts below the form and the value selected here is transmitted as one of the parameters to the web application. When the parameter is transmitted, the name attribute (Line 09) of the select tag is used as a name of the parameter.
The option tags in Line 10 and Line 11 respectively represent selection candidates of the select box. When the content enclosed by the option tags is selected, the value of the value attribute of the option tag is transmitted as a parameter value to the web application.
For example, when “television” is selected, a parameter having “item” as a name and “tv” as a value is transmitted to the web application. Moreover, when “video” is selected, a parameter having “item” as a name and “video” as a value is transmitted to the web application. It should be noted that the select tag in Line 10 has the selected attribute. This indicates that the option tag in Line 10 has been selected in advance.
Furthermore, <br> in Line 13 and Line 16 represents a new paragraph. Moreover, the input tags in Line 15 and Line 17 represents one of the parts of the input form.
Here, the input tag having a text as the type attribute like in Line 15 represents a text input field. The name attribute of the input tag is used as a parameter name when transmitting the parameter. In Line 15, the name of the name attribute is “bikou”. Accordingly, the value inputted in the text input field is transmitted as a value of the parameter whose name is “bikou” to the web application.
Moreover, like in Line 17, the input tag having a submit as the type attribute represents an execution button. Here, when the execution button is pressed, the content of the input form is transmitted as a parameter to the web application. Thus, a response message is received in response to the request message transmitted from the pseudo-client 501 to the web application 104.
In Step S602 in
In the respective items of the parameter list 803, a check box 807, an URL 808, a name 809, a value 810, a condition 811, and a result 812 are displayed. The check box is used when a user specifies a parameter to be traced as will be explained below. The URL 808 is a column showing the URL of the parameter transmission destination. In the HTML shown in
The name 809 is a column showing the name of the parameter. In the HTML shown in
The value 810 is a column showing the value of the parameter. In the HTML, when an initial value and a value selected in advance are specified, they are displayed here. In the HTML shown in
The condition 811 is a column for displaying the trace condition of each parameter. However, in Step S602, no parameter trace is performed yet and the characters “not traced” are displayed for all the parameters. The use position 812 is a column where the trace result of each parameter is displayed. In Step S602, no parameter trace is performed yet and a short line “-” indicating that no result is obtained is displayed for all the parameters.
Returning to the flowchart
Moreover, for the parameter not to be traced, i.e., for the parameter having no mark in the check box 807, the column of the value 810 is edited so as to set an arbitrary character string for the parameter value. Furthermore, when specification of the parameter is complete, the user presses the request transmission button 813.
When the request transmission button 813 is pressed in Step S604, the request generation unit 505 generates a pseudo-request message for tracing the parameter.
Moreover, the request generation unit sets a trace value as a parameter value for the parameter having the mark in the check box 807. As the trace value, for example, a random character string can be used. When setting trace values for a plurality of parameters, different trace values are set for them. In the example of
Furthermore, in Step S605, the monitoring unit starts monitoring of the trace value. When the pseudo-request is transmitted, each of the monitoring units in the monitoring unit 502 starts monitoring of the system. That is, the SQL statement management unit 508 monitors the SQL statement transmitted to the job database and monitors the request message generated in Step S604. When the SQL statement issued includes a trace value, it is understood that the parameter to be traced is used in the SQL statement.
Moreover, the response management unit 509 monitors the response message returned from the web application to the client. When the response message contains a trace value, it is understood that the parameter to be traced is used for screen view output.
Furthermore, in Step S606, the HTTP processing unit 506 of the pseudo-client 501 transmits the pseudo-request generated by the request generation unit 505 to web application. Moreover, in Step S607, the web application 104 performs the same process as when a normal request is received. That is, the pseudo-request is received, a job process is performed, and a response is returned to the pseudo-client.
In Step S608, when the response message is returned from the web application, the pseudo-client displays the trace result to the user.
Furthermore, the parameter list 803 displays the trace result monitored by the monitoring unit 502 for the parameters (the “item” parameter and the “bikou” parameter) displayed in Step S602. In the use position 812, the character string “SQL statement” is outputted when the trace value is detected by the SQL statement monitoring unit 508 and the character string “response” is outputted when the trace value is detected by the response monitoring unit 509. Thus, the user can know the position in the system where each parameter is used.
In Step S609, the user selects to continue the parameter trace processing or terminate the trace processing and generate a check rule. When the trace is to be terminated here, the user presses the check tool generation button 814 in Step S610. When the check tool generation button 814 is pressed, the monitoring unit 502 terminates monitoring in Step S611. After this, in Step S612, the unification unit 503 generates a check rule.
It should be noted that a check policy 510 indicating the check principle is set in advance for the unification unit 503. For example, information shown in
That is, Line 1 in
Here, the characters such as the colon, the semi colon, the equal, the double quotation, and the single quotation have special meanings in the SQL. When these characters are used for malicious purpose, the SQL injection attack may occur. Consequently, by inhibiting these characters, it is possible to prevent the SQL injection.
Moreover, Line 1105 in
Here, the symbols “<”, “>”, a double quotation ““”, a single quotation “'”, and “&” are characters used when describing a script. When these characters are abused, there arises a possibility of the cross site scripting attack. So, by inhibiting use of these characters, it is possible to prevent the cross site scripting.
Furthermore, in the example of
The unification unit 503 generates a check rule 105 according to the parameter trace result and the check policy 510. That is, when the parameter trace result is
As has been explained above, it is possible to easily generate the check rule 103 without having detailed knowledge about the web application 104. The security filter 103 can perform appropriate check processing by using the check rule 105.
Thus, the present invention provides a communication information monitoring apparatus used in a system providing a service to a client. The system includes a pseudo-client transmitting a request containing a trace value and a monitoring unit for monitoring the trace value in various positions in the system. By monitoring the trace value in various positions of the system so as to identify the parameter use position, it is possible to easily create an appropriate check rule without having detailed knowledge of the security and the web application.
It should be noted that the present invention is not to be limited to the aforementioned embodiment but include various embodiments without departing the spirit of the invention disclosed in the claims.
Having described a preferred embodiment of the invention with reference to the accompanying drawings, it is to be understood that the invention is not limited to the embodiments and that various changes and modifications could be effected therein by one skilled in the art without departing from the spirit or scope of the invention as defined in the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
2005-186694 | Jun 2005 | JP | national |