WO2020228160A1 - 一种基于动态污点分析的工业通信协议逆向分析方法 - Google Patents

一种基于动态污点分析的工业通信协议逆向分析方法 Download PDF

Info

Publication number
WO2020228160A1
WO2020228160A1 PCT/CN2019/101245 CN2019101245W WO2020228160A1 WO 2020228160 A1 WO2020228160 A1 WO 2020228160A1 CN 2019101245 W CN2019101245 W CN 2019101245W WO 2020228160 A1 WO2020228160 A1 WO 2020228160A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
function
dynamic
analysis
tainted
Prior art date
Application number
PCT/CN2019/101245
Other languages
English (en)
French (fr)
Inventor
程鹏
郑豪
杨泽域
陈积明
王文海
孙优贤
Original Assignee
浙江大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浙江大学 filed Critical 浙江大学
Publication of WO2020228160A1 publication Critical patent/WO2020228160A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/74Reverse engineering; Extracting design information from source code
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/03Protocol definition or specification 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures

Definitions

  • the invention relates to the technical field of industrial communication network and protocol reverse engineering, in particular to an industrial communication protocol reverse analysis method based on dynamic stain analysis.
  • the traditional protocol reverse analysis method is based on manual analysis, which has the disadvantages of time-consuming, error-prone, and not universal.
  • the traditional protocol reverse analysis method is based on manual analysis, which has the disadvantages of time-consuming, error-prone, and not universal.
  • the protocol reverse analysis method for the characteristics of industrial control protocols is currently required by industrial control security systems.
  • the purpose of the present invention is to provide a reverse analysis method of industrial communication protocol based on dynamic stain analysis technology in view of the shortcomings of the existing reverse analysis technology of industrial communication protocol.
  • a reverse analysis method of industrial communication protocols based on dynamic stain analysis includes the following steps:
  • Step 1 Instrument the executable program of the unknown protocol in the industrial control system, locate the memory location and length of the message data in the communication process by analyzing the message receiving function, and mark these data as tainted data to complete the tainted initialization .
  • Step 2 Instrument the memory copy function and data read and write assembly instructions in the executable program, monitor the propagation process of all tainted data during the dynamic running of the program, and mark all the transferred registers and memory as tainted, complete The spread of stains.
  • Step 3 Record the context of function calls during the execution of the executable program, record all instructions and function operations involving tainted data, and output these records to a log file.
  • Step 4 Write a script to analyze the log file, construct a function call relationship diagram containing stain data for the executable program, determine the field boundary of the message, and output the format of the unknown protocol.
  • the executable program of the unknown protocol in the industrial control system is inserted based on the multi-granularity instrumentation interface provided by the dynamic binary instrumentation tool, and the multi-granularity instrumentation interface includes a dynamic library, Functions, instructions.
  • map data structure to save the taint status of each taint data, which is used to record and query the taint information of each register and memory during the execution of the executable program;
  • the recorded taint information includes: whether it is tainted, the address of the tainted data source, the number of tainted data bytes, and whether it is big-endian;
  • c Provide a function interface to deal with various situations of taint propagation, including tainted data reading and writing, tainted data and, or, shift calculation.
  • step 1 specifically includes:
  • step 2 specifically includes:
  • step 3 specifically includes:
  • step 1 and step 2 For the stain-related instructions and functions in step 1 and step 2, record all instructions and function operations involving stain data during the execution of the executable program;
  • the two types of records are output to the log file in sequential order, and the stain data information is nested in the function context record.
  • step 4 offline analysis is performed based on the log file, and each function in the log is regarded as a function node, and the tainted data inside each function is regarded as a data node.
  • the two types of nodes are formed in the process of processing. The relationship between parent and child nodes, through the script output function call relationship graph containing stain data.
  • the field boundary of the message is determined based on the following discrimination rules:
  • a single byte in the data node is regarded as a protocol field
  • the bytes before and after the field boundary in the data node are regarded as a protocol field.
  • the present invention has the following advantages:
  • Fig. 1 is an architecture diagram of the method of the present invention
  • Figure 2 is a UML diagram of memory and register design in the method of the present invention.
  • Figure 3 is a tree diagram of the results of the modbus protocol as an example.
  • the protocol executable program receives and runs the protocol data message in the dynamic stain analysis environment.
  • the stain analysis program initializes the message data as stain data, and monitors related functions and instructions to complete the spread of stain data.
  • the stain analysis program outputs the necessary information to the log file, and outputs the protocol format information after the analysis script is processed.
  • Pintool Based on the image, function, trajectory, instruction and other instrumentation interfaces provided by the dynamic binary instrumentation tool Pintool, instrument the functions and instructions related to the stain analysis in the binary executable program of the target protocol, and record the protocol data in the executable program The spreading process. Specifically, Pintool provides RTN_InsertCall and InsertPredicatedCall functions to insert callback functions for functions and instructions.
  • the standard dynamic library in the operating system is optimized by the compiler, and the instrumentation tool Pintool may not be able to locate the function return instruction address. Therefore, the callback function cannot be inserted into the function return position.
  • the wrapper function of the objective function By writing the wrapper function of the objective function, and compiling it into a dynamic library.
  • the executable program By setting the LD_PRELOAD keyword, the executable program will load the function with the same name first, so that Pintool can locate accurately.
  • the wrapper function has the same name and type as the original function, and the internal implementation calls the real recv function real_recv.
  • the RegT class and MemT class are designed to store the tainted data state, including the source address of the taint, the length of the data, whether it is big-endian format, etc., and are used uniformly
  • the map data structure saves numerous tainted data.
  • the map data structure and related algorithms of the register are packaged in the Register class, and the corresponding memory is in the Memory class.
  • the relationship and data structure of each class is shown in Figure 2. Both the Memory class and the Register class provide the following functional interfaces:
  • isTainted method returns whether the memory address or register is marked as tainted data.
  • 2.taint method mark the target memory address or register as tainted data.
  • Untaint method remove the stain mark of the target memory address or register.
  • Offset method Return the offset position of the message data corresponding to the memory address or register stain data.
  • the register class has more shift fields and methods than the memory class.
  • the shift field and the bigendian field are used to process whether the data read by the register is big-endian data.
  • the two fields 0x010x11 in the message represent the hexadecimal number 0x111 in the big-endian way.
  • the little-endian CPU needs to read the two bytes separately and concatenate them in a specified way.
  • the corresponding binary code is as follows:
  • eax For shr eax, 0x8, eax is shifted 8bit to the left, monitor shr and other instructions, and set the shift attribute of the corresponding register.
  • add eax, edx the two bytes are read in big-endian format, and commands such as add are monitored to set the size and bigendian attributes of the corresponding register.
  • the network receiving function is inserted, including the recv, recvfrom, and recvmsg functions in the standard dynamic library and the system call read function under the Unix/Linux operating system.
  • Design different callback functions locate the protocol data receiving buffer address and protocol data length in these functions, and mark the corresponding memory area as stained data to complete the protocol data stain initialization.
  • the instrumentation interface RTN_InsertCall can pass the parameters and return values of the function during runtime, and the parameter buffer is the location where the protocol data is received.
  • the data movement instructions mov, cmov, push, pop are inserted to analyze the spread of tainted data existing between registers, memory, and immediate data.
  • the Pintool function instrumentation interface insert the memcpy and memmove functions in the standard dynamic library to analyze the overall movement of the tainted data during the memory copy process.
  • the taint data information is output to the log file at the same time, mainly the offset in the original message location where the taint data involved is located.
  • each function is represented by a node.
  • Each node contains information about the node of the sub-function or the tainted data used in the function.
  • the boundary of the function is regarded as the byte boundary of the communication message.
  • the function A has only processed byte 2, then byte 2 can be regarded as a protocol field, and there is a field boundary between byte 1 and byte 3.
  • function B has processed multiple bytes, and a total of 4 bytes in the format 1, [2, 3], 4, where [2, 3] means read bytes 2, 3 as a whole, then bytes 2, 3 can be regarded as a protocol field, and there is a byte boundary between bytes 1, 4.
  • the format information of the agreement is finally obtained.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer And Data Communications (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)
  • Communication Control (AREA)

Abstract

本发明公开了一种基于动态污点分析的工业通信协议逆向分析方法,包括:对协议可执行程序动态插桩,对协议报文接收和处理的相关函数与指令进行监控,并在此基础上进行动态污点分析。在动态污点分析过程中记录相应信息,输出到日志文件,并根据日志文件分析协议格式。本方法能够基于工业控制系统通信协议的可执行程序在动态运行中自动分析出协议格式信息,不需要获得程序的源代码,避免了繁琐耗时的人工动态调试分析过程,使得对工业控制系统中未知通信协议的格式逆向分析过程变得简单高效。

Description

一种基于动态污点分析的工业通信协议逆向分析方法 技术领域
本发明涉及工业通信网络与协议逆向工程技术领域,特别涉及一种基于动态污点分析的工业通信协议逆向分析方法。
背景技术
随着工业网络的发展,许多工业控制系统应用的协议使用基于TCP协议栈的应用层协议。与互联网协议不同,在工业控制系统应用的众多协议之中,许多都是不同厂商私有的非标准非公开协议。而在工业控制系统安全越发重要的今天,这些非标准非公开协议给诸如防火墙,入侵检测,深度包解析等安全防御机制带来了挑战。
传统的协议逆向分析方法基于人工分析,具有耗时,易错,不通用等缺点。目前有许多研究和应用工具针对以文本格式为主的计算机协议,而缺乏针对基本采用二进制格式的工业控制协议的逆向分析方法,且工业控制协议具有的内在格式特点也是之前的方法不曾考虑的。因此,针对工业控制协议特点的协议逆向分析方法目前工业控制安全系统所需要的。
发明内容
本发明的目的在于针对现有工业通信协议逆向分析技术的不足,提出一种基于动态污点分析技术的工业通信协议的逆向分析方法。
本发明的目的是通过以下技术方案实现的:一种基于动态污点分析的工业通信协议逆向分析方法,该方法包括以下步骤:
步骤1:对工业控制系统中未知协议的可执行程序进行插桩,通过分析报文接收函数,定位通信过程中报文数据的内存位置与长度,并将这些数据标记为污点数据,完成污点初始化。
步骤2:对可执行程序中的内存拷贝函数和数据读写汇编指令进行插桩,监控所有污点数据在程序动态运行过程中的传播过程,并将传播到的寄存器和内存全部标记为污点,完成污点的传播。
步骤3:在可执行程序运行过程中记录函数调用的上下文,并记录所有涉及污点数据的指令和函数操作,将这些记录输出到日志文件。
步骤4:编写脚本分析日志文件,针对可执行程序,构建包含污点数据的函数调用关系图,判断报文的字段边界,输出该未知协议的格式。
进一步地,所述步骤1和2中,基于动态二进制插桩工具提供的多粒度插 桩接口对工业控制系统中未知协议的可执行程序进行插桩,所述多粒度插桩接口包括动态库、函数、指令。
进一步地,所述步骤1和步骤2中,在使用Pintool工具对操作系统的标准动态库进行函数粒度插桩时,由于标准动态库一般经过编译器优化,Pintool无法定位到函数的退出位置;基于此缺陷,将标准动态库的函数包装一层外层函数,将包装后的函数编译成本地动态库,并使可执行程序优先选择该库中函数,完成对函数入口和出口的插桩;所述外层函数与原函数的名称与参数类型相同。
进一步地,所述步骤1和步骤2中,
a.使用map数据结构保存每个污点数据的污点状态,用于记录和查询可执行程序运行过程中各个寄存器和内存的污点信息;
b.对于每个寄存器和内存,记录的污点信息包括:是否污点、污点数据源地址、污点数据字节数、是否大端序;
c.提供函数接口处理污点传播的多种情况,包括污点数据读写,污点数据与、或、移位计算。
进一步地,所述步骤1具体包括:
a.对标准动态库中recv,recvfrom,recvmsg函数作为污点输入源进行插桩;
b.对Unix/Linux的系统调用read函数作为污点输入源进行插桩。
6.根据权利要求1所述基于动态污点分析的工业通信协议逆向分析方法,其特征在于,所述步骤2具体包括:
a.对寄存器、内存、立即数之间的数据传送指令插桩,分析污点数据的传播过程;
b.对读取多个字节相关的算数运算指令插桩,分析污点数据的字节组合情况;
c.对标准动态库中memcpy,memmove函数插桩,分析污点数据的整体拷贝情况。
进一步地,所述步骤3具体包括,
a.对可执行程序中任意一个函数,记录可执行程序运行过程中函数进入和退出状态;
b.对步骤1和步骤2中的污点相关指令和函数,记录可执行程序运行过程中所有涉及污点数据的指令和函数操作;
c.两类记录按时序顺序输出到日志文件,污点数据信息嵌套在函数上下文记录中。
进一步地,所述步骤4中,基于日志文件进行离线分析,将日志中的每个 函数视为一个函数节点,每个函数内部的污点数据视为一个数据节点,两类节点在处理过程中形成父子节点关系,通过脚本输出包含污点数据的函数调用关系图。
进一步地,所述步骤4中,判断报文的字段边界基于以下判别规则:
a.数据节点中单独字节视为一个协议字段;
b.数据节点中作为整体读取的多个字节视为一个协议字段;
c.数据节点中不连续的字节,前一个字节的末尾和后一个字节的起始均视为字段边界;
d.数据节点中前后均为字段边界的字节视为一个协议字段。
与现有技术相比,本发明具有以下优势:
1.不需要程序源码,只需要运行协议可执行程序,且没侵入性。
2.通过动态污点分析,准确分析出协议各个字节在程序运行过程中的流向,以得出准确的协议字段分界结果。
3.不针对特定协议程序,具有普适性。
附图说明
图1是本发明方法的架构图;
图2是本发明方法中内存和寄存器设计类的UML图;
图3是以modbus协议为例的结果树状图。
具体实施方式
下面结合附图对本发明作进一步说明。
本发明的基本架构如图1,协议可执行程序在动态污点分析环境中接收协议数据报文并运行。运行过程中污点分析程序将报文数据作为污点数据初始化,并监控相关函数和指令完成污点数据传播。此外污点分析程序将必要的信息输出到日志文件,经过分析脚本处理后输出协议格式信息。
基于动态二进制插桩工具Pintool提供的对映像,函数,轨迹,指令等插桩接口,对目标协议的二进制可执行程序中污点分析相关的函数和指令进行插桩,记录协议数据在可执行程序中的传播过程。具体的,Pintool提供了RTN_InsertCall和InsertPredicatedCall函数来对函数和指令插入回调函数。
操作系统中标准动态库经过编译器优化,插桩工具Pintool可能无法定位到函数返回指令地址。因而无法对函数返回位置插入回调函数。通过编写目标函数的包装函数,并将其编译成动态库。通过设定LD_PRELOAD关键字,可执行程序将优先加载其中同名函数,从而让Pintool准确定位。以recv函数的包装函数为例,包装函数和原函数同名、同类型,内部实现调用真实的recv函数 real_recv。
Figure PCTCN2019101245-appb-000001
在数据污点传播过程中,对于每个包含污点数据的寄存器或内存,分别设计了RegT类和MemT类用于储存污点数据状态,包括污点源地址,数据长度,是否大端格式等,而且统一使用map数据结构来保存众多的污点数据。寄存器的map数据结构和相关算法包装在Register类中,内存的相应在Memory类中。各个类的关系与数据结构如图2所示。Memory类和Register类都对外提供了以下函数接口:
1.isTainted方法:返回内存地址或寄存器是否被标记为污点数据。
2.taint方法:将目标内存地址或寄存器标记为污点数据。
3.untaint方法:去除目标内存地址或寄存器的污点标记。
4.src方法:返回内存地址或寄存器污点数据源地址。
5.offset方法:返回内存地址或寄存器污点数据对应报文数据偏移位置。
6.size方法:返回内存地址或寄存器污点数据的字节长度
7.value方法:返回内存地址或寄存器污点数据的值。
其中寄存器的类相较于内存类多了shift字段和方法。shift字段和bigendian字段用于处理寄存器读取的数据是否为大端数据。例如,报文中两个字段0x010x11按照大端方式表示16进制数字0x111,小端CPU为了正确读取该数据需要单独读取两个字节按照指定方式拼接起来,其对应的二进制代码如下:
Figure PCTCN2019101245-appb-000002
对于shr eax,0x8,eax被左移8bit,监控shr等指令,设置对应寄存器的shift属性。对于add eax,edx,两个字节按照大端格式读取,监控add等指令,设置对应寄存器的size、bigendian属性。
通过Pintool函数插桩接口RTN_InsertCall,对网络接收函数插桩,包括标准动态库中的recv,recvfrom,recvmsg函数和Unix/Linux操作系统下的系统调用read函数。设计不同回调函数,定位这些函数中协议数据接收缓冲区地址和 协议数据长度,并将对应内存区域标记为污点数据,完成协议数据污点初始化。以recv函数为例子,插桩接口RTN_InsertCall可以传递函数运行时的参数与返回值,其中参数buffer即协议数据接受位置。
Figure PCTCN2019101245-appb-000003
通过Pintool指令插桩接口INS_InsertPredicatedCall,对数据移动指令mov,cmov,push,pop插桩,分析寄存器、内存、立即数之间存在的污点数据传播。通过Pintool函数插桩接口,对标准动态库中memcpy,memmove函数插桩,分析内存拷贝过程中污点数据的整体移动。对数据运算指令xor,and,or,shl,shr插桩,分析多个字节污点数据按照大端或者小端端序读取过程。在上述分析过程中,同时输出污点数据信息到日志文件,主要是涉及的污点数据所在原报文位置中的偏移量。
通过Pintool函数插桩接口RTN_InsertCall对可执行程序中或者协议处理相关动态库中的每个函数插桩,记录函数进入和退出信息,包括函数名称或符号,线程ID,进入或者退出标记,函数返回地址,函数起始地址,函数结束地址。其中函数返回地址,函数起始地址,函数结束地址用于函数回溯调用者。
程序运行过程中,如下格式的文本数据将被输出到日志文件。
Figure PCTCN2019101245-appb-000004
通过Python脚本处理日志,遍历污点信息和函数上下文信息,构造包含污点数据的函数调用树状结构,并用pydot包提供的接口调用Graphviz中的dot可视化工具输出该树状结构。该树状结构中,每个函数以节点表示。每个节点 包含子函数的节点或者函数中使用污点数据的信息。
根据树状图显示的信息,按照设定规则刻画通信报文字节分割边界。其一,函数的边界作为通信报文字节边界,例如函数A只处理过字节2,那么字节2可视为一个协议字段,和字节1、字节3之间有字段边界。其二,函数中存在指令读取连续字节,例如函数B处理过多个字节按照格式1,[2,3],4总共4个字节,其中[2,3]表示读取字节2,3作为整体,那么字节2,3可视为一个协议字段,与字节1,4之间有字节边界。根据以上规则,最终得到该协议的格式信息。
上述实施例用来解释说明本发明,而不是对本发明进行限制,在本发明的精神和权利要求的保护范围内,对本发明作出的任何修改和改变,都落入本发明的保护范围。

Claims (9)

  1. 一种基于动态污点分析的工业通信协议逆向分析方法,其特征在于,包括以下步骤:
    步骤1:对工业控制系统中未知协议的可执行程序进行插桩,通过分析报文接收函数,定位通信过程中报文数据的内存位置与长度,并将这些数据标记为污点数据,完成污点初始化。
    步骤2:对可执行程序中的内存拷贝函数和数据读写汇编指令进行插桩,监控所有污点数据在程序动态运行过程中的传播过程,并将传播到的寄存器和内存全部标记为污点,完成污点的传播。
    步骤3:在可执行程序运行过程中记录函数调用的上下文,并记录所有涉及污点数据的指令和函数操作,将这些记录输出到日志文件。
    步骤4:编写脚本分析日志文件,针对可执行程序,构建包含污点数据的函数调用关系图,判断报文的字段边界,输出该未知协议的格式。
  2. 根据权利要求1所述基于动态污点分析的工业通信协议逆向分析方法,其特征在于,所述步骤1和2中,基于动态二进制插桩工具提供的多粒度插桩接口对工业控制系统中未知协议的可执行程序进行插桩,所述多粒度插桩接口包括动态库、函数、指令。
  3. 根据权利要求1所述基于动态污点分析的工业通信协议逆向分析方法,其特征在于,所述步骤1和步骤2中,在使用Pintool工具对操作系统的标准动态库进行函数粒度插桩时,将标准动态库的函数包装一层外层函数,将包装后的函数编译成本地动态库,并使可执行程序优先选择该库中函数,完成对函数入口和出口的插桩;所述外层函数与原函数的名称与参数类型相同。
  4. 根据权利要求1所述基于动态污点分析的工业通信协议逆向分析方法,其特征在于,所述步骤1和步骤2中,
    a.使用map数据结构保存每个污点数据的污点状态,用于记录和查询可执行程序运行过程中各个寄存器和内存的污点信息;
    b.对于每个寄存器和内存,记录的污点信息包括:是否污点、污点数据源地址、污点数据字节数、是否大端序;
    c.提供函数接口处理污点传播的多种情况,包括污点数据读写,污点数据与、或、移位计算。
  5. 根据权利要求1所述基于动态污点分析的工业通信协议逆向分析方法,其特征在于,所述步骤1具体包括:
    a.对标准动态库中recv,recvfrom,recvmsg函数作为污点输入源进行插桩;
    b.对Unix/Linux的系统调用read函数作为污点输入源进行插桩。
  6. 根据权利要求1所述基于动态污点分析的工业通信协议逆向分析方法,其特征在于,所述步骤2具体包括:
    a.对寄存器、内存、立即数之间的数据传送指令插桩,分析污点数据的传播过程;
    b.对读取多个字节相关的算数运算指令插桩,分析污点数据的字节组合情况;
    c.对标准动态库中memcpy,memmove函数插桩,分析污点数据的整体拷贝情况。
  7. 根据权利要求1所述基于动态污点分析的工业通信协议逆向分析方法,其特征在于,所述步骤3具体包括,
    a.对可执行程序中任意一个函数,记录可执行程序运行过程中函数进入和退出状态;
    b.对步骤1和步骤2中的污点相关指令和函数,记录可执行程序运行过程中所有涉及污点数据的指令和函数操作;
    c.两类记录按时序顺序输出到日志文件,污点数据信息嵌套在函数上下文记录中。
  8. 根据权利要求1所述基于动态污点分析的工业通信协议逆向分析方法,其特征在于,所述步骤4中,基于日志文件进行离线分析,将日志中的每个函数视为一个函数节点,每个函数内部的污点数据视为一个数据节点,两类节点在处理过程中形成父子节点关系,通过脚本输出包含污点数据的函数调用关系图。
  9. 根据权利要求8所述基于动态污点分析的工业通信协议逆向分析方法,其特征在于,所述步骤4中,判断报文的字段边界基于以下判别规则:
    a.数据节点中单独字节视为一个协议字段;
    b.数据节点中作为整体读取的多个字节视为一个协议字段;
    c.数据节点中不连续的字节,前一个字节的末尾和后一个字节的起始均视为字段边界;
    d.数据节点中前后均为字段边界的字节视为一个协议字段。
PCT/CN2019/101245 2019-05-15 2019-08-18 一种基于动态污点分析的工业通信协议逆向分析方法 WO2020228160A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910401745.1A CN110213243B (zh) 2019-05-15 2019-05-15 一种基于动态污点分析的工业通信协议逆向分析方法
CN201910401745.1 2019-05-15

Publications (1)

Publication Number Publication Date
WO2020228160A1 true WO2020228160A1 (zh) 2020-11-19

Family

ID=67787241

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/101245 WO2020228160A1 (zh) 2019-05-15 2019-08-18 一种基于动态污点分析的工业通信协议逆向分析方法

Country Status (2)

Country Link
CN (1) CN110213243B (zh)
WO (1) WO2020228160A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857681B (zh) * 2020-06-08 2021-04-30 北京大学 一种c++系统的软件定义化关键函数定位与提取方法
CN111984311B (zh) * 2020-07-03 2022-04-22 华南理工大学 一种基于运行日志的软件结构复现的方法
CN112905184B (zh) * 2021-01-08 2024-03-26 浙江大学 一种基于插桩的基本块粒度下工控协议语法逆向分析方法
CN113271237B (zh) * 2021-06-16 2022-12-13 山石网科通信技术股份有限公司 工控协议的解析方法、装置、存储介质及处理器

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521543A (zh) * 2011-12-23 2012-06-27 中国人民解放军国防科学技术大学 一种基于动态污点分析进行消息语义解析的方法
CN103440201A (zh) * 2013-09-05 2013-12-11 北京邮电大学 动态污点分析装置及其在文件格式逆向解析中的应用
US20170293754A1 (en) * 2009-12-15 2017-10-12 Intel Corporation Sensitive data tracking using dynamic taint analysis
CN108255711A (zh) * 2017-12-29 2018-07-06 湖南优利泰克自动化系统有限公司 一种基于污点分析的plc固件模糊测试系统及测试方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063325B (zh) * 2014-07-11 2016-10-26 电子科技大学 一种针对嵌入式软件的测试用例自动化生成装置及其方法
CN105787305B (zh) * 2016-02-26 2018-08-10 西北大学 一种抵抗符号执行和污点分析的软件保护方法
CN106709290A (zh) * 2016-12-16 2017-05-24 江苏通付盾科技有限公司 一种应用安全性分析方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170293754A1 (en) * 2009-12-15 2017-10-12 Intel Corporation Sensitive data tracking using dynamic taint analysis
CN102521543A (zh) * 2011-12-23 2012-06-27 中国人民解放军国防科学技术大学 一种基于动态污点分析进行消息语义解析的方法
CN103440201A (zh) * 2013-09-05 2013-12-11 北京邮电大学 动态污点分析装置及其在文件格式逆向解析中的应用
CN108255711A (zh) * 2017-12-29 2018-07-06 湖南优利泰克自动化系统有限公司 一种基于污点分析的plc固件模糊测试系统及测试方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WANG, QINGLIANG: "Research on the Key Technology of Unknown Protocol Reverse Analysis", CHINA MASTER'S THESES FULL-TEXT DATABASE, no. 08, 15 August 2015 (2015-08-15), DOI: 20200117173829X *

Also Published As

Publication number Publication date
CN110213243A (zh) 2019-09-06
CN110213243B (zh) 2020-05-12

Similar Documents

Publication Publication Date Title
WO2020228160A1 (zh) 一种基于动态污点分析的工业通信协议逆向分析方法
US7975059B2 (en) Generic application level protocol analyzer
US20120159449A1 (en) Call Stack Inspection For A Thread Of Execution
CN109324971B (zh) 一种基于中间语言和污点分析的软件数据流分析方法
WO2020075335A1 (ja) 解析機能付与装置、解析機能付与方法及び解析機能付与プログラム
JP2004164554A (ja) プログラム実行監視装置および方法
WO2011151931A1 (ja) アプリケーションの解析方法、解析システム及び記録媒体
US6598181B1 (en) Method and system for debugging multiple function calls
CN112905184A (zh) 一种基于插桩的基本块粒度下工控协议语法逆向分析方法
CN112540808A (zh) 一种程序行为层级调用关系的记录方法及相关设备
US20090265695A1 (en) Method and apparatus for analyzing program execution path
Liu et al. Extracting sent message formats from executables using backward slicing
WO2020119551A1 (zh) 基于日志文件的服务性能分析方法、装置及电子设备
US6708310B1 (en) Method and system for implementing user-defined codeset conversions in a computer system
Ortega Mastering Python for Networking and Security: Leverage Python scripts and libraries to overcome networking and security issues
CN113076233B (zh) 一种io性能检测方法、装置、设备及存储介质
JP5382743B2 (ja) ユーザ操作のログ記録方法およびその装置
WO2023067665A1 (ja) 解析機能付与方法、解析機能付与装置及び解析機能付与プログラム
KR20190051301A (ko) 퍼징 수행 시스템, 퍼징용 실행 흐름 정보 추출 장치 및 방법
Karippara et al. Synthesis, analysis and visualization of networked executions
US7530080B2 (en) Implementation of alias preserving structural subtyping with precise types using transparent adapters
JP6984760B2 (ja) 変換装置及び変換プログラム
Heisinger et al. QuAPI: Adding Assumptions to Non-Assuming SAT & QBF Solvers.
Torres Go Programming Cookbook: Over 85 recipes to build modular, readable, and testable Golang applications across various domains
CN116431669B (zh) 基于Mybatis的数据处理方法、装置、计算机设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19928875

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19928875

Country of ref document: EP

Kind code of ref document: A1