[go: up one dir, main page]

CN118337403B - Attack path restoration method and device based on IOC, electronic equipment and medium - Google Patents

Attack path restoration method and device based on IOC, electronic equipment and medium Download PDF

Info

Publication number
CN118337403B
CN118337403B CN202311734214.7A CN202311734214A CN118337403B CN 118337403 B CN118337403 B CN 118337403B CN 202311734214 A CN202311734214 A CN 202311734214A CN 118337403 B CN118337403 B CN 118337403B
Authority
CN
China
Prior art keywords
ioc
victim
log
candidate
attacker
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.)
Active
Application number
CN202311734214.7A
Other languages
Chinese (zh)
Other versions
CN118337403A (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.)
Sky Sky Safety Technology Co ltd
Original Assignee
Sky Sky Safety Technology Co ltd
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 Sky Sky Safety Technology Co ltd filed Critical Sky Sky Safety Technology Co ltd
Priority to CN202311734214.7A priority Critical patent/CN118337403B/en
Publication of CN118337403A publication Critical patent/CN118337403A/en
Application granted granted Critical
Publication of CN118337403B publication Critical patent/CN118337403B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1425Traffic logging, e.g. anomaly detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/146Tracing the source of attacks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

本申请涉及一种基于IOC的攻击路径还原方法、装置、电子设备及存储介质。该方法包括:确定受害者的设备信息、威胁入侵指标IOC;根据所述设备信息、IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;所述预置数据库中存储有日志数据;根据IOC的类型、所述可靠性评分,从所述候选攻击手段中确定攻击手段和对应的直接攻击者;根据所述受害者的直接攻击者的设备信息,结合预置数据库,确定所述受害者的同级受害者;判断所述受害者的直接攻击者是否为最终攻击源;若不是,则将所述受害者的直接攻击者作为受害者,重复执行上述步骤,直至确定出最终攻击源。以更可靠的线索提升溯源效率与准确度。

The present application relates to an IOC-based attack path restoration method, device, electronic device and storage medium. The method includes: determining the victim's device information and threat intrusion indicator IOC; determining candidate attack means and corresponding reliability scores based on the device information and IOC in combination with a preset database; the preset database stores log data; determining attack means and corresponding direct attackers from the candidate attack means based on the type of IOC and the reliability score; determining the victim's peer victims based on the device information of the victim's direct attacker in combination with a preset database; determining whether the victim's direct attacker is the final attack source; if not, taking the victim's direct attacker as the victim, and repeating the above steps until the final attack source is determined. Improve the efficiency and accuracy of tracing with more reliable clues.

Description

基于IOC的攻击路径还原方法、装置、电子设备及介质IOC-based attack path restoration method, device, electronic device and medium

技术领域Technical Field

本申请涉及数据处理技术领域,尤其是涉及一种基于IOC的攻击路径还原方法、装置、电子设备及存储介质。The present application relates to the field of data processing technology, and in particular to an IOC-based attack path restoration method, device, electronic device and storage medium.

背景技术Background Art

随着社会的进步与信息技术的发展,政府和企业面临的网络安全形势变得相当严峻:攻击来源更加多样,攻击手法更加复杂,攻击方式更加隐蔽。网络安全事件的发生已经不可避免,事故发生之后吸取经验,总结教训的重要性愈发凸显。从事故中挖掘出攻击者从何处开始入侵、受影响的资产、使用的攻击手段等信息,综合以上数据生成该次事故的黑客攻击路径,有助于受害者组织更好的消除影响、总结经验教训。With the progress of society and the development of information technology, the cybersecurity situation faced by governments and enterprises has become quite severe: the sources of attacks are more diverse, the attack methods are more complex, and the attack methods are more covert. The occurrence of cybersecurity incidents is inevitable, and the importance of learning from experience and summarizing lessons after the incident has become increasingly prominent. From the incident, we can dig out information such as where the attacker started the invasion, the affected assets, and the attack methods used. Combining the above data to generate the hacker attack path of the incident will help the victim organization better eliminate the impact and summarize the experience and lessons.

相关技术中,生成黑客攻击路径相关的技术通常分为两类,预测和还原。预测指根据已有信息,通过各类机器学习、深度学习算法等预测黑客的攻击路径;还原指在安全事件发生之后,还原黑客在业务环境中的攻击路径、攻击手段。Among the related technologies, the technologies related to generating hacker attack paths are usually divided into two categories: prediction and restoration. Prediction refers to predicting hacker attack paths based on existing information through various machine learning and deep learning algorithms; restoration refers to restoring hacker attack paths and attack methods in the business environment after a security incident occurs.

其中,还原攻击路径的技术往往较为依靠安全设备的告警事件与流量监控数据。但是,安全设备的告警并非完全准确,不可避免的会存在大量的误报信息,缺少其他佐证的情况下,就容易导致攻击者、受害者这两个主体信息存在误差,这就使得依靠安全设备告警还原的攻击路径的方式准确率较低。Among them, the technology of restoring the attack path often relies on the alarm events and traffic monitoring data of security equipment. However, the alarms of security equipment are not completely accurate, and there will inevitably be a lot of false positives. In the absence of other evidence, it is easy to cause errors in the information of the attacker and the victim, which makes the method of restoring the attack path based on the alarm of security equipment less accurate.

发明内容Summary of the invention

本申请提供一种基于IOC的攻击路径还原方法、装置、电子设备及存储介质。使用威胁入侵指标(Indicator of compromise,IOC)替代告警事件作为进行路径生成的关键标识,通过不断确定IOC与受害者形成最终的攻击路径。The present application provides an IOC-based attack path restoration method, device, electronic device and storage medium. The threat intrusion indicator (Indicator of compromise, IOC) is used instead of the alarm event as the key identifier for path generation, and the final attack path is formed by continuously determining the IOC and the victim.

第一方面,本申请提供一种基于IOC的攻击路径还原方法,包括:In a first aspect, the present application provides an IOC-based attack path restoration method, comprising:

确定受害者的设备信息、威胁入侵指标IOC;Determine the victim’s device information and threat intrusion indicators (IOCs);

根据所述设备信息、IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;所述预置数据库中存储有日志数据;Determine candidate attack methods and corresponding reliability scores based on the device information and IOC in combination with a preset database; the preset database stores log data;

根据IOC的类型、所述可靠性评分,从所述候选攻击手段中确定攻击手段和对应的直接攻击者;Determine an attack method and a corresponding direct attacker from the candidate attack methods according to the type of IOC and the reliability score;

根据所述受害者的直接攻击者的设备信息,结合预置数据库,确定所述受害者的同级受害者;Determine the victim's peer victims based on the device information of the victim's direct attacker and in combination with a preset database;

判断所述受害者的直接攻击者是否为最终攻击源;Determining whether the direct attacker of the victim is the ultimate attack source;

若不是,则将所述受害者的直接攻击者作为受害者,重复执行上述步骤,直至确定出最终攻击源。If not, the direct attacker of the victim is taken as the victim, and the above steps are repeated until the final attack source is determined.

可选的,所述确定受害者的设备信息、威胁入侵指标IOC,包括:Optionally, the determining of the victim's device information and threat intrusion indicators (IOCs) includes:

根据用户上传的内容,确定受害者的设备信息、IOC;Determine the victim’s device information and IOC based on the content uploaded by the user;

或者,or,

根据用户上传的内容,确定受害者的设备信息、被入侵的时间范围;Determine the victim’s device information and the time range of the intrusion based on the content uploaded by the user;

根据所述设备信息、被入侵的时间范围,结合预置数据库,查找关联日志,并根据事件类型对所述关联日志进行归并;According to the device information and the time range of the intrusion, combined with the preset database, the related logs are searched, and the related logs are merged according to the event type;

针对每一类关联日志,根据事件类型与IOC类型的对应关系,确定该类关联日志对应的IOC,作为候选IOC;根据所述受害者的脆弱性信息与事件类型的关联程度、该类关联日志的威胁等级、该类关联日志的发生次数,计算该类关联日志对应的候选IOC的可靠性评分。For each type of associated log, the IOC corresponding to the associated log is determined as a candidate IOC according to the correspondence between the event type and the IOC type; the reliability score of the candidate IOC corresponding to the associated log is calculated according to the degree of correlation between the vulnerability information of the victim and the event type, the threat level of the associated log, and the number of occurrences of the associated log.

可选的,所述方法还包括:Optionally, the method further includes:

根据所述被入侵的时间范围,结合所述预置数据库,建立所述受害者的通信情况基线;According to the time range of the intrusion, in combination with the preset database, a communication baseline of the victim is established;

根据所述受害者的通信情况基线,以设定周期统计所述受害者的通信情况,所述通信情况包括通信对象数量、通信对象列表、被访问次数、被访问端口列表;According to the victim's communication baseline, the victim's communication status is counted at a set period, wherein the communication status includes the number of communication objects, the communication object list, the number of accesses, and the accessed port list;

针对每一通信情况对应的统计数据,计算其中与中位数偏差大于设定额度的数据量;若所述数据量在该统计数据中占比大于设定比值,则将该中位数作为异常数据;若所述数据量在该统计数据中占比小于等于设定比值,则将与中位数偏差大于设定额度的数据作为异常数据;For the statistical data corresponding to each communication situation, the amount of data whose deviation from the median is greater than the set amount is calculated; if the proportion of the data amount in the statistical data is greater than the set ratio, the median is regarded as abnormal data; if the proportion of the data amount in the statistical data is less than or equal to the set ratio, the data whose deviation from the median is greater than the set amount is regarded as abnormal data;

根据所述异常数据,确定对应的候选直接攻击者。According to the abnormal data, a corresponding candidate direct attacker is determined.

可选的,所述方法还包括:Optionally, the method further includes:

针对每一个所述候选IOC,根据所述设备信息、所述候选IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;根据所述候选IOC的类型、所述候选IOC的可靠性评分,从所述候选攻击手段中确定攻击手段和对应的候选直接攻击者;For each of the candidate IOCs, determine a candidate attack method and a corresponding reliability score according to the device information, the candidate IOC, and a preset database; determine an attack method and a corresponding candidate direct attacker from the candidate attack methods according to the type of the candidate IOC and the reliability score of the candidate IOC;

若用户上传的内容中包括攻击者信息,则根据所述攻击者信息、所述候选IOC对应的候选直接攻击者,从所述候选IOC中确定IOC;If the content uploaded by the user includes attacker information, determining the IOC from the candidate IOCs according to the attacker information and the candidate direct attackers corresponding to the candidate IOCs;

若用户上传的内容中不包括攻击者信息,则针对每一个所述候选IOC,根据所述候选直接攻击者的设备信息,结合预置数据库,确定所述候选直接攻击者对应的疑似受害者和每一个所述疑似受害者对应的IOC;根据每一个所述候选IOC与所述疑似受害者对应的IOC的相似度,从所述候选IOC中确定IOC。If the content uploaded by the user does not include attacker information, for each candidate IOC, the suspected victim corresponding to the candidate direct attacker and the IOC corresponding to each suspected victim are determined based on the device information of the candidate direct attacker and combined with a preset database; the IOC is determined from the candidate IOCs based on the similarity between each candidate IOC and the IOC corresponding to the suspected victim.

可选的,所述根据所述设备信息、IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;所述预置数据库中存储有日志数据,包括:Optionally, the determining of candidate attack methods and corresponding reliability scores based on the device information and IOC in combination with a preset database; the preset database stores log data, including:

根据IOC、IOC与安全事件类型的对应关系,确定安全事件类型;Determine the type of security incident based on the IOC and the correspondence between IOC and security incident type;

在预置的日志数据库中查找所述安全事件类型对应的日志;Searching for a log corresponding to the security event type in a preset log database;

按照预设日志类型,对所述日志进行分类归并,确定每类日志对应的攻击手段;Classify and merge the logs according to the preset log types, and determine the attack means corresponding to each type of log;

针对每一类日志,根据该类日志对应的安全事件相关程度、该类日志的威胁等级、该类日志的发生次数,计算该类日志的可靠性。For each type of log, the reliability of this type of log is calculated based on the relevance of the security event corresponding to this type of log, the threat level of this type of log, and the number of occurrences of this type of log.

可选的,所述根据该类日志对应的安全事件相关程度、该类日志的威胁等级、该类日志的发生次数,计算该类日志的可靠性,包括:Optionally, calculating the reliability of the log according to the degree of relevance of the security event corresponding to the log, the threat level of the log, and the number of occurrences of the log includes:

根据如下公式计算该类日志的可靠性:The reliability of this type of log is calculated according to the following formula:

该类日志对应的安全事件相关程度*0.7+该类日志的威胁等级*0.2+该类日志的发生次数/相关日志总数*100*0.1。The security event relevance level of this type of log * 0.7 + the threat level of this type of log * 0.2 + the number of occurrences of this type of log / the total number of related logs * 100 * 0.1.

可选的,所述根据所述受害者的脆弱性信息与事件类型的关联程度、该类关联日志的威胁等级、该类关联日志的发生次数,计算该类关联日志对应的候选IOC的可靠性评分,包括:Optionally, the calculating the reliability score of the candidate IOC corresponding to the type of associated log according to the degree of association between the vulnerability information of the victim and the event type, the threat level of the type of associated log, and the number of occurrences of the type of associated log includes:

根据如下公式计算该类关联日志对应的候选IOC的可靠性:The reliability of the candidate IOC corresponding to this type of associated log is calculated according to the following formula:

脆弱性与安全事件关联程度*0.5+该类关联日志的威胁等级*0.3+该类关联日志的发生次数/相关日志总数*100*0.2。The correlation degree between vulnerability and security incident*0.5+the threat level of the associated log*0.3+the number of occurrences of the associated log/the total number of related logs*100*0.2.

第二方面,本申请提供一种基于IOC的攻击路径还原装置,包括:In a second aspect, the present application provides an IOC-based attack path restoration device, comprising:

受害者确定模块,用于确定受害者的设备信息、威胁入侵指标IOC;The victim identification module is used to determine the victim's device information and threat intrusion indicators (IOCs);

候选攻击手段确定模块,用于根据所述设备信息、IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;所述预置数据库中存储有日志数据;A candidate attack means determination module, used to determine candidate attack means and corresponding reliability scores based on the device information and IOC in combination with a preset database; the preset database stores log data;

攻击手段确定模块,用于根据IOC的类型、所述可靠性评分,从所述候选攻击手段中确定攻击手段和对应的直接攻击者;An attack means determination module, used to determine an attack means and a corresponding direct attacker from the candidate attack means according to the type of IOC and the reliability score;

同级受害者确定模块,用于根据所述受害者的直接攻击者的设备信息,结合预置数据库,确定所述受害者的同级受害者;A peer victim determination module, used to determine peer victims of the victim based on device information of the victim's direct attacker in combination with a preset database;

攻击源确定模块,用于判断所述受害者的直接攻击者是否为最终攻击源;若不是,则将所述受害者的直接攻击者作为受害者,重复执行上述步骤,直至确定出最终攻击源。The attack source determination module is used to determine whether the direct attacker of the victim is the final attack source; if not, the direct attacker of the victim is regarded as the victim, and the above steps are repeatedly executed until the final attack source is determined.

可选的,所述受害者确定模块,具体用于:Optionally, the victim determination module is specifically used to:

根据用户上传的内容,确定受害者的设备信息、IOC;Determine the victim’s device information and IOC based on the content uploaded by the user;

或者,or,

根据用户上传的内容,确定受害者的设备信息、被入侵的时间范围;Determine the victim’s device information and the time range of the intrusion based on the content uploaded by the user;

根据所述设备信息、被入侵的时间范围,结合预置数据库,查找关联日志,并根据事件类型对所述关联日志进行归并;According to the device information and the time range of the intrusion, combined with the preset database, the related logs are searched, and the related logs are merged according to the event type;

针对每一类关联日志,根据事件类型与IOC类型的对应关系,确定该类关联日志对应的IOC,作为候选IOC;根据所述受害者的脆弱性信息与事件类型的关联程度、该类关联日志的威胁等级、该类关联日志的发生次数,计算该类关联日志对应的候选IOC的可靠性评分。For each type of associated log, the IOC corresponding to the associated log is determined as a candidate IOC according to the correspondence between the event type and the IOC type; the reliability score of the candidate IOC corresponding to the associated log is calculated according to the degree of correlation between the vulnerability information of the victim and the event type, the threat level of the associated log, and the number of occurrences of the associated log.

可选的,所述装置还包括候选直接攻击者模块,用于:Optionally, the device further includes a candidate direct attacker module, configured to:

根据所述被入侵的时间范围,结合所述预置数据库,建立所述受害者的通信情况基线;According to the time range of the intrusion, in combination with the preset database, a communication baseline of the victim is established;

根据所述受害者的通信情况基线,以设定周期统计所述受害者的通信情况,所述通信情况包括通信对象数量、通信对象列表、被访问次数、被访问端口列表;According to the victim's communication baseline, the victim's communication status is counted at a set period, wherein the communication status includes the number of communication objects, the communication object list, the number of accesses, and the accessed port list;

针对每一通信情况对应的统计数据,计算其中与中位数偏差大于设定额度的数据量;若所述数据量在该统计数据中占比大于设定比值,则将该中位数作为异常数据;若所述数据量在该统计数据中占比小于等于设定比值,则将与中位数偏差大于设定额度的数据作为异常数据;For the statistical data corresponding to each communication situation, the amount of data whose deviation from the median is greater than the set amount is calculated; if the proportion of the data amount in the statistical data is greater than the set ratio, the median is regarded as abnormal data; if the proportion of the data amount in the statistical data is less than or equal to the set ratio, the data whose deviation from the median is greater than the set amount is regarded as abnormal data;

根据所述异常数据,确定对应的候选直接攻击者。According to the abnormal data, a corresponding candidate direct attacker is determined.

可选的,所述装置还包括IOC确定模块,用于:Optionally, the device further includes an IOC determination module, configured to:

针对每一个所述候选IOC,根据所述设备信息、所述候选IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;根据所述候选IOC的类型、所述候选IOC的可靠性评分,从所述候选攻击手段中确定攻击手段和对应的候选直接攻击者;For each of the candidate IOCs, determine a candidate attack method and a corresponding reliability score according to the device information, the candidate IOC, and a preset database; determine an attack method and a corresponding candidate direct attacker from the candidate attack methods according to the type of the candidate IOC and the reliability score of the candidate IOC;

若用户上传的内容中包括攻击者信息,则根据所述攻击者信息、所述候选IOC对应的候选直接攻击者,从所述候选IOC中确定IOC;If the content uploaded by the user includes attacker information, determining the IOC from the candidate IOCs according to the attacker information and the candidate direct attackers corresponding to the candidate IOCs;

若用户上传的内容中不包括攻击者信息,则针对每一个所述候选IOC,根据所述候选直接攻击者的设备信息,结合预置数据库,确定所述候选直接攻击者对应的疑似受害者和每一个所述疑似受害者对应的IOC;根据每一个所述候选IOC与所述疑似受害者对应的IOC的相似度,从所述候选IOC中确定IOC。If the content uploaded by the user does not include attacker information, for each candidate IOC, the suspected victim corresponding to the candidate direct attacker and the IOC corresponding to each suspected victim are determined based on the device information of the candidate direct attacker and combined with a preset database; the IOC is determined from the candidate IOCs based on the similarity between each candidate IOC and the IOC corresponding to the suspected victim.

可选的,所述候选攻击手段确定模块,具体用于:Optionally, the candidate attack means determination module is specifically used to:

根据IOC、IOC与安全事件类型的对应关系,确定安全事件类型;Determine the type of security incident based on the IOC and the correspondence between IOC and security incident type;

在预置的日志数据库中查找所述安全事件类型对应的日志;Searching for a log corresponding to the security event type in a preset log database;

按照预设日志类型,对所述日志进行分类归并,确定每类日志对应的攻击手段;Classify and merge the logs according to the preset log types, and determine the attack means corresponding to each type of log;

针对每一类日志,根据该类日志对应的安全事件相关程度、该类日志的威胁等级、该类日志的发生次数,计算该类日志的可靠性。For each type of log, the reliability of this type of log is calculated based on the relevance of the security event corresponding to this type of log, the threat level of this type of log, and the number of occurrences of this type of log.

可选的,所述候选攻击手段确定模块在根据该类日志对应的安全事件相关程度、该类日志的威胁等级、该类日志的发生次数,计算该类日志的可靠性时,具体用于:Optionally, when the candidate attack means determination module calculates the reliability of the log according to the security event correlation degree corresponding to the log, the threat level of the log, and the number of occurrences of the log, the module is specifically used to:

根据如下公式计算该类日志的可靠性:The reliability of this type of log is calculated according to the following formula:

该类日志对应的安全事件相关程度*0.7+该类日志的威胁等级*0.2+该类日志的发生次数/相关日志总数*100*0.1。The security event relevance level of this type of log * 0.7 + the threat level of this type of log * 0.2 + the number of occurrences of this type of log / the total number of related logs * 100 * 0.1.

可选的,所述受害者确定模块在根据所述受害者的脆弱性信息与事件类型的关联程度、该类关联日志的威胁等级、该类关联日志的发生次数,计算该类关联日志对应的候选IOC的可靠性评分时,具体用于:Optionally, when the victim determination module calculates the reliability score of the candidate IOC corresponding to the type of associated log according to the degree of association between the vulnerability information of the victim and the event type, the threat level of the type of associated log, and the number of occurrences of the type of associated log, it is specifically used to:

根据如下公式计算该类关联日志对应的候选IOC的可靠性:The reliability of the candidate IOC corresponding to this type of associated log is calculated according to the following formula:

脆弱性与安全事件关联程度*0.5+该类关联日志的威胁等级*0.3+该类关联日志的发生次数/相关日志总数*100*0.2。The correlation degree between vulnerability and security incident*0.5+the threat level of the associated log*0.3+the number of occurrences of the associated log/the total number of related logs*100*0.2.

第三方面,本申请提供一种电子设备,包括:存储器和处理器,所述存储器上存储有能够被处理器加载并执行第一方面的方法的计算机程序。In a third aspect, the present application provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute the method of the first aspect.

第四方面,本申请提供一种计算机可读存储介质,存储有能够被处理器加载并执行第一方面的方法的计算机程序。In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and execute the method of the first aspect.

第五方面,本申请提供一种计算机程序产品,包括:计算机程序;所述计算机程序被处理器执行时,实现如第一方面任一项所述的方法。In a fifth aspect, the present application provides a computer program product, comprising: a computer program; when the computer program is executed by a processor, it implements the method described in any one of the first aspects.

本申请提供了一种基于IOC的攻击路径还原方法、装置、电子设备及存储介质。基于IOC的攻击路径还原方法包括:确定受害者的设备信息、威胁入侵指标IOC;根据所述设备信息、IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;所述预置数据库中存储有日志数据;根据IOC的类型、所述可靠性评分,从所述候选攻击手段中确定攻击手段和对应的直接攻击者;根据所述受害者的直接攻击者的设备信息,结合预置数据库,确定所述受害者的同级受害者;判断所述受害者的直接攻击者是否为最终攻击源;若不是,则将所述受害者的直接攻击者作为受害者,重复执行上述步骤,直至确定出最终攻击源。IOC是设备受到攻击的实质证据,将IOC作为设备攻击事件中的溯源线索,结合数据库中的大量日志数据,通过对攻击者和攻击手段的过滤,逐步查找到最终攻击源,以更可靠的线索提升溯源效率与准确度。同时,在此过程中,以可靠性评分的方式,高效地对相关日志数据进行筛选,以尽量排除日志数据中的误差,准确还原攻击路径。The present application provides an attack path restoration method, device, electronic device and storage medium based on IOC. The attack path restoration method based on IOC includes: determining the device information of the victim and the threat intrusion indicator IOC; determining the candidate attack means and the corresponding reliability score according to the device information and IOC, combined with a preset database; the preset database stores log data; determining the attack means and the corresponding direct attacker from the candidate attack means according to the type of IOC and the reliability score; determining the victim's peer victim according to the device information of the victim's direct attacker, combined with a preset database; judging whether the victim's direct attacker is the final attack source; if not, taking the victim's direct attacker as the victim, repeating the above steps until the final attack source is determined. IOC is the substantial evidence that the device is attacked. IOC is used as the tracing clue in the device attack event, combined with a large amount of log data in the database, by filtering the attacker and the attack means, the final attack source is gradually found, and the tracing efficiency and accuracy are improved with more reliable clues. At the same time, in this process, the relevant log data is efficiently screened in the form of reliability scoring to eliminate errors in the log data as much as possible and accurately restore the attack path.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

图1为本申请提供的一种应用场景的示意图;FIG1 is a schematic diagram of an application scenario provided by the present application;

图2为本申请一实施例提供的一种基于IOC的攻击路径还原方法的流程图;FIG2 is a flow chart of an IOC-based attack path restoration method provided in an embodiment of the present application;

图3为本申请一实施例提供的一种单段攻击路径的示意图;FIG3 is a schematic diagram of a single-segment attack path provided by an embodiment of the present application;

图4为本申请一实施例提供的一种包含同级受害者的攻击路径的示意图;FIG4 is a schematic diagram of an attack path including a victim at the same level provided by an embodiment of the present application;

图5为本申请一实施例提供的一种完整的攻击路径的示意图;FIG5 is a schematic diagram of a complete attack path provided in an embodiment of the present application;

图6为本申请一实施例提供的基于IOC的攻击路径还原方法的一个完整实施过程的流程图;FIG6 is a flow chart of a complete implementation process of an IOC-based attack path restoration method provided in an embodiment of the present application;

图7为本申请一实施例提供的一种基于IOC的攻击路径还原装置的结构示意图;FIG7 is a schematic diagram of the structure of an IOC-based attack path restoration device provided in an embodiment of the present application;

图8为本申请一实施例提供的一种电子设备的结构示意图。FIG8 is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

另外,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,如无特殊说明,一般表示前后关联对象是一种“或”的关系。In addition, the term "and/or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "/" in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.

下面结合说明书附图对本申请实施例作进一步详细描述。The embodiments of the present application are further described in detail below in conjunction with the drawings in the specification.

IOC:Indicator of compromise,威胁入侵指标。指的是在网络或设备上发现的数据物件,可作为系统疑遭入侵的证据。例如,不属于系统目录的文件、可疑IP地址、已经打开的且包含木马的邮件。IOC属于“确凿证据”,即已遭受损害的事后指标,一般是被动产生的,一般命中就表示设备或者网络已经失陷。IOC: Indicator of compromise, threat intrusion indicator. Refers to data objects found on the network or device, which can be used as evidence of suspected system intrusion. For example, files that do not belong to the system directory, suspicious IP addresses, and emails that have been opened and contain Trojans. IOC is "hard evidence", that is, a post-indicator of damage, which is generally generated passively. Generally, a hit means that the device or network has been compromised.

基于此,本申请提供一种基于IOC的攻击路径还原方法、装置、电子设备及存储介质。本申请提供的方法可以被集成为一项功能,被内置在日志审计系统、安全管理平台、态势感知平台等类型的软件产品中。这些软件产品可以被搭载在服务器、计算机等具备存储和计算功能的智能设备中。这些平台、系统的共通的一项特点是:都会收集业务网络内各类设备产生的日志,例如安全设备日志、网络设备日志、主机日志、应用日志等。在这些软件产品中,这些日志信息可以直接被攻击路径还原方法对应的程序利用,在方法执行过程中提供溯源依据。具体的,可以通过创建对应的日志数据库,将安全日志、应用日志、主机日志等数据存储在日志数据库中。本申请的方法执行时,则可以访问日志数据库,对其中的日志数据进行检索查找。Based on this, the present application provides an IOC-based attack path restoration method, device, electronic device and storage medium. The method provided by the present application can be integrated into a function and built into software products such as log audit systems, security management platforms, and situational awareness platforms. These software products can be installed in intelligent devices with storage and computing functions such as servers and computers. A common feature of these platforms and systems is that they will collect logs generated by various types of equipment in the business network, such as security device logs, network device logs, host logs, application logs, etc. In these software products, these log information can be directly used by the program corresponding to the attack path restoration method to provide a traceability basis during the execution of the method. Specifically, by creating a corresponding log database, data such as security logs, application logs, and host logs can be stored in the log database. When the method of the present application is executed, the log database can be accessed to search for the log data therein.

图1为本申请提供的一种应用场景的示意图。在此场景中,以某一系统及其中的各业务子系统管理为例,网络架构如图所示。具体的实现方式可以参考以下实施例。Figure 1 is a schematic diagram of an application scenario provided by the present application. In this scenario, taking a certain system and the management of each business subsystem therein as an example, the network architecture is shown in the figure. The specific implementation method can refer to the following embodiments.

图2为本申请一实施例提供的一种基于IOC的攻击路径还原方法的流程图,本实施例的方法可以应用于以上场景中的服务器、计算机等具备存储和计算功能的智能设备中。如图2所示的,该方法包括如下步骤。FIG2 is a flow chart of an IOC-based attack path restoration method provided in an embodiment of the present application. The method of this embodiment can be applied to servers, computers and other smart devices with storage and computing functions in the above scenarios. As shown in FIG2, the method includes the following steps.

S201、确定受害者的设备信息、威胁入侵指标IOC。S201. Determine the victim's device information and threat intrusion indicators (IOCs).

在具体的场景中,用户操作内网设备进行正常的工作,执行相应的任务,不可避免的会与其它设备产生数据的交互。当因为接收或操作了某一设备发送的数据而受到入侵,则该设备可以称为攻击者,用户操作的内网设备可以称为受害者。In specific scenarios, users operate intranet devices to perform normal work and execute corresponding tasks, which inevitably generates data interaction with other devices. When a device is invaded because of receiving or operating data sent by a certain device, the device can be called an attacker, and the intranet device operated by the user can be called a victim.

在一些实施方式中,可以由用户提供受害者信息和对应的IOC信息。In some implementations, victim information and corresponding IOC information may be provided by a user.

如若网络安全事件的发生被用户感知到,受害者往往较为明确,失陷主机即为受害者。例如在数据泄露类事件中,一般将受害者定为泄露数据所在的服务器;而在漏洞利用类事件中,受害者则可被确定为该漏洞所在的服务器。If the occurrence of a network security incident is perceived by the user, the victim is often relatively clear, and the compromised host is the victim. For example, in data leakage incidents, the victim is generally determined to be the server where the leaked data is located; while in vulnerability exploitation incidents, the victim can be determined to be the server where the vulnerability is located.

IOC的确定则需要用户结合本次事故信息、网络流量、主机日志或其他特征数据。例如在恶意程序事件中,用户在失陷主机处发现了一个未知的文件,该文件打开后即执行了宏病毒脚本,此文件通常被判定为IOC,记录了该文件传输的流量日志也可被判定为IOC。The determination of IOC requires the user to combine the accident information, network traffic, host logs or other characteristic data. For example, in a malicious program incident, the user found an unknown file on the compromised host. After the file was opened, the macro virus script was executed. This file is usually determined to be an IOC, and the traffic log that records the transmission of this file can also be determined as an IOC.

这样,在发现设备异常后,用户可以确认此次网络安全事件中的受害者以及IOC,将对应信息上传到系统,则可以根据用户上传的内容,确定受害者的设备信息、IOC。In this way, after discovering device anomalies, users can confirm the victims and IOCs in this network security incident and upload the corresponding information to the system. The victim's device information and IOC can be determined based on the content uploaded by the user.

S202、根据所述设备信息、IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;所述预置数据库中存储有日志数据。S202: Determine candidate attack methods and corresponding reliability scores based on the device information and IOC in combination with a preset database; the preset database stores log data.

为了保证本方案的执行,需要构建预置数据库,在数据库中存储日志数据。日志数据包括设备运行过程中产生的安全日志、流量日志等日志记录数据。In order to ensure the implementation of this solution, it is necessary to build a pre-set database to store log data in the database. Log data includes security logs, traffic logs and other log record data generated during the operation of the device.

另外,IOC的类型与安全事件类型、流量日志类型之前存在映射关系,同样可以存储在预置数据库中。例如:未知文件—文件传输、异常邮件接收—钓鱼攻击、系统异常命令执行—漏洞利用等映射关系。In addition, there is a mapping relationship between the IOC type and the security event type and traffic log type, which can also be stored in the preset database. For example: unknown file-file transfer, abnormal email reception-phishing attack, abnormal system command execution-vulnerability exploitation and other mapping relationships.

具体的,根据IOC、IOC与安全事件类型的对应关系,确定安全事件类型;在预置的日志数据库中查找所述安全事件类型对应的日志;按照预设日志类型,对所述日志进行分类归并,确定每类日志对应的攻击手段;针对每一类日志,根据该类日志的威胁等级、该类日志的发生次数、该类日志的发生时间,计算该类日志的可靠性。Specifically, the security event type is determined according to the correspondence between IOC and the security event type; the log corresponding to the security event type is searched in a preset log database; the logs are classified and merged according to the preset log types to determine the attack means corresponding to each type of log; for each type of log, the reliability of the log is calculated according to the threat level of the log, the number of occurrences of the log, and the occurrence time of the log.

在IOC已由用户确定的情况下,系统可以根据IOC的类型,自动列举攻击者可能使用的攻击手段。攻击手法用于表达攻击者如何危害其受害者,一旦IOC和攻击者被确定,流量日志、告警日志、主机日志等日志数据中必然存在攻击者与受害者的网络通讯记录、安全事件告警或命令执行记录等关键信息,这些关键信息即为攻击手法。具体实现如下。When the IOC has been determined by the user, the system can automatically list the possible attack methods used by the attacker according to the type of IOC. Attack methods are used to express how the attacker harms the victim. Once the IOC and the attacker are determined, the traffic log, alarm log, host log and other log data must contain key information such as the attacker's network communication records with the victim, security event alarms or command execution records. This key information is the attack method. The specific implementation is as follows.

1.用户将受害者设备标识(例如常见的IP地址)、IOC、被入侵大致时间区间等参数输入系统。1. The user enters parameters such as the victim's device identifier (such as a common IP address), IOC, and the approximate time period of the invasion into the system.

2.系统根据用户输入的参数,从安全事件数据库、流量日志数据库中捞取相关的日志并进行归并,并根据威胁等级、发生次数、发生时间等条件进行可靠性排序,将本次可能使用的攻击手段排在最上方。2. Based on the parameters entered by the user, the system retrieves and merges the relevant logs from the security event database and traffic log database, and sorts them by reliability based on threat level, number of occurrences, time of occurrence and other conditions, and puts the possible attack methods at the top.

其中,可靠性排序机制:根据可靠性评分来进行排序(可靠性评分相同的情况下,发生时间距离现在最近的日志排在最上方),总分100分。Among them, the reliability sorting mechanism is: sorting according to the reliability score (if the reliability scores are the same, the logs with the most recent occurrence time are ranked at the top), with a total score of 100 points.

安全事件相关程度:内置在知识库中,用于体IOC与该类安全事件的对应程度,分值区间为:0-100。Security incident relevance: built into the knowledge base, used to reflect the correspondence between the IOC and this type of security incident, with a score range of 0-100.

威胁等级:日志的危险等级,危险等级共分为5类,紧急、高、中、低、信息,分别对应100,80,60,30,10。Threat Level: The danger level of the log. There are five danger levels: emergency, high, medium, low, and information, corresponding to 100, 80, 60, 30, and 10 respectively.

发生次数:体现日志的发生次数。Occurrence count: reflects the number of times the log occurs.

计算公式:安全事件相关程度*0.7+威胁等级*0.2+发生次数/相关日志总数*100*0.1。Calculation formula: security incident relevance*0.7+threat level*0.2+number of occurrences/total number of related logs*100*0.1.

S203、根据IOC的类型、所述可靠性评分,从所述候选攻击手段中确定攻击手段和对应的直接攻击者。S203: Determine an attack method and a corresponding direct attacker from the candidate attack methods according to the type of the IOC and the reliability score.

在一种实施方式中,可以根据排序结果,直接将可靠性评分最高的候选攻击手段确定为攻击手段,将其关联的攻击者确定为直接攻击者。In one implementation, based on the ranking result, the candidate attack means with the highest reliability score may be directly determined as the attack means, and the attacker associated with the candidate attack means may be determined as the direct attacker.

在另一种实施方式中,也可以由用户根据安全事故具体情况以及IOC类型,从系统罗列的几种可能中进行再次筛选,确定直接攻击者与攻击手段。In another implementation, the user may also re-screen the several possibilities listed by the system according to the specific circumstances of the security incident and the type of IOC to determine the direct attacker and the means of attack.

通过在明确受害者以及IOC后,从存储告警日志或流量数据的数据库中检索攻击者,从而形成一段短的单向攻击路径。此时攻击路径如图3所示。After identifying the victim and IOC, the attacker is retrieved from the database storing alarm logs or traffic data, thus forming a short one-way attack path. The attack path is shown in Figure 3.

攻击者的检索是将IOC以及相关证据作为查询条件,例如IOC类型为文件、md5值时可以从告警日志、流量日志中将受害者、文件名称、md5值作为查询条件进行查询,文件传输者即为攻击者;当IOC类型为异常的网络活动、未经授权的远程连接时,这些异常活动的发起者通常为攻击者。用户不清楚IOC对应的查询条件时,可以从系统归并生成安全事件列表中查找攻击者与攻击手段。用户清楚IOC对应的查询条件时,也可以自己根据这些查询条件去检索。Attacker retrieval uses IOC and related evidence as query conditions. For example, when the IOC type is file or md5 value, the victim, file name, and md5 value can be used as query conditions in the alarm log or traffic log. The file transferor is the attacker. When the IOC type is abnormal network activity or unauthorized remote connection, the initiator of these abnormal activities is usually the attacker. If the user is not clear about the query conditions corresponding to the IOC, the attacker and attack method can be found in the security event list generated by the system. If the user is clear about the query conditions corresponding to the IOC, he or she can also search according to these query conditions.

S204、根据所述受害者的直接攻击者的设备信息,结合预置数据库,确定所述受害者的同级受害者。S204: Determine the victim's peer victims based on the device information of the victim's direct attacker and in combination with a preset database.

攻击者在内网环境中,往往不会只针对一个资产进行攻击,而是对周围的资产进行批量攻击。这就意味着一个资产沦陷,产生IOC后,大概率能够在周围资产上找到相同的IOC。据此可以继续搜索还原受到该攻击者攻击且存在相同IOC的其他主机。以该直接攻击者为源IP,检索该直接攻击者访问过的资产中是否存在相同的IOC。将搜索到的结果合并到路径中,如图4所示。In an intranet environment, attackers often do not attack only one asset, but attack surrounding assets in batches. This means that after an asset is compromised and an IOC is generated, it is highly likely that the same IOC can be found on surrounding assets. Based on this, we can continue to search and restore other hosts that have been attacked by the attacker and have the same IOC. Using the direct attacker as the source IP, search for the same IOC in the assets that the direct attacker has visited. Merge the search results into the path, as shown in Figure 4.

S205、判断所述受害者的直接攻击者是否为最终攻击源。S205: Determine whether the direct attacker of the victim is the final attack source.

内网环境中,在上述流程中发现的攻击者,往往不是第一台被拿下的主机。它大概率也是受害者,需要去判断该攻击者是否是最终的攻击源。In an intranet environment, the attacker found in the above process is often not the first host to be taken down. It is likely to be a victim, and it is necessary to determine whether the attacker is the final source of the attack.

最终攻击源的判定思路:该攻击者为外网IP,和/或,虽然该攻击者为内网IP,但并未找到它的同级受害者,且该内网IP没有产生可疑的网络通讯或命令执行等。The final idea for determining the source of the attack is: the attacker is an external IP, and/or, although the attacker is an internal IP, no victims at the same level are found, and the internal IP does not generate any suspicious network communications or command execution, etc.

即攻击者可能是外网设备,也可能是内网设备,在信息安全问题愈发突出的今天,是存在攻击者使用社工手段在业务现场直接使用内网资产直接发起攻击可能的,本申请并不局限于只将外网设备作为攻击路径的终点,在攻击路径终点的判断上不分内外网设备。That is, the attacker may be an external network device or an internal network device. As information security issues become increasingly prominent today, it is possible that attackers use social engineering methods to directly use internal network assets to launch attacks at the business site. This application is not limited to using only external network devices as the end point of the attack path, and does not distinguish between internal and external network devices in determining the end point of the attack path.

S206、若不是,则将所述受害者的直接攻击者作为受害者,重复执行上述步骤,直至确定出最终攻击源。S206: If not, the direct attacker of the victim is regarded as the victim, and the above steps are repeated until the final attack source is determined.

在未找到最终攻击源之前,重复执行S201-S205,将该直接攻击者视为受害者,明确其沦陷的IOC,继续寻找攻击者,直至确定最终攻击源。Before the final attack source is found, S201-S205 are repeatedly executed, the direct attacker is regarded as the victim, the IOC of the attacker is identified, and the attacker is continuously searched until the final attack source is determined.

在梳理完已有数据中能够找到的受害者、攻击者后,就形成了一张较为完整的攻击路径图,该路径图即最终的输出结果,如图5所示。After sorting out the victims and attackers that can be found in the existing data, a relatively complete attack path map is formed. This path map is the final output result, as shown in Figure 5.

图5表名了本次攻击路径生成的全过程(箭头指示本次溯源的方向):从受害者A处,找到了A失陷的证据,即IOC-1,随后根据受害者信息以及IOC从告警日志、流量日志等信息中找到了一级攻击者B,同时也在业务网络中找到了B以相同方式攻击的其他受害者A1,A2;在找不到其余受害者后,随后将B作为受害者,并且寻找它沦陷的原因,不断重复上述过程,找到攻击B的攻击者C以及C攻击的其他受害者,直至发现最后的攻击者D。Figure 5 shows the entire process of generating this attack path (the arrow indicates the direction of this tracing): from victim A, evidence of A's compromise, namely IOC-1, was found. Then, based on the victim information and IOC, the first-level attacker B was found from the alarm log, traffic log and other information. At the same time, other victims A1 and A2 attacked by B in the same way were also found in the business network. After the remaining victims could not be found, B was then taken as the victim and the reason for its compromise was sought. The above process was repeated to find the attacker C who attacked B and other victims attacked by C until the final attacker D was found.

本实施例的方案,IOC是设备受到攻击的实质证据,将IOC作为设备攻击事件中的溯源线索,以IOC为主,结合数据库中的大量日志数据,通过对攻击者和攻击手段的过滤,逐步查找到最终攻击源,以更可靠的线索提升溯源效率与准确度。同时,在此过程中,以可靠性评分的方式,高效地对相关日志数据进行筛选,以尽量排除日志数据中的误差,准确还原攻击路径。In the solution of this embodiment, IOC is the substantial evidence that the device has been attacked. IOC is used as the tracing clue in the device attack event. Based on IOC, combined with a large amount of log data in the database, the final attack source is gradually found by filtering the attackers and attack methods, and the efficiency and accuracy of tracing are improved with more reliable clues. At the same time, in this process, the relevant log data is efficiently screened in the form of reliability scoring to eliminate errors in the log data as much as possible and accurately restore the attack path.

在生成完本次网络安全事故的攻击路径后,基本已经收集到了所有的事件关键信息,包括:攻击者的入侵是什么时候发生的、攻击者首次尝试入侵是在哪个资产上进行的、攻击者首次入侵时用的攻击手法等等。对于这些已经发生了的网络安全事故中,通过系统溯源到了相关路径以及攻击手法后,可以通过提取本次网络安全事故的特征,包括其中的事件名称、IOC类型、通信协议、通信类型等信息,自动将其收录到网络安全事故知识库中,完成对预置数据库的更新,以供下次参考。After generating the attack path of this network security incident, all the key information of the incident has been basically collected, including: when the attacker's intrusion occurred, on which asset the attacker first attempted to intrude, the attack method used by the attacker during the first intrusion, etc. For these network security incidents that have already occurred, after tracing the relevant paths and attack methods through the system, the characteristics of this network security incident can be extracted, including the event name, IOC type, communication protocol, communication type and other information, and automatically included in the network security incident knowledge base, completing the update of the preset database for reference next time.

但是IOC因为其定义与特性,并非是所有安全事件发生后用户都能够轻易的找到IOC。因此,在另一些实施方式中,也可以为内网设备设置自动上报的程序,实时检测设备的数据交互和数据处理动作及对应产生的相关数据变化,一旦发现相关数据变化异常,则将异常数据变化记录为受到攻击的证据信息,并主动上报。或者在用户无法准确确定IOC时,通过总结事故发生时间段内容的安全告警情况、流量通信情况,帮助用户确定IOC、攻击者以及其攻击手段。However, due to its definition and characteristics, not all security incidents can be easily found by users after the IOC occurs. Therefore, in other implementations, an automatic reporting program can also be set for the intranet device to detect the data interaction and data processing actions of the device and the corresponding related data changes in real time. Once the related data changes are abnormal, the abnormal data changes are recorded as evidence of the attack and actively reported. Or when the user cannot accurately determine the IOC, by summarizing the security alarm situation and traffic communication situation of the time period when the accident occurred, help the user determine the IOC, the attacker and his attack methods.

如图2所示的,每一组受害者与对应的直接攻击者的组合的确定过程都是一致的,对应S201-S204。区别在于,第一个循环中的受害者(即图中标识的最终受害者)的信息的确定,可以通过用户输入的信息来确定,之后每次循环中的受害者均是由上一次循环确定的直接攻击者转化得到的(对应图中标识的一级攻击者、二级攻击者等)。As shown in Figure 2, the process of determining each group of victims and the corresponding direct attackers is consistent, corresponding to S201-S204. The difference is that the information of the victim in the first cycle (i.e., the final victim indicated in the figure) can be determined by the information input by the user, and the victims in each subsequent cycle are converted from the direct attackers determined in the previous cycle (corresponding to the first-level attackers, second-level attackers, etc. indicated in the figure).

具体的,可以根据用户上传的内容,确定受害者的设备信息、被入侵的时间范围;根据所述设备信息、被入侵的时间范围,结合预置数据库,查找关联日志,并根据事件类型对所述关联日志进行归并;针对每一类关联日志,根据事件类型与IOC类型的对应关系,确定该类关联日志对应的IOC,作为候选IOC;根据所述受害者的脆弱性信息与事件类型的关联程度、该类关联日志的威胁等级、该类关联日志的发生次数,计算该类关联日志对应的候选IOC的可靠性评分。Specifically, the victim's device information and the time range of the invasion can be determined based on the content uploaded by the user; the associated logs can be found based on the device information and the time range of the invasion in combination with the preset database, and the associated logs can be merged according to the event type; for each type of associated log, the IOC corresponding to the type of associated log is determined as a candidate IOC based on the correspondence between the event type and the IOC type; the reliability score of the candidate IOC corresponding to the type of associated log is calculated based on the degree of association between the victim's vulnerability information and the event type, the threat level of the type of associated log, and the number of occurrences of the type of associated log.

用户难以确定IOC的情况下:程序自动列举可能发现IOC的事件记录、日志记录等。具体实现如下。When it is difficult for users to identify IOCs: the program automatically lists event records, log records, etc. that may reveal IOCs. The specific implementation is as follows.

1.用户将受害者设备标识(例如常见的IP地址)、被入侵大致时间区间等参数输入系统。1. The user enters parameters such as the victim's device identifier (such as a common IP address) and the approximate time period of the invasion into the system.

2.系统根据用户输入的参数,从安全事件数据库中捞取时间范围与受害者IP有关的日志,根据事件类型进行归并。2. Based on the parameters entered by the user, the system retrieves logs related to the time range and the victim's IP from the security event database and merges them according to the event type.

3.系统中包含业务环境中的资产信息、脆弱性信息、知识库。系统根据受害者已有的脆弱性信息,结合第二步中归并的安全事件,根据脆弱性与安全事件的关联程度、威胁等级、发生次数等条件进行可靠性排序,将每件安全事件对应的以及可能会发现的IOC指标提示给用户。3. The system contains asset information, vulnerability information, and knowledge base in the business environment. Based on the vulnerability information already available to the victim and the security events merged in the second step, the system ranks the vulnerabilities according to their relevance, threat level, and number of occurrences, and prompts the user with the IOC indicators that correspond to each security event and may be discovered.

在本申请中,脆弱性指的是在智能设备的系统设计、实现、配置等环节因疏忽形成的、可导致系统安全策略遭受破坏的缺陷。这些脆弱性可能被威胁所利用,影响智能设备的机密性、完整性和可用性,造成安全后果。这些脆弱性可能存在于物理环境、组织、过程、人员、管理、配置、硬件、软件和信息等各个方面。例如,操作系统、应用程序等软件层面的脆弱性,或是弱口令和基线配置等。In this application, vulnerability refers to defects that are caused by negligence in the system design, implementation, configuration, etc. of smart devices, which may lead to the destruction of system security policies. These vulnerabilities may be exploited by threats, affecting the confidentiality, integrity and availability of smart devices, resulting in security consequences. These vulnerabilities may exist in various aspects such as physical environment, organization, process, personnel, management, configuration, hardware, software and information. For example, vulnerabilities at the software level such as operating system and application, or weak passwords and baseline configurations.

可靠性排序机制:根据可靠性评分来进行排序(可靠性评分相同的情况下,发生时间距离现在最近的日志排在最上方),总分100分。Reliability sorting mechanism: sorting is based on reliability scores (if the reliability scores are the same, the logs with the most recent occurrence time are at the top), with a total score of 100 points.

脆弱性与安全事件的关联程度:内置在知识库中,用于体现脆弱性与该类安全事件的对应程度,分值区间为:0-100。The degree of correlation between vulnerability and security incident: It is built into the knowledge base and is used to reflect the degree of correspondence between vulnerability and security incident of this type. The score range is: 0-100.

威胁等级:日志的危险等级,危险等级共分为5类,紧急、高、中、低、信息,分别对应100,80,60,30,10。Threat Level: The danger level of the log. There are five danger levels: emergency, high, medium, low, and information, corresponding to 100, 80, 60, 30, and 10 respectively.

发生次数:体现日志的发生次数。Occurrence count: reflects the number of times the log occurs.

计算公式:脆弱性与安全事件关联程度*0.5+威胁等级*0.3+发生次数/相关日志总数*100*0.2。Calculation formula: Degree of correlation between vulnerability and security incident*0.5+threat level*0.3+number of occurrences/total number of related logs*100*0.2.

在一些实施例中,还可以根据所述被入侵的时间范围,结合所述预置数据库,建立所述受害者的通信情况基线;根据所述受害者的通信情况基线,以设定周期统计所述受害者的通信情况,所述通信情况包括通信对象数量、通信对象列表、被访问次数、被访问端口列表;针对每一通信情况对应的统计数据,计算其中与中位数偏差大于设定额度的数据量;若所述数据量在该统计数据中占比大于设定比值,则将该中位数作为异常数据;若所述数据量在该统计数据中占比小于等于设定比值,则将与中位数偏差大于设定额度的数据作为异常数据;根据所述异常数据,确定对应的候选直接攻击者。In some embodiments, a communication baseline of the victim can also be established based on the time range of the invasion in combination with the preset database; based on the communication baseline of the victim, the communication status of the victim is counted at a set period, and the communication status includes the number of communication objects, the communication object list, the number of accesses, and the list of accessed ports; for the statistical data corresponding to each communication situation, the amount of data that deviates from the median by more than a set amount is calculated; if the proportion of the data amount in the statistical data is greater than a set ratio, the median is regarded as abnormal data; if the proportion of the data amount in the statistical data is less than or equal to the set ratio, the data that deviates from the median by more than the set amount is regarded as abnormal data; based on the abnormal data, the corresponding candidate direct attacker is determined.

系统还可以根据用户输入的事故发生的时间区间,建立与受害者通信情况基线,生成这段时间内行为异常,包括:通信次数异常、访问端口范围异常、尝试登录次数异常的发起者画像。具体实现如下。The system can also establish a baseline of communication with the victim based on the time interval of the incident input by the user, and generate a profile of the initiator of abnormal behavior during this period, including abnormal communication times, abnormal access port range, and abnormal number of login attempts. The specific implementation is as follows.

1.统计受害者每天的通信情况,包括:每天的通讯对象数量、每天的通信对象列表、每天被访问的次数、每天被访问的端口列表等信息,形成:通信对象数趋势、通信次数趋势、被访问趋势、被访问端口数趋势、被访问端口分布等。1. Statistics on the victim’s daily communication, including: the number of communication objects per day, the list of communication objects per day, the number of visits per day, the list of ports visited per day, etc., to form: the trend of the number of communication objects, the trend of the number of communications, the trend of visits, the trend of the number of visited ports, the distribution of visited ports, etc.

2.以折线图、散点图、饼图、词云等形式,可视化展示第一步中统计完成的数据信息,以便用户较直观的进行分析。2. Visually display the data information collected in the first step in the form of line graphs, scatter graphs, pie charts, word clouds, etc., so that users can analyze more intuitively.

3.获取每天通信对象数、通信次数、被访问次数、被访问端口数列表中的中位数,以该数画一条基线,将高于基线30%的点位高亮,如若列表中80%的统计数字均与该中位数相差30%,无论高低,则将基线高亮。这里,30%、80%仅为举例,在实际的应用场景中,技术人员可以结合实际的通信情况对异常点位的阈值进行设置,以使异常信息被精准捕捉。3. Get the median of the number of communication objects, number of communications, number of visits, and number of visited ports per day, draw a baseline with the number, and highlight the points that are 30% higher than the baseline. If 80% of the statistics in the list differ from the median by 30%, the baseline will be highlighted regardless of whether it is high or low. Here, 30% and 80% are just examples. In actual application scenarios, technicians can set the threshold of abnormal points based on the actual communication situation to accurately capture abnormal information.

4.第三步中高亮的点位即疑似行为异常点位,而该点位中的统计信息则疑似为异常信息,例如在通信次数趋势图中,某一天的通信次数过大,由于当天的通信次数是由与受害者有过通信的设备的访问总和而来,这批设备列表及其当天的通信次数则为异常信息。4. The highlighted points in the third step are suspected abnormal behavior points, and the statistical information in these points is suspected to be abnormal information. For example, in the communication frequency trend chart, the number of communications on a certain day is too large. Since the number of communications on that day is the sum of the visits of devices that have communicated with the victim, this list of devices and their number of communications on that day are abnormal information.

5.通过第四步中的统计与分析,程序最终可以得到一批疑似异常的通信发起者设备列表,并有其对应的异常原因,例如设备IP:192.168.1.1,异常原因:某日与受害者IP通信次数过大。5. Through the statistics and analysis in the fourth step, the program can eventually obtain a list of suspected abnormal communication initiator devices and their corresponding abnormal reasons, such as device IP: 192.168.1.1, abnormal reason: the number of communications with the victim IP on a certain day was too large.

6.根据上述异常设备出现的次数形成词云,在第二步中可视化展示,通过点击设备标识,下钻展示该设备的异常原因与异常期间产生的通信类型、事件类型分布。6. A word cloud is formed based on the number of times the above abnormal devices appear, and is visualized in the second step. By clicking on the device ID, the abnormal cause of the device and the distribution of communication types and event types generated during the abnormal period are displayed.

如此可以帮助用户找到安全事故存在的IOC、攻击者与本次攻击手段。This can help users find the IOCs, attackers, and attack methods involved in security incidents.

更进一步的,还可以从候选IOC中精准验证IOC,具体的,针对每一个所述候选IOC,根据所述设备信息、所述候选IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;根据所述候选IOC的类型、所述候选IOC的可靠性评分,从所述候选攻击手段中确定攻击手段和对应的候选直接攻击者;若用户上传的内容中包括攻击者信息,则根据所述攻击者信息、所述候选IOC对应的候选直接攻击者,从所述候选IOC中确定IOC;若用户上传的内容中不包括攻击者信息,则针对每一个所述候选IOC,根据所述候选直接攻击者的设备信息,结合预置数据库,确定所述候选直接攻击者对应的疑似受害者和每一个所述疑似受害者对应的IOC;根据每一个所述候选IOC与所述疑似受害者对应的IOC的相似度,从所述候选IOC中确定IOC。Furthermore, the IOC can be accurately verified from the candidate IOCs. Specifically, for each of the candidate IOCs, the candidate attack means and the corresponding reliability score are determined based on the device information, the candidate IOCs, and a preset database; the attack means and the corresponding candidate direct attacker are determined from the candidate attack means based on the type of the candidate IOC and the reliability score of the candidate IOC; if the content uploaded by the user includes attacker information, the IOC is determined from the candidate IOCs based on the attacker information and the candidate direct attackers corresponding to the candidate IOCs; if the content uploaded by the user does not include attacker information, for each of the candidate IOCs, the suspected victim corresponding to the candidate direct attacker and the IOC corresponding to each of the suspected victims are determined based on the device information of the candidate direct attacker and a preset database; the IOC is determined from the candidate IOCs based on the similarity between each of the candidate IOCs and the IOC corresponding to the suspected victim.

当用户在初步选定本次事故的IOC时亦或者同时存在多种IOC候选时,用户需要更多的证据来证明当前选择的IOC是准确的。When the user initially selects the IOC for this accident or when there are multiple IOC candidates at the same time, the user needs more evidence to prove that the currently selected IOC is accurate.

程序中提供进一步佐证IOC的能力,主要思路为:通过罗列其他资产相关的信息来验证,即当前IOC对应特征是否出现在其他资产上。具体实现如下。The program provides the ability to further verify IOC. The main idea is to verify by listing information related to other assets, that is, whether the corresponding features of the current IOC appear on other assets. The specific implementation is as follows.

1.用户输入IOC的类型、被入侵的大致时间区间、攻击者设备地址(非必填)。1. The user enters the type of IOC, the approximate time period of the invasion, and the attacker's device address (optional).

2.根据IOC的类型从安全事件数据库、流量日志数据库进行检索,根据事件类型与疑似受害者设备地址两个维度进行分组。2. Search from the security event database and traffic log database according to the type of IOC, and group them according to the event type and the address of the suspected victim device.

3.整合列举疑似受害者设备列表。3. Integrate a list of suspected victim devices.

4.如果用户输入时,输入了攻击者设备地址,那么程序会将检索的日志信息与攻击者进一步关联,判断日志中的攻击者是否与用户输入的是同一个,将结果丰富至疑似受害者列表中。4. If the user enters the attacker's device address, the program will further associate the retrieved log information with the attacker, determine whether the attacker in the log is the same as the one entered by the user, and enrich the result to the list of suspected victims.

此外,系统内置网络安全事故知识库,其中收录总结已发生的网络安全事故,为用户寻找IOC、确定攻击者与攻击手法提供案例支持。In addition, the system has a built-in cybersecurity incident knowledge base, which includes a summary of cybersecurity incidents that have occurred, and provides case support for users to find IOCs, identify attackers and attack methods.

图6为本申请一个完整实施例的流程图,如图6所示的,本实施例的流程整合了上述各实施例的实现步骤。FIG6 is a flow chart of a complete embodiment of the present application. As shown in FIG6 , the flow chart of the present embodiment integrates the implementation steps of the above-mentioned embodiments.

图7为本申请一实施例提供的一种基于IOC的攻击路径还原装置的结构示意图,如图7所示的,本实施例的基于IOC的攻击路径还原装置700包括:受害者确定模块701、候选攻击手段确定模块702、攻击手段确定模块703、同级受害者确定模块704、攻击源确定模块705。Figure 7 is a structural diagram of an IOC-based attack path restoration device provided in an embodiment of the present application. As shown in Figure 7, the IOC-based attack path restoration device 700 of this embodiment includes: a victim determination module 701, a candidate attack means determination module 702, an attack means determination module 703, a peer victim determination module 704, and an attack source determination module 705.

受害者确定模块701,用于确定受害者的设备信息、威胁入侵指标IOC;The victim determination module 701 is used to determine the victim's device information and threat intrusion indicators (IOCs);

候选攻击手段确定模块702,用于根据所述设备信息、IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;所述预置数据库中存储有日志数据;A candidate attack means determination module 702 is used to determine candidate attack means and corresponding reliability scores based on the device information and IOC in combination with a preset database; the preset database stores log data;

攻击手段确定模块703,用于根据IOC的类型、所述可靠性评分,从所述候选攻击手段中确定攻击手段和对应的直接攻击者;An attack means determination module 703, configured to determine an attack means and a corresponding direct attacker from the candidate attack means according to the type of the IOC and the reliability score;

同级受害者确定模块704,用于根据所述受害者的直接攻击者的设备信息,结合预置数据库,确定所述受害者的同级受害者;A peer victim determination module 704, configured to determine peer victims of the victim based on device information of the victim's direct attacker in combination with a preset database;

攻击源确定模块705,用于判断所述受害者的直接攻击者是否为最终攻击源;若不是,则将所述受害者的直接攻击者作为受害者,重复执行上述步骤,直至确定出最终攻击源。The attack source determination module 705 is used to determine whether the direct attacker of the victim is the final attack source; if not, the direct attacker of the victim is taken as the victim and the above steps are repeated until the final attack source is determined.

可选的,所述受害者确定模块701,具体用于:Optionally, the victim determination module 701 is specifically configured to:

根据用户上传的内容,确定受害者的设备信息、IOC;Determine the victim’s device information and IOC based on the content uploaded by the user;

或者,or,

根据用户上传的内容,确定受害者的设备信息、被入侵的时间范围;Determine the victim’s device information and the time range of the intrusion based on the content uploaded by the user;

根据所述设备信息、被入侵的时间范围,结合预置数据库,查找关联日志,并根据事件类型对所述关联日志进行归并;According to the device information and the time range of the intrusion, combined with the preset database, the related logs are searched, and the related logs are merged according to the event type;

针对每一类关联日志,根据事件类型与IOC类型的对应关系,确定该类关联日志对应的IOC,作为候选IOC;根据所述受害者的脆弱性信息与事件类型的关联程度、该类关联日志的威胁等级、该类关联日志的发生次数,计算该类关联日志对应的候选IOC的可靠性评分。For each type of associated log, the IOC corresponding to the associated log is determined as a candidate IOC according to the correspondence between the event type and the IOC type; the reliability score of the candidate IOC corresponding to the associated log is calculated according to the degree of correlation between the vulnerability information of the victim and the event type, the threat level of the associated log, and the number of occurrences of the associated log.

可选的,所述装置还包括候选直接攻击者模块706,用于:Optionally, the apparatus further includes a candidate direct attacker module 706, configured to:

根据所述被入侵的时间范围,结合所述预置数据库,建立所述受害者的通信情况基线;According to the time range of the intrusion, in combination with the preset database, a communication baseline of the victim is established;

根据所述受害者的通信情况基线,以设定周期统计所述受害者的通信情况,所述通信情况包括通信对象数量、通信对象列表、被访问次数、被访问端口列表;According to the victim's communication baseline, the victim's communication status is counted at a set period, wherein the communication status includes the number of communication objects, the communication object list, the number of accesses, and the accessed port list;

针对每一通信情况对应的统计数据,计算其中与中位数偏差大于设定额度的数据量;若所述数据量在该统计数据中占比大于设定比值,则将该中位数作为异常数据;若所述数据量在该统计数据中占比小于等于设定比值,则将与中位数偏差大于设定额度的数据作为异常数据;For the statistical data corresponding to each communication situation, the amount of data whose deviation from the median is greater than the set amount is calculated; if the proportion of the data amount in the statistical data is greater than the set ratio, the median is regarded as abnormal data; if the proportion of the data amount in the statistical data is less than or equal to the set ratio, the data whose deviation from the median is greater than the set amount is regarded as abnormal data;

根据所述异常数据,确定对应的候选直接攻击者。According to the abnormal data, a corresponding candidate direct attacker is determined.

可选的,所述装置还包括IOC确定模块707,用于:Optionally, the device further includes an IOC determination module 707, configured to:

针对每一个所述候选IOC,根据所述设备信息、所述候选IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;根据所述候选IOC的类型、所述候选IOC的可靠性评分,从所述候选攻击手段中确定攻击手段和对应的候选直接攻击者;For each of the candidate IOCs, determine a candidate attack method and a corresponding reliability score according to the device information, the candidate IOC, and a preset database; determine an attack method and a corresponding candidate direct attacker from the candidate attack methods according to the type of the candidate IOC and the reliability score of the candidate IOC;

若用户上传的内容中包括攻击者信息,则根据所述攻击者信息、所述候选IOC对应的候选直接攻击者,从所述候选IOC中确定IOC;If the content uploaded by the user includes attacker information, determining the IOC from the candidate IOCs according to the attacker information and the candidate direct attackers corresponding to the candidate IOCs;

若用户上传的内容中不包括攻击者信息,则针对每一个所述候选IOC,根据所述候选直接攻击者的设备信息,结合预置数据库,确定所述候选直接攻击者对应的疑似受害者和每一个所述疑似受害者对应的IOC;根据每一个所述候选IOC与所述疑似受害者对应的IOC的相似度,从所述候选IOC中确定IOC。If the content uploaded by the user does not include attacker information, for each candidate IOC, the suspected victim corresponding to the candidate direct attacker and the IOC corresponding to each suspected victim are determined based on the device information of the candidate direct attacker and combined with a preset database; the IOC is determined from the candidate IOCs based on the similarity between each candidate IOC and the IOC corresponding to the suspected victim.

可选的,所述候选攻击手段确定模块702,具体用于:Optionally, the candidate attack means determination module 702 is specifically configured to:

根据IOC、IOC与安全事件类型的对应关系,确定安全事件类型;Determine the type of security incident based on the IOC and the correspondence between IOC and security incident type;

在预置的日志数据库中查找所述安全事件类型对应的日志;Searching for a log corresponding to the security event type in a preset log database;

按照预设日志类型,对所述日志进行分类归并,确定每类日志对应的攻击手段;Classify and merge the logs according to the preset log types, and determine the attack means corresponding to each type of log;

针对每一类日志,根据该类日志对应的安全事件相关程度、该类日志的威胁等级、该类日志的发生次数,计算该类日志的可靠性。For each type of log, the reliability of this type of log is calculated based on the relevance of the security event corresponding to this type of log, the threat level of this type of log, and the number of occurrences of this type of log.

可选的,所述候选攻击手段确定模块702在根据该类日志对应的安全事件相关程度、该类日志的威胁等级、该类日志的发生次数,计算该类日志的可靠性时,具体用于:Optionally, when calculating the reliability of the log according to the security event correlation degree corresponding to the log, the threat level of the log, and the number of occurrences of the log, the candidate attack means determination module 702 is specifically used to:

根据如下公式计算该类日志的可靠性:The reliability of this type of log is calculated according to the following formula:

该类日志对应的安全事件相关程度*0.7+该类日志的威胁等级*0.2+该类日志的发生次数/相关日志总数*100*0.1。The security event relevance level of this type of log * 0.7 + the threat level of this type of log * 0.2 + the number of occurrences of this type of log / the total number of related logs * 100 * 0.1.

可选的,所述受害者确定模块701在根据所述受害者的脆弱性信息与事件类型的关联程度、该类关联日志的威胁等级、该类关联日志的发生次数,计算该类关联日志对应的候选IOC的可靠性评分时,具体用于:Optionally, when the victim determination module 701 calculates the reliability score of the candidate IOC corresponding to the type of associated log according to the degree of association between the vulnerability information of the victim and the event type, the threat level of the type of associated log, and the number of occurrences of the type of associated log, it is specifically used to:

根据如下公式计算该类关联日志对应的候选IOC的可靠性:The reliability of the candidate IOC corresponding to this type of associated log is calculated according to the following formula:

脆弱性与安全事件关联程度*0.5+该类关联日志的威胁等级*0.3+该类关联日志的发生次数/相关日志总数*100*0.2。The correlation degree between vulnerability and security incident*0.5+the threat level of the associated log*0.3+the number of occurrences of the associated log/the total number of related logs*100*0.2.

本实施例的装置,可以用于执行上述任一实施例的方法,其实现原理和技术效果类似,此处不再赘述。The device of this embodiment can be used to execute the method of any of the above embodiments. Its implementation principle and technical effects are similar and will not be described in detail here.

图8为本申请一实施例提供的一种电子设备的结构示意图,如图8所示,本实施例的电子设备800可以包括:存储器801和处理器802。FIG8 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in FIG8 , the electronic device 800 of this embodiment may include: a memory 801 and a processor 802 .

存储器801上存储有能够被处理器802加载并执行上述实施例中方法的计算机程序。The memory 801 stores a computer program that can be loaded by the processor 802 and execute the method in the above embodiment.

其中,处理器802和存储器801相连,如通过总线相连。The processor 802 and the memory 801 are connected, for example, via a bus.

可选地,电子设备800还可以包括收发器。需要说明的是,实际应用中收发器不限于一个,该电子设备800的结构并不构成对本申请实施例的限定。Optionally, the electronic device 800 may further include a transceiver. It should be noted that in actual applications, the number of transceivers is not limited to one, and the structure of the electronic device 800 does not constitute a limitation on the embodiments of the present application.

处理器802可以是CPU(Central Processing Unit,中央处理器),通用处理器,DSP(Digital Signal Processor,数据信号处理器),ASIC(Application SpecificIntegrated Circuit,专用集成电路),FPGA(Field Programmable Gate Array,现场可编程门阵列)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器802也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等。The processor 802 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor 802 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

总线可包括一通路,在上述组件之间传送信息。总线可以是PCI(PeripheralComponent Interconnect,外设部件互连标准)总线或EISA(Extended Industry StandardArchitecture,扩展工业标准结构)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus may include a path to transmit information between the above components. The bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

存储器801可以是ROM(Read Only Memory,只读存储器)或可存储静态信息和指令的其他类型的静态存储设备,RAM(Random Access Memory,随机存取存储器)或者可存储信息和指令的其他类型的动态存储设备,也可以是EEPROM(Electrically ErasableProgrammable Read Only Memory,电可擦可编程只读存储器)、CD-ROM(Compact DiscRead Only Memory,只读光盘)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。The memory 801 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

存储器801用于存储执行本申请方案的应用程序代码,并由处理器802来控制执行。处理器802用于执行存储器801中存储的应用程序代码,以实现前述方法实施例所示的内容。The memory 801 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 802. The processor 802 is used to execute the application code stored in the memory 801 to implement the content shown in the above method embodiment.

其中,电子设备包括但不限于:移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。还可以为服务器等。图8示出的电子设备仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。The electronic devices include, but are not limited to, mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. It can also be a server, etc. The electronic device shown in FIG8 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

本实施例的电子设备,可以用于执行上述任一实施例的方法,其实现原理和技术效果类似,此处不再赘述。The electronic device of this embodiment can be used to execute the method of any of the above embodiments. The implementation principles and technical effects are similar and will not be described in detail here.

本申请还提供一种计算机可读存储介质,存储有能够被处理器加载并执行如上实施例中的方法的计算机程序。The present application also provides a computer-readable storage medium storing a computer program that can be loaded by a processor and execute the method in the above embodiment.

本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

Claims (10)

1.一种基于IOC的攻击路径还原方法,其特征在于,包括:1. An IOC-based attack path restoration method, characterized by comprising: 在内网环境中,确定受害者的设备信息、威胁入侵指标IOC;In the intranet environment, determine the victim's device information and threat intrusion indicators (IOCs); 根据所述设备信息、IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;所述预置数据库中存储有日志数据;Determine candidate attack methods and corresponding reliability scores based on the device information and IOC in combination with a preset database; the preset database stores log data; 根据IOC的类型、所述可靠性评分,从所述候选攻击手段中确定攻击手段和对应的直接攻击者;Determine an attack method and a corresponding direct attacker from the candidate attack methods according to the type of IOC and the reliability score; 判断所述受害者的直接攻击者是否为最终攻击源;若所述受害者的直接攻击者是外网IP,则将所述受害者的直接攻击者确定为最终攻击源;Determine whether the victim's direct attacker is the final attack source; if the victim's direct attacker is an external network IP, determine the victim's direct attacker as the final attack source; 若所述受害者的直接攻击者是内网IP,则根据所述受害者的直接攻击者的设备信息,结合预置数据库,确定所述受害者的同级受害者;所述同级受害者为受到所述受害者的直接攻击者的攻击且存在相同IOC的其它主机;If the victim's direct attacker is an intranet IP, determine the victim's peer victims based on the victim's direct attacker's device information and a preset database; the peer victims are other hosts that are attacked by the victim's direct attacker and have the same IOC; 若所述受害者没有同级受害者,且所述内网IP没有产生可疑的网络通讯或命令执行,则将所述受害者的直接攻击者确定为最终攻击源;否则,则将所述受害者的直接攻击者作为受害者,重复执行上述判断步骤,直至确定出最终攻击源。If the victim has no victims at the same level, and the intranet IP does not generate suspicious network communications or command execution, the victim's direct attacker is determined as the final attack source; otherwise, the victim's direct attacker is taken as the victim, and the above judgment steps are repeated until the final attack source is determined. 2.根据权利要求1所述的基于IOC的攻击路径还原方法,其特征在于,所述确定受害者的设备信息、威胁入侵指标IOC,包括:2. The IOC-based attack path restoration method according to claim 1, wherein determining the victim's device information and threat intrusion indicator IOC comprises: 根据用户上传的内容,确定受害者的设备信息、IOC;Determine the victim’s device information and IOC based on the content uploaded by the user; 或者,or, 根据用户上传的内容,确定受害者的设备信息、被入侵的时间范围;Determine the victim’s device information and the time range of the intrusion based on the content uploaded by the user; 根据所述设备信息、被入侵的时间范围,结合预置数据库,查找关联日志,并根据事件类型对所述关联日志进行归并;According to the device information and the time range of the intrusion, combined with the preset database, the related logs are searched, and the related logs are merged according to the event type; 针对每一类关联日志,根据事件类型与IOC类型的对应关系,确定该类关联日志对应的IOC,作为候选IOC;根据所述受害者的脆弱性信息与事件类型的关联程度、该类关联日志的威胁等级、该类关联日志的发生次数,计算该类关联日志对应的候选IOC的可靠性评分。For each type of associated log, the IOC corresponding to the associated log is determined as a candidate IOC according to the correspondence between the event type and the IOC type; the reliability score of the candidate IOC corresponding to the associated log is calculated according to the degree of correlation between the vulnerability information of the victim and the event type, the threat level of the associated log, and the number of occurrences of the associated log. 3.根据权利要求2所述的基于IOC的攻击路径还原方法,其特征在于,还包括:3. The IOC-based attack path restoration method according to claim 2, further comprising: 根据所述被入侵的时间范围,结合所述预置数据库,建立所述受害者的通信情况基线;According to the time range of the intrusion, in combination with the preset database, a communication baseline of the victim is established; 根据所述受害者的通信情况基线,以设定周期统计所述受害者的通信情况,所述通信情况包括通信对象数量、通信对象列表、被访问次数、被访问端口列表;According to the victim's communication baseline, the victim's communication status is counted at a set period, wherein the communication status includes the number of communication objects, the communication object list, the number of accesses, and the accessed port list; 针对每一通信情况对应的统计数据,计算其中与中位数偏差大于设定额度的数据量;若所述数据量在该统计数据中占比大于设定比值,则将该中位数作为异常数据;若所述数据量在该统计数据中占比小于等于设定比值,则将与中位数偏差大于设定额度的数据作为异常数据;For the statistical data corresponding to each communication situation, the amount of data whose deviation from the median is greater than the set amount is calculated; if the proportion of the data amount in the statistical data is greater than the set ratio, the median is regarded as abnormal data; if the proportion of the data amount in the statistical data is less than or equal to the set ratio, the data whose deviation from the median is greater than the set amount is regarded as abnormal data; 根据所述异常数据,确定对应的候选直接攻击者。According to the abnormal data, a corresponding candidate direct attacker is determined. 4.根据权利要求2所述的基于IOC的攻击路径还原方法,其特征在于,还包括:4. The IOC-based attack path restoration method according to claim 2, further comprising: 针对每一个所述候选IOC,根据所述设备信息、所述候选IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;根据所述候选IOC的类型、所述候选IOC的可靠性评分,从所述候选攻击手段中确定攻击手段和对应的候选直接攻击者;For each of the candidate IOCs, determine a candidate attack method and a corresponding reliability score according to the device information, the candidate IOC, and a preset database; determine an attack method and a corresponding candidate direct attacker from the candidate attack methods according to the type of the candidate IOC and the reliability score of the candidate IOC; 若用户上传的内容中包括攻击者信息,则根据所述攻击者信息、所述候选IOC对应的候选直接攻击者,从所述候选IOC中确定IOC;If the content uploaded by the user includes attacker information, determining the IOC from the candidate IOCs according to the attacker information and the candidate direct attackers corresponding to the candidate IOCs; 若用户上传的内容中不包括攻击者信息,则针对每一个所述候选IOC,根据所述候选直接攻击者的设备信息,结合预置数据库,确定所述候选直接攻击者对应的疑似受害者和每一个所述疑似受害者对应的IOC;根据每一个所述候选IOC与所述疑似受害者对应的IOC的相似度,从所述候选IOC中确定IOC。If the content uploaded by the user does not include attacker information, for each candidate IOC, the suspected victim corresponding to the candidate direct attacker and the IOC corresponding to each suspected victim are determined based on the device information of the candidate direct attacker and combined with a preset database; the IOC is determined from the candidate IOCs based on the similarity between each candidate IOC and the IOC corresponding to the suspected victim. 5.根据权利要求1-4任一项所述的基于IOC的攻击路径还原方法,其特征在于,所述根据所述设备信息、IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;所述预置数据库中存储有日志数据,包括:5. The IOC-based attack path restoration method according to any one of claims 1 to 4, characterized in that the candidate attack means and the corresponding reliability score are determined based on the device information and IOC in combination with a preset database; the preset database stores log data, including: 根据IOC、IOC与安全事件类型的对应关系,确定安全事件类型;Determine the type of security incident based on the IOC and the correspondence between IOC and security incident type; 在预置的日志数据库中查找所述安全事件类型对应的日志;Searching for a log corresponding to the security event type in a preset log database; 按照预设日志类型,对所述日志进行分类归并,确定每类日志对应的攻击手段;Classify and merge the logs according to the preset log types, and determine the attack means corresponding to each type of log; 针对每一类日志,根据该类日志对应的安全事件相关程度、该类日志的威胁等级、该类日志的发生次数,计算该类日志的可靠性。For each type of log, the reliability of this type of log is calculated based on the relevance of the security event corresponding to this type of log, the threat level of this type of log, and the number of occurrences of this type of log. 6.根据权利要求5所述的基于IOC的攻击路径还原方法,其特征在于,所述根据该类日志对应的安全事件相关程度、该类日志的威胁等级、该类日志的发生次数,计算该类日志的可靠性,包括:6. The IOC-based attack path restoration method according to claim 5 is characterized in that the reliability of the log type is calculated according to the security event correlation degree corresponding to the log type, the threat level of the log type, and the number of occurrences of the log type, including: 根据如下公式计算该类日志的可靠性:The reliability of this type of log is calculated according to the following formula: 该类日志对应的安全事件相关程度*0.7+该类日志的威胁等级*0.2+该类日志的发生次数/相关日志总数*100*0.1。The security event relevance level of this type of log * 0.7 + the threat level of this type of log * 0.2 + the number of occurrences of this type of log / the total number of related logs * 100 * 0.1. 7.根据权利要求2-4任一项所述的基于IOC的攻击路径还原方法,其特征在于,所述根据所述受害者的脆弱性信息与事件类型的关联程度、该类关联日志的威胁等级、该类关联日志的发生次数,计算该类关联日志对应的候选IOC的可靠性评分,包括:7. The IOC-based attack path restoration method according to any one of claims 2 to 4, characterized in that the reliability score of the candidate IOC corresponding to the type of associated log is calculated according to the degree of association between the vulnerability information of the victim and the event type, the threat level of the type of associated log, and the number of occurrences of the type of associated log, including: 根据如下公式计算该类关联日志对应的候选IOC的可靠性:The reliability of the candidate IOC corresponding to this type of associated log is calculated according to the following formula: 脆弱性与安全事件关联程度*0.5+该类关联日志的威胁等级*0.3+该类关联日志的发生次数/相关日志总数*100*0.2。The correlation degree between vulnerability and security incident*0.5+the threat level of the associated log*0.3+the number of occurrences of the associated log/the total number of related logs*100*0.2. 8.一种基于IOC的攻击路径还原装置,其特征在于,包括:8. An IOC-based attack path restoration device, comprising: 受害者确定模块,用于在内网环境中,确定受害者的设备信息、威胁入侵指标IOC;The victim identification module is used to determine the victim's device information and threat intrusion indicators (IOCs) in the intranet environment; 候选攻击手段确定模块,用于根据所述设备信息、IOC,结合预置数据库,确定候选攻击手段和对应的可靠性评分;所述预置数据库中存储有日志数据;A candidate attack means determination module, used to determine candidate attack means and corresponding reliability scores based on the device information and IOC in combination with a preset database; the preset database stores log data; 攻击手段确定模块,用于根据IOC的类型、所述可靠性评分,从所述候选攻击手段中确定攻击手段和对应的直接攻击者;An attack means determination module, used to determine an attack means and a corresponding direct attacker from the candidate attack means according to the type of IOC and the reliability score; 攻击源确定模块,用于判断所述受害者的直接攻击者是否为最终攻击源;若所述受害者的直接攻击者是外网IP,则将所述受害者的直接攻击者确定为最终攻击源;若所述受害者的直接攻击者是内网IP,则根据所述受害者的直接攻击者的设备信息,结合预置数据库,确定所述受害者的同级受害者;所述同级受害者为受到所述受害者的直接攻击者的攻击且存在相同IOC的其它主机;若所述受害者没有同级受害者,且所述内网IP没有产生可疑的网络通讯或命令执行,则将所述受害者的直接攻击者确定为最终攻击源;否则,则将所述受害者的直接攻击者作为受害者,重复执行上述判断步骤,直至确定出最终攻击源。The attack source determination module is used to determine whether the direct attacker of the victim is the final attack source; if the direct attacker of the victim is an external network IP, the direct attacker of the victim is determined as the final attack source; if the direct attacker of the victim is an internal network IP, the victim's peer victims are determined based on the device information of the direct attacker of the victim in combination with a preset database; the peer victims are other hosts that are attacked by the direct attacker of the victim and have the same IOC; if the victim has no peer victims and the internal network IP does not generate suspicious network communication or command execution, the direct attacker of the victim is determined as the final attack source; otherwise, the direct attacker of the victim is taken as the victim, and the above-mentioned determination steps are repeated until the final attack source is determined. 9.一种电子设备,其特征在于,包括:存储器和处理器;9. An electronic device, comprising: a memory and a processor; 所述存储器,用于存储程序指令;The memory is used to store program instructions; 所述处理器,用于调用并执行所述存储器中的程序指令,执行如权利要求1-7任一项所述的方法。The processor is used to call and execute the program instructions in the memory to perform the method according to any one of claims 1-7. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序;所述计算机程序被处理器执行时,实现如权利要求1-7任一项所述的方法。10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium; when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
CN202311734214.7A 2023-12-15 2023-12-15 Attack path restoration method and device based on IOC, electronic equipment and medium Active CN118337403B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311734214.7A CN118337403B (en) 2023-12-15 2023-12-15 Attack path restoration method and device based on IOC, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311734214.7A CN118337403B (en) 2023-12-15 2023-12-15 Attack path restoration method and device based on IOC, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN118337403A CN118337403A (en) 2024-07-12
CN118337403B true CN118337403B (en) 2024-09-10

Family

ID=91780935

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311734214.7A Active CN118337403B (en) 2023-12-15 2023-12-15 Attack path restoration method and device based on IOC, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN118337403B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119922021B (en) * 2025-04-03 2025-06-27 北京微步在线科技有限公司 Network security data tracing methods, equipment, media and program products

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067815A (en) * 2018-11-06 2018-12-21 深信服科技股份有限公司 Attack Source Tracing method, system, user equipment and storage medium
CN111835781A (en) * 2020-07-21 2020-10-27 杭州安恒信息技术股份有限公司 A method and system for discovering a same-origin attack host based on a lost host

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7586328B2 (en) * 2021-08-02 2024-11-19 日本電気株式会社 Inference device, inference method, and program
CN114363002B (en) * 2021-12-07 2023-06-09 绿盟科技集团股份有限公司 Method and device for generating network attack relation diagram
CN114417329B (en) * 2021-12-08 2024-10-01 国家电网有限公司信息通信分公司 Threat information production and analysis method based on federal learning
CN116226835A (en) * 2022-11-29 2023-06-06 新华三信息安全技术有限公司 Risk assessment method and device
CN116566689A (en) * 2023-05-18 2023-08-08 江苏安恒网络安全有限公司 Method, device, equipment and medium for restoring and alarm disposal of three-dimensional attack link

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067815A (en) * 2018-11-06 2018-12-21 深信服科技股份有限公司 Attack Source Tracing method, system, user equipment and storage medium
CN111835781A (en) * 2020-07-21 2020-10-27 杭州安恒信息技术股份有限公司 A method and system for discovering a same-origin attack host based on a lost host

Also Published As

Publication number Publication date
CN118337403A (en) 2024-07-12

Similar Documents

Publication Publication Date Title
US12301628B2 (en) Correlating network event anomalies using active and passive external reconnaissance to identify attack information
US12058177B2 (en) Cybersecurity risk analysis and anomaly detection using active and passive external reconnaissance
US11165815B2 (en) Systems and methods for cyber security alert triage
US10505986B1 (en) Sensor based rules for responding to malicious activity
US20200296137A1 (en) Cybersecurity profiling and rating using active and passive external reconnaissance
US10104112B2 (en) Rating threat submitter
WO2019144548A1 (en) Security test method, apparatus, computer device and storage medium
CN114866296B (en) Intrusion detection method, intrusion detection device, intrusion detection equipment and readable storage medium
CN118337403B (en) Attack path restoration method and device based on IOC, electronic equipment and medium
CN111756745B (en) Alarm method, alarm device, terminal equipment and computer-readable storage medium
CN118378264B (en) User behavior management method, device, medium and product oriented to database
CN113055362B (en) Method, device, equipment and storage medium for preventing abnormal behaviors
Gonzalez-Granadillo et al. Enhancing information sharing and visualization capabilities in security data analytic platforms
CN114238279A (en) Database security protection method, device, system, storage medium and electronic device
US20250088521A1 (en) Identifying similarities in complex objects at scale
CN111291409A (en) Data monitoring method and device
Bo et al. Tom: A threat operating model for early warning of cyber security threats
CN115766247A (en) System information security evaluation method, device, equipment and storage medium
CN119363485B (en) Attack data multi-dimensional analysis method, device, equipment and storage medium
CN115348109B (en) Industrial production threat early warning method and system, electronic equipment and storage medium
US20240414184A1 (en) Network security assessment based upon identification of an adversary
CN112764974B (en) Information asset online management method and system
US20250193213A1 (en) Rapid identification of malicious cyber activity and contextualization of indicators of compromise
JP2019159383A (en) White list management system
CN119939189A (en) Method, device and computer equipment for identifying generation of office equipment security incidents

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