WO2004077295A1 - 不正処理判定方法、データ処理装置、コンピュータプログラム、及び記録媒体 - Google Patents

不正処理判定方法、データ処理装置、コンピュータプログラム、及び記録媒体 Download PDF

Info

Publication number
WO2004077295A1
WO2004077295A1 PCT/JP2004/002319 JP2004002319W WO2004077295A1 WO 2004077295 A1 WO2004077295 A1 WO 2004077295A1 JP 2004002319 W JP2004002319 W JP 2004002319W WO 2004077295 A1 WO2004077295 A1 WO 2004077295A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
instruction
byte
code
instruction code
Prior art date
Application number
PCT/JP2004/002319
Other languages
English (en)
French (fr)
Inventor
Kazunori Saito
Original Assignee
Secure Ware Inc.
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 Secure Ware Inc. filed Critical Secure Ware Inc.
Priority to JP2005502935A priority Critical patent/JP4320014B2/ja
Publication of WO2004077295A1 publication Critical patent/WO2004077295A1/ja
Priority to US11/211,556 priority patent/US7895655B2/en

Links

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/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
    • 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

Definitions

  • the present invention relates to an unauthorized process determination method for detecting data for performing an unauthorized process, a data processing device, a computer program for realizing the data processing device, and a computer in which the computer program is recorded.
  • the present invention relates to a readable recording medium.
  • attack data containing instruction codes for performing illegal processing (hereinafter referred to as “illegal codes”) is used for attacking server devices and personal computers.
  • the instruction code is transmitted to an information processing device such as a computer, and the instruction code is executed by the information processing device.
  • attack methods There are various types of such attack methods, and one of them is known as an attack method using a knock-over.
  • the buffer secured in the stack is in a state where writing is being performed on a stacker that is equal to or greater than the secured buffer. If one of these conditions occurs, unexpected variable rupture may occur, causing the program to malfunction.
  • a buffer overflow attack intentionally causes a program to malfunction, for example, acquiring system administrator privileges.
  • the present invention has been made in view of such circumstances, and a purpose thereof is to make each of the continuous byte strings, and to provide a leading byte of each byte string.
  • a purpose thereof is to make each of the continuous byte strings, and to provide a leading byte of each byte string.
  • the appearance pattern of an instruction code appearing in each data sequence is detected. Based on the detection result, whether or not the processing by each data sequence is an illegal process is determined. It is not necessary to prepare in advance a bit notation, etc., for detecting instruction code groups that perform illegal processing.
  • Illegal processing determination method capable of detecting code and group, data processing device, n computer program for realizing the data processing device, and computer in which the computer program is recorded To provide a recording medium that can be read by
  • the illegal processing request method J is a method for receiving data including a plurality of instruction codes having different byte lengths.
  • the in-hand and the storage means for storing the received data are stored in the data processing unit, and the processing power is executed based on the instructions contained in the data contained in the data.
  • the data written in the storage means m is sequentially output in RJC in byte units, each of which consists of a continuous byte row, and the head of each byte row.
  • the appearance pattern of the instruction code appearing in each data sequence is detected, and processing by each data sequence is performed based on the appearance pattern of the detected instruction. It is characterized in that it is determined whether or not an unauthorized process is performed.
  • a data processing device includes: a receiving unit that receives data including a plurality of instruction codes having different byte lengths; a storage unit that stores received data; and a storage unit that stores the received data.
  • Determining means for determining whether or not the processing to be executed based on the instruction code included in the data is illegal processing; Means for sequentially reading the data stored in the storage means in byte units, and a continuous read byte sequence, each of which has a different read position in which the first byte of each byte sequence is different.
  • Detecting means for detecting an appearance pattern of an instruction code appearing in each data series, for a plurality of data series corresponding to the data sequence, wherein the determining means is configured to detect an appearance pattern of the instruction code detected by the detecting means. It is characterized in that it is performed to determine whether or not the processing by each data series is an illegal processing.
  • the data processing device is the data processing device according to the second aspect of the present invention, wherein the data processing device according to the second aspect of the present invention includes a table storing a correspondence relationship between data of a first byte of the instruction code and a byte length of the instruction code. It is characterized by further provision.
  • a data processing device is the data processing device according to the second aspect, wherein the data sequence including an appearance pattern to be detected by the detection unit is the storage unit in which an instruction code group being executed is placed. It is characterized by including the process of acquiring the above address.
  • a data processing device is the data processing device according to the second invention or the fourth invention, wherein one of the appearance patterns to be detected by the detection means calls a group of instruction codes for executing a predetermined process.
  • the instruction code group includes an instruction code for acquiring an address of a return destination of the instruction code.
  • a data processing device is the data processing device according to the fifth invention, wherein the appearance pattern further includes an instruction code related to a branch instruction, and an address of a branch destination of the instruction code is
  • the present invention is characterized by being associated with an instruction code for calling the instruction code group.
  • a data processing device is the data processing device according to the fifth invention, wherein the appearance pattern is a command for activating a system call.
  • a code is further included.
  • the data processing device is the data processing device according to the fifth invention, wherein the appearance pattern further includes an instruction code for instructing rewriting of data starting from the address.
  • a data processing device is the data processing device according to the fifth invention, wherein the appearance pattern further includes a predetermined character code after the instruction code.
  • the data processing device is the data processing device according to the second aspect, wherein, when the detection unit detects one of the appearance patterns to be detected, the determination unit determines that the detected data sequence is invalid. It is characterized by being determined to be data for executing processing.
  • a data processing device is the data processing device according to the second aspect of the present invention, wherein, when the determination unit determines that the detected data sequence is data for executing an unauthorized process, information to that effect is sent to the outside. It is characterized by further comprising means for notifying the user.
  • a computer program is a computer program which determines whether or not a process executed based on input data including a plurality of instruction codes having different byte lengths is an illegal process.
  • a computer program having a step of making a determination a plurality of data sequences are read from the computer, each of which is composed of a continuous byte sequence and the first byte of each byte sequence is associated with a different read position. Detecting the appearance pattern of the instruction code appearing in each data system, and determining whether the processing by each data series is an illegal process based on the appearance pattern of the detected instruction code. And a step of performing the following.
  • the computer-readable recording medium includes a plurality of instruction codes having different byte lengths input to the computer.
  • Computer-readable recording media on which a computer program having a step of judging whether or not a process to be executed based on the downloaded data is an unauthorized process is stored in a computer.
  • a computer program is recorded which has a step of detecting the application and a step of determining whether or not the processing by each data series can be performed by an unauthorized process based on the appearance pattern of the detected instruction code. It is characterized by
  • the first invention, the second invention, the 12 'invention, and the thirteenth invention include an instruction code for sequentially reading data from the storage means in byte units and executing an illegal process.
  • an attempt is made to detect the appearance pattern of the instruction code for a plurality of data sequences at different read positions. Therefore, by performing detection by paying attention to the appearance pattern of instruction codes that cannot be found in ordinary data, when unknown malicious codes appear, ⁇ As long as the processing content does not change, it is possible to deal with it.
  • detection is performed based on the appearance pattern of the instruction code, so that the detected appearance pattern may differ depending on where the detection start position is set. Since detection is performed for a plurality of data sequences that are sequentially different, erroneous determinations are reduced and detection accuracy is improved.
  • the instruction sequence having the data reading position is provided. Does not detect illegal code if it is located outside the first byte of the instruction code Thus, the processing speed can be improved.
  • the fifth invention includes an instruction code for calling a group of instruction codes for executing a predetermined process.
  • the return code of the above-mentioned instruction code is included.
  • the branch destination of the branch instruction is detected as an appearance pattern associated with the instruction code group. Therefore, it is easy to determine whether or not the data is such that it can execute unauthorized processing, and since it is detected based on its essential structure, it can be used to detect unknown unauthorized code. It will be possible to deal with it.
  • an appearance pattern including an instruction code for activating a system rule is further detected. Therefore, it is possible to detect a case where the probability of execution of the malicious code is high, so that the detection accuracy is improved.
  • An appearance pattern including an instruction code indicating X. is detected. Therefore, it is possible to deal with an illegal code in which it is not possible to know what processing is performed at a stage before the execution.
  • the data is determined to be data for executing an illegal process, so that an illegal operation is performed. With data that will cause the process
  • the eleventh invention when it is determined that the detected data sequence is data for which an unauthorized process is performed, the fact is notified externally. Therefore, when an unauthorized code is detected, it is possible to block a traffic or the like, thereby preventing malfunctions caused by the unauthorized code.
  • FIG. 1 is a block diagram of a data processing device according to the present embodiment.
  • FIG. 2 is a schematic diagram illustrating a process executed by the data processing device.
  • FIG. 3 is a schematic diagram illustrating the configuration of data to be analyzed.
  • FIG. 4 is a flowchart illustrating a procedure for detecting unauthorized code by the data processing device.
  • FIG. 5 is a flowchart illustrating a procedure for detecting an unauthorized code by the data processing device.
  • FIG. 6 is a flowchart for explaining the procedure of the analysis / determination processing routine.
  • Fig. 7 shows the instruction code detected by the analysis processing of the data processing device. It is a schematic diagram explaining the appearance pattern of.
  • FIG. 8 is a schematic diagram illustrating an appearance pattern of an instruction code detected by the analysis processing of the data processing device.
  • Fig. 9 is a flowchart explaining the processing procedure of the analysis processing routine.
  • FIG. 10 is a flowchart for explaining the processing procedure of the analysis processing routine.
  • FIG. 11 is a flowchart illustrating the processing procedure of the analysis processing routine.
  • FIG. 12 is a flowchart illustrating the processing procedure of the analysis processing routine.
  • FIG. 13 is a flowchart for explaining the processing procedure of the analysis processing routine.
  • FIG. 14 is a flowchart for explaining the processing procedure of the judgment processing routine.
  • FIG. 15 is a flowchart illustrating a processing procedure of an analysis processing routine according to the present embodiment.
  • FIG. 16 is a flowchart for explaining the processing procedure of the analysis routine according to the present embodiment.
  • FIG. 17 is a flowchart for explaining the processing procedure of the analysis processing routine according to the present embodiment.
  • FIG. 18 is a flowchart for explaining the processing procedure of the analysis processing routine according to the present embodiment.
  • FIG. 19 is a flowchart for explaining the processing procedure of the analysis processing routine according to the present embodiment.
  • FIG. 20 is a flowchart illustrating a processing procedure of the determination processing routine according to the present embodiment.
  • FIG. 21 is a schematic diagram illustrating a configuration of a data processing device according to the present embodiment. BEST MODE FOR CARRYING OUT THE INVENTION
  • FIG. 1 is a block diagram of a data processing device according to the present embodiment.
  • reference numeral 10 denotes a data processing device, which is a CPU 11, a communication interface 15 a for connecting to an external network, and a connection interface for connecting to an internal network and a network. It has a communication interface 15b.
  • the data processing device 10 is a device that relays data transmitted and received on a communication network such as a router, a broadband router, or a switch.
  • the communication interface 15a includes: An information processing device and a communication device to be communicated with are connected via an external network.
  • the S. ⁇ interface 15b includes an information processing device and a communication device used by the user on the internal network. Connected through the work.
  • the information processing device includes a personal computer, a workstation, a server device,
  • PDA Personal Digital Assistant
  • the communication device includes a mobile phone and the like.
  • the CPU 11 is connected to hardware such as a memory 12, a buffer memory 13, and a routing unit 14 .
  • the CPU 11 is a control program stored in the memory 12 in advance. By reading and executing these, each of the above-described hardware is controlled, and operates as a device that relays various data transmitted and received between the external network and the internal network.
  • the memory 12 stores each hardware
  • a routing table storing a network address of a transmission destination for determining a communication path, and a computer program of the present invention are stored.
  • the CPU 11 When transmitting data from the internal network to the external network, if the communication interface 15b of the data processing device 10 receives the data, the CPU 11 The communication path is determined with reference to the nodal table stored in the memory 12. The routing section 14 is controlled according to the determined communication path. Then, the data is transmitted to the destination information processing device or communication device via the communication interface 15a, and the data is transmitted from the external network to the internal network. The data is relayed by the data processing device 10 according to the same procedure as described above. At this time, the data processor 10 temporarily stores the received data from the external network side on the buffer interface 13 a in the buffer interface 13 a.
  • an instruction code (hereafter, illegal code) that causes an illegal process to be executed for a specific CPU (hereafter, CPU to be protected) is analyzed. ) Is determined in the data.
  • the CPU 11 reads the computer program of the present invention from the memory 12, executes the computer program, and stores the data therein.
  • Analysis ⁇ Create a virtual CPU execution environment part 11a that provides an environment for judgment.
  • the virtual CPU execution environment section 11a includes registers used by the CPU to be protected, virtual registers corresponding to the stacks, virtual stacks, and the like, and analyzes the data to be analyzed by the instruction code of the CPU to be protected.
  • the CPU 11 determines the presence or absence of illegal code by monitoring the status of the virtual register and the virtual stack provided in the virtual CPU execution environment unit 11a.
  • the CPU 11, the memory 12, and the buffer memory 13 are individually provided.
  • the memory 11 and the computer program of the present invention are provided separately. It is also possible to provide an ASIC (Application Specified IC) in which an IC (Integrated Circuit) storing the information is mounted on one chip.
  • ASIC Application Specified IC
  • FIG. 2 is a schematic diagram illustrating a process executed by the data processing device 10.
  • the processing executed by the data processing device 10 is roughly divided into (1) data reception from an external network, (2) extraction of data to be analyzed, and (3) multiple data derived from the data to be analyzed. (4) Detection of illegal code in each instruction sequence.
  • each process will be described.
  • the communication interface 15a of the data processing device 10 receives data in a predetermined unit (for example, packet unit) according to a communication procedure conforming to the communication standard of the connected external network.
  • a predetermined unit for example, packet unit
  • Each unit of data to be received has a predetermined byte length, and is composed of a communication header including address information of a transmission source and a transmission destination, and user data arbitrarily created by a user.
  • the user data includes an instruction code for executing a process desired by the user, and there is a case where an illegal process is executed by the instruction code.
  • the data processing device 10 sequentially extracts the received data in byte units and stores the data in the buffer memory 13 for analysis.
  • the position at which data extraction is started can be any predetermined position.
  • the first byte of the received data may be the analysis start position, or the first byte of the user data excluding the communication header may be the analysis start position.
  • the buffer size of the memory 13 to store the extracted data is predetermined, and the instruction code having the largest instruction length among the instruction codes that can be decoded by the CPU to be protected. Are set in advance so as to store at least one or more.
  • the instruction sequence is a sequence of instruction codes of the CPU to be protected starting from the position specified for the data to be analyzed.
  • the CPU 11 When performing analysis on the data to be analyzed, the CPU 11 sequentially reads data one byte at a time from the first byte of the buffer memory V13.
  • the analysis start buffer position corresponding to the read position from buffer memory 13 is shifted by .1 byte, and another data is read and read. Analysis is performed on the instruction sequence with the data read position as the first byte. Such processing Is repeatedly executed while sequentially shifting the analysis start buffer position, thereby analyzing a plurality of instruction sequences at different read positions.
  • the data of the next read data position from the received data is stored in sd in the Vf position fc of the analysis start of the buffer memory 13 after the analysis.
  • the CPU 11 of the data processing device 10 has a specific structure (appearance pattern) based on the state of the virtual register and the virtual stack included in the temporary i CPU execution environment 11a. An instruction sequence is detected, and when an instruction sequence having a specific structure is detected,
  • One is an instruction code that calls an instruction code group at a branch destination of a branch instruction (hereinafter referred to as a jmp instruction).
  • ⁇ , Ca 11 ⁇ pura a branch destination of a branch instruction
  • the call destination of the ca 11 instruction corresponds to the address between the jmp instruction and the cal 1 instruction.
  • this structure is called “; jmp ⁇ ca 1 ⁇ ” structure, and it is often found in attacker's malicious code in combination with the “call ⁇ pop” structure described later.
  • the information of the address immediately after the ca11 instruction (address to return to) from the instruction code group between the jmp instruction and the ca11 instruction is acquired, and the address is obtained.
  • an external command embedded in the malicious code itself is acquired, and the external command is executed or the malicious code itself is rewritten.
  • the other is a structure where there is a pop instruction without a push instruction at the call destination of the call instruction.
  • ⁇ ush life The instruction is an instruction for temporarily storing an address value or the like in the stack area
  • the pop instruction is an instruction for obtaining the address value or the like stored in the stack area. is there.
  • this structure is referred to as a “ca11 ⁇ pop” structure.
  • An illegal code having this structure basically executes an external command or rewrites the illegal code itself by using the same method as the above-mentioned “jmp ⁇ ca11J structure”. 11 When the 1 instruction is executed, the information of the return destination address stored in the stack area is acquired by the Pop instruction, and the address is used as a clue, and the external command is used. Execute malicious code or rewrite malicious code itself.
  • FIG. 3 is a schematic diagram illustrating the configuration of the analysis target data.
  • the instruction length of the instruction code used in the CPU to be protected is not always constant, and instruction codes of various instruction lengths may be used.
  • the received data may include, for example, simple data that is not an instruction code such as image data and document data. Therefore, if the reading position of the data to be analyzed is not properly set, there is a possibility that the instruction code cannot be interpreted correctly, and the judgment about the presence or absence of the illegal code may be erroneously made.
  • the data to be analyzed stored in the buffer memory 13 is analyzed.
  • the 1 byte The data is read one by one and the data is analyzed assuming that it is the first byte of a certain instruction code.
  • the position of the next instruction code can be determined from the read 1-byte data, so that the instruction codes can be sequentially grasped.
  • the analysis target data can be interpreted as a single sequence (instruction sequence) in which multiple instruction codes are consecutive.
  • the data to be analyzed shown in FIG. 3 includes the first four bytes of simple data, the two-byte instruction code (instruction 1), the four-byte instruction code (instruction 2), 4-byte instruction code (instruction 3), 1-byte instruction code (instruction 4) ... are consecutive data.
  • First set the analysis start buffer position to b1, read one byte of data, and obtain information such as the instruction contents, the position of the next instruction code, and the parameters used in the instruction code.
  • analysis of instruction sequence 1 with b 1 as the first byte starts.
  • the instruction sequence 2, the instruction sequence 3, and the instruction sequence 4 in which each read position is the first byte. are performed simultaneously and in parallel.
  • the instruction sequence 5 with the position of b5 as the first byte is a correct instruction code sequence, and when the instruction sequence 5 is analyzed, “; jmp ⁇ ca 11 "determined structure, or” if the ca 1 l ⁇ p 0 p "structure has been detected, has been detected unauthorized code.
  • the data series 7 starting from b 7, the data series 11 starting from b 11, and the data series 15 starting from b 15 are the data series 5 Since it is included as a part, data analysis can be omitted.
  • FIG. 4 and FIG. 5 are flowcharts illustrating a procedure for detecting an unauthorized code by the data processing apparatus 10.
  • step S5 it is determined whether or not the data at the analysis start buffer position is the end of the received data. If the data at the analysis start buffer position is terminated (S5: YES), the detection of the illegal code by this flowchart is terminated, and if the data at the analysis start buffer position is not terminated (S5: YES). : NO), and reads one byte of data at the analysis start buffer position (step S6). Next, the next instruction start position, instruction type, and parameters are obtained based on the read one-byte data, and are stored in the memory 12 (step S7).
  • the CPU 11 determines whether there is an instruction sequence whose current position matches the next start position stored in the instruction sequence under analysis.
  • Step S8 If there is an instruction sequence that matches the current position and the stored next start position (S8: YES), an analysis described below is performed on all the instruction sequences. ⁇ Perform a judgment process (step S10). . There is no instruction sequence that matches the current position and the stored next start position In this case (S8: NO), the instruction sequence starting from the current position is added as a new instruction sequence for analysis and judgment processing (step S9), and the analysis and judgment process is executed. (S10).
  • step S11 the write buffer position is set as the analysis start buffer position (step S11), and the read data position is increased by one (step S12). Then, one byte of data is read from the read data position to the write buffer position on the buffer memory 13 (step S13). Next, the remainder obtained by dividing the value obtained by increasing the analysis buffer position by one by the buffer size is set as the next analysis start buffer position (step S14), and the process returns to step S5.
  • FIG. 6 is a flowchart for explaining the procedure of the analysis 1 determination processing routine.
  • the analysis process described below is performed for all instruction sequences including the one byte data read from the buffer memory 13 corresponding to the first byte of the instruction code (step S21) ).
  • the analysis processing will be described in detail later.
  • the instruction table is referred to based on the read one-byte data, and the contents of the instruction, the parameters to be used, and In addition to storing the position of the next instruction, etc., the state in the virtual stack in the virtual CPU execution environment section 11a is monitored and analyzed.
  • the CPU 11 determines whether or not the analyzed instruction sequence is terminated (step S22), and when the instruction sequence is not completed (S22: NO), Analysis ⁇ End the judgment processing routine and shift to the processing of step SI 1 in FIG.
  • step S23 If it is determined that the instruction sequence has been terminated (S22: YES), a determination process described later is performed (step S23). Then, the CPU 11 receives the result of the determination processing, determines whether or not an unauthorized code has been detected (step S24), and determines that the unauthorized code has not been detected. In this case (S24 ⁇ NO), the current instruction sequence is deleted (step S26), and if it is determined that an invalid code has been detected (S24: YES), an invalid code has been detected. (Step S25) The information is output to the information processing device connected to the internal network via the communication interface 15b. Further, the data processing device 10 may be provided with a display unit for displaying as character information or a light emitting unit for informing by light to output. Further, it may be configured to perform processing such as shutting down communication after outputting information indicating that an unauthorized code has been detected.
  • FIG. 8 are schematic diagrams for explaining an appearance pattern of an instruction code detected by the analysis processing of the data processing device 10.
  • Figure 7
  • Fig. 8 shows the structure of the “ca 11 1 ⁇ Popj structure using the fraudulent K .
  • jmpca11Jo-roh corresponds to the address of the branch instruction Sca11 of the mp instruction, and the call destination of the ca11 instruction is the jmp instruction.
  • the jmp instruction of address A1 is Accordingly, a branch is made to the instruction ca11 of address A10, and the instruction code group of instructions A2 to A6 is called by the instruction ca11.
  • the return address of the ca11 instruction is temporarily stored in the stack area.
  • the return code stored in the stack area is temporarily stored in the stack area.
  • the instruction code group of A16 to A20 is called by the ca11 instruction of the address A1, and the ca1 instruction is called by the pop instruction. 1 Return address of instruction has been acquired.
  • the character string of the external command to be activated immediately after the ca11 instruction is not arranged, but the dummy instruction code of fixed length predetermined by the attacker is used. In this case, the same effect as described above can be obtained. That is, in the example shown in Fig.
  • the push instruction existing in the instruction code group to which the ca11 instruction is called does not precede; the op instruction causes the ca11 instruction
  • the address A2 that is the return destination is obtained, the value of the address A7 is calculated by the arithmetic processing, the system call is called by the int instruction of the address A20, and the address is obtained. It is configured to execute the external command (shell program) of the character string located in A7.
  • addresses shown in FIGS. 7 and 8 are addresses provided for convenience, and do not necessarily represent continuous memory addresses on the stack area.
  • FIGS. 9 to 13 are flowcharts illustrating the processing procedure of the analysis processing routine.
  • the CPU 11 of the data processing device 10 refers to the above-mentioned instruction table to determine whether the instruction sequence starting from one byte of data read from the buffer memory 13 is a jmp instruction. Is determined (step S31). If it is determined that the instruction is a jmp instruction (S31: YES), the key of the branch destination indicated by the jmp instruction is determined. It is determined whether the dress is larger than the address at the current position (step S32). If it is determined that the address of the branch destination is smaller than the address of the current position (S32: NO), this routine is terminated and the processing returns to the analysis-determination processing routine.
  • step S33 If it is determined that the branch destination address is larger than the current position address (S32: YES), the branch destination address is already stored in a predetermined storage area in the memory 12 (hereinafter, referred to as a branch destination table). It is determined whether or not the obtained branch destination address exists (step S33). If the branch destination address already stored in the branch destination table does not exist (S33: NO), the branch destination address of the jmp instruction detected in step S31 is converted to the branch destination table. It is memorized (step S3 4). If the already stored branch destination address exists (S33: YES), the smaller branch destination address is selected (step S35), and the branch destination table is stored in the branch destination table. The branch destination address to be stored is updated (step S36).
  • step S37 When the branch address is updated or stored, the next instruction position is stored in the memory 12 (step S37), and the processing is analyzed. ⁇ Return to the judgment processing routine.
  • step S41 it is determined whether or not one byte of data read from the buffer memory 13 is an int instruction (Ste S41). If it is determined that the instruction is an int instruction (S41: YES), the fact that the int instruction is detected is stored in the memory 12 (step S42). Then, it is determined whether or not there is a branch destination address already stored in the above-mentioned branch destination table (step S43). If there is no branch destination table stored in the branch destination table (S43: NO), the instruction sequence currently being analyzed is terminated (step S44), and the processing is analyzed. ⁇ Return to the determination routine and make a determination described later. Move to processing. If there is a branch destination address that has already been memorized, A (S43: YE
  • step S45 it is determined whether or not the address at the current position is larger than the branch destination address described in the branch destination table (step S45).
  • step S41 If it is determined in step S41 that the instruction is not an int instruction (S41: NO), it is determined whether or not the instruction code starting from one byte of data read from the buffer memory 13 is the ca11 instruction. Is determined (step S51). If it is determined that the instruction is the ca11 instruction (S51: YES), it is determined whether the call destination address of the ca11 instruction is larger than the address at the current position (step S51). 5 2). If it is determined that the destination address is larger than the current location address (S52: YES), it is determined whether there is a destination address already stored (step S5). 3). If there is no stored call destination address (S53: NO), the call destination address of the ca11 instruction detected in step S51 is stored (step S54). If there is a stored destination address (S53: YES), the smaller destination address is selected (step S55), and the stored destination address is selected. Is updated (step S56).
  • step S52 the ca11 life detected in step S51 If it is determined that the call destination address of the instruction is smaller than the current position (S52: NO), several bytes of data from the next instruction position are stored in the memory 12 as the command data (step 52). S58).
  • step S59 it is determined whether or not there is a call destination address in the list where the pop instruction is placed.
  • the list means that the pop instruction is placed. This is the storage area that stores the addresses in the list format. If it is determined that there is a call destination address on the list (S59: YES), the fact that the "call ⁇ pop" structure has been detected is stored in the memory 12 (step S60), and the current Terminate the instruction sequence being analyzed (step S61). When the instruction sequence is terminated, the processing returns to the analysis / judgment processing routine and shifts to the judgment processing.
  • step S62 If it is determined that there is no called address on the list (S59: NO), it is determined whether or not an int instruction has been detected (step S62), and if no int instruction has been detected. (S62: NO), the processing is returned to the analysis / judgment processing routine without terminating the instruction sequence.
  • Step 62 If an int instruction has been detected (S62: YES), it is determined whether or not the branch destination address of the jmp instruction is smaller than the address of the current position by referring to the branch destination table (Step 62). Top S63). If it is determined that the branch destination address is larger than the current position (S63: NO), the processing is analyzed without terminating the instruction sequence. ⁇ Return to the determination processing routine.
  • step S64 it is determined whether the call destination address is between the jmp instruction and the current position (step S64). . If the callee address is not between the jmp instruction and the current position (S64: NO), the processing is analyzed without terminating the instruction sequence and returns to the judgment processing routine.
  • the fact that the “; jmp ⁇ ca11” structure is detected is stored in the memory 12 (step S65), and the instruction sequence currently analyzed is terminated (step S66). ). When the instruction sequence is terminated, the processing returns to the analysis / judgment processing routine and shifts to the judgment processing.
  • step S51 If it is determined in step S51 that the instruction is not the ca11 instruction (S51: NO), the instruction code starting from the 1-note data read from the memory 13 is a pop instruction. Is determined (step S71). If it is determined that the instruction is a pop instruction (S71: YES), the address of the current position is stored in the list (step S72). Then, it is determined whether or not the call destination address of the ca11 instruction matches the address at the current position (step S73). If they match (S73: YES), the fact that the ⁇ ca11 ⁇ popj structure has been detected is stored in the memory 12 (step S74), and the processing returns to the analysis / determination processing routine. If the call destination address of the call instruction does not match the address at the current position (S73: NO), the processing is analyzed and the processing proceeds to the judgment processing routine.
  • the instruction boundary may not be interpreted correctly. Yes, it may not be possible to detect the “; jmp ⁇ ca11” structure and the “ca11 ⁇ popj” structure in one instruction sequence. If a jm P instruction with a large branch destination address and a ca11 instruction with a call destination address larger than the next instruction position are detected, the branch destination address and the call destination address are changed to Since the analysis is performed as the start position of each next instruction code, the above-mentioned “; jmp ⁇ ca 11 J structure” and “ca ⁇ 1 ⁇ ⁇ 0 ⁇ ”structure can be detected.
  • step S71 If it is determined in step S71 that the instruction is not the ca11 instruction (S71: NO), the data of one byte read from the / memory 13 is output.
  • Ret instruction, 1ret instruction, int3 instruction It is determined whether the instruction is an instruction or an iret instruction (step S81). Each of these instructions represents an instruction for returning control from the called routine to the calling routine. If it is any of the above instructions (S81: YES), the instruction sequence currently being analyzed is terminated (step S82), and the process returns to the analysis / determination processing routine. If it is determined that the instruction is not any of the above-mentioned instructions (S81: NO), the processing returns to the analysis / determination processing routine without terminating the instruction sequence.
  • FIG. 14 is a flowchart for explaining the processing procedure of the judgment processing routine.
  • the CPU 11 of the data processing device 10 determines whether an int instruction has been detected in the instruction sequence terminated by the above-described analysis routine (step S91). If the int instruction has not been detected (S91: NO), it is determined that there is no illegal code because the system call is not called and the external command is not executed by the interrupt processing ( Step S92).
  • the CPU 11 uses the "ca11 ⁇ pop" structure or ": jmp ⁇ ca11". It is determined whether or not a structure has been detected (step S93). If no structure is detected (S93: NO), it is determined that there is no illegal code (S92).
  • step S94 If any of the “ca1l ⁇ pop” structure or “; jmp ⁇ ca11” structure is detected (S93: YES), the character corresponding to “/” indicating the path delimiter in the command data It is determined whether or not there is a code (step S94). If the character data does not exist in the command data (S94: NO), it is determined that there is no illegal code (S92). Also, If the character data is included in the command data (S94: YES), it is determined that there is a high probability that a system call will be invoked by interrupt processing and an external command (serial code) will be executed. Is determined (step S95).
  • performing the supporting evidence to determine whether contains / "indicating a break of Nono 0 scan externally command the detection Netsuki & fraud co de for ⁇ 3 ⁇ 4 Mel ⁇ ⁇ ⁇ jmp
  • “/” is given as an example of a character code indicating a path delimiter.
  • a different type of protection target CPU uses “/” as a character code indicating a path delimiter.
  • is used.
  • the character code used for side identification is not necessarily limited to /".
  • FIGS. 15 to 19 show the processing of the analysis processing routine according to the present embodiment.
  • the CPU 11 of the data processing device 10 decrements the lifetime associated with each of the state, the variable, and the counter (step S101).
  • a state, a variable, and a counter are introduced as parameters indicating a situation under analysis, and when each parameter is set, a positive default value is set as a survival period. I am trying to set it.
  • the state is a “Po instruction waiting” state, which indicates a state waiting for the pop instruction to appear, and a state in which the “ca11 ⁇ pop” structure must be checked. Introduce the "ca 11 1 ⁇ pop confirmation" state to indicate that there is
  • a P us li -Pop balance variable for examining the balance of the number of occurrences of the ush instruction and the Pop instruction was introduced.
  • Count the state with a high probability that the “pop” structure appears.
  • the survival time is a value preset for each parameter, and is decremented by one each time the analysis routine is repeated, indicating the effectiveness of the analysis processing routine with respect to the number of executions. . If the lifetime is decremented in this step and the lifetime becomes 0, initialization is performed here.
  • the CPU 11 determines whether the 1-byte data read from the buffer memory 13 is a jmp instruction by referring to the instruction table. (Step S102). If it is determined that the instruction is a jmp instruction (S102: YES), it is determined whether the branch destination address specified by the jmp instruction is larger than the next instruction position.
  • Step S103 If it is determined that the branch destination address is less than the next instruction position (S103: NO), this routine is terminated and the processing returns to the analysis-determination processing routine.
  • the branch destination list is a storage area of a list format capable of storing a plurality of addresses, and the storage area is secured in the memory 12. Then, after changing the next instruction position to the branch destination address (step S105), the processing returns to the analysis / judgment processing routine.
  • step S102 if it is determined that the instruction is not a jmp instruction (S102: NO), the CPU 11 reads one byte of data read from the buffer memory 13 into ca. It is determined whether or not the instruction is one (step S106). If it is determined that the instruction is a ca 11 instruction (S106: YES), it is determined whether the called address is larger than the next instruction position (step S107). If it is determined that the called address is larger than the next instruction position (S107: YES), the difference between the called address and the next instruction position is a default value (for example, 10 bytes). It is determined whether or not it is smaller (step S108). If it is determined that the difference is larger than the default value (S108: NO), the process returns to the analysis / judgment processing routine.
  • Step S109 If it is determined that the difference is smaller than the default value (s108: YES), the push-one-op normal variable is cleared, and the state of "Pop instruction waiting" is stored. (Step S109).
  • the push instruction is executed in order to detect a Po instruction that is not preceded by the sh instruction. Introduce a balance variable.
  • the push instruction is decremented and finally the sign of the pUsh-pop balance variable is determined. Does not precede: Detects op instructions.
  • CPU 11 After memorizing that it is in the “waiting for pop instruction” state, CPU 11 changes the next instruction position to the call destination address (step S110) and analyzes the processing. ⁇ Judgment processing routine Return to
  • step S107 if it is determined in step S107 that the call destination address of the cal1 instruction is smaller than the next instruction position (S107: NO), the call destination address is determined to be the analysis start position. It is determined whether the difference is smaller (step S111). If it is determined that the call destination address is smaller than the analysis start position (S111: YES), the processing returns to the analysis / determination processing routine. If it is determined that the call destination address is larger than the analysis start position (S111: NO), the next instruction position stored in the aforementioned branch destination list and the branch destination address are compared. In the meantime, it is determined whether or not the destination address is located (step S112).
  • step S113 If there is a call destination address between the next instruction position and the branch destination address (S111: YES), the address in the list where the pop instruction is placed is placed. It is determined whether or not the dress is within a predetermined range (for example, several bytes) from the called address (step S113).
  • a predetermined range for example, several bytes
  • step S114 If there is an address in the list where the pop instruction is located within a predetermined range from the called address (S113: YES), the called address is set to the pop instruction. It is determined whether or not the address matches the address in the list of the placed place (step S114). If it is determined that they match (S114: YES), the fact that the "ca1l ⁇ pop" structure has been detected is stored (step S115), and if they do not match (S114). 14 : NO), the fact that the “; imp ⁇ C all” structure was detected is stored (step S116). Then, the instruction sequence is terminated (Step S117), the process is analyzed, and the process returns to the determination process routine. In step S112, the address of the callee is changed to the next instruction position.
  • step S'113 a list of locations where the pop instruction is located within a predetermined range from the called address If there is no address in (S113: N ⁇ ), the processing returns to the analysis / judgment processing routine without terminating the instruction sequence.
  • step S106 If it is determined in step S106 that the instruction is not the ca11 instruction (S106: NO), the CPU 11 reads one byte of data from the buffer memory 13 Is a pop instruction (step S118). If it is determined that the instruction is a pop instruction (S118: YES), the current position is stored in the list (step S119), and the push—pop balance variable is decremented (step S119). Step S 12 0). Then, the CPU 11 determines whether the current state is the “pop instruction waiting” state and whether the push-pop balance variable is negative (step S 12 1).
  • step S121 If it is in the “waiting for pop instruction” state and it is determined that the push-pop balance variable is negative (S121: YES), the register number used in the pop instruction is memorized, and “ The state of “ca 1 l ⁇ pop confirmation” is stored in the memory 12 (step S 122). Then, after clearing the ca 11 ⁇ pop confirmation counter (step S123), the processing is returned to the analysis / judgment routine. If it is not "waiting for a pop instruction” or if the push-pop balance variable is not negative (S121: NO), this routine is terminated and the analysis is returned to the judgment processing routine.
  • step S118 If it is determined in step S118 that the instruction is not a pop instruction (S118: NO), the CPU 11 reads one byte of data read from the non-memory 13 by a push instruction. It is determined whether or not there is (Step S124). If it is determined that the instruction is a push instruction (S124: YES), the push—pop balance variable is incremented and (Step S125)., Analyze the process. ⁇ Return to the judgment process routine.
  • Step S12 When it is determined that the instruction is not a ush instruction
  • the CPU 11 checks whether the 1-byte data read from the non-memory 13 is a moV instruction or a logical operation instruction. It is determined whether or not it is (step S 1 26). If it is determined that the instruction is a m o V instruction or a logical operation instruction (S 12 6: Y E S), “c a l
  • Step S127 it is determined whether or not the register number stored in the base register of the memory addressing is used (Step S127).
  • the ca1 1 ⁇ pop confirmation counter is incremented (step S128), and ca1 l ⁇ pop check, judge whether the value of the counter is more than the default value (for example, about 3 to 5)
  • Step S129 If it is determined that the value of the ca1l-> pop confirmation counter is equal to or greater than the default value (S129: YES), the message "call ⁇ po J structure detected" is stored. (Step S130), after terminating the instruction sequence (Step S131), analyze the processing. 'Judgment processing routine 3 Note that the processing is stored in Step S127. If it is determined that the register number is not used (S127: N ⁇ ), it is also determined in step s129 that the value of the call ⁇ pop confirmation counter is smaller than the default value In this case (S129: NO), the processing returns to the analysis / judgment processing routine without terminating the instruction sequence.
  • step S126 if it is determined that the instruction is neither a moV instruction nor a logical operation instruction (s126: NO), it is determined whether or not the instruction is an instruction marked as a termination instruction (step S126).
  • step S126 an instruction table that defines the relationship between instruction codes and instruction lengths of the instruction codes is used, but the terminal instruction is marked in advance in the instruction table. Whether the instruction is marked as a terminating instruction Can be determined.
  • Instructions that should be marked as terminal instructions include: (1) Protection function instructions used only in system programs (ARPL, LGDT, LIDT, SGDT, SIDT, LLDT, LTR, SLDT, STR, LMSW, SMSW, LAR, LSL, VERW, CLTS, HLT, (2) Instructions that use the segment selector (moV, part of ush, pop, LES, LDS, etc.), (3) Input / output instructions (IN, OUT) , INS, OUTS, etc.), (4) Infrequently used instructions (DAA, DAS, AAA, AAS, BOUND, PUSHF, POPF, SAHF, LAHF), (5) Start and end of functions or interrupt routines The instruction to indicate (ENTER, LEAVE, RET, LRET, INT3, INTO, IRET). Note that these instructions are instructions specific to a specific CPU. If the CPU to be protected changes, the instructions to be marked as terminal instructions will of course change. Step
  • the instruction sequence under analysis is terminated (S131), and the processing is analyzed. Return to the judgment processing routine, and if it is determined that the instruction is not a marked end instruction (S132: NO), the processing is returned to the analysis' judgment processing routine without terminating the instruction sequence. Also, instead of detecting a terminating instruction, if an instruction having an invalid addressing format is detected, or if it is detected that an invalid prefix is being used, the instruction sequence is terminated. Analyzes the processing with ⁇ Returning to the judgment processing routine may be performed.
  • FIG. 20 is a flowchart illustrating a processing procedure of a determination processing routine according to the present embodiment.
  • the CPU 11 of the data processing device 10 executes the “ca 1 l ⁇ pop” structure or “; jm It is determined whether or not the p ⁇ ca 11 1 ”structure has been detected (step S 14 1). If it is determined that any of the structures has been detected (S 14 1: YES), it is determined that an invalid code exists. If it is determined (step S142) that no structure is detected (S141: NO), it is determined that there is no illegal code (step S144). Then, the process returns to the analysis / determination processing routine.
  • a relay device used for data communication such as a router, a broadband router, or a switch
  • a personal computer, a server device, and a mobile phone It can also be applied to an information processing device having a communication function, such as a PDA.
  • FIG. 21 is a schematic diagram illustrating a configuration of a data processing device according to the present embodiment.
  • reference numeral 100 denotes an information processing device such as a personal computer, and the information processing device 100 includes a CPU 101, and a ROM 103 via a bus 102. , A RAM 104, an operation unit 105, a display unit 106, a communication unit 107, an internal storage device 108, and an auxiliary storage device 109.
  • the CPU 101 controls the hardware according to the control program stored in the ROM 103.
  • RAM I04 is composed of SRAM or flash memory, etc., and is data generated during execution of the control program stored in ROM 103 and external network received via communication unit 107. Receives various data from the network.
  • the operation unit 105 is an input device such as a keyboard and a mouse
  • the display unit 106 is a display device such as a CRT and a liquid crystal display.
  • the operation unit 105 and the display unit 106 are used, for example, when inputting and displaying data to be transmitted.
  • the communication unit 107 is connected to a line It is equipped with terminal devices and controls the transmission and reception of various types of data exchanged with external networks.
  • the auxiliary storage device 109 includes a FD drive for reading a computer program and the like from a recording medium M such as an FD and a CD-ROM recording the computer program and the like of the present invention, and a CD-ROM drive and the like. That is, the read computer program is stored in the internal storage device 108.
  • the computer program stored in the internal storage device 108 is appropriately read into the RAM 104 in accordance with an instruction from the CPU 101 and executed.
  • the information processing device 100 functions as a device that detects an unauthorized code from the data received by the communication unit 107.
  • the computer program described above is preferably a resident type program that is automatically read into the RAM I 04 when the information processing device 100 is started up. It is preferable to automatically detect an unauthorized code when data is received from the outside in the meantime. The procedure for detecting an unauthorized code is described in Embodiment 1.
  • the computer program of the present invention has been described as being provided by the recording medium M, the computer program may be provided by communication means via the communication unit 107. .
  • the configuration is such that an unauthorized code is detected by using the information processing device 100 such as a personal computer.
  • the information processing device 100 such as a personal computer.
  • a mobile phone, a PDA, a computer Of course, it can be applied to mobile devices, in-vehicle communication devices, and various information appliances.
  • the computer program of the present invention by recording it on a recording medium such as an FD or a CD-ROM, the computer program can be implemented. It can also be provided as a package of application software that detects applications. Industrial applicability
  • the second invention whether or not an instruction code for sequentially reading data from the storage means in byte units and executing an illegal process is included.
  • it tries to detect the appearance pattern of the instruction code for a plurality of data sequences at different read positions. Therefore, by focusing on the occurrence pattern of instruction code that is not found in ordinary data, detection is performed even if an unknown illegal code appears. As long as does not change, it is possible to deal with it.
  • the detection since the detection is performed based on the appearance pattern of the instruction code, the appearance pattern to be detected may be different depending on where the detection start position is set, but a plurality of the read positions are sequentially changed. Since the data sequence is detected, the number of erroneous determinations is reduced, and the detection accuracy can be improved.
  • the instruction sequence having the data read position is provided.
  • the instruction code is located at a position other than the first byte, illegal code can be prevented from being detected, and the processing speed can be improved.
  • the appearance pattern including the process of acquiring the address on the storage means in which the instruction code group being executed is placed is detected, the essence of the illegal code is detected. It is possible to propose a detection method that focuses on the basic structure.
  • an instruction code group for executing a predetermined process is called.
  • An instruction pattern for issuing an instruction code for obtaining a return address of the instruction code is detected in a group of instruction codes to be called. Therefore, it is easy to determine whether or not the data is such that it can perform unauthorized processing, and since it is detected based on its essential structure, it is possible to detect unknown fraudulent code. It is possible to deal with it.
  • the branch destination of the branch instruction detects an appearance pattern associated with the above-mentioned instruction code group. Therefore, it is easy to determine whether or not the data is such that it can perform unauthorized processing, and since it is detected based on its essential structure, it is possible to detect unknown malicious code. Can also deal with.
  • an appearance pattern including an instruction code for activating a system call is detected. Therefore, it is possible to detect a case where the probability of execution of a malicious code is high, and it is possible to improve the detection accuracy.
  • an appearance pattern including an instruction code for instructing data rewriting starting from the return address is detected. Therefore, it is possible to cope with an illegal code that does not know what processing is executed at a stage before the execution.
  • the data when an appearance pattern of an instruction code to be detected is detected, the data is determined to be data for executing an unauthorized process, so that the unauthorized process is executed.
  • Data -It is easy to determine whether or not it is, and since it is determined based on its basic structure, it is possible to deal with unknown malicious code. .
  • the fact is notified externally. Therefore, when an unauthorized code is detected, communication is interrupted or the like, so that inconsistency caused by the unauthorized code can be prevented.

Abstract

本発明にかかる不正処理方法、データ処理装置、コンピュータプログラム、及び記録媒体は、バッファメモリに記憶させたデータをバイト単位で読出し、読出し位置がそれぞれ異なる複数の命令系列について、順次的にどのような命令コードが含まれているか解析してゆく。そして、解析した命令系列に、int命令が含まれており、命令コードが特定の出現パターンを持ち、記憶させたコマンドデータに"/"に対応した文字コードが含まれている場合、当該命令系列に不正コードが含まれていると判定する。

Description

糸田 ¾
不正処理判定方法、 データ処理装置、 コ ンピュータプログラム、 及び記録媒体 技術分野
本発明は、 不正処理を実行するデータを検出する不正処理判定方 法、 データ処理装置、 該データ処理装置を実現するためのコ ンビュ ータプログラム、 及び該コ ン ピュータプログラムが記録されている コ ンピュータでの読取りが可能な記録媒体に関する。
背景技術
イ ンターネッ ト網の普及に伴い、 各種の情報処理装置がコ ンビュ ータ ウ ィ ルス、 クラ ッキング等の攻撃の対象となり 、 それらの脅威 に晒される可能性が高く なってきている。例えば、近年、 「ニムダ J 、 「コー ドレ ツ ド」 等のコ ン ピュータ ゥイ ノレス に代表されるよ う に、 システムプログラム又はウェブブラ ウザのよ う なアプリ ケーシ ョ ン プログラムの脆弱性 (セキュ リティホール) を利用 して自 己増殖さ せ、 甚大な被害を与えたケースが存在する。
前述のよ う なコ ン ピュータ ウ ィ ルス、 ク ラ ッキング等による攻撃 では、 不正な処理を行う命令コー ド (以下、 不正コー ドという) を 含む攻撃データを攻撃対象であるサーバ装置、 パーソナルコ ンビュ ータ等の情報処理装置に対して送信し、 その情報処理装置にて前記 命令コー ドが実行される よ う に している。 このよ う な攻撃手法は 様々なものが存在し、 その 1つと してノ ッ フ ァオー バフ ロ ーによる 攻撃手法が知られている。 ノ ッ フ ァオー バフ ロ ーでは、 スタ ック内 に確保されたバッファにおいて、 確保されたバッファ以上のスタ ッ クエ リ ァに書込みが行われている状態であ り 、 バ ッ フ ァオーバフ ロ 一の状態に陥つた場合、 予期せぬ変数破壌を招き、 プロ グラムの誤 動作の原因と な り 得る。 バッファオーバフローによ る攻撃では、 プ ロ グラ ムの誤動作を意図的に引き起し、 例えばシステムの管理者権 限を取得する こ とが行われる。
これらのコ ンピュータ ウイ /レス 、 ク ラ ッキング等の攻擊に対処す るため、 例えば 、 特開平 9 — 3 1 9 5 7 4号公報に記載されている よ う に、 不正コ一ドにみられる よ う な特定のビッ トノヽ。タ一ンの有無 を受信 したデ一タ に対して検出する処理が行われていた そ して、 そのよ う なビシ トパターンが受信 したデータに含まれている場合に は、 不正コー ド、を含んだ攻擊デ一タである と判定し、 デ一タの受信 拒否、 ユーザへの報知等を行う よ う に していた。
そのため、 従来の手法によ り様々 なコ ンピュータ ウイルス、 ク ラ ッキング等の攻撃に対処するためには、 各コ ンピュータゥイノレス、 ク ラ ッキングに対応した特定のビッ トパターンをデータベ一/ Vし B己 憶させて予め 意しておく 必要があ り 、 新種のコ ン ビュ ―タ ウィル ス、 ク ラ ツキング手法が発見された場合には、 前記データベース 更新して対処しなければならない'
と ころで、 攻擊データ に対する従来の検出方法では、 述のよ う に既知の ビ ッ ト ノ、。タ ー ンを検出する か、 又は N O P命令 (NOP : no n-op era t i o n ) の単純な繰り 返しといった攻撃処理にと つて、 本質 的と はいえない部分の構造を検出する よ う に してきた。 そのため、 攻撃データのバリ エーショ ンに弱く 、 未知の攻撃データが現れる毎 に、 検出に用いる ビッ トパターンのデータベースを更新する必要が あ り 、 データベースが更新されるまでのタイ ムラグが問題になって いた。
本発明は斯かる事情に鑑みなされたも のであ り 、 その 目的とする と ころは、 夫々が連続したバイ ト列からな り 、 各バイ ト列の先頭バ ィ 卜が異なる読出し位置に対応した複数のデータ系列について、 各 デ一タ系列に現れる命令コ一 の出現パターンを検出し 、 その検出 結果に基づいて各データ系列による処理が不正処理であるか否かを 判定する構成とするこ とによ り 不正な処理を行う命令コ一 ド群を 検出するための ビッ トノ タ一ン等を予め用意する必要がな < ヽ 不正 な処理を行う未知の命令コ一 ド、群に対しても検出可能な不正処理判 定方法、 データ処理装置、 該テ一タ処理装置を実現するための n ン ピュータプログラム、 及び該コンピュータプログラムが記録されて いるコ ン ビュータでの読取り が可能な記録媒体を提供するこ とであ
発明の開示
第 1発明に係る不正処理判疋 J 法は 、 異なるバィ ト長の命令コ一 ドを複数含んだデ一タを受信する P .
¾ in手 と 、 受信したデータを記 憶する記憶手段とを 兄るァータ処理 置を用い 、 pL Ί®し i<~テ一 タに含まれる命令 一 ドに基づいて実行する処理力 不正処理である か否かを判定する不正処理判疋 h法に いて 、 m記記憶手段に記 したデータをバイ 卜単位で順次的 RJC出し 夫々が連続したバィ 卜 列からな り 、 各バィ ト列の先頭バィ 卜が異なる E出し位置に対応し た複数のデータ系列について 、 各了 ―タ系列に現れる命令コー の 出現パターンを検出 レ、 検 111 した命令 の出現パターンに基づ いて各データ系列による処理が不正処理であるか否かを判定する ·>· とを特徴とする。
第 2発明に係るテータ処理装置は、 異なるバイ ト長の命令コ一 ド、 を複数含んだデータを受信する受信手段とヽ 受信したデ―タを記 する記憶手段と、 記 '|思し / ァ一タに含まれる命令コー ドに基づいて 実行される処理が不正処理であるか否かを判定する判定手段とを備 えるデータ処理装置において、 前記記憶手段に記憶したデータをバ ィ ト単位で順次的に読出す手段と、 夫々が連続したバイ ト列からな り 、 各バイ ト列の先頭バイ トが異なる読出し位置に対応した複数の データ系列について、 各データ系列に現れる命令コー ドの出現パタ ーンを検出する検出手段とを備え、 前記判定手段は、 前記検出手段 が検出した命令コー ドの出現パターンに基づいて各データ系列によ る処理が不正処理であるか否かを判定すべく なしてあるこ とを特徴 とする。
第 3発明に係るデータ処理装置は、 第 2発明に係るデータ処理装 置において、 命令コー ドの 1バイ ト 目のデータ と該命令コー ドのバ イ ト長との対応関係を記憶したテーブルを更に備えるこ とを特徴と する。
第 4発明に係るデータ処理装置は、 第 2発明に係るデータ処理装 置において、 前記検出手段が検出すべき出現パターンを含むデータ 系列は、 実行中の命令コー ド群が置かれた前記記憶手段上のァ ドレ ス を取得する処理を含むこ とを特徴とする。
第 5発明に係るデータ処理装置は、 第 2発明又は第 4発明に係る データ処理装置において、 前記検出手段が検出すべき出現パターン の 1 つは、 所定の処理を実行する命令コー ド群を呼出すための命令 コー ドを含み、 前記命令コー ド群は、 前記命令コー ドの復帰先のァ ドレス を取得する命令コー ドを含むこ とを特徴とする。
第 6発明に係るデータ処理装置は、 第 5発明に係るデータ処理装 置において、 前記出現パターンは、 分岐命令に係る命令コー ドを更 に含み、 該命令コー ドの分岐先のア ド レスが、 前記命令コー ド群を 呼出すための命令コー ドに対応付けられていることを特徴とする。
第 7発明に係るデータ処理装置は、 第 5発明に係るデータ処理装 置において、 前記出現パターンは、 システム コールを起動する命令 コー ドを更に含むことを特徴とする。
第 8発明に係るデータ処理装置は、 第 5発明に係るデータ処理装 置において、 前記出現パターンは、 前記ア ド レスを起点と したデー タの書換えを指示する命令コー ドを更に含むことを特徴とする。
第 9発明に係るデータ処理装置は、 第 5発明に係るデータ処理装 置において、 前記出現パターンは、 前記命令コー ドの後に所定の文 字コー ドを更に含むことを特徴とする。
第 1 0発明に係るデータ処理装置は、 第 2発明に係るデータ処理 装置において、 検出すべき出現パターンの 1つを前記検出手段が検 出した場合、 前記判定手段は、 検出したデータ系列が不正処理を実 行するデータである と判定すべく なしてあることを特徴とする。
第 1 1発明に係るデータ処理装置は、 第 2発明に係るデータ処理 装置において、 前記判定手段が、 検出したデータ系列が不正処理を 実行するデータである と判定した場合、 外部へその旨の情報を報知 する手段を更に備えるこ とを特徴とする。
第 1 2発明に係るコ ン ピュータプログラムは、 コ ン ピュータに、 入力された異なるバイ ト長の命令コー ドを複数含んだデータに基づ いて実行される処理が不正処理であるか否かを判定させるステップ を有するコ ンピュータプログラムにおいて、 コ ン ピュータに、 夫々 が連続したバイ ト列からなり、 各バイ ト列の先頭バイ トを異なる読 出 し位置に対応させて読出 した複数のデータ系列について、 各デー タ系冽に現れる命令コー ドの出現パターンを検出させるステップと、 コ ンピュータに、 検出した命令コー ドの出現パターンに基づいて各 データ系列による処理が不正処理であるか否かを判定させるステツ プとを有することを特徴とする。
第 1 3発明に係るコ ン ピュータでの読取り が可能な記録媒体は、 コ ンピュータに、 入力された異なるバイ ト長の命令コー ドを複数含 んだデータに基づいて実行される処理が不正処理であるか否かを判 定させるステップを有するコ ンビュ タプロダラムが記録されてい るコンピュータでの読取り が可能な記録媒体において 、 コンピュー タに、 夫々が連続したバィ 卜歹 Uからな り 、 各バイ 卜列の先頭バイ ト を異なる読出し位置に対 、させて読出した複数のデ一タ系列につい て、 各データ系列に現れる命令コー ド、の出現パタ ンを検出させる ステツプと、 コ ンビユータに、 検出した命令コー ド、の出現パターン に基づいて各データ系列による処理が不正処理でめる力 かを判定 させるステップとを有するコ ン ビュ タプロダラムが記録されてい ることを特徴とする。
第 1発明、 第 2発明、 第 1 2 '発明、 及び第 1 3発明にあつては、 記憶手段からデータをバイ ト単位で順次的に読出して不正処理を実 行する命令コ一 ドが含まれているか否かを判定する際、 読出 し位置 が異なる複数のデータ系列について、 命令コー ドの出現パターンを 検出よ う にしている。 したがつて 、 通常のデータには見られないよ う な命令コー ドの出現パターンに着目 して検出を行う こ とで 、 未知 の不正コー ドが現れたときで ヽ 不正コー ドの本質的な処理内容が 変わらない限り対処するこ とが可能となる。 また、 本発明では命令 コ一ドの出現パターンに基づレ、て検出を行うため、 検出の開始位置 をどこに設定するかによって検出する出現パターンが異なつてく る 場合が生じるが、 読出し位置を順次異ならせた複数のデータ系列に ついて検出するよ う にしているため、 誤った判定をするこ とが少な く なり、 検出精度が高まる。
第 3発明にあっては、 命令コ一 の 1 バイ ト 目 のデータ と 、 命令 コー ドのバイ ト長との対応関係を記憶したテーブルを備えているた め、 データ の読出し位置がある命令系列において命令コー ド、の先頭 バイ ト以外に位置している と含には、 不正コー ドの検出を行わない よ う にするこ とができ、 処理速度の向上が図れる。
第 4発明にあっては、 実行中の命令コー ド群が置かれた記憶手段 上のァ ド レスを取得する処理が含まれる出現パターンを検出するよ う にしているため、 不正コードの本質的な構造に着目 した検出手法 の提案が可能となる。
第 5発明にめつては、 所定の処理を実行する命令コード群を呼出 すための命令コ一ドを含みヽ 呼出し先の命令コー ド群において、 前 記命令コ一ドの復帰先のァ ド、 レスを取得する命令コードを含んでい
·>- る出現ハタ一ンを検出するよ Ό にしている。 したがって 、 不正処理 を実行させる うなデータでめるか否かを容易に判定することがで さ、 しかもその本質的な構 te.に基づいて検出 しているため、 未知の 不正コー ドに対しても対処することが可能となる。
第 6発明にあっては、 分岐命令の分岐先が前述の命令コード群に 対応付けられている出現パターンを検出するよ う にしている。 した がって、 不正処理を実行させる よ う なデータであるか否かを容易に 判定するこ とができ、 しかもその本質的な構造に基づいて検出 して いるため、未知の不正コー ドに対しても対処するこ とが可能となる。
第 7発明にめつては 更にシステム ールを起動する命令コ一ド を含んだ出現パタ一ンを検出するよ 5 にしている。 したがって 、 不 正コー ドが実行される蓋然性が高く なる場合を検出できるため 、 検 出精度が高ま
第 8発明にめつてはヽ 復帰先ア ドレスを起点と したデータの書換
X.を指示する命令コ一ド、を含んだ出現パターンを検出するよ う にし ている。 したがつて 、 実行前の段階でどのよ うな処理が実行される のかが分からないよ な不正コー ドに 対処するこ とが可能となる。 第 9発明にあつてはヽ 述の命令 一ドを呼び出すための命令コ 一ドの後に所定の文字コ ドを含んでいるか否かを判定するよ う に しているため、 特定の C P Uに対する不正コ一ドの検出処理におい て検出精度が高まる,
第 1 0発明にあつては 、 検出すべき命令 一ドの出現パターンを 検出した場合、 そのテ一タが不正処理を実行するテ一タである と判 定するよ う にしているため、 不正処理を実行させるよ うなデータで
- あるか否かを容易に判定する とがでさ、. しかもその本質的な構造 に基づいて判定しているため 、 未知の不正 一ドに対しても対処す ることが可能となる
第 1 1発明にあつては 、 検出したデ一タ系列が不正処理を実行す るデータである と判定した場 、 外部 その旨を報知するよ う にし ている 。 したがって 、 不正コ一ドを検出した時点で通 の遮断等を 行って 、 当該不正コ一ドによ り生じる不具 を防止するこ とが可能 となる 図面の簡単な説明
第 1 図は、 本実施の形態に係るデータ処理装置のブ口 ック図であ る。
第 2図は、 データ処理装置が実行する処理を説明する模式図であ る。
第 3図は、 解析対象データの構成を説明する模式図である。
第 4図は、 データ処理装置による不正コー ドの検出手順を説明す るフローチャー トである。
第 5 図は、 データ処理装置による不正コー ドの検出手順を説明す るフローチヤ一トである。
第 6 図は、 解析 ' 判定処理ルーチンの手順を説明するフローチヤ 一トである。
第 7図は、 データ処理装置の解析処理によ り検出する命令コード の出現パターンを説明する模式図である。
第 8図は 、 テータ処理装置の解析処理によ り検出する命令コード の出現パターンを説明する模式図である。
第 9図は . 解析処理ルーチンの処理手順を説明するフローチャー トである
第 1 0図は、 解析処理ルーチンの処理手順を説明するフローチヤ ー トである
第 1 1 図は、 解析処理ルーチンの処理手順を説明するフローチヤ ー トである
第 1 2図は、 解析処理ルーチンの処理手順を説明する フローチヤ ー トであ
第 1 3 図は、 解析処理ルーチンの処理手順を説明するフローチヤ ー トである
第 1 4図は、 判定処理ルーチンの処理手順を説明するフロ一チヤ ー トである
第 1 5図は、 本実施の形態に係る解析処理ルーチンの処理手順を 説明するフ α一チヤ一トである。
第 1 6図は、 本実施の形態に係る解析処理ル一チンの処理手順を 説明するフ Π一チヤ一トである。
第 1 7図は、 本実施の形態に係る解析処理ルーチンの処理手順を 説明するフ Π一チヤ一トである。
第 1 8 図は、 本実施の形態に係る解析処理ルーチンの処理手順を 説明するフ Ρ一チヤ一トである。
第 1 9図は、 本実施の形態に係る解析処理ルーチンの処理手順を 説明するフ Π一チヤ一トである。
第 2 0図は、 本実施の形態に係る判定処理ル チンの処理手順を 説明するフ Π一チヤ一トである。 第 2 1 図は、 本実施の形態に係るデータ処理装置の構成を説明す る模式図である。 発明を実施するための最良の形態
以下、 本発明をその実施の形態を示す図面を参照して具体的に説 明する。
(第 1実施の形態)
第 1 図は本実施の形態に係るデータ処理装置のブロ ック図である。 図中 1 0 は、 データ処理装置であり 、 C P U 1 1、 外部ネ -y ト ヮー クへ接続するための通信ィ ンタ フエース 1 5 a 、 及び内部ィ、 ッ 卜 ヮ ークへ接続するための通信イ ンタ フェース 1 5 b を備えている。 了 ータ処理装置 1 0は、 具体的にはルータ、 プ 一ドバン ドルータ、 スィ ツチ等の通信ネッ ト ワーク上で送受信されるデータを中継する 装置であ り 、 通信イ ンタフェース 1 5 a には通信相手となる情報処 理装置及び通信装置等が外部ネッ ト ワークを介して接続されヽ S. ίρ イ ンタ フェース 1 5 b にはユーザが利用する情報処理装置及ぴ通信 装置等が内部ネッ ト ワークを介して接続される 。 前記情報処理装置 には、パーソナルコンピュータ、 ワークステーショ ン、サーバ装置、
P D A (Personal Digital Assistant) 等力 S含まれ、 前記通信装置 には携帯電話機等が含まれる。
C P U 1 1 には、 メモ リ 1 2 、 ノ ッファ メモリ 1 3、 及びルーテ イ ング部 1 4等のハー ドウェアが接続されており 、 C P U 1 1 がメ モ リ 1 2 に予め格納された制御プログラムを読込んで実行するこ と によ り前述の各ハー ドウエアを制御し、 外部ネッ トワーク と内部ネ ッ ト ワーク との間で送受信される各種データを中継する装置と して 動作させる。 また、 メモ リ 1 2 には、 各ハー ドウェアを動作させる ための制御プロ グラムの他、 通信経路を定めるために送信先のネ ッ ト ワークァ ド レスを記憶したルーティ ングテーブル、 及び本発明の コンピュータプログラムが格納されている。
内部ネ ッ ト ヮ一ク側から外部ネ ッ ト ヮ ク側へ丁 タを送信する 際にデータ処理装置 1 0 の通信イ ンタフェ一ス 1 5 b が当該データ を受信した場合 、 C P U 1 1 はメ モ リ 1 2 内に格納されたノレーティ ングテ一ブルを参照して通信経路を定めヽ 定めた通信経路に従って ルーテ ィ ング部 1 4 を制御する。 そ して 、 通信ィ ンタフ ェース 1 5 a を介して送信先の情報処理装置又は通信装置へァ一タ を送信する また、 外部ネッ ト ワーク側から内部ネ ッ 卜 ヮ一ク側へ送信するデ ータは、 前述と 同様の手順に従ってデータ処理装置 1 0 によ り 中継 される。 このと きデータ処理装置 1 0 は 、 信ィ ンタフェース 1 5 a 【こ飞受 1目 した外部ネ ッ ト ヮ一ク側からのァ一タ を一時的にバッフ ァ メモ リ 1 3 に記憶させ、 記憶させたデータ について解析を行う こ と によ り 、 ある特定の C P U (以下、 保護対象 C P U とい う ) につ いて不正処理を実行させる よ う な命令コー ド (以下、 不正コー ドと い う ) がそのデータに含まれているか否かを判定する。 バッファ メ モ リ 1 3 に記憶させたデータを解析 ' 判定するにあたって、 C P U 1 1 は、 本発明のコ ン ピュータプロ グラムをメ モ リ 1 2 から読込ん で実行し、 自身の内部にデータ を解析 ■ 判定するための環境を与え る仮想 C P U実行環境部 1 1 a を作成する。 仮想 C P U実行環境部 1 1 a は、 保護対象 C P Uが用いる レジスタ、 スタ ック に対応する 仮想レジス タ、 仮想ス タ ッ ク等を備えてお り 、 解析対象のデータを 保護対象 C P Uの命令コードと解釈して仮想的にデコー ドし、 その と きに生成されたパラ メータ等を記憶する。そ して、 C P U 1 1 は、 仮想 C P U実行環境部 1 1 a が備える仮想レジス タ及び仮想ス タ ツ ク の状態等を監視する こ とで不正コー ドの有無を判定する。 なお、 本実施の形態では、 C P U 1 1、 メモリ 1 2、 及びバッフ ァメ モ リ 1 3 を夫々個別に設ける構成と したが、 ノ ッ フ ァ メ モ リ及 び本発明のコ ンピュータプロ グラムを記憶した I C ( Integrated Circuit ) を 1 つ のチ ッ プ に実装 し た A S I C ( Application Specified IC) 等を設ける構成と しても良い。
第 2図はデータ処理装置 1 0が実行する処理を説明する模式図で ある。 データ処理装置 1 0が実行する処理は、 大別して ( 1 ) 外部 ネ ッ ト ワークからのデータの受信、 ( 2 ) 解析対象とするデータの 抽出、 ( 3 ) 解析対象のデータから派生させた複数の命令系列に対 する解析、 ( 4 ) 各命令系列における不正コ一 ドの検出、 に分かれ る。 以下では各処理について説明する。
( 1 ) データの受信
データ処理装置 1 0 の通信イ ンタ フェース 1 5 a は、 接続された 外部ネッ ト ワークの通信規格に準拠した通信手順に従って所定の単 位 (例えば、 パケッ ト単位) でデータを受信する。 受信するデータ の各単位は所定のバィ ト長を有しており、 送信元及び送信先のァ ド レス情報を含んだ通信ヘッダ、 並びにユーザが任意に作成したユー ザデータから構成される。 ユーザデータには、 ユーザが所望する処 理を実行させるための命令コ一 ドが含まれており 、 当該命令コー ド によって不正処理が実行される虡がある。
( 2 ) 解析対象データの抽出
そこで、 データ処理装置 1 0 は、 受信したデータをバイ ト単位で 順次的に抽出し、 バ ッ フ ァ メ モ リ 1 3 に記憶させて解析を行う。 デ ータの抽出を開始する位置、 すなわち解析開始位置は予め定められ た任意の位置とするこ とができる。 例えば、 受信したデータの先頭 バイ トを解析開始位置と しても良く 、 通信ヘッダを除いたユーザデ ータの先頭バイ トを解析開始位置と しても良い。 また、 解析対象と して抽出 したデータを記憶させるバッファ メモ リ 1 3 のバッファサ ィズは予め定められており 、 保護対象 C P Uがデコー ドするこ とが できる命令コー ドの内、 最大の命令長を有する命令コー ドが少なく と も 1つ以上記憶されるよ うなサイズに予め設定されている。
( 3 ) 複数の命令系列の解析
次いで、 バッファメモリ 1 3 に記憶させた解析対象データについ て複数の命令系列を派生させながら解析を行う。 こ こで、 命令系列 とは解析対象データについて指定した位置から始まる保護対象 C P Uの命令コ一 ドの並びをいう。
C P U 1 1 は 、 解析対象データについて解析を行う にあたり 、 バ ッファ メ モ V 1 3 の先頭バイ トから順次的に 1 ノ ィ トずつデータを
HK if 0 し P U 1 1 f 、 込んだ 1 バイ トのデータが保護対象 C P
Uにおいてどのよ うな命令コ一ドの先頭バィ トに該当するか解釈し、 その解釈結果に基づいて命令の種類、 次の命令の開始位置、 及び当 該命令で使 されるノヽ。ラメ一タを記憶する 。 実際には本発明のコン ピュータプ P グラム中に保護対象 C P Uで使用される命令コー ドの 先頭バイ トの文ナコー ドと、 当該命令コ一ドの命令長及び使用され るパラメ一タ等との間の対応関係を規定したテーブル (以下、 命令 テーブルという ) を有しており 、 C P U 1 1 が本発明のコ ンビユー タプログラムを π ― ドした際に育 IJ言己命令テ一ブルがメモリ 1 2上に 格納される o C P U 1 1 は、 当該命令テープルを参照するこ とによ つて、 バッファメモリ 1 3から gin込んた 1バイ トのデータの解釈を 行 Ό 。
読込んだ 1 バイ トのデータの解釈を終えた後、 バッファ メモ リ 1 3からの読出し位置に対応する解析開始バッファ位置を .1バイ トず ら して更にデータを 1バイ ト読込み、 読込んだデータの読出し位置 を先頭バイ ト と した命令系列について解析を行う。 このよ うな処理 を解析開始バッファ位置を順次的にずら しながら繰返して実行する こ とによ り 、 読出し位置が異なる複数の命令系列について解析を行 ラ
また、 解析を終えたバ ッ ファメ モ リ 1 3 の解析開始ノ^ V ファ位 fc には、 受信したデータから次の読込みデータ位置のテ一タが sd憶 れる
( 4 ) 不正コー ドの検出
次いで、 データ処理装置 1 0 の C P U 1 1 は、 仮 ; i C P U実行環 境部 1 1 a が備える仮想レジス タ及び仮想スタ ックの状態等に基づ いて特定の構造 (出現パターン) を有する命令系列を検出するよ う にしており 、 特定の構造を有する命令系列を検出した場ム
1=1 、 不正コ 一 ドを検出したと判定する。 本実施の形態では以下の 2種類の構造 を有するデータを検出する。
1 つは、 分岐命令 (以下、 j m p命令とい う ) の分岐先が 、 命令 コ一 ド群を呼出す命令コー ド 、以 ! ^、 c a 1 1 ·ρ卩 " という ) のア ド レス に対応付けられており 、 その c a 1 1 命令の呼出し先が 、 j m p命令と c a l 1 命令との間のァ ド レス に対応している構造である 以下では本構造を 「 ; j m p → c a 1 丄 」 構造と称する 通吊 、 後述 する 「 c a l l → p o p」 構造と組み合わされ攻撃者の不正コー ド に見出されるこ とが多い。
本構造をもつ不正コー ドでは、 j m p命令と c a 1 1 命令との間 の命令コー ド群で c a 1 1 命令直後のア ドレス(復帰先のア ドレス) の情報を取得し、 そのァ ド レスを手掛かり と して不正コー ド自身の 中に埋め込まれた外部コマン ドを取得し、 当該外部コマン ドを実行 したり 、 不正コー ド自身を書き換えたりするこ とが行われる。
も う 1つは、 c a l l 命令の呼出し先において、 p u s h命令が 先行しない p o p命令が存在する構造である。 こ こで、 ^ u s h命 令は、 ァ ドレス値等をスタ ック領域へ一時的に格納させるための命 令であ り 、 p o p命令は、 逆にスタ ック領域へ格納されたア ド レス 値等を取得する命令である。 以下では本構造を 「 c a 1 1 → p o p」 構造と称する。
本構造をもつ不正コー ドも基本的には前述の「 j m p → c a 1 1 J 構造と同様の手法を用いて、 外部コマン ドを実行したり 、 不正コー ド自身を書き換えたりする。 すなわち、 c a 1 1 命令が実行された と きに、 ス タ ッ ク領域に格納される復帰先のア ド レスの情報を P o p命令によ り取得し、 そのァ ド レスを手掛かり と して、 外部コマン ドを実行したり、 不正コー ド自身を書き換えたりする。
前述の 2種類の命令構造は一般のデータに見られる構造ではない ため、 データ処理装置 1 0がそれらの構造を持つ命令コー ドの出現 パタ ーンを検出した場合、 不正コー ドが含まれている蓋然性が高い と判定する。
なお、 「 j m p → c a 1 1 」 構造、 及び 「 c a 1 1 — > ρ ο ρ」 構 造を用いた不正コ一ドの動作については、後に詳述するこ と とする。
第 3 図は解析対象データの構成を説明する模式図である。 保護対 象 C P Uで使用される命令コ一 ドの命令長は必ずしも一定ではなく 、 様々な命令長の命令コー ドを使用する場合がある。 また、 受信する データには、 例えば、 画像データ、 文書データ等の命令コー ドでは ない単なるデータが含まれている場合もある。 したがって、 解析対 象とするデータ の読出し位置を適切に設定しないと きは、 命令コー ドを正しく解釈できない虞があ り 、 不正コー ドの有無についての判 定を誤る場合が生じる。
そこで、 本実施の形態では、 単なるデータ と命令コー ドとの境界 及び 2つの命令コー ド間の境界 (命令境界) を正しく把握するため に、 ノくッファメモリ 1 3 に記憶させた解析対象のデータを 1 バイ ト ずつ読込み、 それをある命令コー ドの先頭バイ ト とみな してデータ の解析を進める。 前述した命令テーブルを参照する こ と によ り 、 読 込んだ 1 バイ トのデータから次の命令コ ー ドの位置が分かるため、 順次的に命令コー ドを把握する こ とが可能と な り 、 解析対象データ を複数の命令コー ドが連続した 1 つの並び (命令系列) と解釈する こ とができ る。 また、 1 バイ トずつデータの読込み位置をずら しな が ら解釈を行う ため、 先頭バイ トの位置がそれぞれ異なる複数の命 令系列を順次的に派生させる こ とができ、 それらの命令系列の中に 含まれる こ と と なる正しい命令境界を持つ命令系列について解析を 行う こ とが可能となる。
以下、 第 3 図を用いて具体的に説明する。 第 3 図に示した解析対- 象デ一タ は、 先頭から 4バイ トの単なるデータ、 2バイ トの命令コ ー ド (命令 1 ) 、 4バイ トの命令コ ー ド (命令 2 ) 、 4バイ トの命 令コー ド (命令 3 ) 、 1 バイ トの命令コー ド (命令 4 ) …が連続し たデータである。 まず、 解析開始バッファ位置を b 1 に設定して 1 バイ トのデータを読込み、 命令内容、 次の命令コー ドの位置、 及び その命令コ ー ドで使用されるパラメ ータ等の情報を取得する と と も に、 b 1 を先頭バイ ト と した命令系列 1 についての解析を始める。 そ して、 解析開始バッファ位置を b 2 , b 3 , b 4 … と順次的にず ら しなが ら、 各読込み位置が先頭バイ ト と なる命令系列 2、 命令系 列 3 、 命令系列 4 …についての解析を同時並行して行う。 第 3 図に 示した例では、 b 5 の位置を先頭バイ ト と した命令系列 5 が正 しい 命令コー ドの並びと な り 、 命令系列 5 を解析したと きに 「 ; j m p → c a 1 1 」 構造、 又は 「 c a 1 l → p 0 p 」 構造が検出された場合 に、 不正コー ドを検出 したと判定する。
なお、 b 7 から始まるデータ系列 7 、 b 1 1 から始まるデータ系 列 1 1 、 及ぴ b 1 5 から始まるデータ系列 1 5 等はデータ系列 5 の 一部と して含まれているため、 データの解析を省略するこ とができ る。
以下では、 データ処理装置 1 0 による不正コー ドの検出手順につ いて説明する。 第 4図及び第 5図はデータ処理装置 1 0 による不正 コー ドの検出手順を説明するフローチャー トである。 外部ネッ トヮ ークからのデータを通信インタフェース 1 5 a にて受信した場合、 まず、 読込みデータ位置、 及び解析開始位置を初期化し (ステ ップ S 1 ) 、 バッファメモリ 1 3へデータを読込む (ステップ S 2 ) 。 この初期段階での読込みでは、 バッファメモ リ 1 3 のバッファサイ ズ分だけデータを読込む。 そして、 読込データ位置にバッファサィ ズを加算した位置を次の読込データ位匱と して設定する (ステ ップ S 3 ) 。 また、 解析中の命令系列がある場合には、 その命令系列の 集合を初期化する (ステ ップ S 4 ) 。
そ して、 解析開始バッファ位置のデータが受信したデータの終端 であるか否かを判断する (ステップ S 5 ) 。 解析開始バッファ位置 のデータが終端した場合 ( S 5 : Y E S ) 、 本フローチャー トによ る不正コー ドの検出処理を終了し、 解析開始バッフ ァ位置のデータ が終端していない場合 ( S 5 : N O ) 、 解析開始バッファ位置のデ ータを 1バイ ト読込む (ステ ップ S 6 ) 。 次いで、 読込んだ 1バイ トのデータに基づいて次の命令開始位置、 命令の種類、 及びパラメ ータを取得し、それらをメ モ リ 1 2 に記憶させる (ステップ S 7 ) 。
次いで、 C P U 1 1 は、 解析中の命令系列の中で、 現在位置が記 憶させた次の開始位置に一致する命令系列があるか否かを判断する
(ステ ップ S 8 ) 。 現在位置と記憶させた次の開始位置とがー致す る命令系列がある場合 ( S 8 : Y E S ) 、 それらすベての命令系列 について後述する解析 ■ 判定処理を実行する (ステップ S 1 0 ) 。 現在位置と記憶させた次の開始位置とがー致する命令系列がない 場合 ( S 8 : N O ) 、 現在位置から始まる命令系列を解析 · 判定処 理の対象とするために新しい命令系列と して追加した上で (ステツ プ S 9 ) 、 解析 . 判定処理を実行する ( S 1 0 ) 。
次いで、 書込みバッファ位置を解析開始バッファ位置と し (ステ ップ S 1 1 ) 、 読込みデータ位置を 1つだけ増加させる (ステップ S 1 2 ) 。 そして、 読込みデータ位置からバッファメモ リ 1 3上の 書込みバッファ位置へデータを 1バイ ト読込む(ステップ S 1 3 )。 次いで、 解析バッファ位置を 1つだけ増加させた値をバッファサイ ズで除算したときの余り を次の解析開始バッファ位置と して設定し (ステップ S 1 4 ) 、 処理をステップ S 5へ戻し、 解析を繰返し行 う
第 6図は解析 ■ 判定処理ルーチンの手順を説明するフローチヤ一 トである。 バッファメモ リ 1 3から読込んだ 1バイ トのデータが命 令コー ドの先頭バイ トに該当する ものを含んだ命令系列の全てにつ いて後述の解析処理を行う (ステ ップ S 2 1 ) 。 解析処理について は後に詳述する こ と とするが、 こ こでは、 読込んだ 1バイ トのデ一 タを元に命令テーブルを参照して、 命令の内容及び使用するパラ メ ータ、 並びに次の命令の位置等を記憶する と と もに、 仮想 C P U実 行環境部 1 1 a 内の仮想スタ ック内の状態を監視して解析を行う。
解析処理が終了した場合、 C P U 1 1 は解析した命令系列が終端 したか否かを判断し (ステップ S 2 2 ) 、 また、 命令系列が終了 し ていない場合 ( S 2 2 : N O ) 、 本解析 ■ 判定処理ルーチンを終了 して、 第 5図のステップ S I 1 の処理へ移行させる。
また、 命令系列が終端したと判定した場合 ( S 2 2 : Y E S ) 、 後述する判定処理を行う (ステップ S 2 3 ) 。 そして、 C P U 1 1 は、 その判定処理の結果を受けて不正コー ドを検出したか否かを判 断し (ステップ S 2 4 ) 、 不正コー ドを検出していないと判断した 場合( S 2 4 ·· N O ) 、現在の命令系列を削除し (ステップ S 2 6 ) 、 不正コー ドを検出したと.判断した場合 ( S 2 4 : Y E S ) 、 不正コ 一 ドを検出した旨の情報を出力する (ステクプ S 2 5 ) 情報の出 力は、 通信イ ンタフエース 1 5 b を介して内部ネッ 卜 ヮ一クに接続 された情報処理装置へ送信する構成でめつてあよ く 、 また 、 データ 処理装置 1 0 に文字情報と して表示する表示部、 又は光によ り報知 する発光部を設けて出力する構成であつてあよい。 またヽ 不正コー ドを検出した旨の情報を出力した後に通信を遮断するよ な処理を 行う構成と しても良い。
、、/1及び第 8図はデ一タ処理装置 1 0 の解析処理によ り検出す る命令コー ドの出現パタ一ンを説明する模式図である。 第 7図では
「 j m ρ → c a 1 1 」 構造を用レ、た不正 — ドの要部構成を示し、 第 8 図には 「 c a 1 1 → P o p j 構造を用いた不正 · Kの要部構 成を示す。
刖述し / よ つ に 「 j m p c a 1 1 J ォ冓 は、 当該 〗 m p命令の 分岐先力 S c a 1 1 命令のァ ド、レス に対応し 、 その c a 1 1 命令の呼 出し先が j m p命令と c a 1 1 命令との間にあるよ う な構造を有し ている (第 7図 ( b ) 参照 ) 。 第 7図 ( a ) に示した例では、 ァ ド レス A 1 の j m p命令によつて、 ァ ド、レス A 1 0 の c a 1 1 命令へ 分岐し 、 その c a 1 1 命令によってァ ド、レス A 2 〜A 6 の命令コー ド群を呼出 している。 ア ドレス A 1 0 の c a 1 1 命令が実行された と き、 その c a 1 1 命令の復帰先のァ ド、レス ( A 1 1 ) がスタ ック 領域に一時的に格納される スタ ツク領域に格納された復帰先のァ ド レスは、 P o p命令によ り取得できるため 、 そのァ ド レスを手が かり と して外部コマン ドを実行させる - とが可能となる。すなわち、 第 7図に示した不正コー ドは 、 ァ ドレス A 2 の p o p命令によ り c a 1 1 命令の復帰先であるァ ドレス A 1 1 を取得し、 ソフ ト ウェア 割込みである i n t命令によ り システム コールの呼出して、 攻撃者 がア ド レス A 1 1 に作成した外部コマン ド (例えば、 シェルプロ グ ラム) を実行させる構成である。 - 次に、 「 c a 1 1 → p o p」 構造は、 c a 1 1 命令の呼出先の命 令コー ド群において p u s h命令が先行しない p o p命令を有する 構造をしている (第 8図 ( b ) 参照) 。 第 8図 ( a ) に示した例で は、 ア ド レス A 1 の c a 1 1 命令によって、 A 1 6〜A 2 0 の命令 コー ド群を呼出し、 その中で p o p命令によ り c a 1 1 命令の復帰 先のァ ド レスを取得している。 なお、 第 8図 ( a ) に示した例では、 c a 1 1 命令の直後に起動したい外部コマン ドの文字列を配置する 構成とせずに、 攻撃者が予め定めた固定長のダミーの命令コー ドを 挿入しているが、 この場合でも前述と同様の効果が得られる。 すな わち、 第 8図 ( a ) に示した例では、 c a 1 1 命令の呼出し先の命 令コー ド群に存在する p u s h命令が先行しない; o p命令によ り、 c a 1 1 命令の復帰先であるァ ド レス A 2を取得し、 演算処理によ つてァ ド レス A 7の値を算出 してァ ド レス A 2 0 の i n t命令によ り システムコールを呼出 し、 ァ ド レス A 7に配置された文字列の外 部コマン ド (シェルプログラム) を実行させる構成と している。
なお、 第 7図及び第 8 図に示したァ ドレスは便宜的に付与したァ ドレスであって、 必ずしもスタ ック領域上の連続したメ モ リ ァ ドレ スを表している訳ではない。
第 9図〜第 1 3図は解析処理ルーチンの処理手順を説明するフロ 一チャー トである。 データ処理装置 1 0の C P U 1 1 は、 前述の命 令テーブルを参照するこ とによ り 、 バッファメ モ リ 1 3から読込ん だ 1バイ トのデータから始まる命令系列が j m p命令であるか否か を判断する (ステップ S 3 1 ) 。 j m p命令である と判断した場合 ( S 3 1 : Y E S ) 、 当該 j m p命令によ り指示される分岐先のァ ド レスが、 現在位置のア ド レス よ り も大きいか否かを判断する (ス テツプ S 3 2 ) 。 分岐先のァ ド レスが現在位置のァ ド レス よ り も小 さいと判断した場合 ( S 3 2 : N O) 、 本ルーチンを終了 して解析 - 判定処理ルーチンへ処理を戻す。
また、 分岐先ァ ドレスが現在位置のァ ドレス よ り も大きいと判断 した場合 ( S 3 2 : Y E S ) 、 メモリ 1 2内の所定の記憶領域 (以 下、 分岐先テーブルとする) に既に記憶された分岐先ア ドレスが存 在するか否かを判断する (ステ ップ S 3 3 ) 。 分岐先テーブルに既 に記憶された分岐先ァ ド レスが存在しない場合 ( S 3 3 : N O ) 、 ステ ップ S 3 1 で検出した j m p命令の分岐先ァ ド レスを分岐先テ ―ブルに記憶する (ステップ S 3 4 ) 。 また、 既に記憶された分岐 先のア ド レスが存在する場合 ( S 3 3 : Y E S ) 、 小さい方の分岐 先のァ ド レスを選択して (ステ ップ S 3 5 ) 、 分岐先テーブルに記 憶させる分岐先ァ ドレスを更新する (ステ ップ S 3 6 ) 。
分岐先ァ ドレスを更新又は記憶した場合、 次の命令位置をメ モ リ 1 2 に記憶させ (ステ ップ S 3 7 ) 、 処理を解析 ■ 判定処理ルーチ ンへ戻す。
ステップ S 3 1 において j m p命令でないと判断した場合 ( S 3 1 : N O ) 、 バ ッ フ ァ メ モ リ 1 3から読込んだ 1 バイ ト のデータが i n t命令であるか否かを判断する (ステ ッ プ S 4 1 ) 。 i n t命 令である と判断した場合 ( S 4 1 : Y E S ) 、 i n t命令を検出し た旨をメ モ リ 1 2に記憶させる (ステップ S 4 2 ) 。 そして、 前述 の分岐先テーブルに既に記憶された分岐先ア ド レスがあるか否かを 判断する (ステ ップ S 4 3 ) 。 分岐先テーブルに記憶された分岐先 テープルがない場合 ( S 4 3 : N O ) 、 現在解析している命令系列 を終端させ (ステップ S 4 4 ) 、 処理を解析 ■ 判定ルーチンへ戻し て後述する判定処理へ移行させる。 また、 既に記憶された分岐先ア ド レスがある場 A ( S 4 3 : Y E
S ) 、 現在位置のア ド レスが分岐先テーブルに記 ' された分岐先ァ ドレス よ り も大きいか否かを判断する (ステップ S 4 5 ) 現在位 置のァ ドレスが記憶された分岐先ァ ド レス よ り も小さい場 a ( S 4
5 : N O ) 、 現在解析している命令系列を終端させ ( S 4 4 ) 、 解 析 · 判定処理ルーチンへ戻して判定処理へ移行させる また 、 現在 位置のァ ド レスが記憶された分岐先ァ ド レス よ り も大さレ、場合 ( s
4 5 : Y E S ) 、 命令系列を終端させるこ となく解析 • 判定処理ル 一チンへ処理を戻す。
ステップ S 4 1 において i n t命令でないと判断した場合 ( S 4 1 : N O ) 、 ノ ッファメ モ リ 1 3から読込んだ 1バイ トのデータか ら始まる命令コー ドが c a 1 1 命令であるか否かを判断する (ステ ップ S 5 1 ) 。 c a 1 1 命令である と判断した場合 ( S 5 1 : Y E S ) 、 当該 c a 1 1 命令の呼出先ア ド レスが現在位置のア ドレス よ り も大きいか否かを判断する (ステ ッ プ S 5 2 ) 。 呼出先ァ ド レス が現在位置のァ ド レス よ り も大きいと判断した場合 ( S 5 2 : Y E S ) 、 既に記憶された呼出先ァ ド レスがあるか否かを判断する (ス テツプ S 5 3 ) 。 既に記憶された呼出先ァ ドレスがない場合 ( S 5 3 : N O ) 、 ステップ S 5 1 で検出した c a 1 1 命令の呼出先ア ド レスを記憶させる (ステ ップ S 5 4 ) 。 また、 既に記憶された呼出 先ァ ド レス がある場合 ( S 5 3 : Y E S ) 、 小さい方の呼出先ァ ド レスを選択して (ステップ S 5 5 ) 、 記憶している呼出先ア ド レス を更新する (ステ ップ S 5 6 ) 。
呼出先ア ド レスを更新又は記憶した場合、 次の命令位置から数バ ィ ト のデータを コマン ドデータ と してメ モ リ 1 2 に記憶させる (ス テツプ S 5 7 ) 。
ステ ップ S 5 2 において、 ステ ップ S 5 1 で検出した c a 1 1 命 令の呼出先ァ ド レスが現在位置よ り も小さいと判断した場合 ( S 5 2 : N O ) 、 次の命令位置から数バイ トのデータをコマン ドデータ と してメモリ 1 2に記憶させる (ステップ S 5 8 ) 。
そして、 p o p命令が置かれた場所のリ ス トに呼出先ァ ド レスが あるか否かを判断する (ステ ップ S 5 9 ) 、 こ こで、 リ ス ト と は、 p o p命令が置かれているア ドレスをリ ス ト形式で記憶させている 記憶領域のこ とをいう。 リ ス ド上に呼出先ア ド レスがある と判断し た場合 ( S 5 9 : Y E S ) 、 「 c a l l → p o p」 構造を検出した 旨をメモリ 1 2 に記憶させ (ステップ S 6 0 ) 、 現在解析している 命令系列を終端させる (ステ ップ S 6 1 ) 。 命令系列を終端させた 場合、 処理を解析 · 判定処理ルーチンへ戻し、 判定処理へと移行さ せる。
リ ス ト上に呼出先ァ ドレスがないと判断した場合( S 5 9 : N O)、 i n t命令が検出されているか否かを判断し (ステップ S 6 2 ) 、 i n t命令が検出されていない場合 ( S 6 2 : N O ) 、 命令系列を 終端させることなく処理を解析 · 判定処理ルーチンへ戻す。
i n t命令が検出されている場合 ( S 6 2 : Y E S ) 、 分岐先テ 一ブルを参照して j m p命令の分岐先ァ ドレス が現在位置のァ ドレ ス ょ り小さいか否かを判断する (ステ ッ プ S 6 3 ) 。 分岐先ァ ド レ スが現在位置よ り大きいと判断した場合 ( S 6 3 : N O ) 、 命令系 列を終端させることなく 処理を解析 ■ 判定処理ルーチンへ戻す。
分岐先ア ドレスが現在位置よ り小さいと判断した場合 ( S 6 3 : Y E S ) 、 呼出先ア ド レスが j m p命令と現在位置との間にあるか 否かを判断する (ステップ S 6 4 ) 。 呼出先ア ドレスが j m p命令 と現在位置との間にない場合 ( S 6 4 : N O ) 、 命令系列を終端さ せるこ となく処理を解析 ' 判定処理ルーチンへ戻す。 また、 呼出先 ァ ド レスが j m p命令と現在位置との間にある と判断した場合 ( S 6 4 : Y E S ) 、 「 ; j m p → c a 1 1 」 構造を検出 した旨をメ モ リ 1 2 に記憶させ (ステップ S 6 5 ) 、 現在解析している命令系列を 終端させる (ステップ S 6 6 ) 。 命令系列を終端させた場合、 処理 を解析 · 判定処理ルーチンへ戻し、 判定処理へと移行させる。
ステップ S 5 1 において c a 1 1 命令でないと判断した場合 ( S 5 1 : N O ) 、 ノ ッ フ ァ メ モ リ 1 3力 ら読込んだ 1 ノ イ ト のデータ から始まる命令コー ドが p o p命令であるか否かを判断する (ステ ップ S 7 1 )。 p o p命令である と判断した場合( S 7 1 : Y E S ) 、 リ ス トに現在位置のァ ド レスを記憶させる (ステップ S 7 2 ) 。 そ して、 c a 1 1 命令の呼出先ア ド レスが現在位置のア ドレス に一致 するか否かを判断する (ステップ S 7 3 ) 。 一致する場合 ( S 7 3 : Y E S ) 、 Γ c a 1 1 → p o p j 構造を検出 した旨をメモリ 1 2 に 記憶させ (ステ ップ S 7 4 ) 、 処理を解析 ' 判定処理ルーチンへ戻 す。 また、 c a l l 命令の呼出先ア ド レスが現在位置のア ドレスに 一致しない場合 ( S 7 3 : N O ) 、 処理を解析 ' 判定処理ルーチン へ戾す。
なお、 解析対象データにおいて、 j m p命令と c a 1 1 命令との 間、 又は c a 1 1 命令と p o p命令との間にダミーのデータが揷入 されているケースでは、命令境界を正しく解釈できない場合があり、 1つの命令系列の中で 「 ; j m p → c a 1 1 」 構造、 及び 「 c a 1 1 → p o p j 構造を検出できないこ とがある。 しかしながら、 本実施 の形態では、 次の命令位置よ り も大きい分岐先ァ ド レスをもつ j m P命令、 及び次の命令位置よ り も大きい呼出先ア ド レスをもつ c a 1 1 命令を検出した場合、 分岐先ア ド レス及び呼出先ア ド レスを、 それぞれの次の命令コー ドの開始位置と して解析を行う ため、 ダミ 一のデータが挿入されている場合にも前述の 「 ; j m p → c a 1 1 J 構造、 及び 「 c a ί 1 → ρ 0 ρ」 構造を検出するこ とができる。 ステップ S 7 1 において c a 1 1 命令でないと判断した場合 ( S 7 1 : N O ) 、 / ッ フ ァ メ モ リ 1 3 から読込んだ 1バイ ト のデータ 力 r e t命令、 1 r e t命令、 i n t 3命令、 又は i r e t命令の 何れかであるか否かを判断する (ステップ S 8 1 ) 。 これらの命令 は何れも呼出先のルーチンか ら呼出元のルーチンへ制御を戻すため の命令を表している。前述の何れかの命令である場合には( S 8 1 : Y E S )、現在解析している命令系列を終端させ(ステ ップ S 8 2 )、 処理を解析 · 判定処理ルーチンへ戻す。 また、 前述の何れの命令で もないと判断した場合 ( S 8 1 : N O ) 、 命令系列を終端させるこ となく 、 処理を解析 ' 判定処理ルーチンへ戻す。
第 1 4図は判定処理ルーチンの処理手順を説明するフ ロ ーチヤ一 トである。 データ処理装置 1 0の C P U 1 1 は、 前述の解析処理ル 一チンによって終端した命令系列に i n t命令が検出されているか 否かを判断する (ステ ップ S 9 1 ) 。 i n t命令が検出されていな い場合 ( S 9 1 : N O ) 、 割込み処理によ り システム コ一ルが呼出 されて外部コマン ドが実行される こ とがないため、 不正コード無し と判定する (ステ ップ S 9 2 ) 。
解析処理によ り終端した命令系列に i n t命令が検出されている 場合 ( S 9 1 : Y E S ) 、 C P U 1 1 は、 「 c a 1 l → p o p」 構 造、 又は 「 : j m p→ c a 1 1 」 構造が検出されているか否かを判断 する (ステ ップ S 9 3 ) 。 何れの構造も検出されていない場合 ( S 9 3 : N O) 、 不正コー ド無しと判断する ( S 9 2 ) 。
「 c a 1 l → p o p」 構造、 又は 「 ; j m p→ c a 1 1 」 構造の何 れかを検出した場合 ( S 9 3 : Y E S ) 、 コマン ドデータにパスの 区切り を表す" /" に対応する文字コー ドがあるか否かを判断する (ステ ッ プ S 9 4 ) 。 コマン ドデータに前記文字コー ドがない場合 ( S 9 4 : N O ) 、 不正コー ド無しと判定する ( S 9 2 ) 。 また、 コマン ドデータに前記文字コー ドがある場合 ( S 9 4 : Y E S ) 、 割込み処理によってシステムコールが呼出されて外部コマン ド (シ エルコー ド) が実行される蓋然性が高いと判断し、 不正コー ド有り と判定する (ステップ S 9 5 ) 。
なお 、 本実施の形態では 、 不正コ ドの検出ネ月 &を ί¾めるために 外部コマン ドにノヽ0スの区切り を示す / " が含まれているか否かを 判断して傍証を行う よ う にしているが 、 ステ Vプ S 9 3で Γ j m p
→ c a 1 1 」 構造又は 「 c a 1 1 → P o 」 構造を検出した段階で 不正コー ド有り と判定するよ う に しても良い したがつてヽ 検出 冃 度が要求されるよ うな環境での使用が予定されている場 a にはステ ップ S 9 4による傍証まで行い、 検出精度が要求されないよ う な環 境での使用が予定されている場合にはステツプ S 9 4による傍証を 省略するよ うにしても良い < 〕
また 、 本実施の形態では 、 パスの区切り を表す文字コ一 の例と して " / " を挙げたが、 異なる種類の保 αΜ対象 C P Uではヽ パス の 区切り を示す文字コー ドと して" ¥ "が使用されてレヽる場 Π ちあ り、 傍証に用いる文字コー ドは必ずしも / " に限定されずヽ 保護対象
C P Uの種類に応じて予め設定しておく ことが必要となる。
(第 2実施の形態)
第 1 実施の形態で説明した解析 · 判定処理ルーチンを用いて不正 コー ドを検出する手法の他に、 本実施の形態で説明するルーチンを 用いて不正コー ドを検出するこ と も可能である。 なお、 データ処理 装置 1 0のハー ドウェアの構成、 第 図及.び第 5図に示したデータ の読込みに関するルーチン、 及び第 6図に示した解析 · 判定処理ル 一チンは、 本実施の形態においてもそのまま援用できる.ため、 その 説明は省略すること とする。
第 1 5図〜第 1 9図は本実施の形態に係る解析処理ルーチンの処 理手順を説明するフローチャー トである。 データ処理装置 1 0 の C P U 1 1 は、 まず、 状態、 変数、 カ ウンタのそれぞれに付随する生 存期間をデク リ メ ン トする (ステップ S 1 0 1 ) 。 本実施の形態で は解析中の状況を示すパラメータ と して状態、 変数、 及ぴカ ウンタ を導入しており 、 それぞれのパラメータをセッ ト したときに生存期 間と して正の既定値をセッ トする よ う にしている。後述する よ う に、 状態と しては、 p o p命令が出現する とを待機している状態を示 す 「 P o 命令待機中」 状態、 「 c a 1 1 → p o p」 構造を確認す べき状態にあるこ と を示す 「 c a 1 1 → p o p確認」 状態を導入す
O。 3;た、 変数と しては、 u s h命令及び P o p命令の出現回数 の/ ランスを調べるための P u s li 一 P o p バラ ンス変数を導入す た、 カ ウンタには、 「 c a 1 1 → p o p」 構造が出現する蓋 然性が高い状態を計数する c a 1 1 → P o p確認、カ ウンタを導入す る。 生存期間は、 各パラメータ毎に予め設定された値であ り 、 解析 処理ル一チンを繰り返す毎に 1ずつ減少させてゆく こ とで、 解析処 理ルーチンの実行回数に対する有効性を示している。 なお、 本ステ ップで生存期間をデク リ メ ン ト した 果 、 生存期間が 0 となったも のは、 こ こで初期化が行われる。
次いで、 C P U 1 1 は、 命令テ ―ブルを参照するこ とによ り 、 バ ッファ メ モ リ 1 3から読込んだ 1 ノ^ィ トのデータが j m p命令であ る力 否かを判断する (ステ ップ S 1 0 2 ) 。 j m p命令である と判 断した場合 ( S 1 0 2 : Y E S ) 、 当該 j m p命令によ り指示され る分岐先ア ドレスが、 次の命令位置よ り も大きいか否かを判断する
(ステップ S 1 0 3 ) 。 分岐先ァ ド、レスが次の命令位置よ り も小さ いと判断した場合 ( S 1 0 3 : N O ) 、 本ルーチンを終了して解析 - 判定処理ルーチンへ処理を戻す。
また、 分岐先ア ドレスが次の命令位置よ り も大きいと判断した場 合 ( S 1 0 3 : Y E S ) 、 分岐先ア ドレス と と もに次の命令位置を 対と して分岐先リ ス ト に記憶する (ステ ッ プ S 1 0 4 ) 。 こ こで、 分岐先リ ス トは複数のァ ド レスを記憶できる リ ス ト形式の記憶領域 であり 、 メ モ リ 1 2 内にその記憶領域が確保される。 そして、 次の 命令位置を分岐先ア ド レス に変更した後 (ステ ップ S 1 0 5 ) 、 処 理を解析 · 判定処理ルーチンへ戻す。
ステ ップ S 1 0 2 において ; j m p命令でないと判断した場合 ( S 1 0 2 : N O ) 、 C P U 1 1 は、 バ ッ フ ァ メ モ リ 1 3 から読込んだ 1 バイ ト のデータが c a 1 1 命令であるか否かを判断する (ステ ツ プ S 1 0 6 ) 。 c a 1 1 命令である と判断した場合 ( S 1 0 6 : Y E S ) 、 呼出先ァ ドレスが次の命令位置よ り大きいか否かを判断す る (ステ ッ プ S 1 0 7 ) 。 呼出先ァ ド レスが次の命令位置よ り も大 きいと判断した場合 ( S 1 0 7 : Y E S ) 、 呼出先ァ ド レス と次の 命令位置との差が既定値 (例えば、 1 0バイ ト程度) よ り小さいか 否かを判断する (ステ ップ S 1 0 8 ) 。 差が既定値よ り も大きいと 判断した場合 ( S 1 0 8 : N O ) 、 処理を解析 · 判定処理ルーチン へ戻す。
差が既定値よ り あ小さいと判断した場合 ( s 1 0 8 : Y E S ) 、 p u s h 一 o p ノ^ラ ンス変数をク リ ア し , Γ P o p命令待機中」 状態である こ と を記憶する (ステツプ S 1 0 9 ) 。 本実施の形態で は、 c a 1 1 命令から 1 0バイ ト程度の fa囲内にその呼出先ァ ドレ スが有る場合 、 s h命令が先行しない P o P命令を検出するた めに、 p u s h — p o p ノくラ ンス変数を導入する 。 すなわち、 ステ ップ S 1 1 8以降で 、 u s h命令を見つけた場合、 u s h — p o p ノ ラ ンス変数をイ ンク リ メ ン ト し、 p o p命令を見つけた場合、 P u s h - p o p バラ ンス変数をデク リ メ ン ト して、 最終的に p U s h - p o pバランス変数の正負を判定するこ とで p u s h命令が 先行しない: o p命令を検出するよ う にしている。
「 p o p命令待機中」 状態であるこ とを記憶した後、 C P U 1 1 は、次の命令位置を呼出先ア ド レスに変更し(ステ ッ プ S 1 1 0 ) 、 処理を解析 ■ 判定処理ルーチンへ戻す。
一方、 ステップ S 1 0 7 において、 c a l 1 命令の呼出先ア ドレ スが次の命令位置よ り も小さいと判断した場合( S 1 0 7 : N O ) 、 呼出先ァ ド レスが解析開始位置よ り小さいか否かを判断する (ステ ップ S 1 1 1 ) 。 呼出先ア ド レスが解析開始位置よ り も小さいと判 断した場合 ( S 1 1 1 : Y E S ) 、 処理を解析 ' 判定処理ルーチン へ戻す。 また、 呼出先ア ドレスが解析開始位置よ り も大きいと判断 した場合 ( S 1 1 1 : N O ) 、 前述した分岐先リ ス トに記憶されて いる次の命令位置と分岐先ァ ドレス と の間に、 呼出先ァ ドレスが位 置する も のがあるか否かを判断する (ステ ップ S 1 1 2 ) 。 次の命 令位置と分岐先ァ ド レス との間に、 呼出先ァ ドレスが位置するもの がある場合 ( S 1 1 2 : Y E S ) 、 p o p命令が置かれた場所のリ ス ト内のア ド レスが、 呼出先ア ド レスか ら所定範囲 (例えば、 数バ ィ ト) 内に存在するか否かを判断する (ステ ップ S 1 1 3 ) 。
呼出先ァ ド レスか ら所定範囲内に、 p o p命令が置かれた場所の リ ス ト 内のア ドレスが存在する場合 ( S 1 1 3 : Y E S ) 、 呼出先 ァ ド レスが、 p o p命令が置かれた場所のリ ス ト内のァ ド レス に一 致するか否かを判断する (ステップ S 1 1 4 ) 。 そ して、 一致する と判断した場合 ( S 1 1 4 : Y E S ) 、 「 c a 1 l → p o p」 構造 を検出 した旨を記憶し (ステ ップ S 1 1 5 ) 、 一致しない場合 ( S 1 1 4 : N O) 、 「 ; i m p → C a l l 」 構造を検出した旨を記憶す る (ステップ S 1 1 6 ) 。 そして、 命令系列を終端させ (ステップ S 1 1 7 ) 、 処理を解析 ' 判定処理ルーチンへ処理を戻す。 なお、 ステップ S 1 1 2において、 呼出先ア ドレスが次の命令位置と分岐 先ア ド レス と の間にない場合 ( S 1 1 2 : N O ) 、 ステ ッ プ S' 1 1 3 において、 呼出先ァ ドレスから所定範囲内に、 p o p命令が置か れた場所のリ ス ト内のア ド レスが存在しない場合( S 1 1 3 : N〇)、 命令系列を終端させるこ となく解析 · 判定処理ルーチンへ処理を戻 す。
ス テ ッ プ S 1 0 6 において c a 1 1 命令でないと判断した場合 ( S 1 0 6 : N O ) 、 C P U 1 1 は、 バ ッ フ ァ メ モ リ 1 3から読込 んだ 1バイ ト のデータが p o p命令であるか否かを判断する (ステ ップ S 1 1 8 ) 。 p o p命令である と判断した場合 ( S 1 1 8 : Y E S ) 、 リ ス ト に現在位置を記憶し (ステ ッ プ S 1 1 9 ) 、 p u s h — p o p バラ ンス変数をデク リ メ ン トする(ステ ップ S 1 2 0 )。 そして、 C P U 1 1 は、 現在の状態が 「 p o p命令待機中」 状態で あ り 、 しかも p u s h — p o p バランス変数が負であるか否かを判 断する (ステップ S 1 2 1 ) 。 「 p o p命令待機中」 状態であ り 、 しかも p u s h - p o p バラ ンス変数が負である と判断した場合 ( S 1 2 1 : Y E S ) 、 p o p命令で使用されたレジス タ番号を記 憶し、 「 c a 1 l → p o p確認」 状態であるこ とをメ モ リ 1 2 に記 憶する (ステップ S 1 2 2 ) 。 そして、 c a 1 1 → p o p確認カ ウ ンタをク リ ア した上で (ステップ S 1 2 3 ) 、 処理を解析 · 判定ル 一チンへ戻す。 また、 「 p o p命令待機中」 でない場合、 又は p u s h - p o pバランス変数が負でない場合 ( S 1 2 1 : N O ) 、 本 ルーチンを終了して解析 ■ 判定処理ルーチンへ処理を戻す。
ステップ S 1 1 8 において p o p命令でないと判断した場合 ( S 1 1 8 : N O ) 、 C P U 1 1 は、 ノ ッ フ ァ メ モ リ 1 3力 ら読込んだ 1バイ トのデータが p u s h命令であるか否かを判断する (ステツ プ S 1 2 4 ) 。 p u s h命令である と判断した場合 ( S 1 2 4 : Y E S ) 、 p u s h — p o p バラ ンス変数をイ ンク リ メ ン ト した上で (ステ Vプ S 1 2 5 ) .、 処理を解析 ■ 判定処理ルーチンへ戻す。
ステ シプ S 1 2 4 に :お 、て : u s h命令でない と判断 した場合
( S 1 2 4 : Ν Ο ) 、 C P U 1 1 は、 ノ ッ フ ァ メ モ リ 1 3 から読み 込んだ 1 バイ ト のテ一タが m o V命令である力 、 又は論理演算命令 であるか否かを判断する (ステ ップ S 1 2 6 ) 。 m o V命令又は論 理演算命令である と判断した場合 ( S 1 2 6 : Y E S ) 、 「 c a l
1→ p o Ρ確認」 状態でメモ リ ァ ド レ ッ シングのベース レジス タ に ad憶されてレヽる レジスタ番号を使用 しているか否かを判断する (ス テ ツプ S 1 2 7 ) 記レジスタ番号を使用 している と判断した場 合 ( S 1 2 7 : Υ E S ) 、 c a 1 1→ p o p確認カ ウ ンタをイ ンク リ メ ン 卜 し (ステ ッ プ S 1 2 8 ) 、 c a 1 l → p o p 確認、カ ウ ンタ の値が既定値 (例えばヽ 3 〜 5程度) 以上であるか否かを判断する
(ステ プ S 1 2 9 ) c a 1 l → p o p確認カ ウ ンタ の値が既定 値以上である と判断した 合 ( S 1 2 9 : Y E S ) 、 「 c a l l → p o J 構造を検出 した を記憶し (ステ ッ プ S 1 3 0 ) 、 命令系 列を終端させた上で (ステ ップ S 1 3 1 ) 、 処理を解析 ' 判定処理 ルーチン 3 なお 、 ステ ツプ S 1 2 7 において、 記憶されてい る レジスタ番号を使用 していないと判断した場合( S 1 2 7 : N〇)、 また、 ステツプ s 1 2 9 において、 c a l l → p o p確認カ ウンタ の値が既定値よ り も小さいと判断した場合 ( S 1 2 9 : N O ) 、 命 令系列を終端させる こ と なく 処理を解析 ·判定処理ルーチンへ戻す。
ステ ップ S 1 2 6 において、 m o V命令でも論理演算命令でもな いと判断した場合 ( s 1 2 6 : N O) 、 終端命令とマーク された命 令であるか否かを判断する (ステ ップ S 1 3 2 ) 。 本実施の形態で は、 命令コー ドとその命令コー ドの命令長等と の関係を規定した命 令テーブルを用いているが、 その命令テーブルにて終端命令を予め マーク しておく こ と で、 終端命令とマーク された命令であるか否か を判断するこ とができる。 終端命令と してマーク しておく べき命令 には以下のものが存在する。 ( 1 ) システムプログラムでしか使わ れない保護機能命令 (A R P L , L G D T, L I D T , S G D T , S I D T , L L D T , L T R, S L D T , S T R, L M S W, S M S W , L A R , L S L, V E R W , C L T S , H L T, コ ン ト 口 一 ルレジスタ、 デバック レジスタに対する M O V等) 、 ( 2 ) セグメ ン ト セ レク タ を使用する命令 ( m o V , u s h , p o p の一部、 L E S, L D S等) 、 ( 3 ) 入出力命令 ( I N , O U T , I N S , O U T S等) 、 ( 4 ) まれにしか使用されない命令 (D A A, D A S , AA A , A A S , B O U N D , P U S H F , P O P F , S A H F, L A H F ) 、 ( 5 ) 関数又は割込みルーチンの開始、 終了を指 示する命令 ( E N T E R , L E A V E , R E T , L R E T , I N T 3 , I N T O , I R E T ) 。 なお、 これらの命令は、 特定の C P U に特化した命令であ り 、 保護対象 C P Uが変われば終端命令と して マーク しておく べき命令が変わるのは勿論のこ とである。 ステ ップ
S 1 3 2 において、 終端命令とマーク された命令である と判断した 場合 ( S 1 3 2 : Y E S ) 、 解析中の命令系列を終端させた上で ( S 1 3 1 ) 、 処理を解析 · 判定処理ルーチンへ戻し、 終端命令とマー ク された命令でないと判断した場合 ( S 1 3 2 : N O ) 、 命令系列 を終端させるこ となく 処理を解析'判定処理ルーチンへ戻す。また、 終端命令を検出する代わり に、 不正なァ ドレ ッ シング形式を持つ命 令を検出した場合、 不正なプレフィ ッタスが使用されているこ とを 検出 した場合にも、 命令系列を終端させた上で処理を解析 ■ 判定処 理ルーチンへ戻すよ う にしても良い。
第 2 0図は本実施の形態に係る判定処理ルーチンの処理手順を説 明するフローチャー トである。 本判定処理ルーチンでは、 データ処 理装置 1 0 の C P U 1 1 が、 「 c a 1 l → p o p」 構造又は 「 ; j m p→ c a 1 1 」 構造が検出されているか否かを判断し (ステップ S 1 4 1 ) 、 何れかの構造が検出されたと判断した場合 ( S 1 4 1 : Y E S ) 、 不正コー ド有り と判定し (ステップ S 1 4 2 ) 、 何れの 構造も検出されていないと判断した場合 ( S 1 4 1 : N O ) 、 不正 コー ド無しと判定する (ステップ S 1 4 3 ) 。 そして、 解析 ' 判定 処理ルーチンへ処理を戻す。
(第 3実施の形態)
第 1 実施の形態では、 ルータ、 ブロー ドバン ドルータ、 スィ ッチ 等のデータ通信で利用される中継装置に本発明を適用 した形態につ いて説明したが、 パーソナルコ ンピュータ、 サーバ装置、 携帯電話 機、 P D A等の通信機能を有した情報処理装置に適用するこ と も可 能である。
第 2 1 図は本実施の形態に係るデータ処理装置の構成を説明する 模式図である。 図中 1 0 0は、 パーソナルコ ンピュータのよ う な情 報処理装置であり 、 情報処理装置 1 0 0は、 C P U 1 0 1 を備えて おり 、 バス 1 0 2 を介して、 R O M 1 0 3、 R A M 1 0 4、 操作部 1 0 5、 表示部 1 0 6、 通信部 1 0 7、 内部記憶装置 1 0 8 、 及び 補助記憶装置 1 0 9 等の各種ハー ドウェアに接続されている。 C P U 1 0 1 は、 R O M 1 0 3 に格納された制御プロ グラムに従って、 それらのハー ドウェアを制御する。 R AM I 0 4は、 S R AM又は フラ ッシュメ モ リ等で構成され、 R O M 1 0 3 に格納された制御プ ログラムの実行時に発生するデータ、 通信部 1 0 7 を介して受信し た外部ネッ ト ワークからの各種のデータを受信する。
操作部 1 0 5 は、 キーボー ド、 マウス等の入力装置であ り 、 表示 部 1 0 6 は、 C R T、 液晶ディ スプレイ等の表示装置である。 操作 部 1 0 5及び表示部 1 0 6 は、 例えば、 送信すべきデータの入力及 び表示をする際に利用される。 通信部 1 0 7は、 モデム等の回線終 端装置を備えてお り 、 外部ネッ ト ワーク との間でやり 取り される各 種データの送受信を制御する。
補助記憶装置 1 0 9 は、 本発明のコ ンピュータプロ グラム等を記 録した F D、 C D— R OM等の記録媒体 Mから コ ンピュータプロ グ ラム等を読取る F D ドライブ、 C D— R OM ドライブ等からな り 、 読取られたコ ンピュータプロ グラムは、 内部記憶装置 1 0 8 に格納 される。 内部記憶装置 1 0 8 に格納されたコ ン ピュータプロ グラム は、 C P U 1 0 1 からの指示に応じて適宜 R AM I 0 4 に読込まれ て実行される。 C P U 1 0 1 が本発明のコ ン ピュータプロ グラムを 実行する こ と によって情報処理装置 1 0 0 は通信部 1 0 7 にて受信 したデータから不正コー ドを検出する装置と して機能する。
刖述のコンピュータプロ グラムは、 情報処理装置 1 0 0 の起動時 に自動的に R AM I 0 4 に読込まれる常駐型のプロ グラムである こ とが望ま しく 、 通 1S部 1 0 7 にて外部からデータを受信した際に、 自動的に不正コー ドを検出する よ う に しておく と よい なお 、 不正 コー ドの検出手順については、 実施の形態 1 で説明
した通 り であるので説明を省略する。
なお、 本発明のコ ンピュータプロ グラムは、 記録媒体 Mによ り提 供される形態と して説明 したが、 通信部 1 0 7 を介した通信手段に よって提供される形態であってもよい。
また、 本実施の形態では、 パーソナルコンピュータのよ う な情報 処理装置 1 0 0 を利用 して不正コー ドを検出する構成と したが、 パ 一ソナルコ ンピュータ の他、 携帯電話機、 P D A、 コ ンピュータゲ ーム機、 車載通信装置、 各種の情報家電に適用でき る こ と は勿論で あ 。
また、 本発明のコ ンピュータプロ グラムを F D、 C D— R OM等 の記録媒体に記録させて提供する こ と によ り 、 コ ンピュータ ウィル スを検出するアプリ ケーショ ンソフ ト ウエアのパッケージと して提 供するこ と も可能である。 産業上の利用可能性
第 1発明、第 2発明、第 1 2発明、及び第 1 3発明による場合は、 記憶手段からデータをバイ ト単位で順次的に読出して不正処理を実 行する命令コー ドが含まれているか否かを判定する際、 読出し位置 が異なる複数のデータ系列について、.命令コー ドの出現パターンを 検出よ う にしている。 したがって、 通常のデータには見られないよ う な命令コー ドの出現パターンに着目 して検出を行う こ とで、 未知 の不正コー ドが現れたときでも、 不正コー ドの本質的な処理内容が 変わらない限り対処するこ とが可能となる。 また、 本発明では命令 コー ドの出現パターンに基づいて検出を行うため、 検出の開始位置 をどこに設定するかによって検出する出現パターンが異なってく る 場合が生じるが、 読出し位置を順次異ならせた複数のデータ系列に ついて検出するよ う にしているため、 誤った判定をする こ とが少な く なり、 検出精度を高めるこ とができる。
第 3発明による場合は、 命令コー ドの 1バイ ト 目 のデータ と、 命 令コー ドのバイ ト長との対応関係を記憶したテーブルを備えている ため、 データの読出し位置がある命令系列において命令コー ドの先 頭バイ ト以外に位置している ときには、 不正コー ドの検出を行わな いよ う にするこ とができ、 処理速度の向上を図ることができる。 第 4発明による場合は、 実行中の命令コー ド群が置かれた記憶手 段上のア ドレスを取得する処理が含まれる出現パターンを検出する よ う に しているため、 不正コー ドの本質的な構造に着目 した検出手 法の提案が可能となる。
第 5発明による場合は、 所定の処理を実行する命令コー ド群を呼 出すための命令コー ドを含み、 呼出し先の命令コー ド群において、 前記命令コー ドの復帰先のァ ドレスを取得する命令コー ドを含んで いる出現パターンを検出するよ う にしている。 したがって、 不正処 理を実行させるよ う なデータであるか否かを容易に判定するこ とが でき、 しかもその本質的な構造に基づいて検出しているため、 未知 の不正コ一 ドに対しても対処することが可能となる。
第 6発明による場合は、 分岐命令の分岐先が前述の命令コー ド群 に対応付けられている出現パターンを検出するよ う にしている。 し たがって、 不正処理を実行させるよ う なデータであるか否かを容易 に判定するこ とができ、 しかもその本質的な構造に基づいて検出し ているため、 未知の不正コー ドに対しても対処することができる。 第 7発明による場合は、 更にシステムコールを起動する命令コー ドを含んだ出現パターンを検出するよ う にしている。 したがって、 不正コー ドが実行される蓋然性が高く なる場合を検出できるため、 検出精度を高めるこ とができる。
第 8発明による場合は、 復帰先ァ ド レスを起点と したデータの書 換えを指示する命令コー ドを含んだ出現パターンを検出するよ う に している。 したがって、 実行前の段階でどのよ う な処理が実行され るのかが分からないよ うな不正コー ドにも対処するこ とが可能とな る。
第 9発明による場合は、 前述の命令コー ドを呼び出すための命令 コー ドの後に所定の文字コー ドを含んでいるか否かを判定するよ う にしているため、 特定の C P Uに対する不正コー ドの検出処理にお いて検出精度を高めることができる。
第 1 0発明による場合は、 検出すべき命令コー ドの出現パターン を検出した場合、 そのデータが不正処理を実行するデータである と 判定する よ う にしているため、 不正処理を実行させるよ う なデータ - であるか否かを容易に判定する とがでさヽ しかもその本 的な構 造に基づいて判定して ヽるため 、 未知の不正コー ドに対しても対処 するこ とが可能とな 。
第 1 1発明による場合は 、 検出 したテ タ系列が不正処理を実行 する丁 ―タである と判定した場 、 外部 その旨を報知するよ う に している 。 したがつて、 不正 一ドを検出した時点で通信の遮断等 を行つて 、 当該不正コー ドによ り生じる不 合を防止する とがで きる。

Claims

請求の範囲
1 . 異なるバイ ト長の命令コー ドを複数含んだデータを受信する 受信手段と、 受信したデータを記憶する記憶手段とを備えるデータ 処理装置を用いて、 記憶したデータに含まれる命令コー ドに基づい て実行する処理が不正処理であるか否かを判定する不正処理判定方 法において、 前記記憶手段に記憶したデータをバイ ト単位で順次的 に読出し、 夫々が連続したバイ ト列からなり 、 各バイ ト列の先頭バ ィ トが異なる読出 し位置に対応した複数のデータ系列について、 各 データ系列に現れる命令コー ドの出現パターンを検出し、 検出した 命令コー ドの出現パターンに基づいて各データ系列による処理が不 正処理であるか否かを判定するこ とを特徴とする不正処理判定方法。
2 . 異なるバイ ト長の命令コー ドを複数含んだデータを受信する 受信手段と、 受信したデータを記憶する記憶手段と、 記憶したデー タに含まれる命令コー ドに基づいて実行される処理が不正処理であ るか否かを判定する判定手段とを備えるデータ処理装置において、 前記記憶手段に記憶したデータをバイ ト単位で順次的に読出す手段 と、 夫々が連続したバイ ト列からなり 、 各バイ ト列の先頭バイ トが 異なる読出し位置に対応した複数のデータ系列について、 各データ 系列に現れる命令コー ドの出現パターンを検出する検出手段とを備 え、 前記判定手段は、 前記検出手段が検出 した命令コー ドの出現パ ターンに基づいて各データ系列による処理が不正処理であるか否か を判定すべく なしてあることを特徴とするデータ処理装置。
3 . 命令コー ドの 1バイ ト 目のデータ と該命令コー ドのバイ ト長 との対応関係を記憶したテーブルを更に備えるこ とを特徴とする請 求項 2に記載のデータ処理装置。
4 .前記検出手段が検出すべき出現パターンを含むデータ系列は、 実行中の命令コー ド群が置かれた前記記憶手段上のァ ドレスを取得 する処理を含むこ とを特徴とする請求項 2に記載のデータ処理装置。
5 . 前記検出手段が検出すべき出現パターンの 1つは、 所定の処 理を実行する命令コー ド群を呼出すための命令コー ドを含み、 前記 命令コ ー ド群は、 前記命令コ ー ドの復帰先のァ ド レスを取得する命 令コー ドを含むことを特徴とする請求項 2又は請求項 4に記載のデ ータ処理装置。
6 .前記出現パターンは、分岐命令に係る命令コー ドを更に含み、 該命令コー ドの分岐先のア ド レスが、 前記命令コー ド群を呼出すた めの命令コ ー ドに対応付けられているこ とを特徴とする請求項 5 に 記載のデータ処理装置。
7 . 前記出現パターンは、 システム コールを起動する命令コ ー ド を更に含むことを特徴とする請求項 5 に記載のデータ処理装置。
8 . 前記出現パターンは、 前記ア ド レスを起点と したデータの書 換えを指示する命令コー ドを更に含むこ とを特徴とする請求項 5 に 記載のデータ処理装置。
9 . 前記出現パターンは、 前記命令コ 一 ドの後に所定の文字コ ー ドを更に含むことを特徴とする請求項 5に記載のデータ処理装置。
1 0 . 検出すべき出現パターンの 1つを前記検出手段が検出した 場合、 前記判定手段は、 検出したデータ系列が不正処理を実行する データである と判定すべく なしてあるこ と を特徴とする請求項 2 に 記載のデータ処理装置。
1 1 . 前記判定手段が、 検出したデータ系列が不正処理を実行す るデータである と判定した場合、 外部へその旨の情報を報知する手 段を更に備えるこ とを特徴とする請求項 2 に記載のデータ処理装置。
1 2 . コ ンピュータに、 入力された異なるバイ ト長の命令コー ド を複数含んだデータに基づいて実行される処理が不正処理であるか 否かを判定させるステップを有するコ ンピュータプロ グラ ムにおい て、 コ ンピュータ に、 夫々が連続したバイ ト列からな り 、 各バイ ト 列の先頭バイ ト を異なる読出 し位置に対応させて読出 した複数のデ ータ系列について、 各データ系列に現れる命令コー ドの出現パター ンを検出させるステ ップと、 コ ンピュータに、 検出 した命令コー ド の出現パターンに基づいて各データ系列による処理が不正処理であ るか否かを判定させるステップと を有する こ と を特徴とする コ ン ビ ユータプロ グラム。
1 3 . コ ンピュータ に、 入力された異なるバイ ト長の命令コー ド を複数含んだデータに基づいて実行される処理が不正処理であるか 否かを判定させるステ ップを有する コ ン ピュータプロ グラムが記録 されている コ ンピュータでの読取り が可能な記録媒体において、 コ ンピュータ に、 夫々が連続したバイ ト列からな り 、 各バイ ト列の先 頭バイ ト を異なる読出 し位置に対応させて読出 した複数のデータ系 列について、 各データ系列に現れる命令コー ドの出現パターンを検 出させるステ ップと 、 コ ン ピュータに、 検出 した命令コー ドの出現 パターンに基づいて各データ系列による処理が不正処理であるか否 かを判定させるステ ップと を有する コ ン ピュータプロ グラムが記録 されている こ と を特徴とする コンピュータでの読取り が可能な記録 媒体。
PCT/JP2004/002319 2003-02-26 2004-02-26 不正処理判定方法、データ処理装置、コンピュータプログラム、及び記録媒体 WO2004077295A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2005502935A JP4320014B2 (ja) 2003-02-26 2004-02-26 不正処理判定方法、データ処理装置、コンピュータプログラム、及び記録媒体
US11/211,556 US7895655B2 (en) 2003-02-26 2005-08-26 Malicious-process-determining method, data processing apparatus and recording medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003-049911 2003-02-26
JP2003049911 2003-02-26

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US11/211,556 Continuation US7895655B2 (en) 2003-02-26 2005-08-26 Malicious-process-determining method, data processing apparatus and recording medium

Publications (1)

Publication Number Publication Date
WO2004077295A1 true WO2004077295A1 (ja) 2004-09-10

Family

ID=32923329

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/002319 WO2004077295A1 (ja) 2003-02-26 2004-02-26 不正処理判定方法、データ処理装置、コンピュータプログラム、及び記録媒体

Country Status (4)

Country Link
US (1) US7895655B2 (ja)
JP (1) JP4320014B2 (ja)
TW (1) TW200416541A (ja)
WO (1) WO2004077295A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007080281A (ja) * 2005-09-13 2007-03-29 Cloudmark Inc 実行可能コードのためのシグネチャ
JP2007188437A (ja) * 2006-01-16 2007-07-26 Nippon Telegr & Teleph Corp <Ntt> 攻撃検知装置、攻撃検知方法および攻撃検知プログラム

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7607122B2 (en) * 2005-06-17 2009-10-20 Microsoft Corporation Post build process to record stack and call tree information
CN101470661B (zh) * 2007-12-28 2012-03-14 鸿富锦精密工业(深圳)有限公司 计算机程序除错系统及方法
US8291497B1 (en) * 2009-03-20 2012-10-16 Symantec Corporation Systems and methods for byte-level context diversity-based automatic malware signature generation
US8713681B2 (en) * 2009-10-27 2014-04-29 Mandiant, Llc System and method for detecting executable machine instructions in a data stream
CN102576392B (zh) * 2009-10-31 2014-12-17 惠普发展公司,有限责任合伙企业 用于恶意代码检测的设备和方法及恶意代码检测器
US9372991B2 (en) * 2012-03-06 2016-06-21 International Business Machines Corporation Detecting malicious computer code in an executing program module
US10103890B2 (en) * 2014-08-08 2018-10-16 Haw-Minn Lu Membership query method
US10728040B1 (en) * 2014-08-08 2020-07-28 Tai Seibert Connection-based network behavioral anomaly detection system and method
KR101715759B1 (ko) * 2015-09-22 2017-03-15 한국전자통신연구원 멀티코어 환경에서의 악성코드 분석 장치 및 방법
US20190362074A1 (en) * 2018-05-24 2019-11-28 Microsoft Technology Licensing, Llc Training technologies for deep reinforcement learning technologies for detecting malware
US10963561B2 (en) * 2018-09-04 2021-03-30 Intel Corporation System and method to identify a no-operation (NOP) sled attack

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01237834A (ja) * 1988-03-18 1989-09-22 Fujitsu Ltd ロードモジュールの編集表示方式
JPH11167487A (ja) * 1997-12-02 1999-06-22 Fujitsu Ltd ウィルスチェックネットワーク、ウィルスチェック装置、クライアント端末及びウィルス情報管理局
JP2001344128A (ja) * 2000-06-02 2001-12-14 Nec Microsystems Ltd 逆アセンブル表示アドレスの設定方法および記録媒体

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5414833A (en) * 1993-10-27 1995-05-09 International Business Machines Corporation Network security system and method using a parallel finite state machine adaptive active monitor and responder
US5826013A (en) * 1995-09-28 1998-10-20 Symantec Corporation Polymorphic virus detection module
AU1206097A (en) * 1995-12-28 1997-07-28 Eyal Dotan Method for protecting executable software programs against infection by software viruses
JPH09319574A (ja) 1996-05-29 1997-12-12 Nec Niigata Ltd コンピュータウィルスチェックシステム
US5951698A (en) 1996-10-02 1999-09-14 Trend Micro, Incorporated System, apparatus and method for the detection and removal of viruses in macros
US6301699B1 (en) * 1999-03-18 2001-10-09 Corekt Security Systems, Inc. Method for detecting buffer overflow for computer security
US6058372A (en) * 1999-06-11 2000-05-02 Sweet; Stephen R. Interactive self-service hard drive copying system
US6405303B1 (en) * 1999-08-31 2002-06-11 Advanced Micro Devices, Inc. Massively parallel decoding and execution of variable-length instructions
US7360076B2 (en) * 2001-06-13 2008-04-15 Itt Manufacturing Enterprises, Inc. Security association data cache and structure
US6832302B1 (en) * 2001-10-24 2004-12-14 At&T Corp. Methods and apparatus for detecting heap smashing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01237834A (ja) * 1988-03-18 1989-09-22 Fujitsu Ltd ロードモジュールの編集表示方式
JPH11167487A (ja) * 1997-12-02 1999-06-22 Fujitsu Ltd ウィルスチェックネットワーク、ウィルスチェック装置、クライアント端末及びウィルス情報管理局
JP2001344128A (ja) * 2000-06-02 2001-12-14 Nec Microsystems Ltd 逆アセンブル表示アドレスの設定方法および記録媒体

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
EITARO SAITO: "2001 Nen han virus daizukan", NIKKEI NETWORK, no. 16, 22 July 2001 (2001-07-22), pages 59 - 85, XP002982548 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007080281A (ja) * 2005-09-13 2007-03-29 Cloudmark Inc 実行可能コードのためのシグネチャ
JP2007188437A (ja) * 2006-01-16 2007-07-26 Nippon Telegr & Teleph Corp <Ntt> 攻撃検知装置、攻撃検知方法および攻撃検知プログラム
JP4739962B2 (ja) * 2006-01-16 2011-08-03 日本電信電話株式会社 攻撃検知装置、攻撃検知方法および攻撃検知プログラム

Also Published As

Publication number Publication date
US20060026685A1 (en) 2006-02-02
JP4320014B2 (ja) 2009-08-26
JPWO2004077295A1 (ja) 2006-06-08
TW200416541A (en) 2004-09-01
US7895655B2 (en) 2011-02-22

Similar Documents

Publication Publication Date Title
JP4320013B2 (ja) 不正処理判定方法、データ処理装置、コンピュータプログラム、及び記録媒体
US7895655B2 (en) Malicious-process-determining method, data processing apparatus and recording medium
KR102137773B1 (ko) 보안 애플리케이션을 통해 안전한 데이터를 전송하기 위한 시스템 및 그에 관한 방법
ES2302962T3 (es) Metodo y sistema para detectar de forma heuristica virus en un codigo ejecutable.
JP4851150B2 (ja) ユーザ変更可能ファイルの効率的なホワイトリスティング
EP2600272A2 (en) Hacker virus security-integrated control device
US20090133125A1 (en) Method and apparatus for malware detection
US20060130145A1 (en) System and method for analyzing malicious code protocol and generating harmful traffic
Pasupulati et al. Buttercup: On network-based detection of polymorphic buffer overflow vulnerabilities
EP2774071B1 (en) System and method for detecting a file embedded in an arbitrary location and determining the reputation of the file
CN109474625A (zh) 网络安全防护方法、装置及嵌入式系统
JPH11316677A (ja) コンピュ―タネットワ―クの保安方法
CN110837640B (zh) 恶意文件的查杀方法、查杀设备、存储介质及装置
CN101676876A (zh) 受威胁计算机的自动的基于硬件的恢复
JP2007047884A (ja) 情報処理システム
WO2008040223A1 (fr) Procédé de filtrage de données nocives transférées entre un terminal et un hôte de destination dans un réseau
WO2010024606A2 (ko) 정상 파일 데이터베이스 제공 시스템 및 방법
RU2746105C2 (ru) Система и способ конфигурирования шлюза для защиты автоматизированных систем
KR100985076B1 (ko) Usb 디바이스 보안 장치 및 방법
CN114338203A (zh) 一种基于拟态蜜罐的内网检测系统及方法
JP2006268687A (ja) コンピュータウィルス監視プログラム及びこれを用いたコンピュータ端末装置
JP2007157059A (ja) プロアクティブな不正プログラム検出方法、検出装置及びコンピュータプログラム
CN111343000B (zh) 用于配置网关以保护自动化系统的系统和方法
CN110830494B (zh) 一种iot攻击防御方法、装置及电子设备和存储介质
US11520884B2 (en) Dummy information insertion device, dummy information insertion method, and storage medium

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2005502935

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 11211556

Country of ref document: US

WWP Wipo information: published in national office

Ref document number: 11211556

Country of ref document: US

122 Ep: pct application non-entry in european phase