CN112015373A - A formal modeling method for endogenous security application software based on formal method - Google Patents

A formal modeling method for endogenous security application software based on formal method Download PDF

Info

Publication number
CN112015373A
CN112015373A CN202010735834.2A CN202010735834A CN112015373A CN 112015373 A CN112015373 A CN 112015373A CN 202010735834 A CN202010735834 A CN 202010735834A CN 112015373 A CN112015373 A CN 112015373A
Authority
CN
China
Prior art keywords
modeling
application software
model
determining
security
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010735834.2A
Other languages
Chinese (zh)
Other versions
CN112015373B (en
Inventor
赵涌鑫
刘知昊
蒲戈光
刘虹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Industrial Control Safety Innovation Technology Co ltd
East China Normal University
Original Assignee
Shanghai Industrial Control Safety Innovation Technology Co ltd
East China Normal University
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 Shanghai Industrial Control Safety Innovation Technology Co ltd, East China Normal University filed Critical Shanghai Industrial Control Safety Innovation Technology Co ltd
Priority to CN202010735834.2A priority Critical patent/CN112015373B/en
Publication of CN112015373A publication Critical patent/CN112015373A/en
Application granted granted Critical
Publication of CN112015373B publication Critical patent/CN112015373B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a formal modeling method of endogenous safety application software based on a formal method, wherein the modeling part comprises the following parts: and (3) applying software functional modeling to support the description of system functions, wherein the system functional modeling comprises a system structure modeling part and a system behavior modeling part. The system structure modeling is to model a system architecture, and uses a class diagram to describe attributes and methods related in a system, the system behavior modeling adopts a state diagram and a sequence diagram to model the behavior of the whole system, wherein the state diagram describes control logic of processes, and the sequence diagram describes an interaction process between the processes; application software information security threat and policy modeling to support the description of system security threats and security policies. The information security threat modeling uses an attack tree to deeply analyze vulnerability correlation of each module of the system in all aspects, finds an attack path threatening network security and presents the attack path in a tree mode.

Description

一种基于形式化方法内生安全应用软件形式建模方法A formal modeling method for endogenous security application software based on formal method

技术领域technical field

本发明属于软件技术领域,涉及一种基于形式化方法内生安全应用软件形式建模方法,形成内生安全的应用软件集成开发系统。The invention belongs to the technical field of software, and relates to a formal modeling method for endogenous security application software based on a formal method, forming an endogenous security application software integrated development system.

背景技术Background technique

内生安全是网络安全未来发展的方向与进化目标,从前分散的、独立的安全能力需要依靠协同、聚合和融入信息化系统和业务应用,从而构建不断从信息化系统内生长出的安全能力,具备自适应、自主和自成长的特点,这样的防护能力才能伴随系统的增长而提升,时刻保证系统安全。当前应用软件具有分布性、异构性、并发性和实时性等特征,同时存在安全缺陷多、纠错难度大等问题,在内生安全应用软件建模技术中,对应用软件的架构、行为、控制逻辑等方面进行建模,构建能对软件的功能安全和信息安全性质协同建模的工具,从而得到内生安全应用软件安全模型。这种方法需要对软件架构、软件行为、安全威胁和策略进行建模。结合状态机和序列图相融合的应用软件形式化建模技术和开放网络环境下应用软件安全威胁和安全策略建模技术,实现从不同角度对并发/分布式系统的行为的融合建模与分析缓解安全攻击威胁能力。Endogenous security is the future development direction and evolutionary goal of network security. In the past, decentralized and independent security capabilities needed to rely on collaboration, aggregation, and integration into information systems and business applications, so as to build security capabilities that continued to grow from information systems. With the characteristics of self-adaptation, autonomy and self-growth, such protection capabilities can be improved along with the growth of the system and ensure the security of the system at all times. The current application software has the characteristics of distribution, heterogeneity, concurrency and real-time, and there are many security defects and difficulty in error correction. In the endogenous security application software modeling technology, the architecture and behavior of the application software , control logic and other aspects, and build tools that can collaboratively model the functional safety and information security properties of software, so as to obtain an endogenous security application software security model. This approach requires modeling software architecture, software behavior, security threats, and policies. Combining the application software formal modeling technology integrating state machine and sequence diagram and the application software security threat and security policy modeling technology in the open network environment, realize the fusion modeling and analysis of the behavior of concurrent/distributed systems from different perspectives The ability to mitigate security attack threats.

发明内容SUMMARY OF THE INVENTION

本发明的主要目的在于提出一种基于形式化方法内生安全应用软件形式建模方法,为内生安全的应用软件提供建模跨平台桌面应用工具(sbid-ava,以下简称工具)。The main purpose of the present invention is to propose a formal modeling method for endogenous security application software based on a formal method, and to provide a modeling cross-platform desktop application tool (sbid-ava, hereinafter referred to as tool) for endogenous security application software.

为实现上述的目的,本发明提供了一种基于形式化方法内生安全应用软件形式建模的方法,所述基于形式化方法内生安全应用软件形式建模方法包括以下步骤:In order to achieve the above-mentioned purpose, the present invention provides a method for the formal modeling of endogenous security application software based on a formal method, and the formal modeling method for endogenous security application software based on the formal method includes the following steps:

a)利用类图、拓扑图对应用软件的架构进行建模;a) Use class diagrams and topology diagrams to model the architecture of the application software;

b)根据确定的应用软件架构模型,通过融合状态机和序列图来对并发分布式的行为进行建模;b) According to the determined application software architecture model, the concurrent and distributed behavior is modeled by fusing the state machine and the sequence diagram;

c)根据软件架构模型和行为模型,利用攻击树对软件的信息安全威胁建模,在安全威胁模型上,推荐安全缓解策略以支持策略建模。c) According to the software architecture model and behavior model, use the attack tree to model the information security threat of the software, and on the security threat model, recommend the security mitigation strategy to support the strategy modeling.

本发明提供的基于形式化方法内生安全应用软件形式建模方法,通过利用类图、拓扑图对应用软件的架构进行建模,首先能够找到应用软件全局属性与参与实体,将全局属性抽象为类图数据类型和参与实体抽象为模型进程,使得模型基本要素清晰明了;其次,对模型的拓扑图建模使得抽象进程的角色实例化,具体在其上的属性,可以保证工具对应用软件通信过程的抽象,在此基础上在进行通信代价估计,可以提供极大的准确性。The formal modeling method of endogenous security application software provided by the present invention, by using class diagram and topology diagram to model the architecture of the application software, can first find the global attributes and participating entities of the application software, and abstract the global attributes as The class diagram data type and participating entities are abstracted into model processes, which makes the basic elements of the model clear; secondly, modeling the topology diagram of the model makes the role of the abstract process instantiated, and the specific attributes on it can ensure that the tool communicates with the application software The abstraction of the process, on which the communication cost is estimated, can provide great accuracy.

另外,本发明提供的基于形式化方法内生安全应用软件形式建模方法还可以具有如下附加技术特征:In addition, the formal modeling method for endogenous security application software based on the formal method provided by the present invention may also have the following additional technical features:

优选地,所述利用类图、拓扑图对应用软件的架构进行建模,包括:Preferably, the use of class diagrams and topology diagrams to model the architecture of the application software includes:

a1)利用类图对进程/计算节点的属性、方法建模;a1) Use the class diagram to model the attributes and methods of the process/computing node;

a2)利用拓扑图对网络拓扑结构进行建模。a2) Model the network topology using topology graphs.

优选地,所述a1)利用类图对进程/计算节点的属性、方法建模,包括:Preferably, the a1) uses a class diagram to model the attributes and methods of the process/computing node, including:

a11)根据数据类图,确定数据类型;a11) According to the data class diagram, determine the data type;

a12)根据进程类图,确定进程内容;a12) According to the process class diagram, determine the process content;

a13)根据信道类图,确定信道关系;a13) According to the channel class diagram, determine the channel relationship;

a14)根据公理类图,确定公理函数;a14) According to the axiom class diagram, determine the axiom function;

a15)根据初始知识类图,确定知识可见性。a15) Determine knowledge visibility according to the initial knowledge class diagram.

优选地,所述a2)利用拓扑图对网络拓扑结构进行建模,包括:Preferably, the a2) use a topology map to model the network topology, including:

根据实例化类图的拓扑结点与网络关系,确定拓扑图的链路。According to the relationship between the topology nodes and the network of the instantiated class diagram, the links of the topology diagram are determined.

优选地,所述根据确定的应用软件架构模型,通过融合状态机和序列图来对并发分布式的行为进行建模,包括:Preferably, according to the determined application software architecture model, the concurrent and distributed behavior is modeled by fusing the state machine and the sequence diagram, including:

b1)利用状态机来描述进程/计算结点的内部控制逻辑;b1) Using a state machine to describe the internal control logic of the process/computing node;

b2)利用序列图来描述进程/计算结点之间的交互过程。b2) Use sequence diagrams to describe the interaction between processes/computing nodes.

优选地,所述b1)利用状态机来描述进程/计算结点的内部控制逻辑,包括:Preferably, the b1) uses a state machine to describe the internal control logic of the process/computing node, including:

b11)根据进程内容,确定对应的状态机;b11) According to the process content, determine the corresponding state machine;

b12)根据确定的状态机,确定状态结点内容(初始状态、中间状态、转移状态、可接受状态);b12) According to the determined state machine, determine the content of the state node (initial state, intermediate state, transition state, acceptable state);

b13)根据状态结点,确定精化状态。b13) According to the state node, determine the refinement state.

优选地,所述b2)利用序列图来描述进程/计算结点之间的交互过程,包括:Preferably, the b2) uses a sequence diagram to describe the interaction process between the processes/computing nodes, including:

b21)根据进程类图,确定对象-生命线;b21) According to the process class diagram, determine the object-lifeline;

b22)根据通信方法,确定通信消息。b22) According to the communication method, the communication message is determined.

优选地,所述根据软件架构模型和行为模型,利用攻击树对软件的信息安全威胁建模,在安全威胁模型上,推荐安全缓解策略以支持策略建模,包括:Preferably, according to the software architecture model and behavior model, the attack tree is used to model the information security threat of the software, and on the security threat model, a security mitigation strategy is recommended to support the strategy modeling, including:

c1)根据攻击树,确定软件系统的脆弱性;c1) Determine the vulnerability of the software system according to the attack tree;

c2)根据系统脆弱性,确定软件安全缓解策略。c2) According to the system vulnerability, determine the software security mitigation strategy.

本发明的附加方面和优点能够在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the present invention can be set forth in part from the following description, in part will be apparent from the following description, or learned by practice of the invention.

本发明公开了一种基于形式化方法的内生安全应用软件形式建模方法,所述建模部分包括如下部分:应用软件功能建模,以支持对系统功能进行描述,包括系统结构建模和系统行为建模两部分。系统结构建模是对系统架构建模,使用类图对系统中所涉及的属性和方法进行描述,系统行为建模采用状态图和序列图对整个系统的行为进行建模,其中状态图描述进程的控制逻辑,序列图描述进程之间的交互过程;应用软件信息安全威胁和策略建模,以支持对系统安全威胁和安全策略进行描述。信息安全威胁建模使用攻击树来对系统各个模块在各个方面的脆弱性关联起来进行深入地分析,发现威胁网络安全的攻击路径并以树的方式呈现出来。在使用攻击树对信息安全威胁建模的技术上,对可能的信息安全缓解策略或措施进行建议和推荐。攻击者行为建模在安全威胁建模的基础上,对攻击者的可能行为进行分析总结,使用状态图来对其行为进行具体描述。本发明中,通过使用工具对应用软件进行形式化建模,不仅可以通过图形建模来保证协议的功能性,而且为集成后端工具中可进行模型验证和代码生成提供系统模型和威胁模型,能够保证应用软件架构、控制逻辑与安全策略的建模相统一。The invention discloses a formal modeling method for endogenous safety application software based on a formal method. The modeling part includes the following parts: application software function modeling to support the description of system functions, including system structure modeling and System behavior modeling in two parts. System structure modeling is to model the system architecture, use class diagrams to describe the attributes and methods involved in the system, and system behavior modeling uses state diagrams and sequence diagrams to model the behavior of the entire system, in which the state diagram describes the process. The control logic, sequence diagram describes the interaction process between processes; application software information security threat and policy modeling to support the description of system security threats and security policies. The information security threat modeling uses the attack tree to analyze the vulnerabilities of the various modules of the system in depth, and finds the attack path that threatens the network security and presents it in the form of a tree. Based on the technology of using attack tree to model information security threats, make suggestions and recommendations for possible information security mitigation strategies or measures. Attacker behavior modeling is based on security threat modeling, analyzes and summarizes the possible behaviors of attackers, and uses state diagrams to describe their behaviors in detail. In the present invention, by using tools to formally model the application software, not only the functionality of the protocol can be guaranteed through graphical modeling, but also a system model and a threat model can be provided for model verification and code generation in the integrated back-end tool, It can ensure the unity of application software architecture, control logic and security policy modeling.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are for the purpose of illustrating preferred embodiments only and are not to be considered limiting of the invention. Also, the same components are denoted by the same reference numerals throughout the drawings. In the attached image:

图1为本发明实施例提供的一种基于形式化方法内生安全应用软件形式建模方法的流程示意图;1 is a schematic flowchart of a formal modeling method for endogenous security application software based on a formal method provided by an embodiment of the present invention;

图2为本发明实施例提供的基于形式化方法内生安全应用软件形式建模工具窗口示意图;2 is a schematic diagram of a formal modeling tool window for endogenous security application software based on a formal method provided by an embodiment of the present invention;

图3为本发明实施例提供的应用软件架构建模类图属性示意图;3 is a schematic diagram of attributes of an application software architecture modeling class diagram provided by an embodiment of the present invention;

图4为本发明实施例提供的应用软件架构建模类图进程示意图;4 is a schematic diagram of a class diagram process of application software architecture modeling provided by an embodiment of the present invention;

图5为本发明实施例提供的应用软件架构建模类图信道示意图;FIG. 5 is a schematic diagram of an application software architecture modeling class diagram channel provided by an embodiment of the present invention;

图6为本发明实施例提供的应用软件架构建模类图公理示意图;FIG. 6 is a schematic diagram of axioms of application software architecture modeling class diagrams provided by an embodiment of the present invention;

图7为本发明实施例提供的应用软件架构建模类图初始知识示意图;7 is a schematic diagram of initial knowledge of an application software architecture modeling class diagram provided by an embodiment of the present invention;

图8为本发明实施例提供的应用软件架构建模类图拓扑图示意图;8 is a schematic diagram of a topology diagram of an application software architecture modeling class diagram according to an embodiment of the present invention;

图9为本发明实施例提供的应用软件行为建模状态机图示意图;9 is a schematic diagram of a state machine diagram of application software behavior modeling provided by an embodiment of the present invention;

图10为本发明实施例提供的应用软件行为建模序列图示意图;10 is a schematic diagram of a sequence diagram of application software behavior modeling provided by an embodiment of the present invention;

图11为本发明实施例提供的应用软件安全威胁和策略建模攻击树示意图。FIG. 11 is a schematic diagram of an application software security threat and a policy modeling attack tree provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将参照附图更详细地描述本公开的示例性实施方式。虽然附图中显示了本公开的示例性实施方式,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施方式所限制。相反,提供这些实施方式是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be more thoroughly understood, and will fully convey the scope of the present disclosure to those skilled in the art.

图1为本发明实施例提供的一种基于形式化方法内生安全应用软件形式建模方法的流程示意图;如图1所示,所述方法包括以下步骤:FIG. 1 is a schematic flowchart of a formal modeling method for endogenous security application software based on a formal method provided by an embodiment of the present invention; as shown in FIG. 1 , the method includes the following steps:

步骤一:利用类图对应用软件的架构进行建模:Step 1: Use the class diagram to model the architecture of the application software:

具体的,根据形式化方法内生安全应用软件形式建模方法,抽象应用软件的全局数据类型、应用软件模型的进程,进程间的信道,模型的公理与初始知识。Specifically, according to the formal method, the formal modeling method of the security application software is endogenous, and the global data type of the application software, the process of the application software model, the channel between the processes, the axioms and the initial knowledge of the model are abstracted.

图3数据类图描述应用软件模型属性与自定义方法。内置的数据类型包括:int(整形)、bool(布尔)、number(自然数)、byte(字节),复合数据类型包括:ByteVec(字节序列)、Timer(时钟)。Figure 3. The data class diagram describes the attributes and custom methods of the application software model. The built-in data types include: int (integer), bool (Boolean), number (natural number), byte (byte), and composite data types include: ByteVec (byte sequence), Timer (clock).

属性表示为数据类型与标识符:Properties are represented as data types and identifiers:

attr≡Type Identifier|Type[]Identifierattr≡Type Identifier|Type[]Identifier

方法表示为数据类型、标识符与参数:Methods are represented as data types, identifiers, and parameters:

method≡Type Identifier(parameters)method≡Type Identifier(parameters)

图4进程类图描述应用软件模型抽象进程的内容,包括属性、方法和通信方法。进程属性与方法与数据类图定义一致,内置方法有四种包含特定算法的加解密方法,对称加密、对称解密、签名和验证。对称加解密提供AES、DES算法,签名验证方法提供RSA、ECC、MD5、SHA1、SHA256算法。The process class diagram of Figure 4 describes the content of the abstract process of the application software model, including attributes, methods and communication methods. The process attributes and methods are consistent with the definition of the data class diagram. There are four built-in methods including encryption and decryption methods with specific algorithms, symmetric encryption, symmetric decryption, signature and verification. Symmetric encryption and decryption provide AES and DES algorithms, and signature verification methods provide RSA, ECC, MD5, SHA1, and SHA256 algorithms.

Figure BDA0002605005270000051
Figure BDA0002605005270000051

|ByteVec SymDec(ByteVec msg,int key)|ByteVec SymDec(ByteVec msg, int key)

|ByteVec Sign(ByteVec msg,int skey)|ByteVec Sign(ByteVec msg, int skey)

|bool Verify(ByteVec msg,int pkey)|bool Verify(ByteVec msg, int pkey)

进程类图还提供通信方法,用于描述进程模版所抽象的进程与其他进程通信的手段。通信方法定义如下:The process class diagram also provides communication methods, which are used to describe the means by which the process abstracted by the process template communicates with other processes. The communication method is defined as follows:

methodcommunication≡Identifier(parameters)[IN/OUT][CommType]method communication ≡Identifier(parameters)[IN/OUT][CommType]

其中,IN与OUT表示通信方法是用于接受或者发送;通信方式CommType有NativeEthernetFrame与UDP两种,分别表示为原生以太网帧与UDP通信。Among them, IN and OUT indicate that the communication method is used for receiving or sending; the communication method CommType includes NativeEthernetFrame and UDP, which are respectively expressed as native Ethernet frame and UDP communication.

图5信道类图用于描述进程类图的通信方法的发送与接收关系。通常涉及两个进程和进程上的发送接收通信方法,同时表示该信道是公共的还是私有的,定义如下:Figure 5 The channel class diagram is used to describe the sending and receiving relationship of the communication method of the process class diagram. Usually involves two processes and a send-receive communication method on the process, while indicating whether the channel is public or private, defined as follows:

channel≡Process1.methodcommunication-(public/private)-Process2.methodcommunication channel≡Process1.method communication -(public/private)-Process2.method communication

其中,Process1与Process2为两个进程,public与private代表公共信道与私有信道。Among them, Process1 and Process2 are two processes, and public and private represent public channels and private channels.

图6公理类图用以描述应用软件模型中的公理,工具内置了两条公理,为Figure 6 The axiom class diagram is used to describe the axioms in the application software model. The tool has two built-in axioms, which are

SymDec(SymEnc(m,k),k)=mSymDec(SymEnc(m, k), k)=m

Verify(Sign(m,sk),pk)=TrueVerify(Sign(m,sk),pk)=True

表示为内置函数的加密解密配对与私钥签名和公钥验证。Encryption-decryption pairing with private key signing and public key verification represented as built-in functions.

图7初始知识类图用以描述应用软件模型的初始知识,单知识定义进程类图属性的可见性,可以用于明确定义各进程已知信息的范畴。而公私钥对定义公钥私钥配对关系。The initial knowledge class diagram in Fig. 7 is used to describe the initial knowledge of the application software model. A single knowledge defines the visibility of the attributes of the process class diagram and can be used to clearly define the category of known information of each process. The public-private key pair defines the public-private key pairing relationship.

单知识表示初始知识包含了该属性:Single knowledge means that the initial knowledge includes this property:

Knowledgementsingle≡Process.Processattr Knowledgement single ≡Process.Process attr

公私钥对定义为:A public-private key pair is defined as:

Process.Processattr|Process.Processattr Process.Process attr | Process.Process attr

其中,表示非对称加密与非对称解密或者签名验证配对。Among them, indicates that asymmetric encryption is paired with asymmetric decryption or signature verification.

步骤二:利用拓扑图对应用软件的架构进行建模:Step 2: Use the topology diagram to model the architecture of the application software:

具体的,根据形式化方法内生安全应用软件形式建模方法,拓扑图中的每个结点表示网络环境中应用了某一进程类图的具体角色,对进程类图所有属性进行实例化。实例中,展开所有复合类型(其继承的祖先类型的属性将实化),遇到数组时,将作变长数组处理。每个元素单独展开,直到遇到基本类型时将作为叶结点直接设置值处理。拓扑图的结点之间可以连接有向边,表示从一方到另一方的单工通信,边上可以设置通信方法序对和通信代价。可选的通信方法序对一定是在信道类图中定义的符合发送、接收方进程类图的项。Specifically, according to the formal modeling method of endogenous security application software, each node in the topology diagram represents a specific role of a certain process class diagram in the network environment, and all attributes of the process class diagram are instantiated. In the instance, expand all composite types (the attributes of their inherited ancestor types will be materialized), and when an array is encountered, it will be treated as a variable-length array. Each element is expanded independently, until it encounters a basic type, it will be treated as a leaf node directly setting the value. The nodes of the topology graph can be connected with directed edges, which represent simplex communication from one party to the other, and the communication method sequence pair and communication cost can be set on the edge. An optional communication method pair must be an item defined in the channel class diagram that conforms to the sender and receiver process class diagrams.

图8拓扑图边定义为:Figure 8 Topological graph edges are defined as:

Figure BDA0002605005270000061
Figure BDA0002605005270000061

其中,表示为两个进程与进程上的通信方法,公共信道或者私有信道。Among them, it is expressed as the communication method between two processes, public channel or private channel.

步骤三:根据确定的应用软件架构模型,通过融合状态机和序列图来对并发分布式的行为进行建模。Step 3: Model the concurrent and distributed behavior by fusing the state machine and the sequence diagram according to the determined application software architecture model.

具体的,系统行为建模采用状态图和序列图对整个系统的行为进行建模。状态机对各个进程的控制逻辑进行描述,而序列图则对进程之间的交互过程进行描述。Specifically, system behavior modeling uses state diagrams and sequence diagrams to model the behavior of the entire system. The state machine describes the control logic of each process, and the sequence diagram describes the interaction between the processes.

图9状态机图来描述进程/计算结点的内部控制逻辑。当在类图中创建进程类图时,会自动在状态机选项卡下创建与之对应的状态机面板。当状态机面板创建时,会提供一个唯一且不可更改的初始状态(图中黑色实心圆),连接一个初始的普通状态。用户可以在面板上通过右键菜单传创建若干普通状态或终止状态(图中双圈)。在每个状态结点上提供一些锚点,可以点击锚点进行状态连线,表示状态的迁移。在状态的迁移边上可以设置卫条件和若干的转移动作,以完成状态机的行为建模。Figure 9 is a state machine diagram to describe the internal control logic of the process/computing node. When the process class diagram is created in the class diagram, the corresponding state machine panel is automatically created under the state machine tab. When the state machine panel is created, it provides a unique and unchangeable initial state (black solid circle in the figure), which is connected to an initial normal state. The user can create several normal states or termination states (double circles in the figure) through the right-click menu on the panel. Provide some anchor points on each state node, you can click on the anchor point to connect the state, indicating the state transition. On the transition edge of the state, guard conditions and several transition actions can be set to complete the behavior modeling of the state machine.

其中,卫条件是一条类C语言的逻辑表达式,可以通过求值判定真假的表达式(默认为true)。逻辑表达式可通过二元运算符&&和||连接,以支持更复杂的卫条件。Among them, the guard condition is a logical expression of C-like language, which can be evaluated to determine the true or false expression (the default is true). Logical expressions can be joined by the binary operators && and || to support more complex guard conditions.

转移动作是一条类C语言的赋值声明语句或方法调用。A transfer action is a C-like assignment statement or a method call.

StateMachineaction≡Type Identifier|Type Identifier:=Expression|StateMachine action ≡Type Identifier|Type Identifier:=Expression|

Identifier:=Expression|Identifier(parameters)Identifier:=Expression|Identifier(parameters)

其中,前两条为声明语句,第三条为赋值语句,最后为方法调用。Among them, the first two are declaration statements, the third is an assignment statement, and the last is a method call.

图10序列图来描述进程/计算结点之间的交互过程。在序列图面板中,可以添加若干的对象-生命线,其中可以组织一个进程模板,然后在它们之间连接各类消息,其中包括同步消息、异步消息、返回消息。在消息连线上可以选择从该进程模板出发的向外通信方法。Figure 10 is a sequence diagram to describe the interaction between processes/computing nodes. In the sequence diagram panel, you can add several objects - lifelines, in which you can organize a process template, and then connect various types of messages between them, including synchronous messages, asynchronous messages, and return messages. The outgoing communication method from this process template can be selected on the message wire.

步骤四:根据软件架构模型和行为模型,利用攻击树对软件的信息安全威胁建模,在安全威胁模型上,推荐安全缓解策略以支持策略建模。Step 4: According to the software architecture model and behavior model, use the attack tree to model the information security threat of the software. On the security threat model, recommend the security mitigation strategy to support the strategy modeling.

图11使用攻击树来对应用软件的信息安全威胁建模进行建模,使用攻击树来对系统各个模块在各个方面的脆弱性关联起来进行深入地分析,发现威胁网络安全的攻击路径并以树的方式呈现出来。而且,在使用攻击树对信息安全威胁进行建模的技术上,收集整理了一个可能的信息安全缓解策略库,并根据攻击树中的攻击方法来推荐相应的安全缓解策略。Figure 11 uses the attack tree to model the information security threat modeling of the application software, and uses the attack tree to correlate the vulnerabilities of each module of the system in various aspects to conduct in-depth analysis, find the attack path that threatens network security, and use the tree way presented. Moreover, in the technology of using attack tree to model information security threats, a possible information security mitigation strategy library is collected and sorted, and corresponding security mitigation strategies are recommended according to the attack methods in the attack tree.

在使用攻击树对安全威胁进行建模的基础上,对攻击者行为进行分析总结,并且使用状态机来对攻击者行为进行具体描述。在攻击者考虑进来之后,分布式系统中每个进程的行为将对应于进程功能状态机和攻击者状态机同步之后得到的新状态机。Based on the modeling of security threats using the attack tree, the attacker's behavior is analyzed and summarized, and the state machine is used to describe the attacker's behavior in detail. After the attacker is taken into account, the behavior of each process in the distributed system will correspond to the new state machine obtained after the process functional state machine and the attacker state machine are synchronized.

由此,通过对应用软件进行形式化建模,即使用形式化方法内生安全应用软件形式建模方法对应用软件进行建模。该过程中,一方面,对应用软件基于形式化方法内生安全应用软件形式建模,有助于刻画应用软件模型架构、内部状态变化过程细节和通信过程。另一方面,系统性地对软件系统的架构、设计和部署进行分析,找出其可能面临的潜在威胁,从整体上提升软件系统的安全性。指导研发人员编写出安全的代码,辅助渗透测试人员开展安全测试,识别威胁,消减威胁和规避风险。Therefore, through formal modeling of the application software, that is, the application software is modeled using the formal method endogenous security application software formal modeling method. In this process, on the one hand, the formal modeling of the application software based on the formal method of endogenous security application software is helpful to describe the application software model architecture, the details of the internal state change process and the communication process. On the other hand, systematically analyze the architecture, design and deployment of the software system, find out the potential threats it may face, and improve the security of the software system as a whole. Guide developers to write secure code, assist penetration testers to carry out security tests, identify threats, reduce threats and avoid risks.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件来实现。本发明体用基于.Net Core 3.0的Avalonia跨平台桌面应用工具,基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来。From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software. The present invention uses the Avalonia cross-platform desktop application tool based on .Net Core 3.0. Based on this understanding, the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products.

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above description is only a preferred embodiment of the present invention, but the protection scope of the present invention is not limited to this. Substitutions should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (8)

1. A formal modeling method based on a formalization method endogenous security application software is characterized by comprising the following steps:
a) modeling the architecture of the application software by using a class diagram and a topological diagram;
b) according to the determined application software architecture model, modeling the concurrent distributed behaviors by fusing a state machine and a sequence diagram;
c) and modeling the information security threat of the software by utilizing the attack tree according to the software architecture model and the behavior model, and adopting a security relief strategy to support strategy modeling on the security threat model.
2. The method according to claim 1, wherein the modeling the architecture of the application software by using the class diagram and the topological graph comprises:
a1) modeling the attribute and method of the process/computing node by using the class diagram;
a2) and modeling the network topology by using the topological graph.
3. The method of claim 2, wherein modeling attributes, methods of a process/compute node using a class graph comprises:
a11) determining the data type according to the data class diagram;
a12) determining process content according to the process class diagram;
a13) determining a channel relation according to the channel class diagram;
a14) determining an axiom function according to the axiom class diagram;
a15) knowledge visibility is determined based on the initial knowledge class diagram.
4. The method of claim 2, wherein modeling the network topology using the topology map comprises: and determining the link of the topological graph according to the relation between the topological node of the instantiated class graph and the network.
5. The method of claim 1, wherein modeling the concurrent distributed behavior by fusing a state machine and a sequence diagram according to the determined application software architecture model comprises:
b1) describing the internal control logic of the process/computation node by using a state machine;
b2) sequence diagrams are used to describe the interaction process between processes/compute nodes.
6. The method of claim 5, wherein said using a state machine to describe internal control logic of a process/compute node comprises:
b11) determining a corresponding state machine according to the process class diagram;
b12) determining the content of the state node according to the determined state machine, comprising: initial state, intermediate state, transition state, acceptable state;
b13) and determining the refinement state according to the state node.
7. The method according to claim 5, wherein the describing the interaction process between the processes/computation nodes by using the sequence diagram comprises:
b21) determining an object-life line according to the process template;
b22) according to the communication method, a communication message is determined.
8. The method of claim 1, wherein the modeling of the information security threat of the software using the attack tree according to the software architecture model and the behavior model, and wherein the recommending of the security mitigation policy to support policy modeling on the security threat model comprises:
c1) determining the vulnerability of the software system according to the attack tree;
c2) and determining a software safety relieving strategy according to the vulnerability of the system.
CN202010735834.2A 2020-07-28 2020-07-28 A Formal Modeling Method for Endogenous Security Application Software Based on Formal Method Active CN112015373B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010735834.2A CN112015373B (en) 2020-07-28 2020-07-28 A Formal Modeling Method for Endogenous Security Application Software Based on Formal Method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010735834.2A CN112015373B (en) 2020-07-28 2020-07-28 A Formal Modeling Method for Endogenous Security Application Software Based on Formal Method

Publications (2)

Publication Number Publication Date
CN112015373A true CN112015373A (en) 2020-12-01
CN112015373B CN112015373B (en) 2022-02-11

Family

ID=73500230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010735834.2A Active CN112015373B (en) 2020-07-28 2020-07-28 A Formal Modeling Method for Endogenous Security Application Software Based on Formal Method

Country Status (1)

Country Link
CN (1) CN112015373B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115357911A (en) * 2022-10-24 2022-11-18 中国人民解放军国防科技大学 A method for building a satellite navigation system security threat model
CN118607319A (en) * 2024-06-20 2024-09-06 武汉大学 Interactive geometric modeling related module design method, software construction method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447695A (en) * 2011-11-14 2012-05-09 中国科学院软件研究所 Method for identifying key attack path in service system
CN106802863A (en) * 2016-12-16 2017-06-06 华东师范大学 Interprocess communication security formalization analysis checking system based on micro-kernel prototype
CN107103244A (en) * 2017-05-12 2017-08-29 天津大学 The appraisal procedure of Web application architecture securities based on AADL
CN109150831A (en) * 2018-07-16 2019-01-04 中国人民解放军战略支援部队信息工程大学 A kind of the cloud task execution device and method of interior raw safety
CN109191326A (en) * 2018-08-23 2019-01-11 东北大学 The interdependent deposit system network attack methods of risk assessment of power distribution network CPS based on attacker visual angle
DE102017212581A1 (en) * 2017-07-21 2019-01-24 Siemens Aktiengesellschaft A method for dynamically expanding a domain-specific language of a graphical modeling tool

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447695A (en) * 2011-11-14 2012-05-09 中国科学院软件研究所 Method for identifying key attack path in service system
CN106802863A (en) * 2016-12-16 2017-06-06 华东师范大学 Interprocess communication security formalization analysis checking system based on micro-kernel prototype
CN107103244A (en) * 2017-05-12 2017-08-29 天津大学 The appraisal procedure of Web application architecture securities based on AADL
DE102017212581A1 (en) * 2017-07-21 2019-01-24 Siemens Aktiengesellschaft A method for dynamically expanding a domain-specific language of a graphical modeling tool
CN109150831A (en) * 2018-07-16 2019-01-04 中国人民解放军战略支援部队信息工程大学 A kind of the cloud task execution device and method of interior raw safety
CN109191326A (en) * 2018-08-23 2019-01-11 东北大学 The interdependent deposit system network attack methods of risk assessment of power distribution network CPS based on attacker visual angle

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张琛等: "分布式软件系统交互行为建模、验证与测试", 《计算机研究与发展》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115357911A (en) * 2022-10-24 2022-11-18 中国人民解放军国防科技大学 A method for building a satellite navigation system security threat model
CN118607319A (en) * 2024-06-20 2024-09-06 武汉大学 Interactive geometric modeling related module design method, software construction method and device

Also Published As

Publication number Publication date
CN112015373B (en) 2022-02-11

Similar Documents

Publication Publication Date Title
US11651082B2 (en) Blockchain applicability framework
Suhail et al. On the role of hash-based signatures in quantum-safe internet of things: Current solutions and future directions
US10956296B2 (en) Event correlation
US20190303932A1 (en) Method and system for verifying policy compliance of transactions in a blockchain executing smart contracts
Ghosh et al. Leveraging public-private blockchain interoperability for closed consortium interfacing
Rak et al. ESSecA: An automated expert system for threat modelling and penetration testing for IoT ecosystems
CN110362357A (en) A kind of configuration file management method and device of application program
CN109347651B (en) MSVL (modeling, simulation and verification language) -based block chain system modeling and security verification method and system
US11070575B2 (en) Verifying accuracy of ML pipelines using third party co-ordination
Nielsen et al. A domain-specific programming language for secure multiparty computation
Gupta et al. Proxy smart contracts for zero trust architecture implementation in Decentralised Oracle Networks based applications
US11533336B2 (en) Security verification method and apparatus for attacked smart home Internet of Things system
CN112015373B (en) A Formal Modeling Method for Endogenous Security Application Software Based on Formal Method
CN114448654B (en) Block chain-based distributed trusted audit security evidence storing method
Rouland et al. A formal methods approach to security requirements specification and verification
Levshun et al. A technique for design of secure data transfer environment: Application for I2C protocol
Wang Sok: Applying blockchain technology in industrial internet of things
CN114500347B (en) Method and system for formalized verification of security interconnection protocol
Kor et al. Tight bounds for distributed MST verification
Chivers et al. Risk profiles and distributed risk assessment
US20240089132A1 (en) Method and apparatus for editing block chain
Yu et al. Attack graph auto-generation for blockchains based on bigraphical reaction systems
Zhang et al. An efficient smart contract vulnerability detector based on semantic contract graphs using approximate graph matching
CN115859371A (en) Privacy calculation method based on block chain, electronic device and storage medium
Anantharaman Protecting systems from exploits using language-theoretic security

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant