WO2012032660A1 - Mobile code testing device, method of mobile code testing and program for mobile code testing - Google Patents
Mobile code testing device, method of mobile code testing and program for mobile code testing Download PDFInfo
- Publication number
- WO2012032660A1 WO2012032660A1 PCT/JP2010/065663 JP2010065663W WO2012032660A1 WO 2012032660 A1 WO2012032660 A1 WO 2012032660A1 JP 2010065663 W JP2010065663 W JP 2010065663W WO 2012032660 A1 WO2012032660 A1 WO 2012032660A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- information
- function
- input
- illegal
- function information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/57—Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
- G06F21/577—Assessing vulnerabilities and evaluating computer system security
Definitions
- the present invention relates to a mobile code test apparatus, a mobile code test method, and a mobile code test program. More specifically, the present invention relates to a mobile code test apparatus, a mobile code test method, and a mobile code test program that can automatically determine vulnerabilities in mobile code.
- a general computer is installed with an OS (Operating System) having a role of mediating control in hardware and a function of providing an interface environment in consideration of user operability. Yes. Furthermore, when a user performs various processes using a computer, it is necessary to install a program (application software) necessary for the process in the computer.
- OS Operating System
- application software application software
- a web application program is run on a server connected via the Internet, and a user operating a computer accesses various pages provided by the server by accessing a corresponding page of the server using a browser (browser program). Service is available.
- Flash registered trademark
- Java registered trademark
- Silverlight registered trademark
- FIG. 16 shows an example of using an embed element of HTML (HyperText ⁇ ⁇ Markup Language) (a tag used to embed audio and video in a web page), to display an illegal mobile on a web page displayed on the user's browser.
- HTML HyperText ⁇ ⁇ Markup Language
- FIG. 16 shows an example of using an embed element of HTML (HyperText ⁇ ⁇ Markup Language) (a tag used to embed audio and video in a web page), to display an illegal mobile on a web page displayed on the user's browser.
- HTML HyperText ⁇ ⁇ Markup Language
- the width attribute included in the HTML embed tag shown in FIG. 16 indicates the width of the plug-in area where the mobile code is displayed, and the height attribute indicates the height of the plug-in area where the mobile code is displayed. Then, a mobile code (movie.swf corresponds to an invalid mobile code in the case of FIG. 16) is designated in the src attribute. In this way, when a user views a web page in which an invalid mobile code designation destination is recorded by an embed element (embed tag) with a browser, the mobile code is automatically downloaded and executed on the computer.
- the mobile code is not necessarily specified only by the embed element (embed tag) in HTML.
- the URL Uniform Resource Locator
- the mobile code is automatically downloaded and executed by directly entering and accessing the address of the mobile code (movie.swf corresponds to the mobile code in the above case) Is possible.
- Parameter injection is an attack method specific to mobile code in which an illegal attack is injected by the mobile code by setting an invalid parameter in the mobile code from the outside of the mobile code.
- this attack includes unauthorized network access and cross-site scripting.
- Unauthorized network access is an attack that executes parameters input by parameter injection to receive data from unauthorized sites or send data to unauthorized sites. For example, this illegal network access causes damage such as downloading a video that is not intended by the user.
- Cross-site scripting is an attack that executes scripts injected through parameter injection when mobile code is executed.
- this cross-site scripting may cause damage such as an attacker taking the user's cookie information and impersonating the user.
- Security measures against these attack methods include, for example, a method of improving computer security using a sandbox, and the reliability of mobile codes by using digital signature technology.
- a method to be executed by a user has been proposed (see, for example, Patent Document 1 and Patent Document 2).
- test operation in which a tester directly operates a browser or the like and inputs tests indicating various aggressiveness related to mobile code is performed.
- a penetration test is performed to determine vulnerabilities to mobile code by visually checking the response (output) state on the browser for this test operation.
- the present invention has been made in view of the above problems, and it is an object of the present invention to provide a mobile code test device, a mobile code test method, and a mobile code test program capable of automatically detecting vulnerabilities in mobile code.
- a mobile code test apparatus is a plug-in that inputs and outputs function information between a browser and a virtual machine that executes mobile code, from the browser to the virtual machine.
- First plug-in wrapper means for extracting input function information to be inputted, and traveling means for executing an operation process in the mobile code based on the traveling path information in which an operation procedure in the mobile code is preset as the traveling path information.
- argument information changing means capable of changing the argument information of the input function information extracted by the first plug-in wrapper means to other argument information, and illegal processing based on the mobile code,
- the input function information input from the browser to the virtual machine in accordance with the operation process is extracted, and the argument information changing means is the input function information extracted by the first plug-in wrapper means. Find out the input function information having a function name that matches the function name of the illegal input function information recorded in the test generation pattern recording means, and further find the argument information of the found input function information in the test generation pattern recording means
- the illegal argument information recorded in (1) is changed.
- the argument information is output by the second plug-in wrapper means for extracting output function information output from the virtual machine to the browser, and the argument information changing means.
- the illegal input function information input means capable of causing the virtual machine to input the illegal input function information changed to the illegal argument information
- the output function extracted by the second plug-in wrapper means Vulnerability determination means for determining vulnerability to the mobile code based on the function name of the information and the content of the argument information of the output function information
- the second plug-in wrapper means includes the unauthorized input Corresponding to the illegal input function information input to the virtual machine by the function information input means, it is output from the virtual machine.
- the vulnerability determination means finds out illegal output function information having a function name that matches the function name of the output function information from the illegal output function information, and argument information of the found illegal output function information Further, when the invalid argument information changed by the argument information changing means is included, it may be determined that there is a vulnerability to the mobile code.
- the argument information is output by the second plug-in wrapper means for extracting output function information output from the virtual machine to the browser, and the argument information changing means.
- the illegal input function information input means capable of causing the virtual machine to input the illegal input function information changed to the illegal argument information
- the output function extracted by the second plug-in wrapper means Vulnerability determination means for determining vulnerability to the mobile code based on the function name of the information and the content of the argument information of the output function information, and the vulnerability that can be determined that the vulnerability to the mobile code exists
- the function name of the output function information and the argument information of the vulnerable output function information, where the vulnerability exists Vulnerability determination pattern recording means recorded with vulnerability argument information that can be determined as
- the second plug-in wrapper means the unauthorized input input to the virtual machine by the unauthorized input function information input means
- the fraudulent output function information output from the virtual machine corresponding to the function information is extracted, and the vulnerability judgment means records the vulnerability recorded in the vulnerability judgment pattern recording means from the fraudulent output function information.
- the illegal output function information having a function name that matches the function name of the output function information is found, and the argument information of the detected illegal output function information includes the vulnerable argument information recorded in the vulnerability determination pattern recording unit In such a case, it may be determined that there is a vulnerability to the mobile code.
- a mobile code test method is a mobile code test method for determining vulnerabilities of a virtual machine on which mobile code is executed, and a cyclic route showing an operation procedure in the mobile code.
- a circulating step in which the circulating means executes an operation process in the mobile code, and input function information input from the browser to the virtual machine according to the mobile code operation process in the cyclic step
- An input function information extracting step in which a plug-in wrapper means extracts a plug-in that inputs and outputs function information between the virtual machine and the browser; and the input function extracted in the input function information extracting step From the information, illegal processing based on the mobile code is performed in the virtual
- the input function information detecting step in which the argument information changing means finds input function information having a function name that matches the function name of the illegal input function information that can be executed in the thin, and the input function information detecting step.
- the argument information changing means for changing the argument information of the input function information to the invalid argument information set as the argument information of the illegal input function
- Two plug-in wrapper means to extract the output function information extracted in the plug-in, and to input the illegal input function information in which the argument information is changed to the invalid argument information in the invalid argument information change step
- the illegal input function information input step to be input to the virtual machine in the plug-in, from the virtual machine
- the second plug-in wrapper means outputs the illegal output function information that has been output.
- the vulnerability determination unit may include a vulnerability determination step of determining that there is a vulnerability to the mobile code when the illegal argument information changed in the information change step is included. .
- Two plug-in wrapper means to extract the output function information extracted in the plug-in, and to input the illegal input function information in which the argument information is changed to the invalid argument information in the invalid argument information change step
- the illegal input function information input step to be input to the virtual machine in the plug-in, from the virtual machine
- the second plug-in wrapper means outputs the illegal output function information that has been output.
- the vulnerability determination means determines that there is a vulnerability to the mobile code
- Illegal output function information detection step for finding illegal output function information having a function name that matches the function name of the vulnerable output function information that can be performed, and argument information of the illegal output function information found in the illegal output function information detection step
- a vulnerability determination step in which the vulnerability determination means determines that there is a vulnerability to the mobile code when vulnerability argument information that can be determined that the vulnerability exists is included in It may be.
- the mobile code test program is a mobile code test program for performing vulnerability determination of a virtual machine in which execution of mobile code is performed in a computer, and the computer performs an operation procedure in the mobile code.
- a cyclic function for executing an operation process in the mobile code based on the cyclic route information indicated by the input, and an input function input to the virtual machine from the browser according to the mobile code operation process based on the cyclic function
- An input function information extraction function that extracts information in a plug-in that inputs and outputs function information between the virtual machine and the browser, and the input function information extracted based on the input function information extraction function From the virtual machine, illegal processing based on the mobile code is performed.
- An input function information detection function for finding input function information having a function name that matches the function name of the illegal input function information that can be executed in the function, and input function information found based on the input function information detection function It is a mobile code test program for realizing an invalid argument information changing function for changing argument information to illegal argument information set as argument information of the illegal input function information when performing the illegal processing.
- the mobile code test program described above is output to the computer from the virtual machine in response to input function information input from the browser to the virtual machine in accordance with the operation processing of the mobile code.
- Output function information extraction function for extracting function information in the plug-in, and the illegal input function information in which the argument information is changed to the invalid argument information based on the illegal argument information change function, in the plug-in
- An illegal output function information extraction function for extracting information in the plug-in, and the illegal output function Incorrect output function information having a function name that matches the function name of the output function information extracted based on the output function information extraction function from among the unauthorized output function information extracted based on the information extraction function
- the argument information of the output function information detection function and the illegal output function information found based on the illegal output function information detection function includes the invalid argument information changed based
- the mobile code test program described above is output to the computer from the virtual machine in response to input function information input from the browser to the virtual machine in accordance with the mobile code operation process.
- Output function information extraction function for extracting function information in the plug-in, and the illegal input function information in which the argument information is changed to the invalid argument information based on the illegal argument information change function, in the plug-in
- Information output function for extracting information in the plug-in, and the illegal output function information Among the unauthorized output function information extracted based on the extraction function, the unauthorized output function information having a function name that matches the function name of the vulnerable output function information that can be determined to be vulnerable to the mobile code.
- the illegal output function information detection function to be found and the argument information of the illegal output function information found based on the illegal output function information detection function includes vulnerable argument information that can be determined that the vulnerability exists.
- it may be a mobile code test program for realizing a vulnerability determination function for determining that there is a vulnerability to the mobile code.
- the function name of the illegal input function information matches the input function information input to the virtual machine based on the browser operation processing.
- the mobile code test apparatus, mobile code test method, and mobile code test program according to the present invention have a function name that matches the function name of the extracted output function information from the extracted illegal output function information.
- a function name matches the function name of the extracted output function information from the extracted illegal output function information.
- (A) is a table illustrating the plug-in function on the plug-in side recorded in the cyclic input database according to the present embodiment, and (b) is recorded in the cyclic output database according to the present embodiment. It is the table which illustrated the plug-in function on the browser side.
- (A) is an example in which an invalid parameter is embedded in HTML of a web page
- (b) is a table illustrating a test generation pattern database according to the present embodiment.
- (A) is a table illustrating the plug-in function and its argument information recorded in the test database according to the present embodiment, and (b) corresponds to the plug-in function shown in (a).
- 4 is a table showing an output function name monitored by a vulnerability determination unit according to the present embodiment and a vulnerability determination method based on the output function in order to perform a vulnerability determination of unauthorized network access.
- 4 is a table showing output function names monitored by a vulnerability determination unit according to the present embodiment and vulnerability determination methods based on the output functions in order to perform vulnerability determinations for cross-site scripting.
- (A) is a table exemplifying output function names indicating vulnerabilities and identifiers indicating vulnerabilities recorded in the vulnerability determination database, and (b) relates to vulnerabilities determined by the vulnerability determination unit.
- Step S. of the flowchart shown in FIG. 5 is a table exemplifying contents recorded in the test database by the test generation unit in the test database, the plug-in function used during the test tour, the tour argument information, and the test argument information.
- 14A shows an output function corresponding to the plug-in function in the column whose test ID is 1 in FIG. 14, and FIG.
- FIG. 14B shows an output function corresponding to the plug-in function in the column whose test ID is 2 in FIG. (C) shows an example of the test result finally recorded in the test result database. It is the figure which illustrated HTML when improper mobile code is embedded in a web page using an embed tag.
- FIG. 1 is a schematic diagram showing a mobile code test device (hereinafter referred to as a test device) connected to a server via a network.
- the test apparatus 1 has a network connection function (such as a communication unit to be described later).
- a network connection function such as a communication unit to be described later.
- the network 2 is widely open worldwide, and may be the Internet capable of transmitting / receiving information to / from a large number of people, and the transmission / reception of information is limited to certain users.
- LAN local area network
- the server 3 is a so-called web server, and has a role of providing web information to the test apparatus 1 via the network 2. Further, it has a function of downloading a mobile code or the like in response to a request from the test apparatus 1.
- test apparatus 1 and one server 3 are shown, but the number of connected test apparatuses 1 and servers 3 is not limited to one each. It may be connected one by one.
- FIG. 2 is a block diagram showing a schematic configuration of the test apparatus 1.
- the test apparatus 1 is roughly configured by a main body unit 10, a display unit 11, and an operation unit 12.
- the main body unit 10 includes a control unit 20, a data storage unit 21, and a communication unit 22.
- the data storage unit 21 is configured by an auxiliary storage device such as a hard disk or SSD (Solid State Drive).
- the data storage unit 21 stores a program related to a mobile code test process executed by the control unit 20.
- the data storage unit 21 includes a cyclic route information database 50, a test generation pattern database (test generation pattern recording means) 54, a test database 55, a cyclic input database 51, a cyclic output database 52, and a test input time shown in FIG.
- the output database 53, the vulnerability determination database (vulnerability determination pattern recording means) 56, and the test result database 57 have a role of recording various information. Details thereof will be described later.
- the communication unit 22 has a role of transmitting necessary information to the server 3 via the network 2 in accordance with an instruction from the control unit 20 and recording information received from the server 3 in the data storage unit 21.
- the communication unit 22 is configured by a general NIC (Network Interface Card) such as a LAN board or a LAN card.
- NIC Network Interface Card
- the control unit 20 has a role of performing a mobile code test process to be described later in accordance with a program recorded in the data storage unit 21.
- the control unit 20 can start and end the browser according to the program recorded in the data storage unit 21, and further transmits / receives data based on the browser operation via the communication unit 22. It is possible to do.
- the control unit 20 includes a CPU (Central Processing Unit) (not shown) and a RAM (Random Access Memory).
- the CPU has a role of substantially executing the mobile code test process in the control unit 20.
- the RAM is used as a work area used for CPU processing.
- the display unit 11 has a role of displaying information such as an application image such as a browser (browser program) executed by the control unit 20 and information such as a processing process and a processing result in the mobile code test processing so as to be visible to the user.
- an application image such as a browser (browser program) executed by the control unit 20
- information such as a processing process and a processing result in the mobile code test processing so as to be visible to the user.
- a general display device such as a liquid crystal display or a CRT display is used for the display unit 11.
- the operation unit 12 is used for operations in which a user inputs settings and conditions necessary for the mobile code test process, and changes data in various databases recorded in the data storage unit 21.
- the operation unit 12 includes a general keyboard, a mouse, and the like.
- FIG. 3 is a diagram showing functional blocks for explaining the mobile code processing function in the test apparatus 1.
- the control unit 20 activates the browser and executes the process using the mobile code in accordance with the program recorded in the data storage unit 21, the process using the mobile code is virtually performed via the plug-in 31 as shown in FIG. Executed by machine 32.
- the test apparatus 1 performs control processing of the hardware 35 via an OS (Operating System) 34 such as Windows (registered trademark), and the virtual machine 32 is operated in the OS 34. Is in operation.
- the virtual machine 32 transmits / receives information to / from the browser 30 via an extended function unit called a plug-in 31 related to browser processing.
- the plug-in 31 is an environment for executing a mobile code in a shared object format.
- the plug-in 31 is standardized and based on Netscape Plugin Interface used in various browsers. The processing is defined.
- Netscape Plugin Interface includes a plug-in-side plug-in API (Application-Programming Interface) and a browser-side plug-in API (Application-Programming Interface), and this plug-in-side plug-in API and browser-side plug-in API. are used to input / output information between the browser 30 and the virtual machine 32 and execute necessary processing.
- a plug-in side plug-in API function (hereinafter referred to as a plug-in side plug-in function).
- the plug-in API on the plug-in side includes processing for the browser 30 to call the plug-in 31.
- information is output from the virtual machine 32 to the browser 30 by calling a browser-side plug-in API function (hereinafter referred to as a browser-side plug-in function).
- the browser-side plug-in API includes a process for calling the browser 30 from the plug-in 31.
- FIG. 4 shows a list of plug-in functions on the plug-in side.
- FIG. 5 shows a list of plug-in functions on the browser side.
- a plug-in wrapper unit that monitors calls (inputs) of plug-in functions on the plug-in 31 and calls (outputs) of plug-in functions on the browser side ( First plug-in wrapper means, second plug-in wrapper means) 33 are provided.
- the plug-in wrapper unit 33 hooks a plug-in DLL (dynamic link library) as necessary, monitors what function is called, and stores information on the called function in the data storage unit 21.
- the data is recorded in the database (travel input database 51, tour output database 52, test input output database 53).
- the plug-in wrapper unit 33 uses the plug-in associated with the patrol operation. It has the role of detecting the inside plug-in function and recording it in the cyclic input database 51.
- the plug-in wrapper unit 33 has a role of detecting a browser-side plug-in function when the automatic cyclic processing is performed by the cyclic unit 41 and recording the plug-in function in the cyclic output database 52.
- the plug-in wrapper unit 33 records the browser-side plug-in function detected when the cyclic argument information of the plug-in-side plug-in function is rewritten with the test argument information in the test input output database 53. have.
- the plug-in wrapper unit 33 is provided, and the plug-in 31 calls the plug-in function to the browser 30 and calls the virtual machine 32 the plug-in function. To monitor. Then, if necessary, a function in which information usable for a mobile code vulnerability test is written (embedded) is generated, and mobile code processing is performed on the virtual machine 32 from the plug-in 31 using the generated function. Is executed, and the mobile code vulnerability is determined by extracting the function output from the virtual machine 32 for the executed mobile code.
- the function monitoring in the plug-in 31 and the function change processing can perform a penetration test regarding the mobile code at a level closer to the virtual machine 32, which is more detailed and detailed.
- Mobile code vulnerabilities can be determined at various levels.
- FIG. 6 is a block diagram showing the processing contents in the case where the control unit 20 executes the mobile code test process according to the program stored in the data storage unit 21 as a function block for each processing function.
- the block diagram shown in FIG. 6 shows a database in which data used for processing in each functional block is recorded.
- a plug-in wrapper unit 33 As a functional block, a plug-in wrapper unit 33, a test setting unit 40, a traveling unit 41, a test generation unit 42, a test input unit (argument information change) Means, unauthorized input function information input means) 43, and vulnerability determination unit (vulnerability determination means) 44 are provided. Further, in the test apparatus 1 according to the present embodiment, as shown in FIG. 6, as a database, a traveling route information database 50, a traveling input database 51, a traveling output database 52, a test input output database 53, a test A generation pattern database 54, a test database 55, a vulnerability determination database 56, and a test result database 57 are provided.
- each functional block shown in FIG. 6 is realized by the control unit 20 executing a program recorded in the data storage unit 21.
- Each database shown in FIG. 6 is recorded in the data storage unit 21 as described above.
- the plug-in wrapper unit 33 extracts (hooks) the input / output between the browser 30 and the virtual machine 32 by extracting the plug-in side plug-in function and the browser side plug-in function in the plug-in 31. And has a role to record in each database.
- the information of the extracted plug-in function is recorded in different databases depending on the test process.
- the plug-in wrapper unit 33 extracts a plug-in side plug-in function corresponding to the processing content in the tour unit 41 and records it in the tour input database 51. .
- the plug-in wrapper unit 33 extracts a plug-in function on the browser side corresponding to the processing content in the tour unit 41, and outputs a tour-time output database 52. To record.
- the plug-in wrapper unit 33 rewrites the plug-in side plug-in function round-trip argument information extracted during the second automatic loop by the cyclic unit 41 into the test argument information by the test input unit 43 so that the virtual machine 32
- the browser-side plug-in function output from the virtual machine 32 is extracted and recorded in the test input output database 53.
- the process in which the test input unit 43 rewrites the cyclic argument information of the plug-in side plug-in function with the test argument information will be described later.
- the test setting unit 40 has a role of setting a mobile code to be tested.
- the mobile code set in the test setting unit 40 is a test target in the test apparatus 1. Since the test setting unit 40 only sets the mobile code to be tested, the mobile code setting information (designated information) to be tested is recorded in the data storage unit 21 or the like in advance. Even if the test setting unit 40 is not actively provided, it is possible to perform a mobile code test process by the test apparatus 1.
- the traveling unit 41 has a role of performing a predetermined operation on the browser 30 according to the traveling route information created in advance by the tester. Specifically, when the tester actually operates the browser 30 displayed on the display unit 11 with the operation unit 12, the traveling unit 41 records the operation procedure in the traveling route information database 50 as the traveling route information. Further, when the traveling route information has already been created by the operation of the operation unit 12, the traveling route information recorded in the traveling route information database 50 can be used without newly recording the traveling route information. it can.
- the patrol unit 41 automatically performs various operations in the browser based on the patrol route information.
- “iMacros” is known as software that realizes the operation by the traveling unit 41.
- “IMacros” has a function that, when the tester actually operates the operation unit 12 and operates the browser, records the operation process and then automatically reproduces it. By using this software, the browser can be automatically operated based on the patrol route information.
- the plug-in side plug-in function extracted by the plug-in wrapper unit 33 in accordance with the automatic patrol process (operation processing of the browser 30) executed by the patrol unit 41 is recorded in the tour input database 51.
- the operation of the browser 30 or the like is actually performed by the traveling unit 41, even if one operation (action) is performed on the browser 30, the plug-in function requested from the browser 30 to the plug-in 31 is The request is not limited to one, but may be based on a plurality of functions.
- the browser-side plug-in function extracted by the plug-in wrapper unit 33 according to the operation of the browser 30 executed by the patrol unit 41 is recorded.
- the plug-in wrapper unit 33 extracts the browser-side plug-in function corresponding to the operation by the patrol unit 41 and records it in the patrol output database 52 so that the plug recorded in the patrol input database 51 is recorded.
- the contents of the plug-in function on the inside can be easily compared with the contents of the plug-in function on the browser side recorded in the patrol output database 52 so as to correspond to the plug-in function.
- FIG. 7A is a table illustrating plug-in functions on the plug-in side recorded in the cyclic input database 51, and FIG. 7B corresponds to the plug-in function shown in FIG. 7A. It is the table which illustrated the plug-in function by the side of the browser recorded in the output database 52 at the time of doing in this way.
- the test generation unit 42 has a role of generating a test pattern for mobile code testing based on the plug-in side plug-in function recorded in the cyclic input database 51.
- the test generation unit 42 reads, as an input set, a set of plug-in functions generated by one operation (action) in the cyclic unit 41 from the cyclic input database 51. Then, the test generation unit 42 extracts a plug-in function corresponding to the function name of the plug-in function from the test generation pattern database 54 from a plurality of plug-in functions that can be included in the input set, and sets the function set as the test set. And The test generation unit 42 generates a plug-in function in which a test pattern is added as test argument information for the plug-in function of the test set, and records the generated plug-in function in the test database 55.
- a web page HTML such as a tag described in the HTML source code
- a URL such as input to a URL
- a mobile text UI text field that the user enters on the web page
- An illegal variable can be input (injected) from any of the (text fields of UI (User Interface)).
- the incorrect variable is input to the argument of the text input acquisition function.
- the text input acquisition function is not defined in Netscape Plugin and is a platform-dependent function. For this reason, when performing a mobile code vulnerability test on a UI text field, the test pattern acquired from the test generation pattern database 54 is added (as test argument information) to the argument of the text input acquisition function. Become.
- a test pattern for unauthorized network access a key (key information) and a value (value information) are regarded as a pair of pair information, and an unauthorized URL is input to the value (value information) of the pair information.
- the identifier “http://www.example.com” is embedded in the value (value information) so that the vulnerability determination unit 44 can immediately detect the vulnerability.
- This identifier “http://www.example.com” indicates an example of a test URL set in advance by a tester for processing in the test apparatus 1.
- identifier “javascript: alert (“ xss ”)” is embedded in the value (value information) so that the vulnerability determination unit 44 can immediately detect an illegal setting.
- This identifier “javascript: alert (“ xss ”)” is an example of a test JavaScript code set in advance by a tester for processing in the test apparatus 1.
- FIG. 8A shows an example in which an invalid parameter is embedded in HTML of a web page.
- FIG. 8B is a table showing an example of the test generation pattern database 54.
- the test generation pattern database 54 stores five types of information: test pattern ID, cyclic function call number, function name, cyclic argument information, and test pattern.
- test pattern ID is “1”
- url http: //www.example.com
- test pattern ID is “2”
- FIG. 9A is a table exemplifying plug-in functions and argument information recorded in the test database 55.
- a plug-in function to which argument information is added by the test generation unit 42 is recorded based on the test pattern recorded in the test generation pattern database 54 of FIG. 8B described above. Yes.
- test pattern acquired from the test generation pattern database 54 is added to the cyclic argument information of the text input acquisition function as test argument information.
- a test tour plug-in function and argument information can be generated and recorded in the test database 55.
- the test input unit 43 has a role of causing the virtual machine 32 to input a set of plug-in functions to which test argument information has been added as plug-in side plug-in functions to be used during a test tour.
- the test input unit 43 reads the plug-in function to which the test argument information has been added from the test database 55, and is included in the test database 55 from the plug-in function of the first automatic cyclic processing in the cyclic unit 41.
- a plug-in function that matches the plug-in function name is defined as a test set.
- the test input unit 43 causes the traveling unit 41 to execute a traveling process (test traveling process) using the same traveling route as the first automatic traveling process.
- the test input unit 43 causes the plug-in wrapper unit 33 to extract the plug-in side plug-in function in the second automatic cyclic processing (test cyclic processing), and the cyclic argument information of the plug-in function corresponding to the test set is obtained.
- the plug-in function replaced with the test argument information is output to the virtual machine 32.
- the plug-in wrapper unit 33 is the same as the first tour. Plug-in side plug-in functions can be extracted.
- the test input unit 43 uses the same plug-in function, and the test information recorded in the test database 55 from the argument information at the first round is the argument information.
- the configuration of a web page for performing a mobile code vulnerability test is different for each mobile code UI in the web page, and thus it can be said that it is difficult to fully determine the vulnerability of the mobile code.
- the user can record a browser operation in the web page as the traveling route information in the traveling route information database 50 to obtain a plug-in function required by the browser operation based on the traveling route information.
- the browser operation includes operation and reading of the mobile code UI displayed on the browser.
- the operation of the mobile code UI includes inputting characters into a text field of the mobile code. For this reason, it is possible to reduce the burden of determining test items, and it is possible to suppress the leakage of test items.
- the plug-in wrapper unit 33 After the plug-in function replaced with the test argument information by the test input unit 43 is output to the virtual machine 32, the plug-in wrapper unit 33 outputs the plug-in function replaced with the test argument information from the virtual machine 32. A browser-side plug-in function is extracted and recorded in the test input output database 53.
- FIG. 9B shows a browser-side plug-in function output from the virtual machine 32 with respect to the plug-in function whose argument information has been changed by the test argument information in the test database 55.
- FIG. The contents (table) of the test input output database 53 in which plug-in functions output corresponding to the plug-in functions shown in FIG.
- the browser-side plug-in function as shown in FIG. 5 is recorded in the test input output database 53.
- the vulnerability determination unit 44 includes a plug-in function recorded in the tour output database 52, a plug-in function recorded in the test input output database 53, and an identifier for each output function recorded in the vulnerability determination database 56. Based on the information, it has a role to determine the vulnerability of the mobile code to be tested.
- the vulnerability determination unit 44 retrieves the plug-in function, which is the output of the virtual machine 32 at the time of the first round, from the round-time output database 52 and the virtual machine 32 at the time of the test round (at the second round).
- a plug-in function as an output is extracted from the test input time output database 53.
- the vulnerability determination part 44 compares each taken out plug-in function, and calculates
- the vulnerability determination unit 44 reads a dangerous output function name (browser-side plug-in function name) indicating vulnerability and an identifier (function argument information) indicating vulnerability from the vulnerability determination database 56.
- FIG. 12A is a table illustrating output function names indicating vulnerabilities recorded in the vulnerability determination database 56 and identifiers indicating vulnerabilities.
- the identifier of the vulnerability determination database 56 one or both of an identifier for detecting unauthorized network access and an identifier for detecting cross-site scripting are recorded.
- the information recorded in the identifier must correspond to the contents set as the test pattern in the test generation pattern database 54.
- the output function name of the difference function corresponds to the output function name recorded in the vulnerability determination database 56, and the argument information of the corresponding difference function is recorded in the vulnerability determination database 56. In the case of corresponding identifier information, it is determined that the mobile code is vulnerable to the test code. Then, the vulnerability determination unit 44 records the vulnerability determination result in the test result database 57.
- the vulnerability determination unit 44 monitors whether there are four types of output functions NPN_GetURL, NPN_GetURLNotify, NPN_PostURL, and NPN_PostURLNotify in the difference function in order to make a vulnerability determination against unauthorized network access.
- NPN_GetURL and NPN_GetURLNotify are functions for reading data from a specified URL.
- NPN_PostURL and NPN_PostURLNotify are functions that transmit data to a specified URL.
- FIG. 10 is a table showing the output function names monitored by the vulnerability determination unit 44 and the vulnerability determination method based on the output function in order to determine the vulnerability against unauthorized network access as described above. Any one of these four types of output functions is included in the difference function, and the URL of the argument of the difference function is the identifier of the test argument information that is replaced with the cyclic argument information in the test generation unit 42. When “http://www.example.com” is included, the vulnerability determination unit 44 determines that there is a vulnerability with respect to the mobile code to be tested.
- the vulnerability determination unit 44 monitors whether or not five types of output functions NPN_GetURL, NPN_GetURLNotify, NPN_PostURL, NPN_PostURLNotify, and NPN_Evaluate exist in the difference function in order to make a vulnerability determination for cross-site scripting.
- NPN_GetURL and NPN_GetURLNotify are functions for reading data from a specified URL.
- NPN_PostURL and NPN_PostURLNotify are functions that transmit data to a specified URL.
- NPN_Evaluate is a function that executes JavaScript.
- FIG. 11 is a table showing the output function names monitored by the vulnerability determination unit 44 and the vulnerability determination method based on the output function in order to perform vulnerability determination for cross-site scripting as described above. Any one of these five types of output functions is included in the difference function, and the URL of the difference function argument is the identifier of the test argument information that is replaced with the cyclic argument information in the test generation unit 42. When “javascript: alert (“ xss ”)” is included, the vulnerability determination unit 44 determines that there is a vulnerability to the mobile code to be tested.
- FIG. 12B is a table exemplifying the contents of the test result database 57 in which the test results related to the vulnerability determined by the vulnerability determination unit 44 are recorded.
- the vulnerability determination unit 44 includes any of the four types of output functions shown in FIG. 10 in the difference function, and further, “http: // If “www.example.com” is included, it is determined that there is a vulnerability to unauthorized network access, and the result of “vulnerable” is recorded as a test result for unauthorized network access.
- the vulnerability determination unit 44 determines whether or not any of the four types of output functions is included in the difference function, even if it is included in the URL as an argument of the difference function, “http: // www If ".example.com” is not included, it is determined that there is no vulnerability to unauthorized network access, and a result of "no vulnerability” is recorded as a test result for unauthorized network access.
- a result of “no vulnerability” is recorded as a test result for unauthorized network access.
- the vulnerability determination unit 44 includes any of the five types of output functions shown in FIG. 11 in the difference function, and further adds “javascript: alert (“ xss ”” to the URL serving as the argument of the difference function. ) ”Is included, it is determined that there is a vulnerability to cross-site scripting, and the result of“ with vulnerability ”is recorded as a test result for cross-site scripting.
- the vulnerability determination unit 44 sets “javascript: alert (” to the URL that is an argument of the difference function even if none of the five types of output functions is included in the difference function or is included. If xss ")" is not included, it is determined that there is no vulnerability to cross-site scripting, and the result of "no vulnerability” is recorded as a test result for cross-site scripting. In the test result database 57 shown in FIG. 12B, a result of “Vulnerability” is recorded as a test result for cross-site scripting.
- FIG. 13 is a flowchart showing the content of the mobile code test process performed by the control unit 20 of the test apparatus 1.
- the flowchart shown in FIG. 13 is realized when the control unit 20 performs processing according to a program recorded in the data storage unit 21.
- the description will be made mainly with the processing by each functional unit shown in FIG.
- FIG. 12C shows a vulnerable ActionScript set in the test setting unit 40.
- ActionScript is a programming language used in Flash.
- an external variable is used in _root.url, and the URL specified by the argument of navigateToURL is displayed on the browser.
- Attackers can use parameter injection to inject variables into _root.url from the outside to generate unauthorized network access and cross-site scripting.
- the traveling unit 41 reads the traveling route information recorded in the traveling route information database 50, and performs an automatic traveling process by operating the browser based on the read traveling route information (step S). .2).
- the plug-in wrapper unit 33 records the plug-in side plug-in function extracted along with the automatic cyclic processing of the cyclic unit 41 in the cyclic input database 51 (step S.3).
- the plug-in wrapper unit 33 records the browser-side plug-in function extracted in association with the automatic patrol process of the patrol unit 41 in the patrol output database 52 (step S.4).
- test generation unit 42 uses the plug-in function recorded in the tour-time input database 51 and the test pattern recorded in the test generation pattern database 54, and the cyclic-time argument information of the plug-in function used during the test tour. Test argument information is recorded in the test database 55 (step S.5).
- test input unit 43 causes the traveling unit 41 to execute the same traveling process (test traveling process) as the first automatic traveling process. Then, the test input unit 43 uses the argument information of the plug-in side plug-in function extracted by the plug-in wrapper unit 33 in the second automatic cyclic process (test cyclic process) as test argument information recorded in the test database 55. To be input to the virtual machine 32 (step S.6)
- the plug-in wrapper unit 33 performs step S.1.
- the browser-side plug-in function output from the virtual machine 32 in response to the input of the plug-in function in step 6 is extracted as an output function and recorded in the test input output database 53 (step S.7).
- the vulnerability determination unit 44 obtains a difference function based on the plug-in function recorded in the patrol output database 52 and the plug-in function recorded in the test input output database 53.
- the obtained output function name of the difference function corresponds to the output function name recorded in the vulnerability determination database 56, and the argument information of the corresponding difference function is recorded in the vulnerability determination database 56.
- the vulnerability of the mobile code is determined (step S.8).
- the vulnerability determination unit 44 records the obtained vulnerability determination result in the test result database 57 (step S.9), and ends the mobile code test process.
- FIG. 5 shows a table in which the test generation unit 42 records the test tour plug-in function, the tour time argument information, and the test argument information in the test database 55.
- Step S. 6 when the test input unit 43 extracts the NPP_New function with the test ID “1” shown in FIG. 14 and outputs the NPP_New function to the virtual machine 32, based on the browser-side plug-in function for this output, the vulnerability determination unit 44 determines that unauthorized network access occurs. This is because the key-value pair (url, http://www.example.com) is replaced as test argument information as shown in the column of “1” in FIG. As a result, "http://www.example.com” is passed to _root.url, and the site transitions to "http://www.example.com". is there. As a result, the site is displayed on the browser.
- step S.E. 7 the output function extracted by the plug-in wrapper unit 33 is recorded in the output database 53 at the time of test input.
- FIG. 15A shows an output function corresponding to the plug-in function in the column whose test ID is “1” in FIG.
- the vulnerability determination unit 44 determines that there is a vulnerability based on unauthorized network access by referring to the vulnerability determination database 56 (step S.8), and uses the determination result as the test result database 57. (Step S.9).
- step S. 6 when the test input unit 43 extracts the NPP_New function having the test ID “2” shown in FIG. 14 and outputs the NPP_New function to the virtual machine 32, based on the browser side plug-in function for this output, the vulnerability determination unit 43 44 determines that cross-site scripting occurs. This is because the key-value pair 2 (url, javascript: alert ("xss”)) is replaced as test argument information as shown in the column of the test ID “2” in FIG. As a result, "javascript: alert (" xss ”)" is passed to _root.url and the JavaScript is executed with "navigateToURL".
- step S.E. 7 the output function extracted by the plug-in wrapper unit 33 is recorded in the output database 53 at the time of test input.
- FIG. 15B shows an output function corresponding to the plug-in function in the column whose test ID is “2” in FIG.
- the vulnerability determination unit 44 determines that there is a vulnerability based on cross-site scripting by referring to the vulnerability determination database 56 (step S.8), and uses the determination result as the test result database. 57 (step S.9).
- Step S. 6 when the test input unit 43 extracts the NPP_New function having the test ID “3” shown in FIG. 14 and outputs the NPP_New function to the virtual machine 32, based on the browser-side plug-in function for this output, the vulnerability determination unit 43 44 determines that there is no vulnerability. This is because the key-value pair (test, javascript: alert ("xss")) is replaced as test argument information and input to the virtual machine as shown in the column of test ID “3” in FIG. However, because the key is test, a value is entered in _root.test, but no value is entered in _root.url.
- test javascript: alert
- the vulnerability determination unit 44 determines that there is no vulnerability by referring to the vulnerability determination database 56 (step S.8), and records the determination result in the test result database 57 (step S.8). 9) It will be.
- FIG. 15 (c) shows the test results finally recorded in the test result database 57. As shown in FIG. 15C, it is possible to detect vulnerabilities to each mobile code for each test ID.
- the mobile code test apparatus according to the present invention has been described in detail by showing the test apparatus 1 as an example.
- the mobile code test apparatus according to the present invention is not limited to the example shown in the above-described embodiment. It will be apparent to those skilled in the art that various changes and modifications can be made within the scope of the claims, and these are naturally within the technical scope of the present invention. Understood.
- the test input unit 43 outputs all the plug-in functions replaced with the test argument information to the virtual machine 32, and step S. 7, all browser-side plug-in functions corresponding to the output to the virtual machine are extracted by the plug-in wrapper unit 33, and step S. 8, after the vulnerability determination unit 44 determines the vulnerability for the output function names of all the obtained difference functions, the step S. 9, the case where the vulnerability determination unit 44 records the result in the test result database 57 has been described.
- step S.E. 6 the test input unit 43 outputs the plug-in function recorded in the test database 55 to the virtual machine 32 one function at a time. Vulnerability judgment is made in step S.8. 9, the test result database 57 records the vulnerability test result for one function. Returning to step S6, the vulnerability in the next one function is determined. 6 to Step S.
- the configuration may be such that up to 9 processes are repeatedly executed.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、モバイルコードテスト装置、モバイルコードテスト方法およびモバイルコードテスト用プログラムに関するものである。より詳細には、モバイルコードの脆弱性を自動的に判断することが可能なモバイルコードテスト装置、モバイルコードテスト方法およびモバイルコードテスト用プログラムに関するものである。 The present invention relates to a mobile code test apparatus, a mobile code test method, and a mobile code test program. More specifically, the present invention relates to a mobile code test apparatus, a mobile code test method, and a mobile code test program that can automatically determine vulnerabilities in mobile code.
一般的なコンピュータには、ハードウエア的な制御の仲介を行う役割を有すると共に、ユーザの操作性を考慮したインターフェース環境を提供する役割を備えたOS(オペレーティングシステム (Operating System))がインストールされている。さらに、ユーザが、コンピュータを用いてさまざまな処理を行う場合には、その処理に必要なプログラム(アプリケーションソフトウェア)を、コンピュータにインストールすることが必要とされる。 A general computer is installed with an OS (Operating System) having a role of mediating control in hardware and a function of providing an interface environment in consideration of user operability. Yes. Furthermore, when a user performs various processes using a computer, it is necessary to install a program (application software) necessary for the process in the computer.
しかしながら、今日では、直接プログラムをコンピュータにインストールするのではなく、インターネットなどを介して所定のサーバにアクセスすることによって、さまざまなサービスを受けることが可能なアプリケーションプログラムが広く知られている。このようなアプリケーションプログラムは、一般的にウェブアプリケーションプログラムと呼ばれる。ウェブアプリケーションプログラムは、インターネットを介して接続されたサーバ上で稼働され、コンピュータを操作するユーザがブラウザ(ブラウザプログラム)を用いて、サーバの該当ページにアクセスすることによって、サーバにより提供されるさまざまなサービスを受けることが可能となっている。 However, application programs that can receive various services by accessing a predetermined server via the Internet or the like instead of directly installing the program on a computer are widely known today. Such an application program is generally called a web application program. A web application program is run on a server connected via the Internet, and a user operating a computer accesses various pages provided by the server by accessing a corresponding page of the server using a browser (browser program). Service is available.
近年では、ブラウザにより提供されるサービスが、単なる文字情報、画像情報だけに限定されなくなっており、自動的にサーバからプログラムをダウンロードして、ブラウザ上で動画や映像、あるいは、ゲームなどのさまざまなコンテンツを楽しむことが可能となっている。このように、ユーザが意識することなく自動的にダウンロードされ、実行されるプログラムは、モバイルコードと呼ばれる。 In recent years, services provided by browsers are no longer limited to simple text information and image information. Various programs such as videos, videos, and games are automatically downloaded from the server and automatically downloaded from the server. Content can be enjoyed. In this way, a program that is automatically downloaded and executed without the user's awareness is called mobile code.
モバイルコードとして、例えば、Flash(登録商標)、Java(登録商標)、Silverlight(登録商標)などが知られている。これらのモバイルコードを用いることにより、ユーザは、コンピュータのOSに依存することなくさまざまなプログラムをブラウザ上で楽しむことができる。 As mobile codes, for example, Flash (registered trademark), Java (registered trademark), Silverlight (registered trademark), and the like are known. By using these mobile codes, the user can enjoy various programs on the browser without depending on the OS of the computer.
しかしながら、モバイルコードは、インターネット上の匿名性の高いサイトから自動的にダウンロードされて、コンピュータで実行されることが多いため、悪意があるモバイルコードや不正なモバイルコードがダウンロードされて実行されてしまう場合も存在する。もし、悪意のある不正なモバイルコードが、ユーザの知らない間にダウンロードされて、コンピュータで実行されてしまうと、コンピュータに記録されている個人情報などが、実行されたモバイルコードによって漏洩してしまい、ユーザに不測の不利益を与えるおそれがあった。 However, since mobile code is often automatically downloaded from a highly anonymous site on the Internet and executed on a computer, malicious mobile code or malicious mobile code is downloaded and executed. There are cases. If malicious and malicious mobile code is downloaded without the user's knowledge and executed on the computer, personal information recorded on the computer will be leaked by the executed mobile code. , There was a risk of unexpected disadvantage to the user.
図16は、HTML(HyperText Markup Language)のembed要素(音声や動画をウェブページに埋め込む(embedding)ために用いられるタグ)を用いることによって、ユーザのブラウザに表示されたウェブページに、不正なモバイルコードを埋め込む場合を例示したものである。ウェブ作成者は、HTMLのembedタグを用いることにより、該当するウェブページの閲覧者に気づかれないようにしてモバイルコードを実行させることが可能となる。 FIG. 16 shows an example of using an embed element of HTML (HyperText 音 声 Markup Language) (a tag used to embed audio and video in a web page), to display an illegal mobile on a web page displayed on the user's browser. This is an example of embedding a code. By using the HTML embed tag, the web creator can execute the mobile code without being noticed by the viewer of the corresponding web page.
図16に示すHTMLのembedタグに含まれるwidth属性は、モバイルコードが表示されるプラグイン領域の横幅を示し、height属性は、モバイルコードが表示されるプラグイン領域の高さを示している。そしてsrc属性にモバイルコード(図16の場合には、movie.swfが不正なモバイルコードに該当する。)が指定される。このように、embed要素(embedタグ)によって不正なモバイルコードの指定先が記録されたウェブページを、ユーザがブラウザで閲覧すると、自動的にモバイルコードがダウンロードされ、コンピュータにおいて実行されてしまう。 The width attribute included in the HTML embed tag shown in FIG. 16 indicates the width of the plug-in area where the mobile code is displayed, and the height attribute indicates the height of the plug-in area where the mobile code is displayed. Then, a mobile code (movie.swf corresponds to an invalid mobile code in the case of FIG. 16) is designated in the src attribute. In this way, when a user views a web page in which an invalid mobile code designation destination is recorded by an embed element (embed tag) with a browser, the mobile code is automatically downloaded and executed on the computer.
また、モバイルコードは、必ずしもHTML内のembed要素(embedタグ)だけによって指定されるものではない。例えば、ユーザが、ブラウザのURL(Uniform Resource Locator)を指定する欄に、
http://www.example.com/movie.swf
で示されるように、モバイルコード(上述の場合には、movie.swfがモバイルコードに該当する)のアドレスを直接に記入してアクセスすることにより、モバイルコードを自動的にダウンロードさせて実行することが可能となる。
Also, the mobile code is not necessarily specified only by the embed element (embed tag) in HTML. For example, in the field where the user specifies the URL (Uniform Resource Locator) of the browser,
http://www.example.com/movie.swf
As shown in the above, the mobile code is automatically downloaded and executed by directly entering and accessing the address of the mobile code (movie.swf corresponds to the mobile code in the above case) Is possible.
このようなモバイルコードに対する十分な対策を行わない場合には、ウェブ作成者の意図しない処理がモバイルコードにより実行されてしまうおそれが生ずる。 If there is no sufficient countermeasure against such mobile code, there is a possibility that processing unintended by the web creator is executed by the mobile code.
このようなモバイルコードの脆弱性が存在するウェブサイト(ウェブアプリケーション)に対して、モバイルコードの脆弱性を利用した攻撃を行う方法が知られている。例えば、パラメータインジェクションや、クロスサイトスプリクティングなどがその代表例といえる。 [0005] There is known a method of performing an attack using a mobile code vulnerability on a website (web application) where such a mobile code vulnerability exists. For example, parameter injection, cross-site scripting, and the like are typical examples.
パラメータインジェクションとは、モバイルコードの外部から不正なパラメータをモバイルコードに設定することにより、モバイルコードにより不正な攻撃を注入させるモバイルコード特有の攻撃方法である。例えば、この攻撃には、不正ネットワークアクセスやクロスサイトスクリプティングなどが含まれる。 Parameter injection is an attack method specific to mobile code in which an illegal attack is injected by the mobile code by setting an invalid parameter in the mobile code from the outside of the mobile code. For example, this attack includes unauthorized network access and cross-site scripting.
不正なネットワークアクセスとは、パラメータインジェクションで入力したパラメータを実行させて、不正なサイトからデータを受信や、不正なサイトに対してデータを送信させる攻撃である。例えば、この不正なネットワークアクセスにより、ユーザが意図していない動画をダウンロードするなどの被害が発生する。 “Unauthorized network access” is an attack that executes parameters input by parameter injection to receive data from unauthorized sites or send data to unauthorized sites. For example, this illegal network access causes damage such as downloading a video that is not intended by the user.
クロスサイトスプリクティングとは、モバイルコードの実行時にパラメータインジェクションを通じて注入したスクリプトを実行させる攻撃である。例えば、このクロスサイトスクリプティングにより攻撃者がユーザのクッキー情報を奪い、攻撃者がそのユーザになりすますなどの被害が発生する。 ク ロ ス Cross-site scripting is an attack that executes scripts injected through parameter injection when mobile code is executed. For example, this cross-site scripting may cause damage such as an attacker taking the user's cookie information and impersonating the user.
これらの攻撃方法に対するセキュリティ対策として、例えば、サンドボックスを用いてコンピュータセキュリティを向上させる方法や、デジタル署名技術を利用することによりモバイルコードの信頼性の判断を行い、信頼性の高いモバイルコードだけをユーザに実行させる方法などが提案されている(例えば、特許文献1および特許文献2参照)。
Security measures against these attack methods include, for example, a method of improving computer security using a sandbox, and the reliability of mobile codes by using digital signature technology. A method to be executed by a user has been proposed (see, for example,
しかしながら、サンドボックスを用いてセキュリティを高める場合には、モバイルコードの実行範囲(サンドボックスの制御対象)を規定するポリシーファイルを、管理者または開発者が設定する必要がある。このため、管理者などによって設定されるポリシーファイルに記載不備がある場合には、不正なモバイルコードの実行を制限することができず、セキュリティの確保を行うことが困難になってしまうという問題があった。 However, when using a sandbox to increase security, it is necessary for an administrator or developer to set a policy file that defines the execution range of the mobile code (sandbox control target). For this reason, if there is an incomplete description in the policy file set by the administrator, etc., it is not possible to restrict the execution of unauthorized mobile code, making it difficult to ensure security. there were.
また、デジタル署名技術を利用してモバイルコードの信頼性の判断処理を行う場合であっても、モバイルコードそのものに脆弱性が内在する場合には、十分なセキュリティの確保が困難となる場合が多い。 Even when the process of determining the reliability of mobile code is performed using digital signature technology, it is often difficult to ensure sufficient security if the mobile code itself is vulnerable. .
このため、上述したようなセキュリティ技術を用いる場合であっても、現状では、テスターが直接的にブラウザなどを操作して、モバイルコードに関連するさまざまな攻撃性を示すテストを入力するテスト操作を行い、このテスト操作に対するブラウザ上での反応(出力)状態を目視で確認することにより、モバイルコードに対する脆弱性を判断するペネトレーションテストが行われている。 For this reason, even in the case of using the security technology as described above, at present, a test operation in which a tester directly operates a browser or the like and inputs tests indicating various aggressiveness related to mobile code is performed. A penetration test is performed to determine vulnerabilities to mobile code by visually checking the response (output) state on the browser for this test operation.
しかしながら、直接的にテスターがブラウザを操作してテストを行う方法では、単位時間当たりのテスト量が限られるのでテスト効率が低く、さらに、テスト操作における脆弱性テストの網羅性を高めようとすると、膨大な時間がかかってしまうという問題があった。 However, in the method in which the tester directly operates the browser to perform the test, the test amount per unit time is limited, so the test efficiency is low, and furthermore, when trying to increase the comprehensiveness of the vulnerability test in the test operation, There was a problem that it took an enormous amount of time.
さらに、テスト結果を目視で確認する方法では、ブラウザ内部でどのような動作が行われているかを確認することができないため、テスターが脆弱性の発見を見落としてしまうおそれがあった。 Furthermore, in the method of visually checking the test result, it is not possible to check what operation is being performed inside the browser, so the tester may overlook the discovery of the vulnerability.
本発明は上記問題に鑑みてなされたものであり、モバイルコードの脆弱性を自動的に検知することが可能なモバイルコードテスト装置、モバイルコードテスト方法およびモバイルコードテスト用プログラムを提供することを課題とする。 The present invention has been made in view of the above problems, and it is an object of the present invention to provide a mobile code test device, a mobile code test method, and a mobile code test program capable of automatically detecting vulnerabilities in mobile code. And
上記課題を解決するために、本発明に係るモバイルコードテスト装置は、ブラウザとモバイルコードの実行を行う仮想マシンとの間における関数情報の入出力を行うプラグインにおいて、前記ブラウザから前記仮想マシンへ入力される入力関数情報を抽出する第1プラグインラッパ手段と、前記モバイルコードにおける操作手順が巡回経路情報として予め設定され、当該巡回経路情報に基づいて前記モバイルコードにおける操作処理を実行する巡回手段と、前記第1プラグインラッパ手段において抽出された前記入力関数情報の引数情報を、他の引数情報に変更することが可能な引数情報変更手段と、前記モバイルコードに基づく不正な処理を、前記仮想マシンにおいて実行させることが可能な不正入力関数情報の関数名と、前記不正な処理を行う場合に前記不正入力関数情報の引数情報に設定される不正引数情報とが記録されたテスト生成パターン記録手段とを有し、前記第1プラグインラッパ手段は、前記巡回手段による前記モバイルコードの操作処理に応じて前記ブラウザから前記仮想マシンへ入力される入力関数情報を抽出し、前記引数情報変更手段は、前記第1プラグインラッパ手段により抽出された前記入力関数情報の中から、前記テスト生成パターン記録手段に記録された前記不正入力関数情報の関数名と一致する関数名を有する入力関数情報を見つけ出し、さらに、見つけ出された入力関数情報の引数情報を、前記テスト生成パターン記録手段に記録された前記不正引数情報に変更することを特徴とする。 In order to solve the above-described problem, a mobile code test apparatus according to the present invention is a plug-in that inputs and outputs function information between a browser and a virtual machine that executes mobile code, from the browser to the virtual machine. First plug-in wrapper means for extracting input function information to be inputted, and traveling means for executing an operation process in the mobile code based on the traveling path information in which an operation procedure in the mobile code is preset as the traveling path information. And argument information changing means capable of changing the argument information of the input function information extracted by the first plug-in wrapper means to other argument information, and illegal processing based on the mobile code, The function name of the illegal input function information that can be executed in the virtual machine and the illegal processing Test generation pattern recording means in which illegal argument information set in the argument information of the illegal input function information is recorded, and the first plug-in wrapper means includes the mobile code by the circulating means. The input function information input from the browser to the virtual machine in accordance with the operation process is extracted, and the argument information changing means is the input function information extracted by the first plug-in wrapper means. Find out the input function information having a function name that matches the function name of the illegal input function information recorded in the test generation pattern recording means, and further find the argument information of the found input function information in the test generation pattern recording means The illegal argument information recorded in (1) is changed.
また、上述したモバイルコードテスト装置は、前記プラグインにおいて、前記仮想マシンから前記ブラウザへ出力される出力関数情報を抽出する第2プラグインラッパ手段と、前記引数情報変更手段により前記引数情報が前記不正引数情報に変更された前記不正入力関数情報を、前記プラグインにおいて前記仮想マシンに入力させることが可能な不正入力関数情報入力手段と、前記第2プラグインラッパ手段により抽出された前記出力関数情報の関数名と当該出力関数情報の引数情報の内容とに基づいて、前記モバイルコードに対する脆弱性の判断を行う脆弱性判断手段とを有し、前記第2プラグインラッパ手段は、前記不正入力関数情報入力手段により前記仮想マシンに入力された前記不正入力関数情報に対応して前記仮想マシンより出力された不正出力関数情報と、前記巡回手段における前記ブラウザの操作処理に伴って前記ブラウザから前記仮想マシンに入力された入力関数情報に対応して前記仮想マシンより出力された出力関数情報とを抽出し、前記脆弱性判断手段は、前記不正出力関数情報の中から、前記出力関数情報の関数名と一致する関数名を有する不正出力関数情報を見つけ出し、見つけ出された不正出力関数情報の引数情報に、前記引数情報変更手段において変更された前記不正引数情報が含まれる場合に、前記モバイルコードに対する脆弱性が存在するものと判断するものであってもよい。 In the mobile code test apparatus described above, in the plug-in, the argument information is output by the second plug-in wrapper means for extracting output function information output from the virtual machine to the browser, and the argument information changing means. The illegal input function information input means capable of causing the virtual machine to input the illegal input function information changed to the illegal argument information, and the output function extracted by the second plug-in wrapper means Vulnerability determination means for determining vulnerability to the mobile code based on the function name of the information and the content of the argument information of the output function information, and the second plug-in wrapper means includes the unauthorized input Corresponding to the illegal input function information input to the virtual machine by the function information input means, it is output from the virtual machine. And the output function information output from the virtual machine corresponding to the input function information input from the browser to the virtual machine in accordance with the browser operation processing in the patrol means. The vulnerability determination means finds out illegal output function information having a function name that matches the function name of the output function information from the illegal output function information, and argument information of the found illegal output function information Further, when the invalid argument information changed by the argument information changing means is included, it may be determined that there is a vulnerability to the mobile code.
また、上述したモバイルコードテスト装置は、前記プラグインにおいて、前記仮想マシンから前記ブラウザへ出力される出力関数情報を抽出する第2プラグインラッパ手段と、前記引数情報変更手段により前記引数情報が前記不正引数情報に変更された前記不正入力関数情報を、前記プラグインにおいて前記仮想マシンに入力させることが可能な不正入力関数情報入力手段と、前記第2プラグインラッパ手段により抽出された前記出力関数情報の関数名と当該出力関数情報の引数情報の内容とに基づいて、前記モバイルコードに対する脆弱性の判断を行う脆弱性判断手段と、前記モバイルコードに対する脆弱性が存在するものと判断され得る脆弱出力関数情報の関数名と、当該脆弱出力関数情報の引数情報であって前記脆弱性が存在するものと判断され得る脆弱引数情報とが記録された脆弱性判定パターン記録手段とを有し、前記第2プラグインラッパ手段は、前記不正入力関数情報入力手段により前記仮想マシンに入力された前記不正入力関数情報に対応して前記仮想マシンより出力された不正出力関数情報を抽出し、前記脆弱性判断手段は、前記不正出力関数情報の中から、前記脆弱性判定パターン記録手段に記録された前記脆弱出力関数情報の関数名と一致する関数名を有する不正出力関数情報を見つけ出し、見つけ出された不正出力関数情報の引数情報に、前記脆弱性判定パターン記録手段に記録された前記脆弱引数情報が含まれる場合に、前記モバイルコードに対する脆弱性が存在するものと判断するものであってもよい。 In the mobile code test apparatus described above, in the plug-in, the argument information is output by the second plug-in wrapper means for extracting output function information output from the virtual machine to the browser, and the argument information changing means. The illegal input function information input means capable of causing the virtual machine to input the illegal input function information changed to the illegal argument information, and the output function extracted by the second plug-in wrapper means Vulnerability determination means for determining vulnerability to the mobile code based on the function name of the information and the content of the argument information of the output function information, and the vulnerability that can be determined that the vulnerability to the mobile code exists The function name of the output function information and the argument information of the vulnerable output function information, where the vulnerability exists Vulnerability determination pattern recording means recorded with vulnerability argument information that can be determined as, the second plug-in wrapper means the unauthorized input input to the virtual machine by the unauthorized input function information input means The fraudulent output function information output from the virtual machine corresponding to the function information is extracted, and the vulnerability judgment means records the vulnerability recorded in the vulnerability judgment pattern recording means from the fraudulent output function information. The illegal output function information having a function name that matches the function name of the output function information is found, and the argument information of the detected illegal output function information includes the vulnerable argument information recorded in the vulnerability determination pattern recording unit In such a case, it may be determined that there is a vulnerability to the mobile code.
一方で、本発明に係るモバイルコードテスト方法は、モバイルコードの実行が行われる仮想マシンの脆弱性を判断するためのモバイルコードテスト方法であって、前記モバイルコードにおける操作手順が示された巡回経路情報に基づいて、巡回手段が前記モバイルコードにおける操作処理を実行する巡回ステップと、該巡回ステップにおける前記モバイルコードの操作処理に応じて前記ブラウザから前記仮想マシンへ入力される入力関数情報を、第1プラグインンラッパ手段が、前記仮想マシンと前記ブラウザとの間における関数情報の入出力を行うプラグインにおいて抽出する入力関数情報抽出ステップと、該入力関数情報抽出ステップにおいて抽出された前記入力関数情報の中から、前記モバイルコードに基づく不正な処理を前記仮想マシンにおいて実行させることが可能な不正入力関数情報の関数名と一致する関数名を有する入力関数情報を、引数情報変更手段が見つけ出す入力関数情報検出ステップと、該入力関数情報検出ステップにおいて見つけ出された入力関数情報の引数情報を、前記不正な処理を行う場合に前記不正入力関数情報の引数情報として設定される不正引数情報に、前記引数情報変更手段が変更する不正引数情報変更ステップとを有することを特徴とする。 Meanwhile, a mobile code test method according to the present invention is a mobile code test method for determining vulnerabilities of a virtual machine on which mobile code is executed, and a cyclic route showing an operation procedure in the mobile code. Based on the information, a circulating step in which the circulating means executes an operation process in the mobile code, and input function information input from the browser to the virtual machine according to the mobile code operation process in the cyclic step, An input function information extracting step in which a plug-in wrapper means extracts a plug-in that inputs and outputs function information between the virtual machine and the browser; and the input function extracted in the input function information extracting step From the information, illegal processing based on the mobile code is performed in the virtual The input function information detecting step in which the argument information changing means finds input function information having a function name that matches the function name of the illegal input function information that can be executed in the thin, and the input function information detecting step. The argument information changing means for changing the argument information of the input function information to the invalid argument information set as the argument information of the illegal input function information when the illegal processing is performed. It is characterized by that.
また、上述したモバイルコードテスト方法は、前記モバイルコードの操作処理に伴って前記ブラウザから前記仮想マシンに入力された入力関数情報に対応して、前記仮想マシンより出力された出力関数情報を、第2プラグインラッパ手段が前記プラグインにおいて抽出する出力関数情報抽出ステップと、前記不正引数情報変更ステップにおいて前記引数情報が前記不正引数情報に変更された前記不正入力関数情報を、不正入力関数情報入力手段が、前記プラグインにおいて前記仮想マシンに入力させる不正入力関数情報入力ステップと、該不正入力関数情報入力ステップにおいて前記仮想マシンに入力された前記不正入力関数情報に対応して、前記仮想マシンより出力された不正出力関数情報を、前記第2プラグインラッパ手段が前記プラグインにおいて抽出する不正出力関数情報抽出ステップと、該不正出力関数情報抽出ステップにおいて抽出された前記不正出力関数情報の中から、脆弱性判断手段が、前記出力関数情報抽出ステップにおいて抽出された出力関数情報の関数名と一致する関数名を有する不正出力関数情報を見つけ出す不正出力関数情報検出ステップと、該不正出力関数情報検出ステップにおいて見つけ出された前記不正出力関数情報の引数情報に、前記不正引数情報変更ステップにおいて変更された前記不正引数情報が含まれる場合に、前記脆弱性判断手段が、前記モバイルコードに対する脆弱性が存在するものと判断する脆弱性判断ステップとを有するものであってもよい。 In the mobile code test method described above, the output function information output from the virtual machine corresponding to the input function information input from the browser to the virtual machine in accordance with the operation processing of the mobile code, Two plug-in wrapper means to extract the output function information extracted in the plug-in, and to input the illegal input function information in which the argument information is changed to the invalid argument information in the invalid argument information change step In response to the illegal input function information input to the virtual machine in the illegal input function information input step, the illegal input function information input step to be input to the virtual machine in the plug-in, from the virtual machine The second plug-in wrapper means outputs the illegal output function information that has been output. The output function extracted by the vulnerability determination means in the output function information extraction step from the unauthorized output function information extraction step to be extracted in IN and the unauthorized output function information extracted in the unauthorized output function information extraction step An illegal output function information detection step for finding illegal output function information having a function name that matches the function name of the information, and the invalid argument in the invalid output function information found in the illegal output function information detection step The vulnerability determination unit may include a vulnerability determination step of determining that there is a vulnerability to the mobile code when the illegal argument information changed in the information change step is included. .
さらに、上述したモバイルコードテスト方法は、前記モバイルコードの操作処理に伴って前記ブラウザから前記仮想マシンに入力された入力関数情報に対応して、前記仮想マシンより出力された出力関数情報を、第2プラグインラッパ手段が前記プラグインにおいて抽出する出力関数情報抽出ステップと、前記不正引数情報変更ステップにおいて前記引数情報が前記不正引数情報に変更された前記不正入力関数情報を、不正入力関数情報入力手段が、前記プラグインにおいて前記仮想マシンに入力させる不正入力関数情報入力ステップと、該不正入力関数情報入力ステップにおいて前記仮想マシンに入力された前記不正入力関数情報に対応して、前記仮想マシンより出力された不正出力関数情報を、前記第2プラグインラッパ手段が前記プラグインにおいて抽出する不正出力関数情報抽出ステップと、該不正出力関数情報抽出ステップにおいて抽出された前記不正出力関数情報の中から、脆弱性判断手段が、前記モバイルコードに対する脆弱性が存在するものと判断され得る脆弱出力関数情報の関数名と一致する関数名を有する不正出力関数情報を見つけ出す不正出力関数情報検出ステップと、該不正出力関数情報検出ステップにおいて見つけ出された前記不正出力関数情報の引数情報に、前記脆弱性が存在するものと判断され得る脆弱引数情報が含まれる場合に、前記脆弱性判断手段が、前記モバイルコードに対する脆弱性が存在するものと判断する脆弱性判断ステップとを有するものであってもよい。 Further, in the mobile code test method described above, the output function information output from the virtual machine corresponding to the input function information input from the browser to the virtual machine in accordance with the operation processing of the mobile code, Two plug-in wrapper means to extract the output function information extracted in the plug-in, and to input the illegal input function information in which the argument information is changed to the invalid argument information in the invalid argument information change step In response to the illegal input function information input to the virtual machine in the illegal input function information input step, the illegal input function information input step to be input to the virtual machine in the plug-in, from the virtual machine The second plug-in wrapper means outputs the illegal output function information that has been output. From the unauthorized output function information extraction step to be extracted in the login, and the unauthorized output function information extracted in the unauthorized output function information extraction step, the vulnerability determination means determines that there is a vulnerability to the mobile code Illegal output function information detection step for finding illegal output function information having a function name that matches the function name of the vulnerable output function information that can be performed, and argument information of the illegal output function information found in the illegal output function information detection step A vulnerability determination step in which the vulnerability determination means determines that there is a vulnerability to the mobile code when vulnerability argument information that can be determined that the vulnerability exists is included in It may be.
また、本発明に係るモバイルコードテスト用プログラムは、モバイルコードの実行が行われる仮想マシンの脆弱性判断をコンピュータにおいて行うためのモバイルコードテスト用プログラムであって、コンピュータに、前記モバイルコードにおける操作手順が示された巡回経路情報に基づいて、前記モバイルコードにおける操作処理を実行する巡回機能と、該巡回機能に基づく前記モバイルコードの操作処理に応じて前記ブラウザから前記仮想マシンへ入力される入力関数情報を、前記仮想マシンと前記ブラウザとの間における関数情報の入出力を行うプラグインにおいて抽出する入力関数情報抽出機能と、該入力関数情報抽出機能に基づいて抽出された前記入力関数情報の中から、前記モバイルコードに基づく不正な処理を前記仮想マシンにおいて実行させることが可能な不正入力関数情報の関数名と一致する関数名を有する入力関数情報を見つけ出す入力関数情報検出機能と、該入力関数情報検出機能に基づいて見つけ出された入力関数情報の引数情報を、前記不正な処理を行う場合に前記不正入力関数情報の引数情報として設定される不正引数情報に変更する不正引数情報変更機能とを実現させるためのモバイルコードテスト用プログラムであることを特徴とする。 The mobile code test program according to the present invention is a mobile code test program for performing vulnerability determination of a virtual machine in which execution of mobile code is performed in a computer, and the computer performs an operation procedure in the mobile code. A cyclic function for executing an operation process in the mobile code based on the cyclic route information indicated by the input, and an input function input to the virtual machine from the browser according to the mobile code operation process based on the cyclic function An input function information extraction function that extracts information in a plug-in that inputs and outputs function information between the virtual machine and the browser, and the input function information extracted based on the input function information extraction function From the virtual machine, illegal processing based on the mobile code is performed. An input function information detection function for finding input function information having a function name that matches the function name of the illegal input function information that can be executed in the function, and input function information found based on the input function information detection function It is a mobile code test program for realizing an invalid argument information changing function for changing argument information to illegal argument information set as argument information of the illegal input function information when performing the illegal processing. Features.
さらに、上述したモバイルコードテスト用プログラムは、前記コンピュータに、前記モバイルコードの操作処理に伴って前記ブラウザから前記仮想マシンに入力された入力関数情報に対応して、前記仮想マシンより出力された出力関数情報を、前記プラグインにおいて抽出する出力関数情報抽出機能と、前記不正引数情報変更機能に基づいて前記引数情報が前記不正引数情報に変更された前記不正入力関数情報を、前記プラグインにおいて前記仮想マシンに入力させる不正入力関数情報入力機能と、該不正入力関数情報入力機能に基づいて前記仮想マシンに入力された前記不正入力関数情報に対応して、前記仮想マシンより出力された不正出力関数情報を、前記プラグインにおいて抽出する不正出力関数情報抽出機能と、前記不正出力関数情報抽出機能に基づいて抽出された前記不正出力関数情報の中から、前記出力関数情報抽出機能に基づいて抽出された出力関数情報の関数名と一致する関数名を有する不正出力関数情報を見つけ出す不正出力関数情報検出機能と、該不正出力関数情報検出機能に基づいて見つけ出された前記不正出力関数情報の引数情報に、前記不正引数情報変更機能に基づいて変更された前記不正引数情報が含まれる場合において、前記モバイルコードに対する脆弱性が存在するものと判断する脆弱性判断機能とを実現させるためのモバイルコードテスト用プログラムであってもよい。 Further, the mobile code test program described above is output to the computer from the virtual machine in response to input function information input from the browser to the virtual machine in accordance with the operation processing of the mobile code. Output function information extraction function for extracting function information in the plug-in, and the illegal input function information in which the argument information is changed to the invalid argument information based on the illegal argument information change function, in the plug-in An unauthorized input function information input function to be input to the virtual machine, and an unauthorized output function output from the virtual machine in response to the unauthorized input function information input to the virtual machine based on the unauthorized input function information input function An illegal output function information extraction function for extracting information in the plug-in, and the illegal output function Incorrect output function information having a function name that matches the function name of the output function information extracted based on the output function information extraction function from among the unauthorized output function information extracted based on the information extraction function The argument information of the output function information detection function and the illegal output function information found based on the illegal output function information detection function includes the invalid argument information changed based on the illegal argument information change function. In some cases, it may be a mobile code test program for realizing a vulnerability determination function for determining that there is a vulnerability to the mobile code.
また、上述したモバイルコードテスト用プログラムは、前記コンピュータに、前記モバイルコードの操作処理に伴って前記ブラウザから前記仮想マシンに入力された入力関数情報に対応して、前記仮想マシンより出力された出力関数情報を、前記プラグインにおいて抽出する出力関数情報抽出機能と、前記不正引数情報変更機能に基づいて前記引数情報が前記不正引数情報に変更された前記不正入力関数情報を、前記プラグインにおいて前記仮想マシンに入力させる不正入力関数情報入力機能と、該不正入力関数情報入力機能に基づいて前記仮想マシンに入力された前記不正入力関数情報に対応して、前記仮想マシンより出力された不正出力関数情報を、前記プラグインにおいて抽出する不正出力関数情報抽出機能と、前記不正出力関数情報抽出機能に基づいて抽出された前記不正出力関数情報の中から、前記モバイルコードに対する脆弱性が存在するものと判断され得る脆弱出力関数情報の関数名と一致する関数名を有する不正出力関数情報を見つけ出す不正出力関数情報検出機能と、該不正出力関数情報検出機能に基づいて見つけ出された前記不正出力関数情報の引数情報に、前記脆弱性が存在するものと判断され得る脆弱引数情報が含まれる場合において、前記モバイルコードに対する脆弱性が存在するものと判断する脆弱性判断機能とを実現させるためのモバイルコードテスト用プログラムであってもよい。 The mobile code test program described above is output to the computer from the virtual machine in response to input function information input from the browser to the virtual machine in accordance with the mobile code operation process. Output function information extraction function for extracting function information in the plug-in, and the illegal input function information in which the argument information is changed to the invalid argument information based on the illegal argument information change function, in the plug-in An unauthorized input function information input function to be input to the virtual machine, and an unauthorized output function output from the virtual machine in response to the unauthorized input function information input to the virtual machine based on the unauthorized input function information input function Information output function for extracting information in the plug-in, and the illegal output function information Among the unauthorized output function information extracted based on the extraction function, the unauthorized output function information having a function name that matches the function name of the vulnerable output function information that can be determined to be vulnerable to the mobile code. The illegal output function information detection function to be found and the argument information of the illegal output function information found based on the illegal output function information detection function includes vulnerable argument information that can be determined that the vulnerability exists. In some cases, it may be a mobile code test program for realizing a vulnerability determination function for determining that there is a vulnerability to the mobile code.
本発明に係るモバイルコードテスト装置、モバイルコードテスト方法およびモバイルコードテスト用プログラムでは、ブラウザの操作処理に基づいて仮想マシンへ入力された入力関数情報の中から、不正入力関数情報の関数名と一致した関数名を有する入力関数を見つけ出し、見つけ出された入力関数情報の引数情報を不正引数情報に変更することにより、モバイルコードの脆弱性判断に用いる不正入力関数情報を自動的に生成することができる。 In the mobile code test apparatus, the mobile code test method, and the mobile code test program according to the present invention, the function name of the illegal input function information matches the input function information input to the virtual machine based on the browser operation processing. By detecting the input function having the function name and changing the argument information of the found input function information to invalid argument information, it is possible to automatically generate illegal input function information for use in mobile code vulnerability determination it can.
また、本発明に係るモバイルコードテスト装置、モバイルコードテスト方法およびモバイルコードテスト用プログラムでは、抽出された不正出力関数情報の中から、抽出された出力関数情報の関数名と一致する関数名を有する不正出力関数情報を見つけ出し、見つけ出された不正出力関数情報の引数情報に不正引数情報が含まれる場合に、モバイルコードに対する脆弱性が存在すると判断することが可能となる。 The mobile code test apparatus, mobile code test method, and mobile code test program according to the present invention have a function name that matches the function name of the extracted output function information from the extracted illegal output function information. When illegal output function information is found, and invalid argument information is included in the argument information of the found illegal output function information, it is possible to determine that there is a vulnerability to mobile code.
以下、本発明に係るモバイルコードテスト装置について、その一例を示しつつ図面を用いて詳細に説明を行う。図1は、モバイルコードテスト装置(以下、テスト装置とする。)が、ネットワークを介してサーバに接続されている様子を示した概略図である。テスト装置1は、ネットワーク接続機能(後述する通信部など)を備えており、このネットワーク接続機能を利用することによりネットワーク2を介して接続されるサーバ3へ、さまざまなウェブ情報(ウェブページ、動画、音楽など)の要求を行ったり、サーバ3からウェブ情報を取得したりすることが可能となっている。
Hereinafter, the mobile code test apparatus according to the present invention will be described in detail with reference to the drawings while showing an example thereof. FIG. 1 is a schematic diagram showing a mobile code test device (hereinafter referred to as a test device) connected to a server via a network. The
なお、ネットワーク2は、世界的に広く公開されており、数多くの人たちと情報の送受信を行うことが可能なインターネットであってよく、また、一定のユーザの間だけに情報の送受信が限定されるLAN(ローカルエリアネットワーク)であってもよい。
The
サーバ3は、所謂、ウェブサーバであって、ネットワーク2を介してテスト装置1にウェブ情報を提供する役割を有している。また、テスト装置1からの要求に応じて、モバイルコードなどをダウンロードさせる機能を有している。
The
なお、図1には、説明の便宜上、テスト装置1とサーバ3とが1台ずつしか示されていないが、テスト装置1およびサーバ3の接続台数はそれぞれ1台ずつには限定されず、複数台ずつ接続されるものであってもよい。
In FIG. 1, for convenience of explanation, only one
図2は、テスト装置1の概略構成を示したブロック図である。テスト装置1は、本体部10とディスプレイ部11と操作部12とによって概略構成されている。本体部10は、図2に示すように、制御部20と、データ記憶部21と、通信部22とを有している。
FIG. 2 is a block diagram showing a schematic configuration of the
データ記憶部21は、ハードディスク、SSD(Solid State Drive)などの補助記憶装置により構成されている。データ記憶部21には、制御部20において実行されるモバイルコードのテスト処理に関するプログラムが記録されている。また、データ記憶部21は、図6に示す巡回経路情報データベース50、テスト生成パターンデータベース(テスト生成パターン記録手段)54、テストデータベース55、巡回時入力データベース51、巡回時出力データベース52、テスト入力時出力データベース53、脆弱性判定データベース(脆弱性判定パターン記録手段)56、テスト結果データベース57として、各種情報を記録する役割を有している。その詳細については後述する。
The
通信部22は、制御部20の指示に従って、必要な情報をネットワーク2を介してサーバ3に送信すると共に、サーバ3より受信した情報をデータ記憶部21に記録する役割を有している。通信部22は、LANボードやLANカードなどの一般的なNIC(Network Interface Card)により構成されている。
The
制御部20は、データ記憶部21に記録されるプログラムに従って、後述するモバイルコードのテスト処理を行う役割を有している。また、制御部20は、データ記憶部21に記録されるプログラムに応じて、ブラウザの起動および終了を行うことができ、さらに、ブラウザ操作に基づくデータの送受信を、通信部22を介してサーバ3と行うことが可能となっている。
The
制御部20は、図示を省略したCPU(Central Processing Unit)と、RAM(Random Access Memory)とを有している。CPUは、制御部20におけるモバイルコードテスト処理を実質的に実行する役割を有している。RAMは、CPUの処理に利用されるワークエリアとして用いられる。
The
ディスプレイ部11は、制御部20により実行されるブラウザ(ブラウザプログラム)などのアプリケーション画像や、モバイルコードテスト処理における処理過程や処理結果などの情報等を、ユーザに対して視認可能に表示させる役割を有している。ディスプレイ部11には、液晶ディスプレイや、CRTディスプレイなどの一般的な表示装置が用いられる。
The
操作部12は、ユーザがモバイルコードテスト処理に必要な設定や条件などを入力したり、データ記憶部21に記録される各種データベースのデータを変更したりする操作に用いられる。操作部12は、一般的なキーボードやマウスなどにより構成される。
The
図3は、テスト装置1におけるモバイルコードの処理機能を説明するための機能ブロックを示した図である。制御部20が、データ記憶部21に記録されたプログラムに従って、ブラウザを起動し、モバイルコードによる処理を実行する場合、モバイルコードによる処理は、図3に示すように、プラグイン31を介して仮想マシン32により実行される。
FIG. 3 is a diagram showing functional blocks for explaining the mobile code processing function in the
具体的には、図3に示すように、テスト装置1は、Windows(登録商標)などのOS(オペレーティングシステム)34を介してハードウエア35の制御処理を行っており、このOS34において仮想マシン32が稼働されている。仮想マシン32は、プラグイン31と呼ばれるブラウザの処理に関する拡張機能部を介してブラウザ30と情報の送受信を行う。
Specifically, as shown in FIG. 3, the
具体的に、プラグイン31は、共有オブジェクト形式のモバイルコードを実行する環境であり、本実施の形態に係るプラグイン31においては、標準化され、各種ブラウザで使用されているNetscape Plugin Interfaceに基づいてその処理が規定されている。Netscape Plugin Interfaceには、プラグインサイドのプラグインAPI(Application Programming Interface)とブラウザサイドのプラグインAPI(Application Programming Interface)とが設けられており、このプラグインサイドのプラグインAPIとブラウザサイドのプラグインAPIとを利用することにより、ブラウザ30と仮想マシン32との間の情報の入出力および必要な処理の実行が行われる。
Specifically, the plug-in 31 is an environment for executing a mobile code in a shared object format. In the plug-in 31 according to the present embodiment, the plug-in 31 is standardized and based on Netscape Plugin Interface used in various browsers. The processing is defined. Netscape Plugin Interface includes a plug-in-side plug-in API (Application-Programming Interface) and a browser-side plug-in API (Application-Programming Interface), and this plug-in-side plug-in API and browser-side plug-in API. Are used to input / output information between the
具体的に、ブラウザ30から仮想マシン32への情報の入力は、プラグインサイドのプラグインAPIの関数(以下、プラグインサイドのプラグイン関数という。)の呼び出しにより行われる。プラグインサイドのプラグインAPIには、ブラウザ30がプラグイン31を呼び出す処理が含まれている。
Specifically, input of information from the
一方で、仮想マシン32からブラウザ30への情報の出力は、ブラウザサイドのプラグインAPIの関数(以下、ブラウザサイドのプラグイン関数という)の呼び出しにより行われる。また、ブラウザサイドのプラグインAPIには、プラグイン31からブラウザ30を呼び出す処理が含まれている。図4は、プラグインサイドおけるプラグイン関数の一覧を示している。また、図5は、ブラウザサイドにおけるプラグイン関数の一覧を示している。
On the other hand, information is output from the
さらに、本実施の形態に係るテスト装置1では、プラグイン31におけるプラグインサイドのプラグイン関数の呼び出し(入力)と、ブラウザサイドのプラグイン関数の呼び出し(出力)とを監視するプラグインラッパ部(第1プラグインンラッパ手段、第2プラグインンラッパ手段)33が設けられている。
Furthermore, in the
プラグインラッパ部33は、必要に応じてプラグインのDLL(ダイナミックリンクライブラリ)をフックし、どのような関数が呼び出されているか監視して、呼び出された関数の情報を、データ記憶部21のデータベース(巡回時入力データベース51、巡回時出力データベース52、テスト入力時出力データベース53)に記録する。
The plug-in
具体的には、モバイルコードテストにおいて、巡回部(巡回手段)41による自動巡回処理が開始されてブラウザの操作が自動的に行われた場合、プラグインラッパ部33は、この巡回操作に伴うプラグインサイドのプラグイン関数を検出して、巡回時入力データベース51に記録する役割を有している。
Specifically, in the mobile code test, when the automatic patrol process by the patrol unit (the patrol unit) 41 is started and the browser operation is automatically performed, the plug-in
また、プラグインラッパ部33は、巡回部41による自動巡回処理が行われた場合におけるブラウザサイドのプラグイン関数を検出して、巡回時出力データベース52に記録する役割を有している。
Further, the plug-in
さらに、プラグインラッパ部33は、プラグインサイドのプラグイン関数の巡回引数情報がテスト引数情報に書き換えられた場合に検出されるブラウザサイドのプラグイン関数を、テスト入力時出力データベース53に記録する役割を有している。
Further, the plug-in
なお、プラグインラッパ部33においてDLLをフックする技術に関しては、マイクロソフト公式解説書の「Advanced Windows 第5版 下巻,ジェフリー・リッチャー(Jeffrey Richter),クリストフ・ナザー(Christophe Nasarre)著,(株)クイーブ(訳者),日経BPソフトプレス,2008年10月27日発行,p.279-338」に詳細に記載されているため、ここでの説明は省略する。
As for the technology for hooking DLL in the plug-in
本実施の形態に係るテスト装置1では、上述するように、プラグインラッパ部33が設けられ、プラグイン31におけるブラウザ30へのプラグイン関数の呼び出し、および仮想マシン32へのプラグイン関数の呼び出しを監視する。そして、必要に応じて、モバイルコードの脆弱性テストに利用可能な情報を書き込んだ(埋め込んだ)関数を生成し、生成された関数を用いてプラグイン31より仮想マシン32に対してモバイルコード処理を実行させ、実行させたモバイルコードに対して仮想マシン32から出力された関数を抽出することにより、モバイルコードの脆弱性の判断を行う。
In the
従来から一般的に行われているモバイルコードの脆弱性テスト手法では、上述したブラウザ30のテキスト入力部やURL入力部にさまざまなテスト情報を手作業で入力することが多かったが、このようなテスト手法では、そのテスト作業により、ブラウザ30から仮想マシン32に対してどのような情報が伝達され、どのような出力が仮想マシン32からブラウザ30へ戻っているのかを把握することが困難であった。
In the conventional mobile code vulnerability testing method, various test information is often manually input to the text input unit or URL input unit of the
本実施の形態に係るテスト装置1では、プラグイン31における関数の監視および関数の変更処理により、より仮想マシン32に近いレベルでモバイルコードに関するペネトレーションテストを行うことが可能となり、より詳細でより緻密なレベルでモバイルコードの脆弱性判断を行うことができる。
In the
図6は、制御部20が、データ記憶部21に記憶されるプログラムに従ってモバイルコードのテスト処理を実行する場合における処理内容を、その処理機能毎に機能ブロックで示したブロック図である。また、図6に示すブロック図には、各機能ブロックにおける処理に利用されるデータが記録されるデータベースが示されている。
FIG. 6 is a block diagram showing the processing contents in the case where the
本実施の形態に係るテスト装置1においては、図6に示すように、機能ブロックとして、プラグインラッパ部33、テスト設定部40、巡回部41、テスト生成部42、テスト入力部(引数情報変更手段、不正入力関数情報入力手段)43、脆弱性判定部(脆弱性判断手段)44が設けられている。また、本実施の形態に係るテスト装置1においては、図6に示すように、データベースとして、巡回経路情報データベース50、巡回時入力データベース51、巡回時出力データベース52、テスト入力時出力データベース53、テスト生成パターンデータベース54、テストデータベース55、脆弱性判定データベース56、テスト結果データベース57が設けられている。
In the
本実施の形態に係るテスト装置1では、制御部20がデータ記憶部21に記録されるプログラムを実行することによって、図6に示した各機能ブロックの機能を実現する。また、図6に示した各データベースは、上述したように、データ記憶部21にそれぞれ記録されている。
In the
次に、図6に示した各機能ブロックおよび各データベースについて説明する。 Next, each functional block and each database shown in FIG. 6 will be described.
プラグインラッパ部33は、上述したように、ブラウザ30と仮想マシン32との間の入出力を、プラグイン31におけるプラグインサイドのプラグイン関数およびブラウザサイドのプラグイン関数を抽出(フック)して、各データベースに記録する役割を有している。
As described above, the plug-in
抽出されたプラグイン関数の情報は、テスト処理の処理過程に応じて異なるデータベースに記録される。例えば、巡回部41により自動巡回が行われた場合において、プラグインラッパ部33は、巡回部41における処理内容に対応するプラグインサイドのプラグイン関数を抽出して、巡回時入力データベース51に記録させる。
The information of the extracted plug-in function is recorded in different databases depending on the test process. For example, when an automatic tour is performed by the
また、同様に、巡回部41により自動巡回が行われた場合において、プラグインラッパ部33は、巡回部41における処理内容に対応するブラウザサイドのプラグイン関数を抽出して、巡回時出力データベース52に記録させる。
Similarly, when an automatic tour is performed by the
さらに、プラグインラッパ部33は、巡回部41による2度目の自動巡回時に抽出されたプラグインサイドのプラグイン関数の巡回時引数情報が、テスト入力部43によりテスト引数情報に書き換えられて仮想マシン32で実行された場合に、仮想マシン32から出力されたブラウザサイドのプラグイン関数を抽出して、テスト入力時出力データベース53に記録させる。なお、テスト入力部43が、プラグインサイドのプラグイン関数の巡回時引数情報をテスト引数情報に書き換える処理については、後述する。
Furthermore, the plug-in
テスト設定部40は、テスト対象となるモバイルコードの設定を行う役割を有している。このテスト設定部40において設定されたモバイルコードが、テスト装置1におけるテスト対象となる。なお、テスト設定部40は試験対象となるモバイルコードの設定を行うだけであるため、予めテスト対象となるモバイルコードの設定情報(指定情報)をデータ記憶部21などに記録しておくことにより、テスト設定部40を積極的に設けなくても、テスト装置1によるモバイルコードのテスト処理を行うことが可能である。
The
巡回部41は、テスターが予め作成した巡回経路情報に従って、ブラウザ30に対する所定の操作を行う役割を有している。具体的には、実際にテスターがディスプレイ部11に表示されるブラウザ30を操作部12で操作すると、巡回部41が、その操作手順を巡回経路情報として、巡回経路情報データベース50に記録させる。また、操作部12の操作により既に巡回経路情報が作成されている場合には、新たに巡回経路情報を記録することなく、巡回経路情報データベース50に記録されている巡回経路情報を利用することができる。
The traveling
巡回部41では、巡回経路情報に基づいて、ブラウザにおけるさまざまな操作を自動的に行う。この巡回部41による操作を実現するソフトウェアとして、例えば、「iMacros」が知られている。「iMacros」は、実際にテスターが操作部12を操作してブラウザの操作を行った場合に、その操作過程を記録して、その後に自動的に再現させることができる機能を有している。このソフトウェアを利用することにより、巡回経路情報に基づいて自動的にブラウザの操作を行わせることが可能となる。
The
また、Adobe社のFlash(登録商標)に関するモバイルコードの脆弱性テストを行う場合には、Adobe Flex(登録商標)と呼ばれるソフトウェアを用いることにより、同様に自動的な操作処理を制御部20で実現することが可能となる。
In addition, when performing a mobile code vulnerability test related to Flash (registered trademark) of Adobe, automatic control processing is realized by the
巡回時入力データベース51には、巡回部41によって実行された自動巡回処理(ブラウザ30の操作処理)に応じて、プラグインラッパ部33で抽出されたプラグインサイドのプラグイン関数が記録される。巡回部41によって実際にブラウザ30などの操作が行われる場合、ブラウザ30に対して1つの操作(アクション)が行われたとしても、ブラウザ30からプラグイン31に対して要求されるプラグイン関数は、1つとは限らず、複数の関数に基づく要求となる場合も存在する。
The plug-in side plug-in function extracted by the plug-in
このような場合、今までのように、ブラウザで直接的に操作を行ってペネトレーションテストを行うと、その操作に伴うブラウザ30から仮想マシン32へのさまざまな要求を詳細に判断することができなかった。しかしながら、巡回部41による操作に対応するプラグインサイドのプラグイン関数をプラグインラッパ部33で抽出して、巡回時入力データベース51に記録することにより、ブラウザ30から仮想マシン32に対するより詳細な要求を求めることが可能となる。
In such a case, if a penetration test is performed by directly operating with a browser as in the past, various requests from the
巡回時出力データベース52には、巡回部41によって実行されたブラウザ30の操作に応じて、プラグインラッパ部33で抽出されたブラウザサイドのプラグイン関数が記録される。このように、巡回部41による操作に対応するブラウザサイドのプラグイン関数をプラグインラッパ部33で抽出して、巡回時出力データベース52に記録することにより、巡回時入力データベース51に記録されるプラグインサイドのプラグイン関数の内容と、このプラグイン関数に対応するようにして巡回時出力データベース52に記録されるブラウザサイドのプラグイン関数の内容とを、容易に比較できるようになる。
In the
図7(a)は、巡回時入力データベース51に記録されたプラグインサイドにおけるプラグイン関数を例示したテーブルであり、図7(b)は、図7(a)に示されたプラグイン関数に対応するようにして巡回時出力データベース52に記録された、ブラウザサイドのプラグイン関数を例示したテーブルである。
FIG. 7A is a table illustrating plug-in functions on the plug-in side recorded in the
テスト生成部42は、巡回時入力データベース51に記録されたプラグインサイドのプラグイン関数に基づいて、モバイルコードテスト用のテストパターンを生成する役割を有している。
The
まず、テスト生成部42は、巡回部41における1つの操作(アクション)により生成されたプラグイン関数のまとまりを入力集合として、巡回時入力データベース51より読み出す。そして、テスト生成部42は、入力集合に含まれ得る複数のプラグイン関数から、テスト生成パターンデータベース54よりプラグイン関数の関数名に該当するプラグイン関数を抽出し、その関数の集合をテスト集合とする。テスト生成部42は、テスト集合のプラグイン関数に対してテストパターンがテスト引数情報として追加されたプラグイン関数を生成して、テストデータベース55に記録させる。
First, the
例えば、パラメータインジェクションを行う場合、ウェブページのHTML(HTMLのソースコードに記載されるタグなど)、URL(URLへの入力など)、およびウェブページにおいてユーザが入力を行うモバイルコードのUIのテキストフィールド(UI(User Interface、ユーザインターフェース)のテキストフィールド)のいずれからであっても不正な変数を入力(注入)することができる。 For example, when performing parameter injection, a web page HTML (such as a tag described in the HTML source code), a URL (such as input to a URL), and a mobile text UI text field that the user enters on the web page An illegal variable can be input (injected) from any of the (text fields of UI (User Interface)).
もしも、HTMLまたはURLから不正な変数が入力された場合には、図4に示したプラグインサイドのプラグイン関数のうち、プラグインのインスタンスを生成するインスタンス生成関数であるNPP_New関数の引数 argn, argvに、不正な変数が入力されることになる。ここで、argnにはキーが入力され、argvには値が入力される。したがって、ウェブサイトにおいてモバイルコードのテスト処理を行う場合には、NPP_New関数におけるargnとargvとに対して、テスト生成パターンデータベース54より取得したテストパターンがテスト引数情報として追加されることになる。
If an invalid variable is input from HTML or URL, among the plug-in functions shown in FIG. 4, arguments argn, あ る argv of the NPP_New function which is an instance generation function for generating a plug-in instance Incorrect variables will be entered. Here, a key is input to argn, and a value is input to argv. Accordingly, when the mobile code test process is performed on the website, the test pattern acquired from the test
また、UIのテキストフィールドから不正な変数が入力された場合には、テキスト入力取得関数の引数に、不正な変数が入力されることになる。テキスト入力取得関数は、Netscape Pluginでは規定されておらず、プラットフォームに依存された関数である。このため、UIのテキストフィールドに関してモバイルコードの脆弱性テストを行う場合には、テキスト入力取得関数の引数に、テスト生成パターンデータベース54より取得したテストパターンが(テスト引数情報として)追加されることになる。
Also, when an invalid variable is input from the UI text field, the incorrect variable is input to the argument of the text input acquisition function. The text input acquisition function is not defined in Netscape Plugin and is a platform-dependent function. For this reason, when performing a mobile code vulnerability test on a UI text field, the test pattern acquired from the test
これらのテストパターンとして、不正なネットワークアクセスあるいはクロスサイトスクリプティングを引き起こすパターンを入力する。不正なネットワークアクセスに対するテストパターンとして、キー(キー情報)と値(値情報)とを1組のペア情報として捉え、ペアの情報のうち値(値情報)に対して不正なURLを入力させる。URLの入力を行う場合には、脆弱性判定部44ですぐに脆弱性が検知できるように、値(値情報)に識別子「http://www.example.com」を埋め込む。この識別子「http://www.example.com」は、テスト装置1における処理のために予めテスターが設定したテスト用URLの一例を示したものである。
• Enter a pattern that causes unauthorized network access or cross-site scripting as these test patterns. As a test pattern for unauthorized network access, a key (key information) and a value (value information) are regarded as a pair of pair information, and an unauthorized URL is input to the value (value information) of the pair information. When inputting the URL, the identifier “http://www.example.com” is embedded in the value (value information) so that the
クロスサイトスクリプティングのテストパターンには、キーと値とのペア情報として不正なJavaScriptを入力する。その際、脆弱性判定部44ですぐに不正な設定が検知できるように、値(値情報)に識別子「javascript:alert("xss")」を埋め込む。この識別子「javascript:alert("xss")」は、テスト装置1における処理のために予めテスターが設定したテスト用JavaScriptコードの一例を示したものである。
In the cross-site scripting test pattern, input invalid JavaScript as key / value pair information. At this time, the identifier “javascript: alert (“ xss ”)” is embedded in the value (value information) so that the
下記のURLは、URLを置き換えてパラメータを入力する場合の例である。
http://www.example.com/movie.swf?url=http://www.example.com
URLのリクエストにHTTPのGetメソッドを用いて「?url=http://www.example.com」を付け加えることにより、モバイルコードに不正な変数を注入することができる。
The following URL is an example in which parameters are input by replacing the URL.
http://www.example.com/movie.swf?url=http://www.example.com
By adding “? Url = http: //www.example.com” to the URL request using the HTTP Get method, an invalid variable can be injected into the mobile code.
一方で、図8(a)は、ウェブページのHTMLに不正なパラメータを埋め込んだ例を示したものである。図8(a)に示すHTMLにおいても、図16に示したように、HTMLのembedタグを用いて、src属性にHTTPのGetメソッドを用いて「?url=http://www.example.com」を付け加えてある。このように、src属性に「?url=http://www.example.com」を付け加えておくことにより、モバイルコードに不正な変数を注入することが可能となる。 On the other hand, FIG. 8A shows an example in which an invalid parameter is embedded in HTML of a web page. Also in the HTML shown in FIG. 8A, as shown in FIG. 16, using the HTML embed tag and using the HTTP Get method for the src attribute, “? Url = http: //www.example.com” "Is added. Thus, by adding “? Url = http: //www.example.com” to the src attribute, it is possible to inject an invalid variable into the mobile code.
なお、図8(b)は、テスト生成パターンデータベース54の一例を示したテーブルである。テスト生成パターンデータベース54には、図8(b)に示すように、テストパターンID、巡回時関数呼び出し番号、関数名、巡回時引数情報およびテストパターンの5種類の情報が記録されている。
FIG. 8B is a table showing an example of the test
図8(b)に示すように、テストパターンIDが「1」の場合には、テストパターンとして、「url=http://www.example.com」が追加されることになる。つまり、巡回部41における2回目の巡回(以下、テスト巡回という)では、テストパターンIDが「1」であるNPP_Newの引数情報が、
argn[0]=src, argv[0]=test.swf, argn[1]=url, argv[1]=http://www.example.com, argc=2 となる。
As shown in FIG. 8B, when the test pattern ID is “1”, “url = http: //www.example.com” is added as the test pattern. That is, in the second round (hereinafter referred to as a test round) in the
argn [0] = src, argv [0] = test.swf, argn [1] = url, argv [1] = http: //www.example.com, argc = 2.
また、テストパターンIDが「2」の場合には、テストパターンとして、「url=javascript:alert("xss")」が追加されることになる。つまり、巡回部41におけるテスト巡回では、テストパターンIDが「2」であるNPP_Newの引数情報が, argn[0]=src, argv[0]=test.swf, argn[1]=url, argv[1]=javascript:alert("xss"), argc=2となる。
In addition, when the test pattern ID is “2”, “url = javascript: alert (“ xss ”)” is added as a test pattern. That is, in the test tour in the
このようにしてテストパターンに対応する引数が追加されたプラグイン関数は、テストデータベース55に記録される。図9(a)は、テストデータベース55に記録されるプラグイン関数およびその引数情報などを例示したテーブルである。図9(a)においては、上述した図8(b)のテスト生成パターンデータベース54に記録されるテストパターンに基づいて、テスト生成部42で引数情報が追加されたプラグイン関数などが記録されている。
The plug-in function to which the argument corresponding to the test pattern is added in this way is recorded in the
さらに、UIのテキストフィールドに関してモバイルコードの脆弱性テストを行う場合においても同様に、テキスト入力取得関数の巡回時引数情報に、テスト生成パターンデータベース54より取得したテストパターンをテスト引数情報として追加する。この追加処理により、テスト巡回用のプラグイン関数と引数情報とを生成して、テストデータベース55に記録させることができる。
Furthermore, when a mobile code vulnerability test is performed on the UI text field, the test pattern acquired from the test
テスト入力部43は、テスト引数情報が追加されたプラグイン関数の集合を、テスト巡回時に用いるプラグインサイドのプラグイン関数として、プラグイン31において仮想マシン32に入力させる役割を有している。
The
まず、テスト入力部43は、テスト引数情報が追加されたプラグイン関数をテストデータベース55より読み込んで、巡回部41における1回目の自動巡回処理のプラグイン関数から、テストデータベース55に含まれているプラグイン関数名に一致するプラグイン関数をテスト集合とする。そして、テスト入力部43は、巡回部41に対して、1回目の自動巡回処理と同じ巡回経路による巡回処理(テスト巡回処理)を実行させる。そして、テスト入力部43は、2回目の自動巡回処理(テスト巡回処理)におけるプラグインサイドのプラグイン関数をプラグインラッパ部33において抽出させ、テスト集合に該当するプラグイン関数の巡回時引数情報がテスト引数情報に置き換えられたプラグイン関数を、仮想マシン32に対して出力する。
First, the
このように、巡回部41における1回目の巡回経路情報と同じ巡回経路情報に基づいて、テスト巡回処理(2回目の巡回処理)を行うことにより、プラグインラッパ部33において1回目の巡回と同じプラグインサイドのプラグイン関数を抽出することができる。このように同じプラグインサイドのプラグイン関数が抽出された時に、テスト入力部43が、同じプラグイン関数であって、引数情報を1回目の巡回時引数情報から、テストデータベース55に記録されたテスト引数情報へ置き換えたプラグイン関数を仮想マシン32に出力することによって、テスト巡回処理(2回目の巡回処理)においてモバイルコードの脆弱性テストを行うのに好適で不正な変数を注入することが可能となる。
In this way, by performing the test tour process (second tour process) based on the same tour path information as the first tour path information in the
一般的に、モバイルコードの脆弱性テストを行うウェブページの構成は、そのウェブページにおけるモバイルコードのUI毎に異なるため、モバイルコードの脆弱性を完全に自動化して求めることは困難であるといえる。しかしながら、ウェブページにおける一通りのブラウザ操作をユーザが巡回経路情報として巡回経路情報データベース50に記録させておくことにより、この巡回経路情報に基づくブラウザ操作により要求されるプラグイン関数を求めて、各プラグイン関数レベルで、モバイルコードの脆弱性をテストすることが可能な不正な変数を設定することが可能となる。ブラウザ操作には、ブラウザに表示されるモバイルコードUIの操作や読み込みなどが含まれる。たとえば、モバイルコードUIの操作にはモバイルコードのテキストフィールドに文字を入力するなどが含まれる。このため、テスト項目の決定負担を軽減させることができ、また、テスト項目に漏れが生じることを抑制することが可能となる。
In general, the configuration of a web page for performing a mobile code vulnerability test is different for each mobile code UI in the web page, and thus it can be said that it is difficult to fully determine the vulnerability of the mobile code. . However, the user can record a browser operation in the web page as the traveling route information in the traveling
テスト入力部43によりテスト引数情報に置き換えられたプラグイン関数が仮想マシン32に出力された後、プラグインラッパ部33は、テスト引数情報に置き換えられたプラグイン関数に対する仮想マシン32からの出力である、ブラウザサイドのプラグイン関数を抽出して、テスト入力時出力データベース53に記録する。
After the plug-in function replaced with the test argument information by the
このように、テスト引数情報が追加されたプラグイン関数に対する仮想マシン32の出力を、テスト入力時出力データベース53に記録することにより、不正な変数が注入された場合におけるブラウザサイドのプラグイン関数を、テスト入力時出力データベース53に記録することができる。一方で、巡回時出力データベース52には、テスト入力時出力データベース53に記録されるブラウザサイドのプラグイン関数と同じ関数であって、不正な変数が注入されていない場合におけるプラグイン関数が記録されることになる。
In this way, by recording the output of the
図9(b)は、テストデータベース55のテスト引数情報により引数情報が変更されたプラグイン関数に対して、仮想マシン32より出力されたブラウザサイドのプラグイン関数であって、図9(a)に示したプラグイン関数に対応して出力されたプラグイン関数とその関数引数情報とが記録されたテスト入力時出力データベース53の内容(テーブル)を示している。このように、テスト入力時出力データベース53には、図5に示したようなブラウザサイドのプラグイン関数が記録されることになる。
FIG. 9B shows a browser-side plug-in function output from the
脆弱性判定部44は、巡回時出力データベース52に記録されるプラグイン関数と、テスト入力時出力データベース53に記録されるプラグイン関数と、脆弱性判定データベース56に記録される出力関数毎の識別子情報とに基づいて、テスト対象であるモバイルコードの脆弱性判断を行う役割を有している。
The
まず、脆弱性判定部44は、1回目の巡回時における仮想マシン32の出力であるプラグイン関数を巡回時出力データベース52から取り出すと共に、テスト巡回時(2回目の巡回時)おける仮想マシン32の出力であるプラグイン関数をテスト入力時出力データベース53から取り出す。そして、脆弱性判定部44は、取り出されたそれぞれのプラグイン関数を比較して、異なるプラグイン関数を差分関数として求める。
First, the
さらに、脆弱性判定部44は、脆弱性判定データベース56より脆弱性を示す危険な出力関数名(ブラウザサイドのプラグイン関数名)と脆弱性を示す識別子(関数の引数情報)とを読み込む。図12(a)は、脆弱性判定データベース56に記録される脆弱性を示す出力関数名と脆弱性を示す識別子とを例示したテーブルである。脆弱性判定データベース56の識別子には、不正なネットワークアクセスを検知する識別子と、クロスサイトスクリプティングを検知する識別子との両方あるいはいずれかが一方が記録されている。但し、識別子に記録される情報は、テスト生成パターンデータベース54においてテストパターンとして設定された内容に対応するものでなければならない。
Furthermore, the
脆弱性判定部44は、差分関数の出力関数名が、脆弱性判定データベース56に記録されている出力関数名に該当し、さらに、該当する差分関数の引数情報が、脆弱性判定データベース56に記録されている識別子の情報に該当する場合に、モバイルコードに対する脆弱性がテスト対象となったモバイルコードに存在するものとして判断する。そして、脆弱性判定部44は、脆弱性の判断結果をテスト結果データベース57に記録する。
In the
ここで、主なモバイルコードに関する脆弱性は、モバイルコードによる不正なネットワークアクセスとクロスサイトスクリプトである。このため、脆弱性判定部44は、不正なネットワークアクセスに対する脆弱性判断を行うために、差分関数に、NPN_GetURL, NPN_GetURLNotify, NPN_PostURL, NPN_PostURLNotifyの4種類の出力関数が存在するか否かを監視する。ここで、NPN_GetURL, NPN_GetURLNotifyは、指定されたURLからデータを読み込む関数である。また、NPN_PostURL, NPN_PostURLNotifyは、指定されたURLにデータを送信する関数である。
Here, the main vulnerabilities related to mobile code are unauthorized network access by mobile code and cross-site script. Therefore, the
図10は、上述したように不正なネットワークアクセスに対する脆弱性判断を行うために脆弱性判定部44が監視する出力関数名と、その出力関数に基づく脆弱性判定方法とを示した表である。これらの4種類の出力関数のいずれかが差分関数に含まれており、さらに、差分関数の引数となるURLに、テスト生成部42において巡回時引数情報と置き換えられたテスト引数情報の識別子である「http://www.example.com」が含まれている場合に、脆弱性判定部44は、テスト対象であるモバイルコードに対する脆弱性が存在すると判断する。
FIG. 10 is a table showing the output function names monitored by the
また、脆弱性判定部44は、クロスサイトスクリプティングに対する脆弱性判断を行うために、差分関数に、NPN_GetURL, NPN_GetURLNotify, NPN_PostURL, NPN_PostURLNotify, NPN_Evaluateの5種類の出力関数が存在するか否かを監視する。ここで、NPN_GetURL, NPN_GetURLNotifyは、指定されたURLからデータを読み込む関数である。また、NPN_PostURL, NPN_PostURLNotifyは、指定されたURLにデータを送信する関数である。さらに、NPN_EvaluateはJavaScriptを実行する関数である。
In addition, the
図11は、上述したようにクロスサイトスクリプティングに対する脆弱性判断を行うために脆弱性判定部44が監視する出力関数名と、その出力関数に基づく脆弱性判定方法とを示した表である。これらの5種類の出力関数のいずれかが差分関数に含まれており、さらに、差分関数の引数となるURLに、テスト生成部42において巡回時引数情報と置き換えられたテスト引数情報の識別子である「javascript:alert("xss")」が含まれている場合に、脆弱性判定部44は、テスト対象であるモバイルコードに対する脆弱性が存在すると判断する。
FIG. 11 is a table showing the output function names monitored by the
図12(b)は、脆弱性判定部44により判断された脆弱性に関するテスト結果が記録されるテスト結果データベース57の内容を例示したテーブルである。
FIG. 12B is a table exemplifying the contents of the
上述したように、脆弱性判定部44は、図10に示した4種類の出力関数のいずれかが差分関数に含まれており、さらに、差分関数の引数となるURLに、「http://www.example.com」が含まれている場合に、不正なネットワークアクセスに対する脆弱性が存在するものと判断し、不正なネットワークアクセスに対するテスト結果として「脆弱性あり」との結果を記録する。
As described above, the
一方で、脆弱性判定部44は、4種類の出力関数のいずれも差分関数に含まれていない場合、または含まれていたとしても、差分関数の引数となるURLに、「http://www.example.com」が含まれていない場合には、不正なネットワークアクセスに対する脆弱性は存在しないものと判断し、不正なネットワークアクセスに対するテスト結果として「脆弱性なし」との結果を記録する。図12(b)に示すテスト結果データベース57では、不正なネットワークアクセスに対するテスト結果として「脆弱性なし」との結果が記録されている。
On the other hand, the
また、脆弱性判定部44は、図11に示した5種類の出力関数のいずれかが差分関数に含まれており、さらに、差分関数の引数となるURLに、「javascript:alert("xss")」が含まれている場合に、クロスサイトスクリプティングに対する脆弱性が存在するものと判断し、クロスサイトスクリプティングに対するテスト結果として「脆弱性あり」との結果を記録する。
Further, the
一方で、脆弱性判定部44は、5種類の出力関数のいずれも差分関数に含まれていない場合、または含まれていたとしても、差分関数の引数となるURLに、「javascript:alert("xss")」が含まれていない場合には、クロスサイトスクリプティングに対する脆弱性は存在しないものと判断し、クロスサイトスクリプティングに対するテスト結果として「脆弱性なし」との結果を記録する。図12(b)に示すテスト結果データベース57では、クロスサイトスクリプティングに対するテスト結果として「脆弱性あり」との結果が記録されている。
On the other hand, the
次に、上述した各機能部における具体的なモバイルコードのテスト処理内容を、フローチャートを用いて説明する。図13は、テスト装置1の制御部20によるモバイルコードのテスト処理内容を示したフローチャートである。図13に示したフローチャートは、制御部20がデータ記憶部21に記録されるプログラムに従って処理を行うことにより実現されるものである。しかしながら、このフローチャートの説明においては、図6に示した各機能部による処理を主体として説明を行う。
Next, specific mobile code test processing contents in the above-described functional units will be described with reference to flowcharts. FIG. 13 is a flowchart showing the content of the mobile code test process performed by the
但し、既に説明したように、各機能部の働きも、制御部20がデータ記憶部21に記録されるプログラムにより実現されるものであるため、処理主体を、各機能部で説明しても制御部20として説明しても、本実施の形態に係るモバイルコードの脆弱性テスト処理は、同じ処理を示していることになる。
However, as already described, since the function of each function unit is also realized by the program recorded in the
また、図13に示したフローチャートに示す処理では、代表的なモバイルコードであるFlashの脆弱性を検知する例を示しつつ、処理内容を説明する。 Further, in the processing shown in the flowchart shown in FIG. 13, the processing content will be described while showing an example of detecting the vulnerability of Flash, which is a typical mobile code.
まず、はじめに、テスト設定部40においてテスト対象となるモバイルコードの設定を行う(ステップS.1)。図12(c)は、テスト設定部40において設定された脆弱性のあるActionScriptである。ActionScriptはFlashで用いるプログラム言語である。このActionScriptには_root.urlで外部変数を使用し、navigateToURLの引数で指定されたURLをブラウザに表示する関数である。攻撃者はパラメータインジェクションを用いて、_root.urlに外部から変数を注入し、不正なネットワークアクセスやクロスサイトスクリプティングを発生することができる。
First, first, the
次に、巡回部41が、巡回経路情報データベース50に記録される巡回経路情報を読み出し、読み出された巡回経路情報に基づいて、ブラウザの操作を行って、自動巡回処理を実行する(ステップS.2)。
Next, the traveling
その後、プラグインラッパ部33は、巡回部41の自動巡回処理に伴って抽出されたプラグインサイドのプラグイン関数を巡回時入力データベース51に記録する(ステップS.3)。
After that, the plug-in
さらに、プラグインラッパ部33は、巡回部41の自動巡回処理に伴って抽出されたブラウザサイドのプラグイン関数を巡回時出力データベース52に記録する(ステップS.4)。
Further, the plug-in
その後、テスト生成部42が、巡回時入力データベース51に記録されたプラグイン関数とテスト生成パターンデータベース54に記録されるテストパターンとを用いて、テスト巡回時に用いるプラグイン関数の巡回時引数情報とテスト用引数情報とを、テストデータベース55に記録する(ステップS.5)
Thereafter, the
その後、テスト入力部43が、巡回部41に1回目の自動巡回処理と同一の巡回処理(テスト巡回処理)を実行させる。そして、テスト入力部43は、2回目の自動巡回処理(テスト巡回処理)においてプラグインラッパ部33で抽出されたプラグインサイドのプラグイン関数の引数情報を、テストデータベース55に記録されたテスト引数情報に置き換えて仮想マシン32に入力させる(ステップS.6)
Thereafter, the
その後、プラグインラッパ部33は、ステップS.6においてプラグイン関数が入力されたことに対応して仮想マシン32より出力されたブラウザサイドのプラグイン関数を出力関数として抽出し、テスト入力時出力データベース53に記録する(ステップS.7)。
After that, the plug-in
そして、脆弱性判定部44は、巡回時出力データベース52に記録されるプラグイン関数とテスト入力時出力データベース53に記録されるプラグイン関数とに基づいて差分関数を求める。そして、求められた差分関数の出力関数名が、脆弱性判定データベース56に記録されている出力関数名に該当し、さらに、該当する差分関数の引数情報が、脆弱性判定データベース56に記録されている識別子の情報に該当するか否かに基づいて、モバイルコードに対する脆弱性の判断を行う(ステップS.8)。
Then, the
そして、脆弱性判定部44は、求められた脆弱性判断の結果をテスト結果データベース57に記録し(ステップS.9)、モバイルコードテスト処理を終了する。
The
図14は、ステップS.5においてテスト生成部42が、テストデータベース55に、テスト巡回用のプラグイン関数と巡回時引数情報とテスト引数情報とを記録した内容を示したテーブルである。
FIG. 5 shows a table in which the
ステップS.6において、テスト入力部43は、図14に示すテストIDが「1」のNPP_New関数を抽出して仮想マシン32に出力すると、この出力に対するブラウザサイドのプラグイン関数に基づいて、脆弱性判定部44は、不正なネットワークアクセスが発生するものと判断する。なぜならば、図14のテストIDが「1」の欄に示すように、キーと値とのペア(url, http://www.example.com)がテスト引数情報として置き換えられて仮想マシン32に入力されるため、その結果として_root.urlに「http://www.example.com」が渡されてしまい、「http://www.example.com」のサイトへ遷移してしまうからである。その結果として、そのサイトがブラウザ上に表示される。
Step S. 6, when the
このとき、ステップS.7に示すように、プラグインラッパ部33において抽出された出力関数は、テスト入力時出力データベース53に記録される。図15(a)は、図14においてテストIDが「1」である欄のプラグイン関数に対応する出力関数を示している。図15(a)に示すように、プラグインラッパ部33において抽出される出力関数は、NPN_GetURLNotifyであり、この出力関数における関数引数情報に「url=http://www.example.com」が含まれてしまう。
At this time, step S.E. 7, the output function extracted by the plug-in
従って、脆弱性判定部44では、脆弱性判定データベース56を参照することにより、不正なネットワークアクセスに基づく脆弱性が存在するものと判断し(ステップS.8)、その判断結果をテスト結果データベース57に記録する(ステップS.9)ことになる。
Therefore, the
一方で、ステップS.6において、テスト入力部43は、図14に示すテストIDが「2」のNPP_New関数を抽出して仮想マシン32に出力すると、この出力に対するブラウザサイドのプラグイン関数に基づいて、脆弱性判定部44は、クロスサイトスプリクティングが発生するものと判断する。なぜならば、図14のテストIDが「2」の欄に示すように、キーと値とのペア (url, javascript:alert("xss"))がテスト引数情報として置き換えられて、仮想マシン32に入力されるため、その結果として_root.urlに「javascript:alert("xss")」が渡されてしまい、「navigateToURL」でそのJavaScriptを実行してしまうからである。
On the other hand, step S. 6, when the
このとき、ステップS.7に示すように、プラグインラッパ部33において抽出された出力関数は、テスト入力時出力データベース53に記録される。図15(b)は、図14においてテストIDが「2」である欄のプラグイン関数に対応する出力関数を示している。図15(b)に示すように、プラグインラッパ部33において抽出される出力関数は、NPN_GetURLNotifyであり、この出力関数における関数引数情報に「url=javascript:alert("xss")」が含まれてしまう。
At this time, step S.E. 7, the output function extracted by the plug-in
従って、脆弱性判定部44では、脆弱性判定データベース56を参照することにより、クロスサイトスプリクティングに基づく脆弱性が存在するものと判断し(ステップS.8)、その判断結果をテスト結果データベース57に記録する(ステップS.9)ことになる。
Therefore, the
さらに、ステップS.6において、テスト入力部43は、図14に示すテストIDが「3」のNPP_New関数を抽出して仮想マシン32に出力すると、この出力に対するブラウザサイドのプラグイン関数に基づいて、脆弱性判定部44は、脆弱性は存在しないと判断する。なぜならば、図14のテストIDが「3」の欄に示すように、キーと値とのペア (test, javascript:alert("xss"))がテスト引数情報として置き換えられて仮想マシンに入力されるが、キーがtestとなっているので_root.testには値が入力されているものの、_root.urlには値が入力されないからである。
Furthermore, Step S. 6, when the
従って、脆弱性判定部44では、脆弱性判定データベース56を参照することにより、脆弱性が存在しないと判断し(ステップS.8)、その判断結果をテスト結果データベース57に記録する(ステップS.9)ことになる。
Therefore, the
図15(c)は、最終的にテスト結果データベース57に記録されたテスト結果を示している。図15(c)に示すように、テストID毎に、それぞれのモバイルコードに対する脆弱性を検知することが可能となる。
FIG. 15 (c) shows the test results finally recorded in the
以上、本発明に係るモバイルコードテスト装置に関し、一例としてテスト装置1を示して詳細に説明を行った。しかしながら、本発明に係るモバイルコードテスト装置は、上述した実施の形態に示した例には限定されない。当業者であれば、特許請求の範囲に記載された範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。
As described above, the mobile code test apparatus according to the present invention has been described in detail by showing the
例えば、図13に示したフローチャートでは、ステップS.6において、テスト入力部43が、テスト引数情報に置き換えられたプラグイン関数を全て仮想マシン32に出力し、ステップS.7において、仮想マシンへの出力に対応する全てのブラウザサイドのプラグイン関数が、プラグインラッパ部33において抽出され、ステップS.8において、脆弱性判定部44が、求められた全ての差分関数の出力関数名について脆弱性の判断を行った後に、ステップS.9において、脆弱性判定部44が、結果をテスト結果データベース57に記録する場合について説明した。
For example, in the flowchart shown in FIG. 6, the
しかしながら、ステップS.6において、テスト入力部43が、テストデータベース55に記録されるプラグイン関数を1関数ずつ仮想マシン32に出力し、その1関数毎にステップS.8における脆弱性判断が行われて、ステップS.9においてテスト結果データベース57に1関数分の脆弱性のテスト結果を記録させ、その後に、処理をステップS.6に戻して、次の1関数における脆弱性を判断し、全ての関数における脆弱性が判断されるまで、ステップS.6~ステップS.9までの処理が繰り返し実行される構成とするものであってもよい。
However, step S.E. 6, the
1 …テスト装置
2 …ネットワーク
3 …サーバ
10 …本体部
11 …ディスプレイ部
12 …操作部
20 …制御部
21 …データ記憶部
22 …通信部
30 …ブラウザ
31 …プラグイン
32 …仮想マシン
33 …プラグインラッパ部
34 …OS
35 …ハードウエア
40 …テスト設定部
41 …巡回部
42 …テスト生成部
43 …テスト入力部
44 …脆弱性判定部
50 …巡回経路情報データベース
51 …巡回時入力データベース
52 …巡回時出力データベース
53 …テスト入力時出力データベース
54 …テスト生成パターンデータベース
55 …テストデータベース
56 …脆弱性判定データベース
57 …テスト結果データベース
DESCRIPTION OF
35 ...
Claims (9)
前記モバイルコードにおける操作手順が巡回経路情報として予め設定され、当該巡回経路情報に基づいて前記モバイルコードにおける操作処理を実行する巡回手段と、
前記第1プラグインラッパ手段において抽出された前記入力関数情報の引数情報を、他の引数情報に変更することが可能な引数情報変更手段と、
前記モバイルコードに基づく不正な処理を、前記仮想マシンにおいて実行させることが可能な不正入力関数情報の関数名と、前記不正な処理を行う場合に前記不正入力関数情報の引数情報に設定される不正引数情報とが記録されたテスト生成パターン記録手段と
を有し、
前記第1プラグインラッパ手段は、前記巡回手段による前記モバイルコードの操作処理に応じて前記ブラウザから前記仮想マシンへ入力される入力関数情報を抽出し、
前記引数情報変更手段は、前記第1プラグインラッパ手段により抽出された前記入力関数情報の中から、前記テスト生成パターン記録手段に記録された前記不正入力関数情報の関数名と一致する関数名を有する入力関数情報を見つけ出し、さらに、見つけ出された入力関数情報の引数情報を、前記テスト生成パターン記録手段に記録された前記不正引数情報に変更すること
を特徴とするモバイルコードテスト装置。 In a plug-in that inputs and outputs function information between a browser and a virtual machine that executes mobile code, first plug-in wrapper means that extracts input function information input from the browser to the virtual machine;
An operation procedure in the mobile code is preset as the traveling route information, and a traveling unit that executes an operation process in the mobile code based on the traveling route information;
Argument information changing means capable of changing the argument information of the input function information extracted by the first plug-in wrapper means to other argument information;
Incorrect processing based on the mobile code can be executed in the virtual machine, the function name of the illegal input function information and the illegal information set in the argument information of the illegal input function information when performing the illegal processing Test generation pattern recording means in which argument information is recorded,
The first plug-in wrapper means extracts input function information input from the browser to the virtual machine in accordance with the operation processing of the mobile code by the circulating means,
The argument information changing means selects a function name that matches the function name of the illegal input function information recorded in the test generation pattern recording means from the input function information extracted by the first plug-in wrapper means. A mobile code test device characterized in that the input function information is found, and the argument information of the found input function information is changed to the invalid argument information recorded in the test generation pattern recording means.
前記引数情報変更手段により前記引数情報が前記不正引数情報に変更された前記不正入力関数情報を、前記プラグインにおいて前記仮想マシンに入力させることが可能な不正入力関数情報入力手段と、
前記第2プラグインラッパ手段により抽出された前記出力関数情報の関数名と当該出力関数情報の引数情報の内容とに基づいて、前記モバイルコードに対する脆弱性の判断を行う脆弱性判断手段と
を有し、
前記第2プラグインラッパ手段は、前記不正入力関数情報入力手段により前記仮想マシンに入力された前記不正入力関数情報に対応して前記仮想マシンより出力された不正出力関数情報と、前記巡回手段における前記ブラウザの操作処理に伴って前記ブラウザから前記仮想マシンに入力された入力関数情報に対応して前記仮想マシンより出力された出力関数情報とを抽出し、
前記脆弱性判断手段は、前記不正出力関数情報の中から、前記出力関数情報の関数名と一致する関数名を有する不正出力関数情報を見つけ出し、見つけ出された不正出力関数情報の引数情報に、前記引数情報変更手段において変更された前記不正引数情報が含まれる場合に、前記モバイルコードに対する脆弱性が存在するものと判断すること
を特徴とする請求項1に記載のモバイルコードテスト装置。 In the plug-in, second plug-in wrapper means for extracting output function information output from the virtual machine to the browser;
An illegal input function information input means capable of causing the virtual machine to input the illegal input function information in which the argument information is changed to the illegal argument information by the argument information changing means;
Vulnerability determination means for determining vulnerability to the mobile code based on the function name of the output function information extracted by the second plug-in wrapper means and the content of the argument information of the output function information. And
The second plug-in wrapper means includes illegal output function information output from the virtual machine corresponding to the illegal input function information input to the virtual machine by the illegal input function information input means, and The output function information output from the virtual machine corresponding to the input function information input to the virtual machine from the browser in accordance with the operation processing of the browser,
The vulnerability determination means finds out illegal output function information having a function name that matches the function name of the output function information from the illegal output function information, and in the argument information of the found illegal output function information, The mobile code test apparatus according to claim 1, wherein when the invalid argument information changed by the argument information changing means is included, it is determined that there is a vulnerability to the mobile code.
前記引数情報変更手段により前記引数情報が前記不正引数情報に変更された前記不正入力関数情報を、前記プラグインにおいて前記仮想マシンに入力させることが可能な不正入力関数情報入力手段と、
前記第2プラグインラッパ手段により抽出された前記出力関数情報の関数名と当該出力関数情報の引数情報の内容とに基づいて、前記モバイルコードに対する脆弱性の判断を行う脆弱性判断手段と、
前記モバイルコードに対する脆弱性が存在するものと判断され得る脆弱出力関数情報の関数名と、当該脆弱出力関数情報の引数情報であって前記脆弱性が存在するものと判断され得る脆弱引数情報とが記録された脆弱性判定パターン記録手段と
を有し、
前記第2プラグインラッパ手段は、前記不正入力関数情報入力手段により前記仮想マシンに入力された前記不正入力関数情報に対応して前記仮想マシンより出力された不正出力関数情報を抽出し、
前記脆弱性判断手段は、前記不正出力関数情報の中から、前記脆弱性判定パターン記録手段に記録された前記脆弱出力関数情報の関数名と一致する関数名を有する不正出力関数情報を見つけ出し、見つけ出された不正出力関数情報の引数情報に、前記脆弱性判定パターン記録手段に記録された前記脆弱引数情報が含まれる場合に、前記モバイルコードに対する脆弱性が存在するものと判断すること
を特徴とする請求項1に記載のモバイルコードテスト装置。 In the plug-in, second plug-in wrapper means for extracting output function information output from the virtual machine to the browser;
An illegal input function information input means capable of causing the virtual machine to input the illegal input function information in which the argument information is changed to the illegal argument information by the argument information changing means;
Vulnerability determination means for determining vulnerability to the mobile code based on the function name of the output function information extracted by the second plug-in wrapper means and the content of the argument information of the output function information;
The function name of the vulnerable output function information that can be determined to be vulnerable to the mobile code, and the vulnerable argument information that is the argument information of the vulnerable output function information and can be determined to have the vulnerability Recorded vulnerability determination pattern recording means, and
The second plug-in wrapper means extracts the illegal output function information output from the virtual machine corresponding to the illegal input function information input to the virtual machine by the illegal input function information input means,
The vulnerability determination means finds out the unauthorized output function information having a function name that matches the function name of the vulnerable output function information recorded in the vulnerability determination pattern recording means from the unauthorized output function information. When the argument information of the issued illegal output function information includes the vulnerable argument information recorded in the vulnerability determination pattern recording means, it is determined that there is a vulnerability to the mobile code. The mobile code test device according to claim 1.
前記モバイルコードにおける操作手順が示された巡回経路情報に基づいて、巡回手段が前記モバイルコードにおける操作処理を実行する巡回ステップと、
該巡回ステップにおける前記モバイルコードの操作処理に応じて前記ブラウザから前記仮想マシンへ入力される入力関数情報を、第1プラグインンラッパ手段が、前記仮想マシンと前記ブラウザとの間における関数情報の入出力を行うプラグインにおいて抽出する入力関数情報抽出ステップと、
該入力関数情報抽出ステップにおいて抽出された前記入力関数情報の中から、前記モバイルコードに基づく不正な処理を前記仮想マシンにおいて実行させることが可能な不正入力関数情報の関数名と一致する関数名を有する入力関数情報を、引数情報変更手段が見つけ出す入力関数情報検出ステップと、
該入力関数情報検出ステップにおいて見つけ出された入力関数情報の引数情報を、前記不正な処理を行う場合に前記不正入力関数情報の引数情報として設定される不正引数情報に、前記引数情報変更手段が変更する不正引数情報変更ステップと
を有することを特徴とするモバイルコードテスト方法。 A mobile code test method for determining vulnerabilities in a virtual machine on which mobile code is executed,
Based on the cyclic route information in which the operation procedure in the mobile code is indicated, a cyclic step in which a cyclic means executes an operation process in the mobile code;
Input function information input from the browser to the virtual machine in accordance with the operation process of the mobile code in the patrol step, the first plug-in wrapper means stores function information between the virtual machine and the browser. An input function information extraction step to be extracted in a plug-in that performs input and output;
Among the input function information extracted in the input function information extraction step, a function name that matches the function name of the illegal input function information that can cause the virtual machine to execute an illegal process based on the mobile code. An input function information detecting step in which the argument information changing means finds out the input function information having,
The argument information changing means converts the argument information of the input function information found in the input function information detection step into illegal argument information set as argument information of the illegal input function information when performing the illegal processing. A method for testing mobile code, comprising: changing an invalid argument information to be changed.
前記不正引数情報変更ステップにおいて前記引数情報が前記不正引数情報に変更された前記不正入力関数情報を、不正入力関数情報入力手段が、前記プラグインにおいて前記仮想マシンに入力させる不正入力関数情報入力ステップと、
該不正入力関数情報入力ステップにおいて前記仮想マシンに入力された前記不正入力関数情報に対応して、前記仮想マシンより出力された不正出力関数情報を、前記第2プラグインラッパ手段が前記プラグインにおいて抽出する不正出力関数情報抽出ステップと、
該不正出力関数情報抽出ステップにおいて抽出された前記不正出力関数情報の中から、脆弱性判断手段が、前記出力関数情報抽出ステップにおいて抽出された出力関数情報の関数名と一致する関数名を有する不正出力関数情報を見つけ出す不正出力関数情報検出ステップと、
該不正出力関数情報検出ステップにおいて見つけ出された前記不正出力関数情報の引数情報に、前記不正引数情報変更ステップにおいて変更された前記不正引数情報が含まれる場合に、前記脆弱性判断手段が、前記モバイルコードに対する脆弱性が存在するものと判断する脆弱性判断ステップと
を有することを特徴とする請求項4に記載のモバイルコードテスト方法。 In response to the input function information input from the browser to the virtual machine in accordance with the operation processing of the mobile code, the second plug-in wrapper means outputs the output function information output from the virtual machine in the plug-in. An output function information extraction step to extract;
An illegal input function information input step in which the illegal input function information input means causes the virtual machine to input the illegal input function information in which the argument information is changed to the illegal argument information in the illegal argument information change step. When,
Corresponding to the illegal input function information input to the virtual machine in the illegal input function information input step, the second plug-in wrapper means outputs the illegal output function information output from the virtual machine in the plug-in. An illegal output function information extraction step to be extracted;
Among the unauthorized output function information extracted in the unauthorized output function information extraction step, the vulnerability determination means has an unauthorized function name having a function name that matches the function name of the output function information extracted in the output function information extraction step. Incorrect output function information detection step for finding output function information;
When the illegal argument information changed in the illegal argument information changing step is included in the argument information of the illegal output function information found in the illegal output function information detecting step, the vulnerability determining means 5. The mobile code test method according to claim 4, further comprising: a vulnerability determination step for determining that there is a vulnerability with respect to the mobile code.
前記不正引数情報変更ステップにおいて前記引数情報が前記不正引数情報に変更された前記不正入力関数情報を、不正入力関数情報入力手段が、前記プラグインにおいて前記仮想マシンに入力させる不正入力関数情報入力ステップと、
該不正入力関数情報入力ステップにおいて前記仮想マシンに入力された前記不正入力関数情報に対応して、前記仮想マシンより出力された不正出力関数情報を、前記第2プラグインラッパ手段が前記プラグインにおいて抽出する不正出力関数情報抽出ステップと、
該不正出力関数情報抽出ステップにおいて抽出された前記不正出力関数情報の中から、脆弱性判断手段が、前記モバイルコードに対する脆弱性が存在するものと判断され得る脆弱出力関数情報の関数名と一致する関数名を有する不正出力関数情報を見つけ出す不正出力関数情報検出ステップと、
該不正出力関数情報検出ステップにおいて見つけ出された前記不正出力関数情報の引数情報に、前記脆弱性が存在するものと判断され得る脆弱引数情報が含まれる場合に、前記脆弱性判断手段が、前記モバイルコードに対する脆弱性が存在するものと判断する脆弱性判断ステップと
を有することを特徴とする請求項4に記載のモバイルコードテスト方法。 In response to the input function information input from the browser to the virtual machine in accordance with the operation processing of the mobile code, the second plug-in wrapper means outputs the output function information output from the virtual machine in the plug-in. An output function information extraction step to extract;
An illegal input function information input step in which the illegal input function information input means causes the virtual machine to input the illegal input function information in which the argument information is changed to the illegal argument information in the illegal argument information change step. When,
Corresponding to the illegal input function information input to the virtual machine in the illegal input function information input step, the second plug-in wrapper means outputs the illegal output function information output from the virtual machine in the plug-in. An illegal output function information extraction step to be extracted;
Among the unauthorized output function information extracted in the unauthorized output function information extraction step, the vulnerability determination means matches the function name of the vulnerable output function information that can be determined that there is a vulnerability to the mobile code. An illegal output function information detection step of finding illegal output function information having a function name;
When the argument information of the unauthorized output function information found in the unauthorized output function information detection step includes vulnerable argument information that can be determined that the vulnerability exists, the vulnerability determination means includes 5. The mobile code test method according to claim 4, further comprising: a vulnerability determination step for determining that there is a vulnerability with respect to the mobile code.
コンピュータに、
前記モバイルコードにおける操作手順が示された巡回経路情報に基づいて、前記モバイルコードにおける操作処理を実行する巡回機能と、
該巡回機能に基づく前記モバイルコードの操作処理に応じて前記ブラウザから前記仮想マシンへ入力される入力関数情報を、前記仮想マシンと前記ブラウザとの間における関数情報の入出力を行うプラグインにおいて抽出する入力関数情報抽出機能と、
該入力関数情報抽出機能に基づいて抽出された前記入力関数情報の中から、前記モバイルコードに基づく不正な処理を前記仮想マシンにおいて実行させることが可能な不正入力関数情報の関数名と一致する関数名を有する入力関数情報を見つけ出す入力関数情報検出機能と、
該入力関数情報検出機能に基づいて見つけ出された入力関数情報の引数情報を、前記不正な処理を行う場合に前記不正入力関数情報の引数情報として設定される不正引数情報に変更する不正引数情報変更機能と
を実現させるためのモバイルコードテスト用プログラム。 A mobile code test program for performing vulnerability determination of a virtual machine in which mobile code is executed on a computer,
On the computer,
Based on the cyclic route information indicating the operation procedure in the mobile code, a cyclic function for executing the operation process in the mobile code,
Input function information input from the browser to the virtual machine according to the mobile code operation processing based on the patrol function is extracted in a plug-in that inputs and outputs function information between the virtual machine and the browser Input function information extraction function to
A function that matches the function name of the illegal input function information that can cause the virtual machine to execute an illegal process based on the mobile code from the input function information extracted based on the input function information extraction function An input function information detection function for finding input function information having a name;
Illegal argument information for changing the argument information of the input function information found based on the input function information detection function to the illegal argument information set as the argument information of the illegal input function information when performing the illegal processing A mobile code test program to realize the change function.
前記モバイルコードの操作処理に伴って前記ブラウザから前記仮想マシンに入力された入力関数情報に対応して、前記仮想マシンより出力された出力関数情報を、前記プラグインにおいて抽出する出力関数情報抽出機能と、
前記不正引数情報変更機能に基づいて前記引数情報が前記不正引数情報に変更された前記不正入力関数情報を、前記プラグインにおいて前記仮想マシンに入力させる不正入力関数情報入力機能と、
該不正入力関数情報入力機能に基づいて前記仮想マシンに入力された前記不正入力関数情報に対応して、前記仮想マシンより出力された不正出力関数情報を、前記プラグインにおいて抽出する不正出力関数情報抽出機能と、
前記不正出力関数情報抽出機能に基づいて抽出された前記不正出力関数情報の中から、前記出力関数情報抽出機能に基づいて抽出された出力関数情報の関数名と一致する関数名を有する不正出力関数情報を見つけ出す不正出力関数情報検出機能と、
該不正出力関数情報検出機能に基づいて見つけ出された前記不正出力関数情報の引数情報に、前記不正引数情報変更機能に基づいて変更された前記不正引数情報が含まれる場合において、前記モバイルコードに対する脆弱性が存在するものと判断する脆弱性判断機能と
を実現させるための請求項7に記載のモバイルコードテスト用プログラム。 In the computer,
Output function information extraction function for extracting, in the plug-in, output function information output from the virtual machine corresponding to input function information input from the browser to the virtual machine in accordance with the operation processing of the mobile code When,
An illegal input function information input function for causing the virtual machine to input the illegal input function information in which the argument information is changed to the illegal argument information based on the illegal argument information change function;
Incorrect output function information for extracting in the plug-in the illegal output function information output from the virtual machine corresponding to the illegal input function information input to the virtual machine based on the illegal input function information input function Extraction function;
An unauthorized output function having a function name that matches the function name of the output function information extracted based on the output function information extraction function from the unauthorized output function information extracted based on the unauthorized output function information extraction function Illegal output function information detection function to find information,
In the case where the argument information of the illegal output function information found based on the illegal output function information detection function includes the illegal argument information changed based on the illegal argument information change function, the mobile code The program for mobile code testing according to claim 7, for realizing a vulnerability determination function for determining that a vulnerability exists.
前記モバイルコードの操作処理に伴って前記ブラウザから前記仮想マシンに入力された入力関数情報に対応して、前記仮想マシンより出力された出力関数情報を、前記プラグインにおいて抽出する出力関数情報抽出機能と、
前記不正引数情報変更機能に基づいて前記引数情報が前記不正引数情報に変更された前記不正入力関数情報を、前記プラグインにおいて前記仮想マシンに入力させる不正入力関数情報入力機能と、
該不正入力関数情報入力機能に基づいて前記仮想マシンに入力された前記不正入力関数情報に対応して、前記仮想マシンより出力された不正出力関数情報を、前記プラグインにおいて抽出する不正出力関数情報抽出機能と、
前記不正出力関数情報抽出機能に基づいて抽出された前記不正出力関数情報の中から、前記モバイルコードに対する脆弱性が存在するものと判断され得る脆弱出力関数情報の関数名と一致する関数名を有する不正出力関数情報を見つけ出す不正出力関数情報検出機能と、
該不正出力関数情報検出機能に基づいて見つけ出された前記不正出力関数情報の引数情報に、前記脆弱性が存在するものと判断され得る脆弱引数情報が含まれる場合において、前記モバイルコードに対する脆弱性が存在するものと判断する脆弱性判断機能と
を実現させるための請求項7に記載のモバイルコードテスト用プログラム。 In the computer,
Output function information extraction function for extracting, in the plug-in, output function information output from the virtual machine corresponding to input function information input from the browser to the virtual machine in accordance with the operation processing of the mobile code When,
An illegal input function information input function for causing the virtual machine to input the illegal input function information in which the argument information is changed to the illegal argument information based on the illegal argument information change function;
Incorrect output function information for extracting in the plug-in the illegal output function information output from the virtual machine corresponding to the illegal input function information input to the virtual machine based on the illegal input function information input function Extraction function;
Among the illegal output function information extracted based on the illegal output function information extraction function, has a function name that matches the function name of the vulnerable output function information that can be determined to be vulnerable to the mobile code Illegal output function information detection function to find illegal output function information,
When the argument information of the unauthorized output function information found based on the unauthorized output function information detection function includes vulnerable argument information that can be determined that the vulnerability exists, the vulnerability to the mobile code The program for mobile code test according to claim 7, for realizing a vulnerability determination function for determining that there exists a vulnerability.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2010/065663 WO2012032660A1 (en) | 2010-09-10 | 2010-09-10 | Mobile code testing device, method of mobile code testing and program for mobile code testing |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2010/065663 WO2012032660A1 (en) | 2010-09-10 | 2010-09-10 | Mobile code testing device, method of mobile code testing and program for mobile code testing |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2012032660A1 true WO2012032660A1 (en) | 2012-03-15 |
Family
ID=45810279
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/JP2010/065663 Ceased WO2012032660A1 (en) | 2010-09-10 | 2010-09-10 | Mobile code testing device, method of mobile code testing and program for mobile code testing |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2012032660A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2021250827A1 (en) * | 2020-06-10 | 2021-12-16 | 日本電気株式会社 | Security test device, security test method, and program |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7284274B1 (en) * | 2001-01-18 | 2007-10-16 | Cigital, Inc. | System and method for identifying and eliminating vulnerabilities in computer software applications |
| US20080301813A1 (en) * | 2007-05-31 | 2008-12-04 | Microsoft Corporation | Testing Software Applications with Schema-based Fuzzing |
| US20080320328A1 (en) * | 2007-06-21 | 2008-12-25 | Microsoft Corporation | Fuzz testing and attack-surface scoping for uri handlers and pluggable protocols |
-
2010
- 2010-09-10 WO PCT/JP2010/065663 patent/WO2012032660A1/en not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7284274B1 (en) * | 2001-01-18 | 2007-10-16 | Cigital, Inc. | System and method for identifying and eliminating vulnerabilities in computer software applications |
| US20080301813A1 (en) * | 2007-05-31 | 2008-12-04 | Microsoft Corporation | Testing Software Applications with Schema-based Fuzzing |
| US20080320328A1 (en) * | 2007-06-21 | 2008-12-25 | Microsoft Corporation | Fuzz testing and attack-surface scoping for uri handlers and pluggable protocols |
Non-Patent Citations (3)
| Title |
|---|
| "Seiteki Oyobi Doteki Kaiseki no Kumiawase ni yoru Web Application no Security Shindan System ni Kansuru Kenkyu Kaihatsu", HEISEI 21 NENDO SEIKA HOKOKUSHO, NATIONAL INSTITUTE OF INFORMATION AND COMMUNICATIONS TECHNOLOGY, 1 September 2010 (2010-09-01), Retrieved from the Internet <URL:http://www2.nict.go.jp/u/u361/kenkyuseika-files/20-03.pdf> [retrieved on 20100930] * |
| MASARU MATSUNAMI: "Mezase!! Nanko Furaku no Network Online Soft de Jitsugen suru Kanzen Muketsu no Security", NETWORK WORLD, vol. 8, no. 2, 1 February 2003 (2003-02-01), pages 88 - 93 * |
| MICHAEL SUTTON ET AL., FUZZING BRUTE FORCE NI YORU BIJAKUSEI HAKKEN SHUHO, FIRST EDITION, MAINICHI COMMUNICATIONS INC., 6 June 2008 (2008-06-06), pages 3-39,107-129,131-159,255 - 269,271-286,352-366 * |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2021250827A1 (en) * | 2020-06-10 | 2021-12-16 | 日本電気株式会社 | Security test device, security test method, and program |
| JPWO2021250827A1 (en) * | 2020-06-10 | 2021-12-16 | ||
| JP7380877B2 (en) | 2020-06-10 | 2023-11-15 | 日本電気株式会社 | Security inspection device, security inspection method, and program |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9268945B2 (en) | Detection of vulnerabilities in computer systems | |
| US8844043B2 (en) | Detection of vulnerabilities in computer systems | |
| CN102546576B (en) | A kind of web page horse hanging detects and means of defence, system and respective code extracting method | |
| US10447730B2 (en) | Detection of SQL injection attacks | |
| US8752183B1 (en) | Systems and methods for client-side vulnerability scanning and detection | |
| CN107209831B (en) | System and method for identifying network attacks | |
| KR101672791B1 (en) | Method and system for detection of vulnerability on html5 mobile web application | |
| EP3077950B1 (en) | Directed execution of dynamic programs in isolated environments | |
| US20180351986A1 (en) | Cross-site request forgery (csrf) vulnerability detection | |
| Shahriar et al. | Client-side detection of cross-site request forgery attacks | |
| CA3204750A1 (en) | Web attack simulator | |
| CN114666104A (en) | Penetration testing method, system, computer equipment and storage medium | |
| Barua et al. | Server side detection of content sniffing attacks | |
| Beer et al. | The Bridge between Web Applications and Mobile Platforms is Still Broken | |
| Shalini et al. | Prevention of cross-site scripting attacks (xss) on web applications in the client side | |
| WO2012032660A1 (en) | Mobile code testing device, method of mobile code testing and program for mobile code testing | |
| Wichmann et al. | Web cryptography API: Prevalence and possible developer mistakes | |
| KR101731838B1 (en) | Apparatus and Method for Scanning Vulnerability of Web Site Based Java Script | |
| CN115987638A (en) | Webpage vulnerability detection method, device, equipment and storage medium | |
| JP6041634B2 (en) | Tamper detection device and tamper detection method | |
| Kambhampati et al. | Characterizing JavaScript Security Code Smells | |
| Felsch et al. | How private is your private cloud? Security analysis of cloud control interfaces | |
| Kaleli et al. | EasyCSPeasy: A Server-side and Language-agnostic XSS Mitigation by Devising and Ensuring Compliance with CSP | |
| Thulin | Evaluation of the applicability of security testing techniques in continuous integration environments | |
| WO2025260626A1 (en) | Security event processing method and apparatus and electronic device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 10857004 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 10857004 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: JP |