WO2020075335A1 - 解析機能付与装置、解析機能付与方法及び解析機能付与プログラム - Google Patents

解析機能付与装置、解析機能付与方法及び解析機能付与プログラム Download PDF

Info

Publication number
WO2020075335A1
WO2020075335A1 PCT/JP2019/020095 JP2019020095W WO2020075335A1 WO 2020075335 A1 WO2020075335 A1 WO 2020075335A1 JP 2019020095 W JP2019020095 W JP 2019020095W WO 2020075335 A1 WO2020075335 A1 WO 2020075335A1
Authority
WO
WIPO (PCT)
Prior art keywords
analysis
hook
point
trace
analysis function
Prior art date
Application number
PCT/JP2019/020095
Other languages
English (en)
French (fr)
Inventor
利宣 碓井
勇人 大月
誠 岩村
裕平 川古谷
三好 潤
Original Assignee
日本電信電話株式会社
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to JP2020549950A priority Critical patent/JP7115552B2/ja
Priority to US17/283,546 priority patent/US11989292B2/en
Priority to EP19871119.4A priority patent/EP3848833B1/en
Priority to AU2019357365A priority patent/AU2019357365B2/en
Publication of WO2020075335A1 publication Critical patent/WO2020075335A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/566Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/562Static detection
    • G06F21/563Static detection by source code analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/54Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by adding security routines or objects to programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/577Assessing vulnerabilities and evaluating computer system security
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/03Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
    • G06F2221/032Protect output to user by software means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/03Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
    • G06F2221/033Test or assess software

Definitions

  • the present invention relates to an analysis function addition device, an analysis function addition method, and an analysis function addition program.
  • a malicious script is a program that exploits the functions provided by the script engine to realize an attack.
  • an attack is carried out using a script engine that an operating system (OS) has by default, or a script engine included in a specific application such as a web browser or a document file viewer.
  • OS operating system
  • Obfuscation of code is a problem that occurs when parsing malicious scripts. Many malicious scripts have a process called obfuscation that interferes with analysis. Obfuscation deliberately increases the complexity of the code, making it difficult to parse based on the surface information of the code. That is, obfuscation interferes with an analysis method called static analysis, which analyzes information obtained from the code without executing the script.
  • the method called dynamic analysis that knows the behavior by executing the script and monitoring its behavior is not affected by the obfuscation as described above. Therefore, a method based on dynamic analysis is mainly used in the analysis of malicious scripts.
  • Hooks are commonly used in dynamic analysis of malicious scripts.
  • a hook is a mechanism for adding unique processing to a specific place in a program.
  • log output processing is added by using a hook to analyze by grasping the execution status of the script.
  • script level hooks As a hook method for analyzing a script, there are roughly three methods depending on the place where the hook is applied. These are script level hooks, system level hooks, and script engine level hooks.
  • ⁇ Script level hook is a method to directly hook the script to be analyzed. Since the malicious script is generally obfuscated as described above, it is not easy to find the insertion position of the hook that can obtain useful information for the analyst from the script. Therefore, hooks are implemented by overriding certain language elements.
  • the language element refers to a functional unit provided to the programmer by the script language. Language elements include prepared functions, methods, and statements. For example, the eval function and the document.write method provided by JavaScript (registered trademark) and the CreateObject statement provided by VBScript are each one language element.
  • System level hook is a method to hook system API (Application Programming Interface) and system calls.
  • the system level hook implements the analysis by executing the script while monitoring the process of the script engine after applying the hook.
  • ⁇ Script engine level hook is a method of hooking a specific function in the script engine. Generally, it is not obvious which part of the program code of the script engine corresponds to the part to be hooked, so it is necessary to identify the part to be hooked by analyzing the script engine. Then, in the script engine level hook, the hook is applied to the relevant part, and the script is analyzed by executing it.
  • Non-Patent Document 1 describes a method of creating a framework that analyzes JavaScript by hooking by overriding a function provided by JavaScript, which is called JavaScript API hooking. This is an example of a script level hook. According to this method, the behavior of a script written in JavaScript can be analyzed.
  • Non-Patent Document 2 by hooking a system call using a hardware breakpoint on a virtual machine monitor (VMM (Virtual Machine Monitor)) and executing while referring to a specific data structure of Windows, The system call trace log at thread level is acquired. According to this method, the behavior of the script can be analyzed through the script engine by acquiring the system call trace of the script engine that is executing the script. This is an example of a system level hook.
  • VMM Virtual Machine Monitor
  • Non-Patent Document 3 implements a data flow analysis function called taint analysis on the VMM and realizes an API hook that accurately tracks the code to be analyzed. According to this method, by acquiring the API of the script engine that is executing the script, the behavior of the script can be analyzed through the script engine. Again, this is an example of a system level hook.
  • Non-Patent Document 4 an open source script engine (ActionScript in this document) is modified to add a function to trace a method call, property access, and class generation. This is an example of a script engine level hook. According to this method, the behavior of the script can be analyzed.
  • Non-Patent Document 1 relies on a language specification that a language element such as a built-in function can be overridden, and for a specific script language having such a language specification. Since it is only feasible, there was a problem of poor versatility.
  • Semantic gap refers to a semantic gap.
  • the amount of information that can be obtained varies depending on the information obtained when monitoring the level of the script itself or the script engine near it, and the information obtained when monitoring at the system level where there is a gap from the script. It is called a semantic gap.
  • the operation of the cookie observed by the language element Document.Cookie.Set is observed at the system level as a mere WriteFile to the file related to the cookie. This reduces the amount of semantic information from cookie operations to file operations. This is called the loss of semantics, which is a problem caused by the semantic gap.
  • Non-Patent Document 4 a semantic gap does not occur because the behavior can be monitored in the vicinity of the script called the script engine, but how to implement the hook depends on the implementation of the script engine. There is a problem that it is not obvious because it depends. In other words, it is not possible to know the location in the script engine where hooks are applied to insert the analysis code (called the hook point) and the memory monitoring location (called the tap point) that is output as a log by the analysis code. It needs to be clarified by analysis.
  • script engine level hooks can be solved in principle, unlike the problems of script level hooks and system level hooks. That is, if hook points and tap points can be detected from the script engine binary and hooks can be automatically applied, any script engine can have an analysis function without a semantic gap.
  • Non-Patent Document 5 and Non-Patent Document 6 an analysis method for extracting a code portion having a specific function by automatic reverse engineering for an application executed on an OS on a VMM. And an analysis method for detecting tap points is proposed.
  • Non-Patent Document 5 and Non-Patent Document 6 do not realize the detection of the hook point, and the application target is not the script engine, so that the automatic hook to the script engine is realized. There was a problem of not having it.
  • the present invention has been made in view of the above, and can be arbitrarily applied regardless of the language specification of the script language, and an analysis function addition device that can realize the addition of the analysis function without causing a semantic gap,
  • An object is to provide an analysis function addition method and an analysis function addition program.
  • the analysis function providing device executes while monitoring a script engine, and acquires an execution trace including an API trace and a branch trace.
  • the first detection unit that analyzes the execution trace and detects the hook point where the hook is inserted to insert the analysis code, and the memory monitoring point that outputs the log by the analysis code based on the monitoring at the hook point.
  • a second detection unit that detects a tap point, and a providing unit that provides a script engine with a hook and an analysis function based on the hook point and the tap point.
  • the analysis function can be arbitrarily applied regardless of the language specification of the script language, and an analysis function can be provided without causing a semantic gap.
  • FIG. 1 is a schematic diagram illustrating the outline of the processing of the analysis function adding device according to the embodiment.
  • FIG. 2A is a diagram showing an example of the test script shown in FIG. 2B is a diagram showing an example of the test script shown in FIG. 2-3 is a diagram showing an example of the test script shown in FIG.
  • FIG. 3 is a diagram showing an example of the execution trace.
  • FIG. 4 is a diagram showing an example of a data structure of data stored in the execution trace database (DB) shown in FIG.
  • FIG. 5 is a diagram showing an example of a data configuration of data stored in the hook point DB.
  • FIG. 6 is a diagram showing an example of a data configuration of data stored in the tap point DB.
  • FIG. 2A is a diagram showing an example of the test script shown in FIG. 2B is a diagram showing an example of the test script shown in FIG. 2-3 is a diagram showing an example of the test script shown in FIG.
  • FIG. 3 is a diagram showing an example of the execution trace.
  • FIG. 7 is a diagram illustrating an example of processing of the backtrace analysis unit.
  • FIG. 8 is a diagram illustrating an example of processing of the difference execution analysis unit.
  • FIG. 9 is a diagram illustrating an example of processing of the modified Smith-Waterman algorithm.
  • FIG. 10 is a diagram illustrating an example of processing of the tap point detection unit.
  • FIG. 11 is a flowchart showing a processing procedure of the analysis function adding method according to the embodiment.
  • FIG. 12 is a flowchart showing the processing procedure of the execution trace acquisition processing shown in FIG.
  • FIG. 13 is a flowchart showing the processing procedure of the backtrace analysis processing shown in FIG.
  • FIG. 14 is a flowchart showing the processing procedure of the difference execution analysis processing shown in FIG. FIG.
  • FIG. 15 is a flowchart showing the processing procedure of the modified Smith-Waterman algorithm application processing shown in FIG.
  • FIG. 16 is a flowchart showing the processing procedure of the tap point detection processing shown in FIG.
  • FIG. 17 is a flowchart showing the processing procedure of the analysis function addition processing shown in FIG.
  • FIG. 18 is a diagram illustrating an example of a computer that realizes an analysis function adding device by executing a program.
  • the analysis function adding device detects hook points and tap points by analyzing a script engine binary using a test script.
  • the hook point is the point where the hook is applied and the analysis code is inserted.
  • a function (called an internal function) of the internal implementation of the script engine is used as a unit, and the hook is applied to the head of this internal function.
  • the tap point is a memory monitoring point that is output as a log by the analysis code and is one of the arguments of the internal function.
  • this analysis function adding device acquires an execution trace including an API trace and a branch trace for the script engine binary by using the system API hook and the branch instruction hook.
  • the API trace is a record of the executed system API
  • the branch trace is a record of the executed branch.
  • this analysis function adding device analyzes this execution trace and detects a hook point.
  • two analysis methods are applied: backtrace analysis, which searches backward from the system API call, and differential execution analysis, which analyzes based on the differences between multiple execution traces acquired by gradually changing the conditions. To do.
  • the hook points detected by these are set as hook point candidates.
  • this analysis function adding device detects the tap point by hooking this hook point candidate and searching the argument of the hooked function. That is, if the argument of the test script is found in the argument of the function of the hook point candidate, the analysis function providing device determines the hook point candidate as a valid hook point, and sets the argument as the tap point.
  • the analysis function adding device hooks the script engine binary based on the hook point and tap point obtained in this way.
  • the analysis function providing device inserts, into the hook point, a language element corresponding to the hook point and a code for logging out the memory of the tap point.
  • this hook causes a log output as to which language element of the script language is executed with what argument when the script is executed.
  • the analysis function addition device realizes the addition of the analysis function to the script engine afterwards.
  • FIG. 1 is a diagram for explaining an example of the configuration of the analysis function adding device 10 according to the embodiment.
  • the analysis function addition device 10 has an input unit 11, a control unit 12, an output unit 13, a storage unit 14, an execution trace DB 21, a hook point DB 22 and a tap point DB 23.
  • the control unit 12 also includes an execution trace acquisition unit 121 (acquisition unit), a hook point detection unit 122 (first detection unit), a tap point detection unit 123 (second detection unit), and an analysis function addition unit 124 (addition). Part).
  • the hook point detection unit 122 includes a back trace analysis unit 1221 (second analysis unit) and a difference execution analysis unit 1222 (first analysis unit). Then, the analysis function providing device 10 receives the input of the test script and the script engine binary.
  • the input unit 11 is composed of an input device such as a keyboard and a mouse, receives information input from the outside, and inputs it to the control unit 12.
  • the input unit 11 receives inputs of the test script and the script engine binary, and outputs them to the control unit 12.
  • test script is a script that is input when the script engine is dynamically analyzed and an execution trace is acquired. Details of the test script will be described later.
  • the script engine binary is an executable file that constitutes the script engine.
  • the script engine binary may consist of multiple executable files.
  • the control unit 12 has an internal memory for storing a program defining various processing procedures and required data, and executes various processing by these.
  • the control unit 12 is an electronic circuit such as a CPU (Central Processing Unit) and an MPU (Micro Processing Unit).
  • the control unit 12 includes an execution trace acquisition unit 121, a hook point detection unit 122, a tap point detection unit 123, and an analysis function addition unit 124.
  • the execution trace acquisition unit 121 receives a test script and a script engine binary as input.
  • the execution trace acquisition unit 121 acquires the execution trace by executing the test script while monitoring the execution of the script engine binary.
  • the execution trace is composed of an API trace and a branch trace.
  • the API trace is a record of the system API called and its arguments during execution.
  • the branch trace records the type of branch instruction at the time of execution, the branch source address, and the branch destination address. It is known that the API trace can be acquired by a method called an API hook, and the branch trace can be acquired by an instruction hook.
  • the execution trace acquisition unit 121 stores the acquired execution trace in the execution trace DB 21.
  • the hook point detection unit 122 has a back trace analysis unit 1221 and a difference execution analysis unit 1222.
  • the hook point detection unit 122 takes out and analyzes the execution trace stored in the execution trace DB 21, and finds a hook point candidate.
  • the backtrace analysis unit 1221 and the difference execution analysis unit 1222 both serve to detect the hook point candidates.
  • the hook point detection unit 122 inputs the execution trace to the back trace analysis unit 1221.
  • the backtrace analysis unit 1221 searches the execution trace for a call to the system API related to the analysis target, and detects a hook point candidate by the backtrace from the search. In other words, the backtrace analysis unit 1221 detects the hook point by applying the backtrace from the system API corresponding to the language element to be analyzed.
  • the differential execution analysis unit 1222 detects a hook point candidate by extracting a difference between a plurality of execution traces having different acquisition conditions and finding a part satisfying a specific condition.
  • the difference execution analysis unit 1222 detects a hook point based on the difference found between the execution traces with different conditions.
  • the difference execution analysis unit 1222 detects a hook point using an algorithm that detects that a sequence with high homology appears a specific number of times. For example, the difference execution analysis unit 1222 uses the modified Smith-Waterman algorithm as an algorithm for detecting that a sequence with high homology appears a certain number of times.
  • the tap point detection unit 123 detects a tap point by hooking the hook point candidate obtained by the hook point detection unit 122 and searching the memory of the argument of the hooked function.
  • the tap point detection unit 123 detects a tap point, which is a memory monitoring point to be output as a log by the analysis code, based on the monitoring at the hook point. Also, the tap point detection unit 123 determines a hook point candidate having a tap point as a hook point.
  • the analysis function providing unit 124 provides the script engine with an analysis function by hooking the obtained hook point and tap point and outputting a log output of the language element corresponding to the hook point and the argument appearing at the tap point. To do. In other words, the analysis function addition unit 124 hooks the script engine based on the hook point and the tap point to add the analysis function.
  • the output unit 13 is, for example, a liquid crystal display, a printer, or the like, and outputs various kinds of information including information related to analysis function addition.
  • the output unit 13 may be an interface that controls input / output of various data with an external device, and may output various information to the external device.
  • the storage unit 14 is realized by a semiconductor memory device such as a RAM (Random Access Memory) or a flash memory (Flash Memory), or a storage device such as a hard disk or an optical disc, and a processing program or a process for operating the analysis function providing apparatus 10. Data and the like used during the execution of the program are stored.
  • a semiconductor memory device such as a RAM (Random Access Memory) or a flash memory (Flash Memory), or a storage device such as a hard disk or an optical disc, and a processing program or a process for operating the analysis function providing apparatus 10. Data and the like used during the execution of the program are stored.
  • the execution trace DB 21 stores the execution trace acquired by the execution trace acquisition unit 121.
  • the hook point DB 22 stores the hook point candidates detected by the difference execution analysis unit 1222.
  • the tap point DB 23 stores the tap points detected by the tap point detection unit 123.
  • Test script configuration First, the test script will be described. 2-1 to 2-3 are diagrams showing an example of the test script.
  • a test script is a script that is input when the script engine is dynamically analyzed. This test script serves to specify the language element to be parsed in the script engine. Therefore, in this embodiment, a script including only the language element to be analyzed is used. For example, if you want to analyze the processing of a language element called CreateObject to obtain hook points and tap points for this language element, create a test script that calls only CreateObject, as shown in Figure 2-1. This test script is prepared in advance of analysis and is created manually. This creation requires knowledge of the target script language specifications.
  • test scripts are used, such as the test script shown in Figure 2-2 (A for differential execution analysis) and the test script shown in Figure 2-3 (B for differential execution analysis). Then, in the differential execution analysis, the hook points are detected by comparing the execution traces for each.
  • the test script a script that calls the language element to be analyzed only once like A for differential execution analysis and a script that calls multiple times like B for differential execution analysis are prepared.
  • the analysis function providing device 10 can identify a portion related to a language element by capturing a trace portion that appears a plurality of times when comparing execution traces.
  • FIG. 3 is a diagram showing an example of the execution trace.
  • the execution trace is composed of the API trace and the branch trace as described above.
  • FIG. 3 shows a part of the execution trace cut out.
  • the structure of the execution trace will be described with reference to FIG.
  • the branch trace log line has the format described in the first to tenth lines of FIG. 3, for example, and consists of three elements, "type", "from", and "to".
  • the "type” indicates whether the executed branch instruction is a call instruction, a jmp instruction, or a ret instruction. Further, the address of the branch source is shown in “from”. The address of the branch destination is shown in "to”.
  • the log line of the API trace has, for example, the format described in the 11th to 13th lines in FIG. 3, and includes five types of “type”, “name”, “argindex”, “argname”, and “arg”. It consists of elements. Since "type" indicates that the log line is an API trace line, only the value API is taken. The name of the API is stored in “name”. In addition, an index indicating which argument of the API is stored in “argindex”. The name of the argument is stored in "argname”. The value of the observed argument is stored in "arg”.
  • FIG. 4 is a diagram showing an example of a data structure of data stored in the execution trace DB 21.
  • the execution trace DB 21 is a DB that stores the acquired execution trace. As shown in FIG. 4, the execution trace DB 21 has table schemas of "id”, “trace_id”, “image_name”, “branch_index”, “branch_type”, “src_addr”, “dst_addr”, and “args”.
  • “Id” is an identifier that is assigned so that it is unique in the entire table, and has an integer value.
  • “Trace_id” is an identifier that is uniquely assigned to each acquired execution trace and has an integer value.
  • Image_name is the name of the execution file of the script engine that is the analysis target that is acquiring the execution trace.
  • “Branch_index” is an ordinal number indicating the number of the branch recorded in one execution trace.
  • “Branch_type” indicates by which instruction the branch was taken.
  • Branch_type takes jmp, call, ret, etc. depending on the branch acquired in the execution trace. Further, “branch_type” also stores the type of the called system API when the system API is called. “Src_addr” holds the branch source. “Dst_addr” holds the branch destination address. In the case of branching within “image_name”, the offset may be retained. The argument when the system API is called is recorded in “Args”.
  • FIG. 5 is a diagram showing an example of a data configuration of data stored in the hook point DB 22.
  • the hook point DB 22 is a DB that stores detected hook point candidates. As shown in FIG. 5, the hook point DB 22 has table schemas of “id”, “trace_id”, and “hookpoint_addr”.
  • FIG. 6 is a diagram showing an example of a data configuration of data stored in the tap point DB 23.
  • the tap point DB 23 is a DB that stores detected tap point candidates. As shown in FIG. 6, the tap point DB 23 has table schemas of “id”, “trace_id”, “hookpoint_addr”, “tappoint_arg_number”, and “variable_type”.
  • “Id”, “trace_id”, and “hookpoint_addr” are the same as those of the execution trace DB 21. “Tappoint_arg_number” indicates which number argument of the function pointed to by the hook point is the tap point. Also, “variable_type” is the type of the variable.
  • FIG. 7 is a diagram for explaining an example of processing of the backtrace analysis unit 1221.
  • the backtrace-based detection method is realized by analyzing the acquired execution trace log. This backtrace-based detection technique is used to detect hook points of language elements that require system interaction. That is, it is effective for a language element accompanied by a call to the system API.
  • This method is based on the assumption that a language element that needs to interact with the system will call the required system API from the code area related to that language element in the script engine. Therefore, in this detection method, by tracing from the call of the system API corresponding to the black x mark in FIG. 5 to the code area of the script engine corresponding to the white x mark as indicated by arrows Y1 to Y3, The code part related to the language element is specified, and the hook point related to the language element existing there is detected.
  • the differential execution analysis is a method of dynamically analyzing by acquiring a plurality of execution traces while changing conditions and analyzing the differences. This detection method is effective for language elements that do not involve calling the system API.
  • VBScript's Eval function is a closed language element in the script engine, and it is not necessary to call the system API.
  • the detection method by the back trace depending on the system API is not effective, but the detection method by the differential execution analysis enables the detection. It is based on the assumption that only the execution trace of the code related to the language element will appear as a difference between the execution trace when the element is called once and the execution trace when the element is executed multiple times.
  • the differential execution analysis unit 1222 receives a plurality of test scripts and their execution traces as inputs.
  • the test script includes a script that calls the language element to be analyzed only once (for example, A for differential execution analysis in FIG. 2-2) and a script that calls multiple times (for example, B for differential execution analysis in FIG. 2-3).
  • the difference execution analysis unit 1222 detects the difference by comparing the execution traces. As a result, the difference execution analysis unit 1222 captures the trace portion relating to the language element to be analyzed, which appears in the difference when the execution traces are compared.
  • FIG. 8 is a diagram showing an example of processing of the differential execution analysis unit 1222.
  • the Eval function that is the analysis target language element is called only once, and in the test script (B for differential execution analysis B), it is called multiple times (3 times). . Therefore, comparing the execution trace A and the execution trace B, the branch trace portion has only one time in the execution trace A and three times in the execution trace B as shown by the portions R11, R21, R23, and R25 in FIG. You can see the subset of branch traces that appear. This part is a set of branches corresponding to the Eval function of the language element to be analyzed and becomes a hook point candidate.
  • This extraction can be realized by the Smith-Waterman algorithm, which is a local alignment detection method that extracts highly homologous subsequences from two or more sequences.
  • the Smith-Waterman algorithm is modified as follows, because the restriction of the number of times such as one occurrence on one side and three times on the other side is not considered in the Smith-Waterman algorithm.
  • FIG. 9 is a diagram illustrating an example of processing of the modified Smith-Waterman algorithm.
  • the Smith-Waterman algorithm is a sequence alignment algorithm based on dynamic programming (DP (Dynamic Programming)) and can extract highly homologous subsequences from two or more sequences.
  • DP Dynamic Programming
  • This algorithm uses a table called DP table shown in FIG.
  • DP table In the DP table, one series is placed at the top of the table and another series is placed at the front side, and a match score is entered in each cell. With the subscript in the x-axis direction as i and the subscript in the y-axis direction as j, the score F (i, j) of the cell (i, j) is calculated based on the equation (1). Until the creation of this DP table, it is the same as the normal Smith-Waterman algorithm. Note that s (i, j) and d in the equation (1) are expressed as in the equations (2) and (3).
  • each of the portions R11, R21, R23, and R25 in FIG. S is the portions R10 and R20 that appear first in the execution trace of FIG. E is the portions R12 and R26 that appear at the end of FIG. M is a portion R22, R24 that appears between the portions R21, R23, R25.
  • each of these elements is composed of a log of a plurality of branch traces, but here, for simplification, the alphabet is used and compressed.
  • the differential execution analysis unit 1222 again extracts a partial sequence having high homology with respect to the same row (part W11 in FIG. 7) from the DP table excluding the partial sequence extracted by the algorithm.
  • the differential execution analysis unit 1222 repeats this processing for the number of times of calling in the test script, and among the extracted partial series (parts W1, W2, W3 in FIG. 7), the similarity of each partial character string is If it is equal to or larger than the threshold value, the log of the branch trace forming the part is detected as a hook point candidate. On the other hand, when the similarity of each partial character string is less than the threshold value, the difference execution analysis unit 1222 checks the cell having the next highest score.
  • FIG. 10 is a diagram illustrating an example of processing of the tap point detection unit 123.
  • Detecting tap points has the following two roles.
  • the first point is to determine the final hook point from the hook point candidates obtained by the hook point detection.
  • the second point is to specify the memory location for log output at the time of hook.
  • the tap point is detected by searching the argument of the function that is the hook point.
  • the tap point detection unit 123 hooks the hook point candidates obtained up to this point and acquires the execution trace again.
  • the argument can be acquired by referring to it according to the calling convention.
  • heuristics are required for further search.
  • a search as shown in Fig. 10 is used. First, if the argument cannot be referenced as a pointer, consider it to be a value. If the argument can be referenced as a pointer, it is referenced as a pointer. Whether you see it as a value or when you refer to it as a pointer, try various types.
  • the tap point detection unit 123 determines the hook point and sets the point at which the argument is obtained as the tap point.
  • the argument in the test script is WScript.Shell
  • this argument is observed when viewed as an LPBSTR type, so the tap point detection unit 123 uses this argument as the tap point. To detect.
  • the processing of the tap point detection unit 123 is not limited to the above, and other search methods may be used.
  • a method of acquiring type information by reverse engineering without using heuristics for details, see, for example, J. Lee, T. Avgerinos, and D. Brumley, “TIE: Principled Reverse Engineering of Types in Binary Programs”, Network and Distributed System Security Symposium, Internet Society, 2011.
  • heuristics for details, see, for example, J. Lee, T. Avgerinos, and D. Brumley, “TIE: Principled Reverse Engineering of Types in Binary Programs”, Network and Distributed System Security Symposium, Internet Society, 2011.
  • the analysis function adding unit 124 receives the script engine binary and the hook points and tap points detected by the processing up to this point as inputs.
  • the analysis function adding unit 124 hooks the script engine at a hook point.
  • a code for analysis is inserted so that a language element corresponding to the hook is executed and a tap point memory as an argument is output as a log.
  • This analysis code can be easily generated if the hook point and tap point are known.
  • the script when executed, its behavior is output as a log, and the analysis function is added.
  • the addition of the analysis function by this hook may be realized by directly rewriting the binary for the script engine binary, or by rewriting the memory image when the binary is executed and expanded on the process memory.
  • FIG. 11 is a flowchart showing a processing procedure of the analysis function adding method according to the embodiment.
  • the input unit 11 receives a test script and a script engine binary as inputs (step S1).
  • the execution trace acquisition unit 121 executes an execution trace acquisition process (step S2).
  • the backtrace analysis unit 1221 detects hook point candidates by the backtrace analysis process (step S3).
  • the analysis function providing device 10 proceeds to step S7.
  • the difference execution analysis unit 1222 carries out a difference execution analysis process (step S5).
  • step S6: No the analysis function provision device 10 ends the process because the hook point candidate is not detected.
  • step S6: Yes the analysis function providing device 10 proceeds to step S7.
  • the tap point detection unit 123 carries out tap point detection processing (step S7).
  • step S8: No the analysis function providing device 10 ends the process.
  • step S8 when the hook point and the tap point are detected (step S8: Yes), the analysis function adding unit 124 executes the analysis function adding process (step S9).
  • the analysis function addition device 10 outputs the script engine binary to which the analysis function is added at the output unit 13 (step S10), and ends the process.
  • FIG. 12 is a flowchart showing the processing procedure of the execution trace acquisition processing shown in FIG.
  • the execution trace acquisition unit 121 receives a test script and a script engine binary as input (step S11). Then, the execution trace acquisition unit 121 applies a hook for acquiring the API trace to the received script engine (step S12). The execution trace acquisition unit 121 also applies a hook for acquiring the trace of the branch instruction (step S13). Then, the execution trace acquisition unit 121 inputs the test script received in that state into the script engine and executes it (step S14), and stores the execution trace acquired thereby in the execution trace DB 21 (step S15). The execution trace acquisition unit 121 ends the process when all the input test scripts have been executed (step S16: Yes). On the other hand, the execution trace acquisition unit 121 returns to the execution of the test script (step S14) and continues the process when all the input test scripts have not been executed (step S16: No).
  • FIG. 13 is a flowchart showing the processing procedure of the backtrace analysis processing shown in FIG.
  • the back trace analysis unit 1221 extracts an execution trace from the execution trace DB 21 (step S21).
  • the backtrace analysis unit 1221 also receives the test script as an input (step S22). Then, the backtrace analysis unit 1221 scans the argument at the time of calling the system API existing in the execution trace (step S23).
  • step S24 determines that there is no hook point that can be detected by the backtrace analysis, and ends the process.
  • step S24 when there is a match between the argument in the test script and the argument of the system API (step S24: Yes), the backtrace analysis unit 1221 traces back the branch in the execution trace starting from the matched system API. Go (step S25). Then, the backtrace analysis unit 1221 sets N branches obtained by tracing back N times from the point where the trace reaches the script engine as hook point candidates (step S26). Then, the backtrace analysis unit 1221 outputs this hook point candidate and ends the processing (step S27).
  • FIG. 14 is a flowchart showing the processing procedure of the difference execution analysis processing shown in FIG.
  • the differential execution analysis unit 1222 extracts an execution trace from the execution trace DB 21 (step S31). Then, the difference execution analysis unit 1222 carries out Smith-Waterman algorithm application processing (step S32). By executing this processing, the difference execution analysis unit 1222 extracts the difference between a plurality of execution traces having different acquisition conditions, and finds a portion that satisfies a specific condition.
  • step S33: Yes the difference execution analysis unit 1222 outputs the hook point candidate (step S34).
  • step S34 the difference execution analysis unit 1222 ends the process.
  • FIG. 15 is a flowchart showing a processing procedure for applying the modified Smith-Waterman algorithm shown in FIG.
  • the differential execution analysis unit 1222 extracts an execution trace from the execution trace DB 21 (step S41).
  • an execution trace that calls the analysis target language element once and an execution trace that calls multiple times.
  • the difference execution analysis unit 1222 determines whether i is larger than the number of rows (step S46). When the difference execution analysis unit 1222 determines that i is not larger than the number of rows (step S46: No), it increments i by 1 (step S47) and returns to the calculation of the match score (step S45). And continue processing.
  • step S46 determines whether j is greater than the number of rows (step S46: Yes).
  • step S48 determines whether j is greater than the number of columns (step S48).
  • step S48 determines that j is not larger than the number of columns (step S48: No)
  • step S48 determines that j is larger than the number of columns (step S48: Yes)
  • step S50 extracts the cell with the maximum match score (step S50), and backtracks from it.
  • step S51 the series having the highest homology is extracted (step S51).
  • the difference execution analysis unit 1222 newly extracts the upper (N ⁇ 1) series for the same row as the extracted series (step S52).
  • the difference execution analysis unit 1222 calculates the degree of similarity for each of the N extracted sequences, which is the total number of N as described above (step S53).
  • the difference execution analysis unit 1222 determines whether each of the calculated similarities exceeds a predetermined threshold value (step S54).
  • step S54 determines that each of the calculated similarities exceeds a predetermined threshold value (step S54: Yes)
  • the branch included in the extracted sequence is set as a hook point candidate (step S55).
  • the hook point candidate is output (step S56), and the process ends.
  • step S54: No determines that each of the calculated similarities does not exceed the predetermined threshold value (step S54: No)
  • step S58 Backtracking to extract a sequence
  • FIG. 16 is a flowchart showing the processing procedure of the tap point detection processing shown in FIG.
  • the tap point detection unit 123 receives a test script and a hook point candidate as input (steps S61 and S62). Then, the tap point detection unit 123 hooks all the points of the hook point candidates (step S63) and executes the test script (step S64). When reaching the hook point candidate, the tap point detection unit 123 searches for an argument of the hooked function (step S65). At the time of this search, the tap point detection unit 123 determines whether the same argument as the argument specified in the test script is found (step S66).
  • step S66 determines that the same argument as the argument specified in the test script is not found (step S66: No), it is determined that there is no hook point and tap point (step S67), and the process ends.
  • step S66 determines that the same argument as the argument specified in the test script is found (step S66: Yes)
  • the hook point candidate where the matched argument is found is determined as a hook point (step S66).
  • step S68 the place of the argument which agrees is made the tap point (step S69). Then, the tap point detection unit 123 outputs the hook point and the tap point (step S70), and ends the process.
  • FIG. 17 is a flowchart showing the processing procedure of the analysis function addition processing shown in FIG.
  • the analysis function adding unit 124 receives the script engine binary, the detected hook point and tap point as inputs (steps S71 to S73). Then, the analysis function adding unit 124 hooks the hook point of the script engine (step S74), and generates and inserts the code so that the code that outputs the memory of the tap point is executed at the time of this hook (step S75). ). The analysis function adding unit 124 outputs the script engine with the hook thus obtained as a script script engine with an analysis function (step S76), and ends the process.
  • the analysis function providing device 10 acquires an execution trace using a test script for a script engine to which an analysis function is desired. Then, the analysis function adding device 10 analyzes the execution trace by back trace analysis and differential execution analysis, and detects hook point candidates. Furthermore, the analysis function provision device 10 implements hook point determination and tap point detection by hooking and executing hook point candidates and searching the memory. Subsequently, the analysis function adding device 10 hooks the script engine based on the obtained hook point and tap point, and adds the analysis function.
  • the analysis function addition device 10 detects hook points and tap points even for a proprietary script engine that can obtain only binary files, and adds analysis functions without requiring manual reverse engineering. realizable.
  • the analysis function adding device 10 since the script engine level hook is realized, it is possible to monitor the behavior in the vicinity of the script, and it is possible to realize the analysis without the semantic gap.
  • the analysis function addition device 10 applies the hook in a method that does not depend on the language specification of the script language, so that the analysis function can be added to the script engine of various script languages.
  • the analysis function adding device 10 by analyzing the script engine and adding the analysis function afterwards, it is possible to automatically execute the analysis function having no semantic gap to the script engines of various script languages. Can be achieved.
  • the analysis function adding device 10 is useful for analyzing the behavior of a malicious script written in various script languages, and performs the analysis on the malicious script without being affected by the semantic gap. Especially suitable. Therefore, according to the present embodiment, it is possible to analyze a malicious script and use it for countermeasures such as detection by adding an analysis function to various script engines using the analysis function addition device 10. .
  • each component of each device shown in the drawings is functionally conceptual and does not necessarily have to be physically configured as shown. That is, the specific form of distribution / integration of each device is not limited to that shown in the figure, and all or part of the device may be functionally or physically distributed / arranged in arbitrary units according to various loads and usage conditions. It can be integrated and configured. Further, each processing function performed by each device may be implemented in whole or in part by a CPU and a program that is analyzed and executed by the CPU, or may be realized as hardware by a wired logic.
  • FIG. 18 is a diagram illustrating an example of a computer in which the analysis function providing device 10 is realized by executing a program.
  • the computer 1000 has, for example, a memory 1010 and a CPU 1020.
  • the computer 1000 has a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These components are connected by a bus 1080.
  • the memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM 1012.
  • the ROM 1011 stores, for example, a boot program such as a BIOS (Basic Input Output System).
  • BIOS Basic Input Output System
  • the hard disk drive interface 1030 is connected to the hard disk drive 1090.
  • the disk drive interface 1040 is connected to the disk drive 1100.
  • a removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100.
  • the serial port interface 1050 is connected to, for example, a mouse 1110 and a keyboard 1120.
  • the video adapter 1060 is connected to the display 1130, for example.
  • the hard disk drive 1090 stores, for example, the OS 1091, the application program 1092, the program module 1093, and the program data 1094. That is, the program that defines each process of the analysis function providing apparatus 10 is implemented as the program module 1093 in which the code executable by the computer 1000 is described.
  • the program module 1093 is stored in, for example, the hard disk drive 1090.
  • a program module 1093 for executing the same processing as the functional configuration of the analysis function addition device 10 is stored in the hard disk drive 1090.
  • the hard disk drive 1090 may be replaced by an SSD (Solid State Drive).
  • the data used in the processing of the above-described embodiment is stored as program data 1094 in, for example, the memory 1010 or the hard disk drive 1090. Then, the CPU 1020 reads the program module 1093 and the program data 1094 stored in the memory 1010 or the hard disk drive 1090 into the RAM 1012 as necessary and executes them.
  • the program module 1093 and the program data 1094 are not limited to being stored in the hard disk drive 1090, but may be stored in, for example, a removable storage medium and read out by the CPU 1020 via the disk drive 1100 or the like. Alternatively, the program module 1093 and the program data 1094 may be stored in another computer connected via a network (LAN, WAN, etc.). Then, the program module 1093 and the program data 1094 may be read from another computer by the CPU 1020 via the network interface 1070.
  • LAN local area network
  • WAN wide area network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Virology (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

解析機能付与装置(10)は、スクリプトエンジンを監視しながら実行し、APIトレースとブランチトレースとを含む実行トレースを取得する実行トレース取得部(121)と、実行トレースを解析し、フックを施して解析用コードを挿入する箇所であるフックポイントを検出するフックポイント検出部(122)と、フックポイントでの監視に基づいて、解析用コードによってログ出力するメモリ監視箇所であるタップポイントを検出するタップポイント検出部(123)と、フックポイント及びタップポイントに基づいて、スクリプトエンジンにフックを施して解析機能を付与する解析機能付与部(124)と、を有する。

Description

解析機能付与装置、解析機能付与方法及び解析機能付与プログラム
 本発明は、解析機能付与装置、解析機能付与方法及び解析機能付与プログラムに関する。
 マルウェアを用いたスパム(マルスパム)やファイルレスマルウェアなどの多様な攻撃の形態が生じるに伴って、悪性な挙動を示すスクリプト(悪性スクリプト)による攻撃の脅威が顕在化している。
 悪性スクリプトとは、スクリプトエンジンの提供する機能を悪用して攻撃を実現するプログラムである。一般に、オペレーティングシステム(OS(Operating System))がデフォルトで有するスクリプトエンジンや、Webブラウザや文書ファイルのビューアなど、特定のアプリケーションの具備するスクリプトエンジンを用いて攻撃が実施される。
 こうしたスクリプトエンジンの多くは、ユーザの許可が必要な場合もあるものの、ファイル操作やネットワーク通信、プロセスの起動など、システムを介した挙動も実現可能である。したがって、悪性スクリプトを用いた攻撃は、実行ファイルのマルウェアを用いた攻撃と同様に、ユーザに対しての脅威となる。
 悪性スクリプトによる攻撃に対策を講じるためには、スクリプトの持つ挙動を正確に把握する必要がある。したがって、スクリプトを解析することによって、その挙動を明らかにする技術が希求される。
 悪性スクリプトを解析する際に生じる問題として、コードの難読化がある。悪性スクリプトの多くは、難読化と呼ばれる、解析を妨害する処理が施されている。難読化は、故意にコードの複雑さを高めることによって、コードの表層的な情報に基づいて解析するのを困難にする。すなわち、難読化は、スクリプトを実行せずに、コードから得られる情報で解析する、静的解析と呼ばれる解析方法を妨害する。
 特に、実行するコードの一部を外部から動的に取得する場合は、そのコードは実行しなければ得られないため、静的には解析できない。したがって、静的解析はその原理上、不可能となる。
 一方で、スクリプトを実行し、その振る舞いを監視することによって挙動を知る動的解析と呼ばれる手法は、前述のような難読化の影響を受けない。このため、悪性スクリプトの解析においては、動的解析に基づく手法が主に用いられている。
 悪性スクリプトの動的解析では、フックが一般に用いられる。フックとは、プログラム中の特定の箇所に、独自の処理を追加するための仕組みである。悪性スクリプトのコードを監視するために、フックを用いてログ出力処理を追加することで、スクリプトの実行状態を把握することで解析する。
 スクリプトを解析するためのフック手法として、フックを施す箇所によって大きく3つの方式が存在する。スクリプトレベルフック、システムレベルフック、スクリプトエンジンレベルフックである。
 スクリプトレベルフックは、解析対象のスクリプトに対して直接フックを施す方式である。悪性スクリプトは、前述の通り一般に難読化されているため、解析者に有用な情報を得られるフックの挿入箇所をスクリプト内から発見するのは容易ではない。したがって、フックは、特定の言語要素をオーバーライドすることによって実現される。ここで、言語要素とは、スクリプト言語がプログラマに提供する機能単位を指す。言語要素には、あらかじめ用意された関数やメソッド、ステートメントなどがある。例えば、JavaScript(登録商標)の提供するeval関数やdocument.writeメソッド、VBScriptの提供するCreateObjectステートメントは、それぞれ一つの言語要素である。
 システムレベルフックは、システムAPI(Application Programming Interface)やシステムコールにフックを施す方式である。システムレベルフックは、フックを施した上で、スクリプトエンジンのプロセスを監視しながらスクリプトを実行させることで、解析を実現する。
 スクリプトエンジンレベルフックは、スクリプトエンジン内の特定の機能にフックを施す方法である。一般に、スクリプトエンジンのプログラムコードのどの部分がフックを施したい箇所と対応しているかは自明でないため、スクリプトエンジンを解析するなどしてフックを施す箇所を特定する必要がある。その上で、スクリプトエンジンレベルフックでは、当該箇所にフックを施し、スクリプトを実行することによって解析する。
 これらは、いずれも実用されている方式であり、これらを応用した複数の解析手法が提案されている。たとえば、非特許文献1には、JavaScript API hookingと呼ばれる、JavaScriptの提供する関数のオーバーライドによってフックする方法で、JavaScriptを解析するフレームワークを作成する手法が記載されている。これは、スクリプトレベルフックの一例と言える。この手法によれば、JavaScriptで記述されたスクリプトの挙動を解析できる。
 また、非特許文献2には、仮想マシンモニタ(VMM(Virtual Machine Monitor))上でハードウェアブレークポイントを用いてシステムコールをフックし、Windowsの特定のデータ構造を参照しながら実行することで、スレッドレベルでのシステムコールトレースのログを取得している。この手法によれば、スクリプトを実行中のスクリプトエンジンのシステムコールトレースを取得することで、スクリプトエンジン越しにスクリプトの挙動を解析できる。これは、システムレベルフックの一例と言える。
 非特許文献3には、VMM上にテイント解析と呼ばれるデータフローを解析する機能を実装し、解析対象のコードを正確に追跡したAPIフックを実現している。この手法によれば、スクリプトを実行中のスクリプトエンジンのAPIを取得することで、やはりスクリプトエンジン越しにスクリプトの挙動を解析できる。これもまた、システムレベルフックの一例と言える。
 非特許文献4には、オープンソースのスクリプトエンジン(この文献ではActionScript)に改変を加えて、メソッドの呼び出しやプロパティへのアクセス、クラスの生成などをトレースする機能を付加している。これは、スクリプトエンジンレベルフックの一例といえる。この手法によれば、スクリプトの挙動を解析できる。
柴田 龍平,羽田 大樹,横山 恵一, "Js-Walker:JavaScript API hookingを用いた解析妨害JavaScriptコードのアナリスト向け解析フレームワーク",コンピュータセキュリティシンポジウム2016 論文集,情報処理学会,pp. 951-957, 2016. 大月 勇人,瀧本 栄二,齋藤 彰一,毛利 公一, "マルウェア観測のための仮想計算機モニタを用いたシステムコールトレース手法",情報処理学会論文誌,Vol. 55,No. 9,pp. 2034-2046,2014. Y. Kawakoya, M. Iwamura, E. Shioji, and T. Hariu, " API Chaser: Anti-analysis Resistant Malware Analyzer", International Workshop on Recent Advances in Intrusion Detection, Springer, pp. 123-143, 2013. T. Van Overveldt, C. Kruegel, and G. Vigna, "FlashDetect: ActionScript 3 Malware Detection", International Workshop on Recent Advances in Intrusion Detection, Springer, pp. 274-293, 2012. B. Dolan-Gavitt, T. Leek, M. Zhivich, J. Giffin, and W. Lee, "Virtuoso: Narrowing the Semantic Gap in Virtual Machine Introspection", Proceedings of the IEEE Symposium on Security and Privacy (SP) 2011, IEEE, pp. 297-312, 2011. B. Dolan-Gavitt, T. Leek, J. Hodosh, and W. Lee, "Tappan Zee (North) Bridge: Mining Memory Accesses for Introspection", Proceedings of the 2013 ACM SIGSAC conference on Computer & Communications Security, ACM, pp. 839-850, 2013.
 しかしながら、非特許文献1に記載のスクリプトレベルフックによる手法では、ビルトイン関数など、言語要素のオーバーライドが可能であるという言語仕様に依存しており、そうした言語仕様を持った特定のスクリプト言語に対してのみ実現可能であるため、汎用性に乏しいという課題があった。
 また、非特許文献2及び非特許文献3に記載のシステムレベルフックによる手法では、解析対象のスクリプトと、監視箇所のシステムコールやシステムAPIの間に隔たりがあるため、セマンティックギャップが生じるという課題があった。
 セマンティックギャップとは、意味上の隔たりのことを指す。スクリプト自身や、その近傍のスクリプトエンジンのレベルで監視した際に得られる情報と、スクリプトとの隔たりがあるシステムのレベルで監視した際に得られる情報とで、得られる情報量が変化することをセマンティックギャップという。
 たとえば、スクリプトのレベルではDocument.Cookie.Setという言語要素で観測されたCookieの操作が、システムのレベルではCookieに関するファイルへの単なるWriteFileとして観測される。これにより、Cookieの操作からファイルの操作へと意味上の情報量が減少している。これをセマンティクスの喪失と言い、セマンティックギャップによって生じる課題となる。
 そして、非特許文献4に記載のスクリプトエンジンレベルフックによる手法では、スクリプトエンジンというスクリプトの近傍で挙動を監視できるためセマンティックギャップは生じないものの、どのようにフックを実装するかがスクリプトエンジンの実装に依存するために自明でないという課題がある。すなわち、スクリプトエンジン中でフックを施して解析用のコードを挿入する箇所(フックポイントと呼ぶ)と、解析用のコードによってログとして出力されるメモリ監視箇所(タップポイントと呼ぶ)が分からないため、解析によって明らかにする必要がある。
 この解析作業は、オープンソースのスクリプトエンジンに対しては、ソースコードの解析によって実現できるが、ソースコードが得られるスクリプト言語に限られ、一定の工数も要する。さらに、プロプライエタリのスクリプトエンジンについては、バイナリのリバースエンジニアリングの必要があり、人手での実施には熟練したリバースエンジニアと多大な工数を要するため、現実的でない。さらに、そのリバースエンジニアリングの自動化は、確立されていない。
 一方、スクリプトエンジンレベルフックの課題は、スクリプトレベルフックやシステムレベルフックの抱える課題と異なり、原理的には解決が可能である。すなわち、スクリプトエンジンのバイナリからフックポイント及びタップポイントを検出し、自動的にフックを施すことができれば、任意のスクリプトエンジンに対して、セマンティックギャップのない解析機能を持たせられる。
 これに対し、非特許文献5及び非特許文献6では、VMM上のOSの上で実行されるアプリケーションに対して、自動的なリバースエンジニアリングにより、特定の機能を持ったコード部分を抽出する解析手法と、タップポイントを検出する解析手法を提案している。
 しかしながら、非特許文献5及び非特許文献6に記載の手法では、フックポイントの検出は実現しておらず、適用対象もスクリプトエンジンではないため、スクリプトエンジンへの自動的なフックの実現には至っていないという課題があった。
 本発明は、上記に鑑みてなされたものであって、スクリプト言語の言語仕様によらずに任意に適用可能であり、セマンティックギャップを生じることのない解析機能の付与を実現できる解析機能付与装置、解析機能付与方法及び解析機能付与プログラムを提供することを目的とする。
 上述した課題を解決し、目的を達成するために、本発明に係る解析機能付与装置は、スクリプトエンジンを監視しながら実行し、APIトレースとブランチトレースとを含む実行トレースを取得する取得部と、実行トレースを解析し、フックを施して解析用コードを挿入する箇所であるフックポイントを検出する第1の検出部と、フックポイントでの監視に基づいて、解析用コードによってログ出力するメモリ監視箇所であるタップポイントを検出する第2の検出部と、フックポイント及びタップポイントに基づいて、スクリプトエンジンにフックを施して解析機能を付与する付与部と、を有することを特徴とする。
 本発明によれば、スクリプト言語の言語仕様によらずに任意に適用可能であり、セマンティックギャップを生じることのない解析機能の付与を実現できる。
図1は、実施の形態に係る解析機能付与装置の処理の概要を例示する模式図である。 図2-1は、図1に示すテストスクリプトの一例を示す図である。 図2-2は、図1に示すテストスクリプトの一例を示す図である。 図2-3は、図1に示すテストスクリプトの一例を示す図である。 図3は、実行トレースの一例を示す図である。 図4は、図1に示す実行トレースデータベース(DB)が記憶するデータのデータ構成の一例を示す図である。 図5は、フックポイントDBが記憶するデータのデータ構成の一例を示す図である。 図6は、タップポイントDBが記憶するデータのデータ構成の一例を示す図である。 図7は、バックトレース解析部の処理の一例を示す図である。 図8は、差分実行解析部の処理の一例を示す図である。 図9は、改変を施したSmith-Watermanアルゴリズムの処理の一例を示す図である。 図10は、タップポイント検出部の処理の一例を示す図である。 図11は、実施の形態に係る解析機能付与方法の処理手順を示すフローチャートである。 図12は、図11に示す実行トレース取得処理の処理手順を示すフローチャートである。 図13は、図11に示すバックトレース解析処理の処理手順を示すフローチャートである。 図14は、図11に示す差分実行解析処理の処理手順を示すフローチャートである。 図15は、図14に示す改変Smith-Watermanアルゴリズム適用処理の処理手順を示すフローチャートである。 図16は、図11に示すタップポイント検出処理の処理手順を示すフローチャートである。 図17は、図11に示す解析機能付与処理の処理手順を示すフローチャートである。 図18は、プログラムが実行されることにより、解析機能付与装置が実現されるコンピュータの一例を示す図である。
 以下、図面を参照して、本発明の一実施形態を詳細に説明する。なお、この実施形態により本発明が限定されるものではない。また、図面の記載において、同一部分には同一の符号を付して示している。
[実施の形態]
 本実施の形態に係る解析機能付与装置について、解析機能付与装置の概略構成、及び解析機能付与装置における処理の流れ及び具体例を説明する。本実施の形態に係る解析機能付与装置は、テストスクリプトを用いてスクリプトエンジンバイナリを解析することにより、フックポイントとタップポイントを検出する。
 ここで、フックポイントとは、フックを施して解析用コードを挿入する箇所である。本実施の形態においては、スクリプトエンジンの内部実装が持つ関数(内部関数と呼ぶ)を単位とし、フックはこの内部関数の先頭に施されるものとする。また、タップポイントとは、解析用コードによってログ出力するメモリ監視箇所であり、内部関数の引数のいずれかであるとする。
 まず、この解析機能付与装置は、スクリプトエンジンバイナリに対して、システムAPIのフックと、分岐命令のフックにより、APIトレースとブランチトレースを含む実行トレースを取得する。ただし、APIトレースは、実行されたシステムAPIを記録したものであり、ブランチトレースは、実行された分岐を記録したものである。
 そして、この解析機能付与装置は、この実行トレースを解析し、フックポイントを検出する。フックポイントの検出には、システムAPIの呼び出しから遡って探索するバックトレース解析と、少しずつ条件を変えて取得した複数の実行トレースの差分を基に解析する差分実行解析の2つの解析手法を適用する。これらによって検出されたフックポイントを、フックポイントの候補とする。
 さらに、この解析機能付与装置は、このフックポイント候補にフックを施して、フックされた関数の引数を探索することで、タップポイントを検出する。すなわち、解析機能付与装置は、フックポイント候補の関数の引数に、テストスクリプトの引数が見られれば、そのフックポイント候補を有効なフックポイントとして確定し、また、その引数をタップポイントとする。
 そして、解析機能付与装置は、こうして得られたフックポイントとタップポイントに基づいて、スクリプトエンジンバイナリに対して、フックを施す。解析機能付与装置は、このフックによって、フックポイントに、フックポイントに対応した言語要素と、タップポイントのメモリをログ出力するコードを挿入する。解析機能付与装置では、このフックによって、スクリプトが実行された際に、スクリプト言語のどの言語要素が、どんな引数を伴って実行されたかがログ出力されるようになる。これにより、解析機能付与装置は、スクリプトエンジンに後付けでの解析機能の付与を実現する。
[解析機能付与装置10の構成]
 まず、図1を参照して、実施の形態に係る解析機能付与装置10の構成について説明する。図1は、実施の形態に係る解析機能付与装置10の構成の一例を説明するための図である。
 図1に示すように、解析機能付与装置10は、入力部11、制御部12、出力部13、記憶部14、実行トレースDB21、フックポイントDB22及びタップポイントDB23を有する。また、制御部12は、実行トレース取得部121(取得部)、フックポイント検出部122(第1の検出部)、タップポイント検出部123(第2の検出部)、解析機能付与部124(付与部)を有する。また、フックポイント検出部122は、バックトレース解析部1221(第2の解析部)及び差分実行解析部1222(第1の解析部)を有する。そして、解析機能付与装置10は、テストスクリプト及びスクリプトエンジンバイナリの入力を受け付ける。
 入力部11は、キーボードやマウス等の入力デバイスで構成され、外部からの情報の入力を受け付け、制御部12に入力する。入力部11は、テストスクリプト及びスクリプトエンジンバイナリの入力を受け付け、制御部12に出力する。
 ここで、テストスクリプトは、スクリプトエンジンを動的解析して実行トレースを取得する際に、入力されるスクリプトである。テストスクリプトの詳細は後述する。また、スクリプトエンジンバイナリは、スクリプトエンジンを構成する実行可能ファイルである。スクリプトエンジンバイナリは、複数の実行可能ファイルによって構成される場合がある。
 制御部12は、各種の処理手順などを規定したプログラム及び所要データを格納するための内部メモリを有し、これらによって種々の処理を実行する。例えば、制御部12は、CPU(Central Processing Unit)やMPU(Micro Processing Unit)などの電子回路である。制御部12は、実行トレース取得部121、フックポイント検出部122、タップポイント検出部123、解析機能付与部124を有する。
 実行トレース取得部121は、テストスクリプト及びスクリプトエンジンバイナリを入力として受け付ける。実行トレース取得部121は、スクリプトエンジンバイナリの実行を監視しながら、テストスクリプトを実行することで、実行トレースを取得する。実行トレースは、APIトレースとブランチトレースで構成される。APIトレースは、実行の際に、呼び出されたシステムAPIとその引数を記録したものである。ブランチトレースは、実行の際の分岐命令の種類と、分岐元アドレスと分岐先アドレスを記録する。APIトレースは、APIフックと呼ばれる手法によって取得可能であり、ブランチトレースは命令フックによって取得可能であることが知られている。実行トレース取得部121は、取得した実行トレースを、実行トレースDB21に格納する。
 フックポイント検出部122は、バックトレース解析部1221と差分実行解析部1222を有する。フックポイント検出部122は、実行トレースDB21に格納された実行トレースを取り出して解析し、フックポイントの候補を発見する。バックトレース解析部1221と差分実行解析部1222とは、いずれもこのフックポイントの候補を検出する役目を果たす。フックポイント検出部122は、実行トレースをバックトレース解析部1221に入力する。
 バックトレース解析部1221は、実行トレースに対して、解析対象に関連したシステムAPIの呼び出しを探索し、そこからのバックトレースによってフックポイント候補を検出する。言い換えると、バックトレース解析部1221は、解析対象の言語要素に対応したシステムAPIからのバックトレースを適用してフックポイントを検出する。
 差分実行解析部1222は、取得条件の異なる複数の実行トレースの差分を抽出し、特定の条件を満たす部分を発見することでフックポイント候補を検出する。差分実行解析部1222は、複数の条件を変えた実行トレースの間に見られる差分に基づいてフックポイントを検出する。この際、差分実行解析部1222は、相同性の高い系列が特定の回数出現することを検出するアルゴリズムを用いてフックポイントを検出する。例えば、差分実行解析部1222は、相同性の高い系列が特定の回数出現することを検出するアルゴリズムとして改変されたSmith-Watermanアルゴリズム用いる。
 タップポイント検出部123は、フックポイント検出部122によって得られたフックポイント候補にフックを施し、そのフックが施された関数の引数のメモリを探索することで、タップポイントを検出する。タップポイント検出部123は、フックポイントでの監視に基づいて、解析用コードによってログ出力するメモリ監視箇所であるタップポイントを検出する。また、タップポイント検出部123は、タップポイントを持ったフックポイント候補を、フックポイントとして確定する。
 解析機能付与部124は、得られたフックポイント及びタップポイントに対してフックを施し、フックポイントに対応した言語要素と、タップポイントに現れる引数をログ出力することで、スクリプトエンジンに解析機能を付与する。言い換えると、解析機能付与部124は、フックポイント及びタップポイントに基づいて、スクリプトエンジンにフックを施して解析機能を付与する。
 出力部13は、例えば、液晶ディスプレイやプリンタ等であって、解析機能付与に関する情報を含む各種情報を出力する。また、出力部13は、外部装置との間で、各種データの入出力を司るインタフェースであってもよく、外部装置に各種情報を出力してもよい。
 記憶部14は、RAM(Random Access Memory)、フラッシュメモリ(Flash Memory)等の半導体メモリ素子、または、ハードディスク、光ディスク等の記憶装置によって実現され、解析機能付与装置10を動作させる処理プログラムや、処理プログラムの実行中に使用されるデータなどが記憶される。
 実行トレースDB21は、実行トレース取得部121が取得した実行トレースを記憶する。フックポイントDB22は、差分実行解析部1222が検出したフックポイント候補を記憶する。タップポイントDB23は、タップポイント検出部123が検出したタップポイントを記憶する。
[テストスクリプトの構成]
 まず、テストスクリプトについて説明する。図2-1~図2-3は、テストスクリプトの一例を示す図である。
 テストスクリプトとは、スクリプトエンジンを動的解析する際に入力されるスクリプトである。このテストスクリプトは、スクリプトエンジンにおいて解析したい言語要素を指定する働きを果たす。したがって、本実施の形態では、解析対象の言語要素のみを含んだスクリプトを用いる。たとえば、CreateObjectという言語要素に関する処理を解析してこの言語要素のフックポイント及びタップポイントを獲得したい場合は、図2-1のように、CreateObjectのみを呼び出すテストスクリプトを作成する。このテストスクリプトは解析の事前に準備するものであり、手動で作成するものである。この作成には、対象のスクリプト言語の仕様に関する知識が必要となる。
 バックトレース解析のためのテストスクリプトでは、言語要素の引数のうちで任意に設定可能なものに、特徴的な値を設定する。これにより、スクリプトで渡された引数が、スクリプトエンジンによって最終的にどのシステムAPIに渡されたのかを判別する。
 差分実行解析では、図2-2に示すテストスクリプト(差分実行解析用A)と図2-3に示すテストスクリプト(差分実行解析用B)のように、複数のテストスクリプトを用いる。そして、差分実行解析では、それぞれに対する実行トレースを比較することで、フックポイントを検出する。テストスクリプトには、差分実行解析用Aのように解析対象の言語要素を1回のみ呼び出すスクリプトと、差分実行解析用Bのように複数回呼び出すスクリプトとを用意する。これにより、解析機能付与装置10は、実行トレースを比較した際に、複数回現れるトレース部分を捉えることで、言語要素に関わる部分を特定できる。
[実行トレースの構成]
 次に、実行トレースについて説明する。図3は、実行トレースの一例を示す図である。実行トレースは、前述の通り、APIトレースとブランチトレースによって構成されている。図3は、実行トレースの一部を切り出したものである。以降、図3を用いて実行トレースの構成を示す。
 ブランチトレースのログ行は、たとえば、図3の1行目から10行目に記載の書式になっており、「type」、「from」、「to」の3つの要素からなる。「type」には、実行された分岐命令がcall命令によるものか、jmp命令によるものか、ret命令によるものかが示される。また、「from」には分岐元のアドレスが示される。「to」には分岐先のアドレスが示される。
 APIトレースのログ行は、たとえば、図3の11行目から13行目に記載の書式になっており、「type」、「name」、「argindex」、「argname」、「arg」の5つの要素からなる。「type」には、APIトレースのログ行であることが示されるため、APIという値のみをとる。「name」には、APIの名前が格納される。また、「argindex」には、APIの何番目の引数であるかのインデックスが格納される。「argname」には引数の名前が格納される。「arg」には観測された引数の値が格納される。
[実行トレースDBの構成]
 次に、実行トレースDB21が記憶するデータのデータ構成について説明する。図4は、実行トレースDB21が記憶するデータのデータ構成の一例を示す図である。
 実行トレースDB21は、取得した実行トレースを格納するDBである。図4に示すように、実行トレースDB21は、「id」、「trace_id」、「image_name」、「branch_index」、「branch_type」、「src_addr」、「dst_addr」、「args」のテーブルスキーマを持つ。
 「id」は、テーブル全体でユニークになるように割り振られる識別子であり、整数値を持つ。「trace_id」は、取得された実行トレースごとにユニークになるように割り振られる識別子であり、整数値を持つ。「image_name」は、実行トレースを取得している、解析対象のスクリプトエンジンの実行ファイル名である。「branch_index」は、1つの実行トレース内で何番目に記録された分岐かを示す序数である。「branch_type」は、分岐がどの命令によってなされたかを示す。
 「branch_type」は、実行トレースで取得する分岐によって、jmp, call, retなどをとる。また、「branch_type」は、システムAPIの呼び出しに際しては、呼び出されたシステムAPIの種類も併せて格納する。「src_addr」は、分岐元を保持する。「dst_addr」は分岐先のアドレスを保持する。「image_name」内での分岐の場合は、オフセットを保持してもよい。「Args」には、システムAPIが呼び出された際の引数を記録する。
[フックポイントDBの構成]
 次に、フックポイントDB22が記憶するデータのデータ構成について説明する。図5は、フックポイントDB22が記憶するデータのデータ構成の一例を示す図である。
 フックポイントDB22は、検出されたフックポイント候補を格納するDBである。図5に示すように、フックポイントDB22は、「id」、「trace_id」、「hookpoint_addr」のテーブルスキーマを持つ。
 「id」と「trace_id」とは、実行トレースDB21の持つものと同様である。「hookpoint_addr」は、フックポイント候補のアドレスを保持する。前述の通り、フックポイントは関数の先頭アドレスとなっている。
[タップポイントDBの構成]
 次に、タップポイントDB23が記憶するデータのデータ構成について説明する。図6は、タップポイントDB23が記憶するデータのデータ構成の一例を示す図である。
 タップポイントDB23は、検出されたタップポイント候補を格納するDBである。図6に示すように、タップポイントDB23は、「id」、「trace_id」、「hookpoint_addr」、「tappoint_arg_number」、「variable_type」のテーブルスキーマを持つ。
 「id」、「trace_id」及び「hookpoint_addr」は、実行トレースDB21の持つものと同様である。「tappoint_arg_number」は、フックポイントの指す関数の何番目の引数がタップポイントであるかを示す。また、「variable_type」は、変数の型である。
[バックトレース解析部の処理]
 次に、図7を参照して、バックトレース解析部1221の処理について説明する。図7は、バックトレース解析部1221の処理の一例を説明するための図である。
 バックトレースに基づく検出手法は、取得した実行トレースのログを解析することで実現される。このバックトレースに基づく検出手法は、システムとのインタラクションを要する言語要素のフックポイントの検出に用いる。すなわち、システムAPIの呼び出しを伴う言語要素に対して有効である。
 この手法は、システムとのインタラクションが必要な言語要素は、スクリプトエンジン内のその言語要素に関わるコード領域から、必要なシステムAPIを呼び出すであろう、という仮定に基づいている。したがって、この検出手法においては、図5の黒塗りの×印にあたるシステムAPIの呼び出しから、白抜きの×印にあたるスクリプトエンジンのコード領域まで矢印Y1~Y3のように遡って辿っていくことによって、言語要素に関わるコード部分を特定し、そこに存在する言語要素に関わるフックポイントを検出する。
 このため、まず、バックトレース解析部1221は、スクリプト内で実行している言語要素の引数が、システムAPIの引数として現れている呼び出しを発見する。そして、バックトレース解析部1221は、そこからブランチトレースに基づいて呼び出し元を辿り、遡っていく。バックトレース解析部1221は、スクリプトエンジンまで遡ったら、そのスクリプトエンジン内の呼び出し箇所からN回分の分岐を、フックポイント候補として検出する。ここで、遡りがスクリプトエンジンに辿り着いた点をフックポイントとするのではなく、そこからN回遡っている理由は、システムAPIがスタブ等を経由して呼び出される場合を考慮しているためである。このNには、たとえば、N=10などを用いる。
[差分実行解析部の処理]
 次に、もう一つのフックポイント検出手法を用いた、差分実行解析部1222の処理を説明する。差分実行解析とは、条件を変更しつつ複数の実行トレースを取得し、その差分を分析することで動的解析する方法である。この検出手法は、システムAPIの呼び出しを伴わない言語要素に対して有効である。
 例えば、VBScriptの持つEval関数などはスクリプトエンジンの中で閉じた言語要素であり、システムAPIを呼び出す必要がない。ただし、手動解析の際には、解析者に有用な情報を持つため、興味の対象となる。こうした言語要素に対しては、システムAPIに依存するバックトレースによる検出手法では効果をなさないが、この差分実行解析による手法では、検出が可能となる。要素のみを1回呼び出した場合の実行トレースと、複数回実行した場合の実行トレースとでは、その言語要素に関わるコードの実行トレースのみが差分として現れるであろう、という仮定に基づいている。
 差分実行解析部1222は、複数のテストスクリプトとその実行トレースを入力として受け付ける。テストスクリプトには、解析対象の言語要素を1回のみ呼び出すスクリプト(たとえば、図2-2の差分実行解析用A)と、複数回呼び出すスクリプト(たとえば、図2-3の差分実行解析用B)を用意する。そして、差分実行解析部1222は、各々の実行トレースを比較することで、差分を検出する。これにより、差分実行解析部1222は、実行トレースを比較した際に差分に現れる、解析対象の言語要素に関わるトレース部分を捉える。
 図8は、差分実行解析部1222の処理の一例を示す図である。図8では、図2-2のテストスクリプト(差分実行解析用A)に対する実行トレース(実行トレースAとする)と、図2-3のテストスクリプト(差分実行解析用B)に対する実行トレース(実行トレースBとする)を比較している。
 テストスクリプト(差分実行解析用A)では、解析対象の言語要素であるEval関数が1回のみ呼び出されており、テストスクリプト(差分実行解析用B)では、複数回(3回)呼び出されている。したがって、実行トレースAと実行トレースBとを比較すると、ブランチトレース部分に、図8の部分R11,R21,R23,R25のように、実行トレースAには1回のみ、実行トレースBには3回現れるブランチトレースの部分集合が見られる。この部分が、解析対象の言語要素のEval関数に対応した分岐の集合であり、フックポイント候補となる。
 この抽出は、2つ以上の系列から相同性の高い部分系列を抽出するローカルアラインメントの検出手法である、Smith-Watermanアルゴリズムによって実現できる。ただし、Smith-Watermanアルゴリズムには、先ほど述べた一方に1回、もう一方に3回出現するというような回数の制約は考慮されないため、以下のように改変を施した。
[改変Smith-Watermanアルゴリズムの処理]
 次に、図9を用いて改変を施したSmith-Watermanアルゴリズムの処理を説明する。図9は、改変を施したSmith-Watermanアルゴリズムの処理の一例を示す図である。
 Smith-Watermanアルゴリズムは、動的計画法(DP(Dynamic Programming))に基づく系列アライメントアルゴリズムであり、2つ以上の系列から、相同性の高い部分系列を抽出できる。
 このアルゴリズムでは、図9に示すDP表と呼ばれる表を用いる。DP表では、1つの系列を表頭に、もう1つの系列を表側に配置し、各セルにマッチスコアを記入する。x軸方向の添字をi、y軸方向の添字をjとして、(1)式に基づいてセル(i,j)のスコアF(i,j)を算出していく。このDP表の作成までは、通常のSmith-Watermanアルゴリズムと同一である。なお、(1)式におけるs(i,j)及びdは、(2),(3)式のように示される。
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000002
 図9中のA,B,Cは合わさって、図8の部分R11,R21,R23,R25のそれぞれ1つ分を構成する。Sは、図8の実行トレースの最初に現れる部分R10,R20である。Eは、図8の最後に現れる部分R12,R26である。Mは、部分R21,R23,R25の間に現れる部分R22,R24である。本来、これらの各要素は複数の分岐トレースのログで構成されるが、ここでは簡略化のためアルファベットを利用し、かつ、圧縮している。
 ここから、スコアが最大のセル(図7のセルC1)からバックトラックしていくことで、最も相同性の高い部分系列(図7内のセルC1を含む破線部分W1、SABC)を発見して終了するが、改変した手法では、ここからさらに探索を行う。
 差分実行解析部1222は、アルゴリズムで抽出された部分系列を除いたDP表のうち、同じ行(図7の部分W11)に対して、改めて相同性の高い部分系列を抽出する。差分実行解析部1222は、この処理をテストスクリプトでの呼び出し回数分繰り返し、抽出された部分系列(図7の部分W1,W2,W3)同士のうち、各々の部分文字列の類似度がいずれも閾値以上である場合には、その部分を構成する分岐トレースのログがフックポイント候補であるとして検出する。一方、各々の部分文字列の類似度がいずれも閾値未満である場合には、差分実行解析部1222は、次にスコアの高いセルについて調べていく。
[タップポイント検出部の処理]
 次に、図10を用いてタップポイント検出部123の処理を説明する。図10は、タップポイント検出部123の処理の一例を示す図である。
 タップポイントの検出は、以下の2点の役割を担う。1点目は、フックポイント検出で得られたフックポイント候補の中から、最終的なフックポイントを確定することである。2点目は、フック時にログ出力するメモリ位置を特定することである。タップポイントは、フックポイントとなっている関数の引数を探索していくことで検出する。
 そのために、タップポイント検出部123は、ここまでで得られたフックポイント候補にフックを施して、実行トレースを再度取得する。引数は、呼出規約に沿って参照していくことで取得できる。このとき、各引数の型情報は得られないため、さらなる探索にはヒューリスティクスが必要となる。
 このヒューリスティクスには、図10のような探索を用いる。まず、引数がポインタとして参照できない場合は、それが値であるとみる。引数がポインタとして参照できる場合は、ポインタとして参照する。値としてみる場合もポインタとして参照する場合も、様々な型としてみていく。
 たとえば、図10では、int型の値としてみるとともに、LPCSTR型及びLPBSTR型として参照している。この結果、タップポイント検出部123は、テストスクリプトで用いている引数がフックポイント候補で観測されれば、そのフックポイントを確定し、引数が得られた点をタップポイントとする。図8の場合、テストスクリプト中の引数にWScript.Shellという引数があったとしたとき、LPBSTR型としてみた際にこの引数が観測されているため、タップポイント検出部123は、この引数をタップポイントとして検出する。
 もちろん、タップポイント検出部123の処理は上述に限るものではなく、その他の探索方式を用いてもよい。たとえば、ヒューリスティクスを用いずに、型情報をリバースエンジニアリングによって獲得する手法(詳細は、例えば、J. Lee, T. Avgerinos, and D. Brumley, “TIE: Principled Reverse Engineering of Types in Binary Programs”, Network and Distributed System Security Symposium, Internet Society, 2011.参照)を用いてもよい。
[解析機能付与部の処理]
 次に、解析機能付与部124の処理を説明する。解析機能付与部124は、スクリプトエンジンバイナリと、ここまでの処理で検出されたフックポイント及びタップポイントを入力として受け付ける。解析機能付与部124は、スクリプトエンジンに対して、フックポイントでのフックを施す。ここで、フック時に実現される機能として、フックに対応した言語要素が実行されたことと、その引数としてのタップポイントのメモリがログ出力されるように、解析用のコードを挿入する。この解析用のコードは、フックポイントとタップポイントが判明していれば、容易に生成できる。これによって、スクリプトが実行された際に、その挙動がログ出力されるようになり、解析機能の付与が実現される。
 このフックによる解析機能の付与は、スクリプトエンジンバイナリに対するバイナリを直接書き換えて実現してもよく、バイナリが実行されてプロセスメモリ上に展開された際にメモリイメージを書き換えて実現してもよい。
[解析機能付与装置の処理手順]
 図11は、実施の形態に係る解析機能付与方法の処理手順を示すフローチャートである。
 まず、図11に示すように、入力部11は、テストスクリプト及びスクリプトエンジンバイナリを入力として受け取る(ステップS1)。次に、実行トレース取得部121は、実行トレース取得処理を実施する(ステップS2)。そして、バックトレース解析部1221は、バックトレース解析処理によって、フックポイント候補を検出する(ステップS3)。このとき、解析機能付与装置10は、フックポイント候補が検出された場合(ステップS4:Yes)、ステップS7に進む。一方、フックポイント候補が検出されなかった場合(ステップS4:No)、差分実行解析部1222は、差分実行解析処理を実施する(ステップS5)。
 そして、解析機能付与装置10は、フックポイント候補が検出されなかった場合(ステップS6:No)、フックポイント候補の検出がないため、処理を終了する。一方、解析機能付与装置10は、フックポイント候補が検出された場合(ステップS6:Yes)、ステップS7に進む。
 タップポイント検出部123は、タップポイント検出処理を実施する(ステップS7)。解析機能付与装置10は、フックポイント及びタップポイントが検出されなかった場合には(ステップS8:No)、処理を終了する。
 一方、フックポイント及びタップポイントが検出された場合には(ステップS8:Yes)、解析機能付与部124は、解析機能付与処理を実施する(ステップS9)。解析機能付与装置10は、出力部13において、解析機能が付与されたスクリプトエンジンバイナリを出力し(ステップS10)、処理を終了する。
[実行トレース取得処理の処理手順]
 次に、図11に示す実行トレース取得処理(ステップS2)について説明する。図12は、図11に示す実行トレース取得処理の処理手順を示すフローチャートである。
 まず、実行トレース取得部121は、テストスクリプト及びスクリプトエンジンバイナリを入力として受け取る(ステップS11)。そして、実行トレース取得部121は、受け取ったスクリプトエンジンに対して、APIトレースを取得するためのフックを施す(ステップS12)。また、実行トレース取得部121は、同じく分岐命令のトレースを取得するためのフックも施す(ステップS13)。そして、実行トレース取得部121は、その状態で受け取ったテストスクリプトをスクリプトエンジンに入力して実行させ(ステップS14)、それによって取得される実行トレースを実行トレースDB21に格納する(ステップS15)。実行トレース取得部121は、入力されたテストスクリプトを全て実行し終えている場合(ステップS16:Yes)、処理を終了する。一方、実行トレース取得部121は、入力されたテストスクリプトの全てを実行し切っていない場合(ステップS16:No)、テストスクリプトの実行(ステップS14)に戻って処理を続ける。
[バックトレース解析処理の処理手順]
 次に、図11に示すバックトレース解析処理(ステップS3)の流れについて説明する。図13は、図11に示すバックトレース解析処理の処理手順を示すフローチャートである。
 まず、バックトレース解析部1221は、実行トレースDB21から実行トレースを取り出す(ステップS21)。また、バックトレース解析部1221は、テストスクリプトを入力として受け取る(ステップS22)。そして、バックトレース解析部1221は、実行トレース中に存在するシステムAPIの呼び出し時の引数を走査する(ステップS23)。
 このとき、テストスクリプト中の引数とシステムAPIの引数とで一致がない場合(ステップS24:No)、バックトレース解析部1221は、バックトレース解析で検出できるフックポイントはないとして、処理を終了する。
 一方、バックトレース解析部1221は、テストスクリプト中の引数とシステムAPIの引数とで一致がある場合(ステップS24:Yes)、一致したシステムAPIを始点として、実行トレース中の分岐を遡って辿っていく(ステップS25)。そして、バックトレース解析部1221は、遡りがスクリプトエンジンに到達した点から、N回遡って得られるN個の分岐を、フックポイント候補とする(ステップS26)。そして、バックトレース解析部1221は、このフックポイント候補を出力して処理を終了する(ステップS27)。
[差分実行解析処理の処理手順]
 次に、図11に示す差分実行解析処理(ステップS5)の流れについて説明する。図14は、図11に示す差分実行解析処理の処理手順を示すフローチャートである。
 まず、差分実行解析部1222は、実行トレースDB21から実行トレースを取り出す(ステップS31)。そして、差分実行解析部1222は、Smith-Watermanアルゴリズム適用処理を実施する(ステップS32)。差分実行解析部1222は、この処理を実施することによって、取得条件の異なる複数の実行トレースの差分を抽出し、特定の条件を満たす部分を発見する。
 差分実行解析部1222は、フックポイント候補が検出された場合には(ステップS33:Yes)、フックポイント候補を出力する(ステップS34)。一方、差分実行解析部1222は、フックポイント候補が検出されなかった場合には(ステップS33:No)、処理を終了する。
[改変Smith-Watermanアルゴリズム適用処理の処理手順]
 次に、図14に示す改変Smith-Watermanアルゴリズム適用処理(ステップS32)の流れについて説明する。図15は、図14に示す改変Smith-Watermanアルゴリズム適用の処理手順を示すフローチャートである。
 まず、差分実行解析部1222は、実行トレースDB21から実行トレースを取り出す(ステップS41)。この場合、差分実行解析用の実行トレースであるため、解析対象の言語要素を1回呼び出す実行トレースと、複数回呼び出す実行トレースとの2つが取り出される。
 差分実行解析部1222は、解析対象の言語要素を1回呼び出した実行トレースを、DP表の表側に据える(ステップS42)。また、差分実行解析部1222は、同じく複数回呼び出した実行トレースをDP表の表頭に据える(ステップS43)。そして、差分実行解析部1222は、i=0,j=0とし(ステップS44)、マッチスコアF(i,j)を(1)式に基づいて算出する(ステップS45)。
 ここで、差分実行解析部1222は、iが行数よりも大きいか否かを判定する(ステップS46)。差分実行解析部1222は、iが行数よりも大きくないと判定した場合は(ステップS46:No)、iに1を加算した上で(ステップS47)、マッチスコアの算出(ステップS45)に戻って処理を続ける。
 一方、差分実行解析部1222は、iが行数よりも大きいと判定した場合は(ステップS46:Yes)、jが列数よりも大きいか否かを判定する(ステップS48)。差分実行解析部1222は、jが列数よりも大きくないと判定した場合(ステップS48:No)、i=0とし、jに1を加算した上で(ステップS49)、マッチスコアの算出(ステップS45)に戻って処理を続ける。
 これに対し、差分実行解析部1222は、jが列数よりも大きいと判定した場合には(ステップS48:Yes)、マッチスコアが最大となるセルを抽出し(ステップS50)、そこからバックトラックして、最も相同性の高い系列を抽出する(ステップS51)。
 そして、差分実行解析部1222は、抽出した系列と同じ行について上位(N-1)個の系列を新たに抽出する(ステップS52)。差分実行解析部1222は、先ほどのN個全部でN個の抽出した系列について、各々の類似度を算出する(ステップS53)。差分実行解析部1222は、算出した各類似度がそれぞれ所定の閾値を超えたか否かを判定する(ステップS54)。
 差分実行解析部1222は、算出した各類似度がそれぞれ所定の閾値を超えているとは判定した場合(ステップS54:Yes)、抽出した系列に含まれている分岐をフックポイント候補とし(ステップS55)、このフックポイント候補を出力して(ステップS56)、処理を終了する。これに対し、差分実行解析部1222は、算出した各類似度がそれぞれ所定の閾値を超えていないと判定した場合(ステップS54:No)、マッチスコアが次に大きなセルを抽出し(ステップS57)、バックトラックして系列を抽出して(ステップS58)、ステップS52に戻って処理を続ける。
[タップポイント検出処理の処理手順]
 次に、図11に示すタップポイント検出処理(ステップS7)の流れについて説明する。図16は、図11に示すタップポイント検出処理の処理手順を示すフローチャートである。
 まず、タップポイント検出部123は、テストスクリプト及びフックポイント候補を入力として受け取る(ステップS61,S62)。そして、タップポイント検出部123は、フックポイント候補の箇所の全てにフックを施し(ステップS63)、テストスクリプトを実行する(ステップS64)。タップポイント検出部123は、フックポイント候補に到達したら、フックしている関数の引数を探索する(ステップS65)。この探索時において、タップポイント検出部123は、テストスクリプトで指定した引数と同じものが見られたか否かを判定する(ステップS66)。
 タップポイント検出部123は、テストスクリプトで指定した引数と同じものが見られなかったと判定した場合(ステップS66:No)、フックポイント及びタップポイントはなかったとして(ステップS67)、処理を終了する。
 一方、タップポイント検出部123は、テストスクリプトで指定した引数と同じものが見られたと判定した場合(ステップS66:Yes)、一致した引数が見られたフックポイント候補をフックポイントとして確定し(ステップS68)、一致した引数の箇所をタップポイントとする(ステップS69)。そして、タップポイント検出部123は、フックポイント及びタップポイントを出力し(ステップS70)、処理を終了する。
[解析機能付与処理の処理手順]
 次に、図11に示す解析機能付与処理(ステップS9)の流れについて説明する。図17は、図11に示す解析機能付与処理の処理手順を示すフローチャートである。
 まず、解析機能付与部124は、スクリプトエンジンバイナリ、検出されたフックポイント及びタップポイントを入力として受け取る(ステップS71~ステップS73)。そして、解析機能付与部124は、スクリプトエンジンのフックポイントにフックを施し(ステップS74)、このフック時にタップポイントのメモリを出力するコードが実行されるよう、コードを生成して挿入する(ステップS75)。解析機能付与部124は、こうして得られたフックの施されたスクリプトエンジンを、解析機能付きのスクリスクリプトエンジンとして出力し(ステップS76)、処理を終了する。
[実施の形態の効果]
 このように、本実施の形態に係る解析機能付与装置10は、解析機能を付与したいスクリプトエンジンに対し、テストスクリプトを用いて実行トレースを取得する。そして、解析機能付与装置10は、その実行トレースをバックトレース解析と差分実行解析によって解析し、フックポイント候補を検出する。さらに、解析機能付与装置10は、フックポイント候補にフックを施して実行し、メモリを探索することによって、フックポイントの確定とタップポイントの検出を実現する。続いて、解析機能付与装置10は、得られたフックポイントとタップポイントに基づいて、スクリプトエンジンにフックを施し、解析機能を付与する。
 これによって、解析機能付与装置10は、バイナリのみしか手に入らないプロプライエタリなスクリプトエンジンに対しても、フックポイントとタップポイントを検出し、人手でのリバースエンジニアリングを要することなく、解析機能の付与を実現できる。
 また、解析機能付与装置10では、スクリプトエンジンレベルフックを実現するため、スクリプトの近傍でその挙動を監視することが可能であり、セマンティックギャップの生じない解析を実現可能である。
 さらに、解析機能付与装置10は、スクリプトレベルフックと異なり、スクリプト言語の言語仕様に依存しない方法でフックを施すため、多種多様なスクリプト言語のスクリプトエンジンに対して、解析機能の付与できる。
 以上のように、解析機能付与装置10によれば、スクリプトエンジンを解析し、解析機能を後付けで付与することにより、多種多様なスクリプト言語のスクリプトエンジンに対して、セマンティックギャップのない解析機能の自動的な付与を実現できる。
 言い換えると、解析機能付与装置10は、多種多様なスクリプト言語で記述される悪性スクリプトの挙動の解析に有用であり、悪性スクリプトに対して、セマンティックギャップに影響されずに、また、解析を実施することに適している。このため、本実施の形態によれば、解析機能付与装置10を用いて、様々なスクリプトエンジンに解析機能を付与することで、悪性スクリプトを解析して検知などの対策に生かすことが可能である。
[他の実施の形態]
[システム構成等]
 図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況等に応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。さらに、各装置にて行なわれる各処理機能は、その全部又は任意の一部が、CPU及び当該CPUにて解析実行されるプログラムにて実現され、或いは、ワイヤードロジックによるハードウェアとして実現され得る。
 また、本実施の形態において説明した各処理のうち、自動的に行われるものとして説明した処理の全部又は一部を手動的におこなうこともでき、或いは、手動的におこなわれるものとして説明した処理の全部又は一部を公知の方法で自動的におこなうこともできる。この他、上記文書中や図面中で示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。
[プログラム]
 図18は、プログラムが実行されることにより、解析機能付与装置10が実現されるコンピュータの一例を示す図である。コンピュータ1000は、例えば、メモリ1010、CPU1020を有する。また、コンピュータ1000は、ハードディスクドライブインタフェース1030、ディスクドライブインタフェース1040、シリアルポートインタフェース1050、ビデオアダプタ1060、ネットワークインタフェース1070を有する。これらの各部は、バス1080によって接続される。
 メモリ1010は、ROM(Read Only Memory)1011及びRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1090に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1100に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブ1100に挿入される。シリアルポートインタフェース1050は、例えばマウス1110、キーボード1120に接続される。ビデオアダプタ1060は、例えばディスプレイ1130に接続される。
 ハードディスクドライブ1090は、例えば、OS1091、アプリケーションプログラム1092、プログラムモジュール1093、プログラムデータ1094を記憶する。すなわち、解析機能付与装置10の各処理を規定するプログラムは、コンピュータ1000により実行可能なコードが記述されたプログラムモジュール1093として実装される。プログラムモジュール1093は、例えばハードディスクドライブ1090に記憶される。例えば、解析機能付与装置10における機能構成と同様の処理を実行するためのプログラムモジュール1093が、ハードディスクドライブ1090に記憶される。なお、ハードディスクドライブ1090は、SSD(Solid State Drive)により代替されてもよい。
 また、上述した実施の形態の処理で用いられるデータは、プログラムデータ1094として、例えばメモリ1010やハードディスクドライブ1090に記憶される。そして、CPU1020が、メモリ1010やハードディスクドライブ1090に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して実行する。
 なお、プログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1090に記憶される場合に限らず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ1100等を介してCPU1020によって読み出されてもよい。或いは、プログラムモジュール1093及びプログラムデータ1094は、ネットワーク(LAN、WAN等)を介して接続された他のコンピュータに記憶されてもよい。そして、プログラムモジュール1093及びプログラムデータ1094は、他のコンピュータから、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。
 以上、本発明者によってなされた発明を適用した実施形態について説明したが、本実施形態による本発明の開示の一部をなす記述及び図面により本発明は限定されることはない。すなわち、本実施形態に基づいて当業者等によりなされる他の実施形態、実施例及び運用技術等は全て本発明の範疇に含まれる。
 10 解析機能付与装置
 11 入力部
 12 制御部
 13 出力部
 14 記憶部
 21 実行トレースDB
 22 フックポイントDB
 23 タップポイントDB
 121 実行トレース取得部
 122 フックポイント検出部
 123 タップポイント検出部
 124 解析機能付与部
 1221 バックトレース解析部
 1222 差分実行解析部

Claims (8)

  1.  スクリプトエンジンを監視しながら実行し、API(Application Programming Interface)トレースとブランチトレースとを含む実行トレースを取得する取得部と、
     前記実行トレースを解析し、フックを施して解析用コードを挿入する箇所であるフックポイントを検出する第1の検出部と、
     前記フックポイントでの監視に基づいて、解析用コードによってログ出力するメモリ監視箇所であるタップポイントを検出する第2の検出部と、
     前記フックポイント及び前記タップポイントに基づいて、スクリプトエンジンにフックを施して解析機能を付与する付与部と、
     を有することを特徴とする解析機能付与装置。
  2.  前記第1の検出部は、複数の条件を変えた前記実行トレースの間に見られる差分に基づいて前記フックポイントを検出する第1の解析部を有することを特徴とする請求項1に記載の解析機能付与装置。
  3.  前記第1の解析部は、相同性の高い系列が特定の回数出現することを検出するアルゴリズムを用いて前記フックポイントを検出することを特徴とする請求項2に記載の解析機能付与装置。
  4.  前記第1の解析部は、相同性の高い系列が特定の回数出現することを検出するアルゴリズムとして改変されたSmith-Watermanアルゴリズム用いることを特徴とする請求項3に記載の解析機能付与装置。
  5.  前記第1の検出部は、解析対象の言語要素に対応したシステムAPIからのバックトレースを適用して前記フックポイントを検出する第2の解析部を有することを特徴とする請求項1~4のいずれか一つに記載の解析機能付与装置。
  6.  前記第2の検出部は、タップポイントを持ったフックポイント候補をフックポイントとして確定することを特徴とする請求項1~5のいずれか一つに記載の解析機能付与装置。
  7.  解析機能付与装置が実行する解析機能付与方法であって、
     スクリプトエンジンを監視しながら実行し、API(Application Programming Interface)トレースとブランチトレースとを含む実行トレースを取得する工程と、
     前記実行トレースを解析し、フックを施して解析用コードを挿入する箇所であるフックポイントを検出する工程と、
     前記フックポイントでの監視に基づいて、解析用コードによってログ出力するメモリ監視箇所であるタップポイントを検出する工程と、
     前記フックポイント及び前記タップポイントに基づいて、スクリプトエンジンにフックを施して解析機能を付与する工程と、
     を含んだことを特徴とする解析機能付与方法。
  8.  スクリプトエンジンを監視しながら実行し、API(Application Programming Interface)トレースとブランチトレースとを含む実行トレースを取得するステップと、
     前記実行トレースを解析し、フックを施して解析用コードを挿入する箇所であるフックポイントを検出するステップと、
     前記フックポイントでの監視に基づいて、解析用コードによってログ出力するメモリ監視箇所であるタップポイントを検出するステップと、
     前記フックポイント及び前記タップポイントに基づいて、スクリプトエンジンにフックを施して解析機能を付与するステップと、
     をコンピュータに実行させるための解析機能付与プログラム。
PCT/JP2019/020095 2018-10-11 2019-05-21 解析機能付与装置、解析機能付与方法及び解析機能付与プログラム WO2020075335A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2020549950A JP7115552B2 (ja) 2018-10-11 2019-05-21 解析機能付与装置、解析機能付与方法及び解析機能付与プログラム
US17/283,546 US11989292B2 (en) 2018-10-11 2019-05-21 Analysis function imparting device, analysis function imparting method, and recording medium
EP19871119.4A EP3848833B1 (en) 2018-10-11 2019-05-21 Analysis function imparting device, analysis function imparting method, and analysis function imparting program
AU2019357365A AU2019357365B2 (en) 2018-10-11 2019-05-21 Analysis function imparting device, analysis function imparting method, and analysis function imparting program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-192966 2018-10-11
JP2018192966 2018-10-11

Publications (1)

Publication Number Publication Date
WO2020075335A1 true WO2020075335A1 (ja) 2020-04-16

Family

ID=70164658

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/020095 WO2020075335A1 (ja) 2018-10-11 2019-05-21 解析機能付与装置、解析機能付与方法及び解析機能付与プログラム

Country Status (5)

Country Link
US (1) US11989292B2 (ja)
EP (1) EP3848833B1 (ja)
JP (1) JP7115552B2 (ja)
AU (1) AU2019357365B2 (ja)
WO (1) WO2020075335A1 (ja)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210390183A1 (en) * 2018-10-11 2021-12-16 Nippon Telegraph And Telephone Corporation Analysis function imparting device, analysis function imparting method, and recording medium
WO2022079840A1 (ja) * 2020-10-14 2022-04-21 日本電信電話株式会社 解析機能付与装置、解析機能付与方法および解析機能付与プログラム
WO2022180702A1 (ja) * 2021-02-24 2022-09-01 日本電信電話株式会社 解析機能付与装置、解析機能付与プログラム及び解析機能付与方法
WO2023067667A1 (ja) * 2021-10-18 2023-04-27 日本電信電話株式会社 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム
WO2023067668A1 (ja) * 2021-10-18 2023-04-27 日本電信電話株式会社 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム
WO2023067665A1 (ja) * 2021-10-18 2023-04-27 日本電信電話株式会社 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム
WO2023067663A1 (ja) * 2021-10-18 2023-04-27 日本電信電話株式会社 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム
JP7517585B2 (ja) 2021-02-24 2024-07-17 日本電信電話株式会社 解析機能付与装置、解析機能付与プログラム及び解析機能付与方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11630900B2 (en) * 2019-09-30 2023-04-18 Mcafee, Llc Detection of malicious scripted activity in fileless attacks

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012164098A (ja) * 2011-02-06 2012-08-30 Mitsubishi Electric Corp エントリ書換装置及びエントリ書換プログラム
US20150199516A1 (en) * 2013-03-05 2015-07-16 Mcafee, Inc. Execution profile assembly using branch records

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2279601B1 (en) * 2008-05-19 2011-11-02 Citrix Systems, Inc. Methods and systems for enabling features provided by a first presentation layer protocol in a session implemented according to a second presentation layer protocol
US8966623B2 (en) * 2010-03-08 2015-02-24 Vmware, Inc. Managing execution of a running-page in a virtual machine
US8874925B1 (en) * 2011-07-21 2014-10-28 Symantec Corporation Systems and methods to scan memory for a threat
US9600665B2 (en) * 2012-12-21 2017-03-21 Nippon Telegraph And Telephone Corporation Monitoring device and monitoring method
KR101543237B1 (ko) * 2014-12-03 2015-08-11 한국인터넷진흥원 코드 패턴을 이용한 정적 분석과 api 흐름을 이용한 동적 분석을 통한 악성 스크립트 탐지 차단 장치, 시스템 및 방법
JP6708781B2 (ja) * 2017-03-03 2020-06-10 日本電信電話株式会社 選択装置、選択方法及び選択プログラム
US20190163905A1 (en) * 2017-11-27 2019-05-30 PC Pitstop, Inc. System, Method, and Apparatus for Preventing Execution of Malicious Scripts
EP3848833B1 (en) * 2018-10-11 2023-05-24 Nippon Telegraph And Telephone Corporation Analysis function imparting device, analysis function imparting method, and analysis function imparting program
US20230028595A1 (en) * 2019-10-11 2023-01-26 Nippon Telegraph And Telephone Corporation Analysis function imparting device, analysis function imparting method, and analysis function imparting program
WO2023023135A1 (en) * 2021-08-20 2023-02-23 Forter Ltd A system and method for realtime js access control to dom/apis
WO2023067668A1 (ja) * 2021-10-18 2023-04-27 日本電信電話株式会社 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012164098A (ja) * 2011-02-06 2012-08-30 Mitsubishi Electric Corp エントリ書換装置及びエントリ書換プログラム
US20150199516A1 (en) * 2013-03-05 2015-07-16 Mcafee, Inc. Execution profile assembly using branch records

Non-Patent Citations (10)

* Cited by examiner, † Cited by third party
Title
B. DOLAN-GAVITTT. LEEKJ. HODOSHW. LEE: "Proceedings of the 2013 ACM SIGSAC conference on Computer & Communications Security", 2013, ACM, article "Tappan Zee (North) Bridge: Mining Memory Accesses for Introspection", pages: 839 - 850
B. DOLAN-GAVITTT. LEEKM. ZHIVICHJ. GIFFINW. LEE: "Proceedings of the IEEE Symposium on Security and Privacy (SP) 2011", 2011, IEEE, article "Virtuoso: Narrowing the Semantic Gap in Virtual Machine Introspection", pages: 297 - 312
BUYANNEMEFU, ODOFU : "Comparison method of execution traces using 3-gram of dynamic dependent graph", IPSJ SIG SOFTWARE ENGINEERING (SE), vol. 2015-SE-187, no. 4, 5 March 2015 (2015-03-05), pages 1 - 8, XP009526895 *
FUJIOKA, TAIKI : "Proposal of interactive function extraction method based on the properties of object-oriented program", IPSJ SIG SOFTWARE ENGINEERING (SE), vol. 2016-SE-194, no. 2, 10 November 2016 (2016-11-10), pages 1 - 8, XP009526894, ISSN: 2188-8825 *
J. LEET. AVGERINOSD. BRUMLEY: "Network and Distributed System Security Symposium", 2011, INTERNET SOCIETY, article "TIE: Principled Reverse Engineering of Types in Binary Programs"
KON, KENGO ET AL.: "A malicious code extraction method for PDF files based on DBI", COMPUTER SECURITY SYMPOSIUM 2017, vol. 2017, no. 2, 16 October 2017 (2017-10-16), pages 933 - 940, XP055702880, ISSN: 1882-0840 *
R. SHIBATAH. HADAK. YOKOYAMA: "Proc. of Computer Security Symposium", 2016, IPSJ, article "Js-Walker: An Analysis Framework for Analysts of jamming JavaScript Code Using JavaScript API hooking", pages: 951 - 957
See also references of EP3848833A4
Y. KAWAKOYAM. IWAMURAE. SHIOJIT. HARIU: "International Workshop on Recent Advances in Intrusion Detection", 2012, SPRINGER, article "API Chaser: Anti-analysis Resistant Malware Analyzer", pages: 274 - 293
Y. OTSUKIE. TAKIMOTOS. SAITOK. MOURI: "A system call tracing method using virtual computer monitors for malware observation", TRANSACTIONS OF INFORMATION PROCESSING SOCIETY OF JAPAN, vol. 55, no. 9, 2014, pages 2034 - 2046

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210390183A1 (en) * 2018-10-11 2021-12-16 Nippon Telegraph And Telephone Corporation Analysis function imparting device, analysis function imparting method, and recording medium
US11989292B2 (en) * 2018-10-11 2024-05-21 Nippon Telegraph And Telephone Corporation Analysis function imparting device, analysis function imparting method, and recording medium
WO2022079840A1 (ja) * 2020-10-14 2022-04-21 日本電信電話株式会社 解析機能付与装置、解析機能付与方法および解析機能付与プログラム
JP7452691B2 (ja) 2020-10-14 2024-03-19 日本電信電話株式会社 解析機能付与装置、解析機能付与方法および解析機能付与プログラム
WO2022180702A1 (ja) * 2021-02-24 2022-09-01 日本電信電話株式会社 解析機能付与装置、解析機能付与プログラム及び解析機能付与方法
JP7517585B2 (ja) 2021-02-24 2024-07-17 日本電信電話株式会社 解析機能付与装置、解析機能付与プログラム及び解析機能付与方法
WO2023067667A1 (ja) * 2021-10-18 2023-04-27 日本電信電話株式会社 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム
WO2023067668A1 (ja) * 2021-10-18 2023-04-27 日本電信電話株式会社 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム
WO2023067665A1 (ja) * 2021-10-18 2023-04-27 日本電信電話株式会社 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム
WO2023067663A1 (ja) * 2021-10-18 2023-04-27 日本電信電話株式会社 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム

Also Published As

Publication number Publication date
EP3848833A1 (en) 2021-07-14
EP3848833B1 (en) 2023-05-24
AU2019357365B2 (en) 2022-11-17
EP3848833A4 (en) 2022-06-01
AU2019357365A1 (en) 2021-05-13
US20210390183A1 (en) 2021-12-16
JP7115552B2 (ja) 2022-08-09
JPWO2020075335A1 (ja) 2021-05-20
US11989292B2 (en) 2024-05-21

Similar Documents

Publication Publication Date Title
WO2020075335A1 (ja) 解析機能付与装置、解析機能付与方法及び解析機能付与プログラム
Le et al. Deep specification mining
Pan et al. Gui-guided test script repair for mobile apps
CN109583200B (zh) 一种基于动态污点传播的程序异常分析方法
JP7287480B2 (ja) 解析機能付与装置、解析機能付与方法及び解析機能付与プログラム
CN106557413A (zh) 基于代码覆盖率获取测试用例的方法和设备
CN109101815B (zh) 一种恶意软件检测方法及相关设备
CN111240991B (zh) 一种抗隐式污点传播的动态污点检测方法及系统
US10509719B2 (en) Automatic regression identification
WO2022180702A1 (ja) 解析機能付与装置、解析機能付与プログラム及び解析機能付与方法
US11436133B2 (en) Comparable user interface object identifications
WO2014190427A1 (en) Identifying client states
US11868465B2 (en) Binary image stack cookie protection
Murtaza et al. Total ADS: Automated software anomaly detection system
Waly et al. A complete framework for kernel trace analysis
Copos et al. Inputfinder: Reverse engineering closed binaries using hardware performance counters
WO2023067668A1 (ja) 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム
WO2023067665A1 (ja) 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム
US8234525B2 (en) Method and system for anomaly detection in software programs with reduced false negatives
WO2023067663A1 (ja) 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム
WO2023067667A1 (ja) 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム
WO2024079794A1 (ja) 解析機能付与装置、解析機能付与方法および解析機能付与プログラム
JP7517585B2 (ja) 解析機能付与装置、解析機能付与プログラム及び解析機能付与方法
WO2024079800A1 (ja) 解析機能付与装置、解析機能付与方法および解析機能付与プログラム
KR102421394B1 (ko) 하드웨어와 소프트웨어 기반 트레이싱을 이용한 악성코드 탐지 장치 및 방법

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: 19871119

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2020549950

Country of ref document: JP

ENP Entry into the national phase

Ref document number: 2019871119

Country of ref document: EP

Effective date: 20210406

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019357365

Country of ref document: AU

Date of ref document: 20190521

Kind code of ref document: A