JP6783741B2 - Distance measuring device, communication system, creating device and distance measuring program - Google Patents

Distance measuring device, communication system, creating device and distance measuring program Download PDF

Info

Publication number
JP6783741B2
JP6783741B2 JP2017225395A JP2017225395A JP6783741B2 JP 6783741 B2 JP6783741 B2 JP 6783741B2 JP 2017225395 A JP2017225395 A JP 2017225395A JP 2017225395 A JP2017225395 A JP 2017225395A JP 6783741 B2 JP6783741 B2 JP 6783741B2
Authority
JP
Japan
Prior art keywords
data string
distance
list
malware
unit
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
JP2017225395A
Other languages
Japanese (ja)
Other versions
JP2019096088A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2017225395A priority Critical patent/JP6783741B2/en
Publication of JP2019096088A publication Critical patent/JP2019096088A/en
Application granted granted Critical
Publication of JP6783741B2 publication Critical patent/JP6783741B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、距離測定装置、通信システム、作成装置及び距離測定プログラムに関する。 The present invention relates to a distance measuring device, a communication system, a creating device, and a distance measuring program.

従来、通信ネットワークやこれらに接続されたコンピュータに対する外部攻撃通信、及び、コンピュータがマルウェア等に感染した結果発生する内部攻撃や情報漏洩等の通信を検出する手法がある。この検出手法の一つとして、ネットワーク機器やコンピュータ等が出力するログを分析する手法がある。このような。ログを収集、分析し、攻撃や情報漏洩等、セキュリティ上の問題を引き起こす悪性通信を通常の通信(良性通信)の中から検出する装置として、SIEM(Security Information and Event Management)システムがあり、代表的な製品として、McAfee(登録商標) SIEM、IBM(登録商標) QRadar等がある(例えば、非特許文献1,2参照)。 Conventionally, there are methods for detecting external attack communication to a communication network and a computer connected to the communication network, and communication such as an internal attack or information leakage that occurs as a result of the computer being infected with malware or the like. As one of the detection methods, there is a method of analyzing logs output by network devices, computers, and the like. like this. The SIEM (Security Information and Event Management) system is a representative device that collects and analyzes logs and detects malicious communications that cause security problems such as attacks and information leaks from normal communications (beneficial communications). McAfee (registered trademark) SIEM, IBM (registered trademark) QRadar, etc. (see, for example, Non-Patent Documents 1 and 2).

この悪性通信の検出や分析において、ブラックリストやホワイトリスト等の既知の文字列・データ列のリストと、検査対象通信に出現する文字列・データ列を比較し、相違を判定することは重要な処理である。相違には、完全一致や正規表現に代表されるパターン一致等、一致または不一致の2値で表現するものがよく知られている。 In the detection and analysis of this malicious communication, it is important to compare the list of known character strings / data strings such as blacklists and whitelists with the character strings / data strings appearing in the communication to be inspected to determine the difference. It is a process. It is well known that the difference is expressed by two values of match or mismatch, such as exact match and pattern match represented by a regular expression.

一方、データ間の相違を数値化し、一致なら0、より相違するごとに値が大きくなるような距離として定義する手法がある。このような距離を利用することによって、機械学習手法、例えば、k-means法によるクラスタリングやk-近傍法による分類、推薦等を悪性通信の検出や分析に適用でき、より高度で効率的な検知、分析を行うことが可能となる。 On the other hand, there is a method of quantifying the difference between data and defining it as 0 if it matches, and as a distance that the value increases with each difference. By using such distances, machine learning methods such as clustering by the k-means method, classification and recommendation by the k-nearest neighbor method can be applied to the detection and analysis of malignant communication, and more sophisticated and efficient detection can be performed. , It becomes possible to perform analysis.

例えば、文字列間の距離として代表的なものに編集距離(レーベンシュタイン距離)がある。情報理論では相対エントロピー(KL情報量)等が距離として提案されている(例えば、非特許文献3参照)。具体的には、文字列Qに対する文字列Pの相対エントロピーKL(P|Q)は、文字列中に出現する文字の出現率の相違を用いて、以下の通り算出される。 For example, the editing distance (Levenshtein distance) is a typical distance between character strings. In information theory, relative entropy (KL information amount) and the like are proposed as distances (see, for example, Non-Patent Document 3). Specifically, the relative entropy KL (P | Q) of the character string P with respect to the character string Q is calculated as follows using the difference in the appearance rate of the characters appearing in the character string.

Figure 0006783741
Figure 0006783741

McAfee,“Security Information and Event Management(SIEM)”,[平成29年11月9日検索],インターネット<URL:https://www.mcafee.com/jp/products/siem/index.aspx>McAfee, "Security Information and Event Management (SIEM)", [Searched on November 9, 2017], Internet <URL: https://www.mcafee.com/jp/products/siem/index.aspx> IBM,“IBM QRadar Security Intelligence Platform”,[平成29年11月9日検索],インターネット<URL:http://www-03.ibm.com/software/products/ja/qradar>IBM, "IBM QRadar Security Intelligence Platform", [Searched on November 9, 2017], Internet <URL: http://www-03.ibm.com/software/products/ja/qradar> 杉山 将,“確率分布間の距離推定:機械学習分野における最新動向”, 日本応用数理学会論文誌, vol.23, no.3, pp. 439-452, 2013.Masaru Sugiyama, “Distance estimation between probability distributions: Latest trends in the field of machine learning”, Journal of the Japan Society for Industrial and Applied Mathematics, vol.23, no.3, pp. 439-452, 2013. S.R.Kosaraju, G.MANZINI,“Compression of Low Entropy Strings with Lempel-Ziv Algorithms”, SIAM J. Comput., vol.29, pp.893-911, 1999.S.R.Kosaraju, G.MANZINI, “Compression of Low Entropy Strings with Lempel-Ziv Algorithms”, SIAM J. Comput., Vol.29, pp.893-911, 1999.

マルウェアは、特定の複数の通信を行うことがしばしばある。このため、単一の通信のみならず、複数の通信についてその特徴的な文字列及びデータ列をリストとし、ホワイトリスト・ブラックリスト等の既存リストとの相違を距離として判定できると、より検出精度が高められると考えられる。 Malware often makes multiple specific communications. Therefore, if the characteristic character strings and data strings of not only a single communication but also a plurality of communications can be made into a list and the difference from the existing list such as a white list / black list can be determined as a distance, the detection accuracy will be higher. Is thought to be enhanced.

しかしながら、現在、文字列間、文字列リスト間の距離を効率的に求める手法が存在しない。例えば、仮に、編集距離で各リスト同士の文字列の距離を総当たりで求め、それらの距離を、例えば、平均等のような各種算法により、文字列間、文字列リスト間の距離測定を行うことを考える。しかしながら、この測定手法は、少なくとも互いのリスト数Nの掛け算の回数の距離測定を行う必要があり、その計算量のオーダは、O(N2)と大きなものとなってしまう。 However, at present, there is no method for efficiently finding the distance between character strings and between character string lists. For example, suppose that the distance between character strings between each list is calculated by rounding the edit distance, and the distance between the character strings and the character string list is measured by various arithmetic methods such as averaging. Think about it. However, this measurement method needs to measure the distance at least by multiplying the number of lists N by each other, and the order of the amount of calculation becomes as large as O (N 2 ).

一方で、相対エントロピーは、参照元のデータ列を文字種ごとの出現率を算出した後に、対象データ列の各文字に対応する参照元文字種の出現率を処理すればよい。このため、相対エントロピーについては、文字列リスト数Nに比例する計算量O(N)で済む。しかしながら、相対エントロピーは、その相違の比較が文字単位となっており、文字の並びを考慮しておらず、文字列同士の距離を測るのには適していない。 On the other hand, for relative entropy, after calculating the appearance rate of each character type of the reference source data string, the appearance rate of the reference source character type corresponding to each character of the target data string may be processed. Therefore, for relative entropy, the amount of calculation O (N) proportional to the number of character string lists N is sufficient. However, relative entropy is not suitable for measuring the distance between character strings because the comparison of the difference is in character units and does not consider the arrangement of characters.

また、文字の連なりを考慮したエントロピー(Shannonのn次エントロピー)は、文字の連なりに関する確率モデルを事前に決定しておく必要がある。しかしながら、この確率モデルの決定は、容易ではない。 In addition, for the entropy considering the character sequence (Shannon's nth-order entropy), it is necessary to determine the probabilistic model for the character sequence in advance. However, determining this probabilistic model is not easy.

本発明は、上記に鑑みてなされたものであって、データ列間またはデータ列リスト間の距離を効率的に求めることができる距離測定装置、通信システム、作成装置及び距離測定プログラムを提供することを目的とする。 The present invention has been made in view of the above, and provides a distance measuring device, a communication system, a creating device, and a distance measuring program capable of efficiently obtaining a distance between data strings or a data string list. With the goal.

上述した課題を解決し、目的を達成するために、本発明に係る距離測定装置は、計測対象のデータ列またはデータ列リスト、及び、参照元のデータ列またはデータ列リストに対し、k(kは任意の自然数)個の未使用の文字コードを区分データ列として入力してデータ列またはデータ列リストを1つのデータ列に変換する変換部と、変換部が変換した計測対象のデータ列におけるk長部分データ列と該部分データ列の直前に出現する文字とを結合した結合部分データ列の出現率である第1の出現率と、変換部が変換した参照元のデータ列における直後がk長部分データ列であると判明している文字の出現率である第2の出現率の対数である経験情報量と、の乗算値の総和である、k次経験交差エントロピーを、計測対象のデータ列またはデータ列リストと、参照元のデータ列またはデータ列リストとの間の距離として算出する距離算出部と、を有することを特徴とする。 In order to solve the above-mentioned problems and achieve the object, the distance measuring device according to the present invention refers to the data string or data string list to be measured and the data string or data string list of the reference source by k (k). Is an arbitrary natural number) A conversion unit that inputs an unused character code as a divided data string and converts the data string or data string list into one data string, and k in the data string to be measured converted by the conversion unit. The first appearance rate, which is the appearance rate of the combined partial data string that combines the long partial data string and the characters that appear immediately before the partial data string, and the k length immediately after the reference source data string converted by the conversion unit The kth-order experience crossing entropy, which is the sum of the multiplication values of the amount of experience information, which is the logarithm of the second appearance rate, which is the appearance rate of characters known to be partial data strings, is the data string to be measured. Alternatively, it is characterized by having a data string list and a distance calculation unit that calculates the distance between the reference source data string or the data string list.

本発明によれば、データ列間またはデータ列リスト間の距離を効率的に求めることができる。 According to the present invention, the distance between data columns or data column lists can be efficiently determined.

図1は、実施の形態1に係る距離測定装置の構成の一例を示す図である。FIG. 1 is a diagram showing an example of the configuration of the distance measuring device according to the first embodiment. 図2は、図1に示す距離測定装置が実行する距離測定方法の処理手順を示すフローチャートである。FIG. 2 is a flowchart showing a processing procedure of a distance measuring method executed by the distance measuring device shown in FIG. 図3は、実施の形態2に係る通信システムの構成の一例を示す図である。FIG. 3 is a diagram showing an example of the configuration of the communication system according to the second embodiment. 図4は、図3に示す悪性距離測定装置における学習処理の処理手順を示すフローチャートである。FIG. 4 is a flowchart showing a processing procedure of learning processing in the malignant distance measuring device shown in FIG. 図5は、図3に示す悪性距離測定装置における推論理の処理手順を示すフローチャートである。FIG. 5 is a flowchart showing a processing procedure of inference logic in the malignant distance measuring device shown in FIG. 図6は、図3に示す検出装置における検出処理の処理手順を示すフローチャートである。FIG. 6 is a flowchart showing a processing procedure of the detection process in the detection device shown in FIG. 図7は、実施の形態3に係る通信システムの構成の一例を示す図である。FIG. 7 is a diagram showing an example of the configuration of the communication system according to the third embodiment. 図8は、図7に示すマルウェア種別距離測定装置における学習処理の処理手順を示すフローチャートである。FIG. 8 is a flowchart showing a processing procedure of learning processing in the malware type distance measuring device shown in FIG. 7. 図9は、図7に示すマルウェア種別距離測定装置における推論理の処理手順を示すフローチャートである。FIG. 9 is a flowchart showing a processing procedure of inference logic in the malware type distance measuring device shown in FIG. 7. 図10は、図7に示す判定装置における検出処理の処理手順を示すフローチャートである。FIG. 10 is a flowchart showing a processing procedure of the detection process in the determination device shown in FIG. 7. 図11は、実施の形態4に係る作成装置の構成の一例を示す図である。FIG. 11 is a diagram showing an example of the configuration of the creating device according to the fourth embodiment. 図12は、図11に示す作成装置が実行する作成処理の処理手順を示すフローチャートである。FIG. 12 is a flowchart showing a processing procedure of the creation process executed by the creation apparatus shown in FIG. 図13は、プログラムが実行されることにより、距離測定装置、悪性距離測定装置、マルウェア種別距離測定装置及び作成装置が実現されるコンピュータの一例を示す図である。FIG. 13 is a diagram showing an example of a computer in which a distance measuring device, a malignant distance measuring device, a malware type distance measuring device, and a creating device are realized by executing a program.

以下、図面を参照して、本発明の一実施形態を詳細に説明する。なお、この実施の形態により本発明が限定されるものではない。また、図面の記載において、同一部分には同一の符号を付して示している。 Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. The present invention is not limited to this embodiment. Further, in the description of the drawings, the same parts are indicated by the same reference numerals.

本実施の形態では、二つの文字列・データ列、または、文字列リスト・データ列リストについて、事前の確率モデルの想定を必要としない、文字の連なりを考慮した出現率を用い、二つの出現率の差異を算出することによって、距離測定の効率化を実現する。この距離を用いれば、例えば、対象の通信を構成する文字列リストと既存の悪性通信等を構成する文字列リストとの距離を測定し、ある程度近ければ悪性等と判定することが可能となる。以下、文字列間または文字列リスト間の距離測定を例として説明するが、本実施の形態は、データ列またはデータ列リスト全般に適用することができる。 In the present embodiment, for two character strings / data strings or a character string list / data string list, two appearances are used by using an appearance rate in consideration of a sequence of characters, which does not require the assumption of a probabilistic model in advance. By calculating the difference in rate, the efficiency of distance measurement is realized. By using this distance, for example, the distance between the character string list constituting the target communication and the character string list constituting the existing malignant communication or the like can be measured, and if the distance is close to some extent, it can be determined to be malignant or the like. Hereinafter, the measurement of the distance between character strings or between character string lists will be described as an example, but this embodiment can be applied to a data string or a data string list in general.

[従来の数理的背景]
まず、以降の説明において必要となる従来の数理的背景を説明する。従来、事前の確率モデル設定を必要とせず、文字の連なりを考慮した出現率を用いるものとして、k次経験エントロピーが考案されている。このk次経験エントロピーは、文字列中から、文字長kの部分文字列を全て抽出し、抽出した各部分文字列について、文字列中の同一の部分文字列の直前(或いは直後)の文字の出現率を用いて計算されるものである。k次経験エントロピーは、以下の(2)式のように、算出される(詳細は、非特許文献4参照)。
[Conventional mathematical background]
First, the conventional mathematical background required in the following explanation will be described. Conventionally, the k-th-order empirical entropy has been devised to use the appearance rate in consideration of the sequence of characters without the need for prior stochastic model setting. This k-th experience entropy extracts all substrings of character length k from the string, and for each extracted substring, the character immediately before (or immediately after) the same substring in the string. It is calculated using the appearance rate. The k-order empirical entropy is calculated as shown in Eq. (2) below (see Non-Patent Document 4 for details).

Figure 0006783741
Figure 0006783741

また、(2)式に用いられる0次経験エントロピーは、以下の(3)式のように算出される。 The 0th-order empirical entropy used in Eq. (2) is calculated as in Eq. (3) below.

Figure 0006783741
Figure 0006783741

ここで、対数の底には2、あるいは、文字集合Σの要素数がよく用いられる。pc=nc/|T|とすると、0次経験エントロピーは、Shannonの1次エントロピー(1−2式参照)と同様の形であることがわかる。 Here, 2 or the number of elements of the character set Σ is often used at the base of the logarithm. If p c = n c / | T |, it can be seen that the 0th-order empirical entropy has the same form as Shannon's 1st-order entropy (see Equation 1-2).

例として、文字列T(T=abcbcbccb)の2次経験エントロピーは以下の通り計算される。対数の底は2とした。 As an example, the secondary empirical entropy of the string T (T = abcbcbccb) is calculated as follows. The base of the logarithm is 2.

ここで、文字列Tにおける文字長2の部分文字列の集合は{ab,bc,cb,cc}となる。まず、最初の部分文字列abは、行頭にしかなく、直前の文字はないため、直前文字連結文字列は、Tab=(空)となる。一方、次の部分文字列bcについては、末尾に含む文字長3の部分文字列には、(先頭より)abc、(3文字目より)cbc、(5文字目より)cbcがあることから、それぞれの直前文字は、「a,c,c」である。したがって、部分文字列bcについての直前文字連結文字列は、Tbc=accとなる。同様に、部分文字列cbについての直前文字連結文字列は、Tcb=bbcとなる。また、部分文字列ccについての直前文字連結文字列は、Tcc=bとなる。 Here, the set of substrings of character length 2 in the character string T is {ab, bc, cb, cc}. First, since the first substring ab is only at the beginning of the line and there is no immediately preceding character, the immediately preceding character concatenated string is Tab = (empty). On the other hand, regarding the following substring bc, since the substring with a character length of 3 included at the end includes abc (from the beginning), cbc (from the third character), and cbc (from the fifth character). The preceding character of each is "a, c, c". Therefore, the immediately preceding character concatenated string for the substring bc is T bc = acc. Similarly, the immediately preceding character concatenated string for the substring cb is T cb = bbc. Further, the immediately preceding character concatenated character string for the substring cc is T cc = b.

各直前文字連結文字列の0次経験エントロピーは、以下の(A−1)〜(A−4)式のように求めることができる。 The 0th-order empirical entropy of each immediately preceding character concatenated character string can be obtained by the following equations (A-1) to (A-4).

H0(Tac)=H0(空)=0 ・・・(A−1)
H0(Tbc)=H0(acc)=1÷3×log(3÷1)+2÷3×log(3÷2)=0.9183 ・・・(A−2)
(na=1、nc=2、|Tbc|=3、小数点5桁以下四捨五入)
H0(Tcb)=H0(bbc)=2÷3×log(3÷2)+1÷3×log(3÷1)=0.9183 ・・・(A−3)
(nb=2、nc=1、|Tcb|=3、小数点5桁以下四捨五入)
H0(Tcc)=H0(b)=0 ・・・(A−4)
H 0 (T ac ) = H 0 (empty) = 0 ・ ・ ・ (A-1)
H 0 (T bc ) = H 0 (acc) = 1 ÷ 3 × log (3 ÷ 1) + 2 ÷ 3 × log (3 ÷ 2) = 0.9183 ・ ・ ・ (A-2)
(n a = 1, n c = 2, | T bc | = 3, rounded to the nearest 5 decimal places)
H 0 (T cb ) = H 0 (bbc) = 2 ÷ 3 × log (3 ÷ 2) +1 ÷ 3 × log (3 ÷ 1) = 0.9183 ・ ・ ・ (A-3)
(n b = 2, n c = 1, | T cb | = 3, rounded to the nearest 5 decimal places)
H 0 (T cc ) = H 0 (b) = 0 ・ ・ ・ (A-4)

上記のように、|T|=9、|Tac|=1、|Tbc|=3、|Tcb|=3、|Tcc|=1であるため、2次経験エントロピーH2(T)は、以下の(B−1)式のように求めることができる。 As mentioned above, | T | = 9, | T ac | = 1, | T bc | = 3, | T cb | = 3, | T cc | = 1, so the secondary experience entropy H 2 (T) ) Can be obtained by the following equation (B-1).

H2(T)=1÷9×H0(Tac)+3÷9×H0(Tbc)+3÷9×H0(Tbc)+3÷9×H0(Tcc)
=0.1111×0+0.3333×0.9183+0.3333×0.9183+0.1111×0
=0.6122 ・・・(B−1)
H 2 (T) = 1 ÷ 9 × H 0 (T ac ) + 3 ÷ 9 × H 0 (T bc ) + 3 ÷ 9 × H 0 (T bc ) + 3 ÷ 9 × H 0 (T cc )
= 0.1111 × 0 + 0.3333 × 0.9183 + 0.3333 × 0.9183 + 0.1111 × 0
= 0.6122 ・ ・ ・ (B-1)

[本実施の形態における数理的背景]
次に、本実施の形態における数理的背景について述べる。本実施の形態に係る距離測定方法は、上記のk次経験エントロピーを、k次経験交差エントロピーへと拡張することによって、文字の連なりを考慮した分布の差異を測ることを可能とする。
[Mathematical background in this embodiment]
Next, the mathematical background of the present embodiment will be described. The distance measuring method according to the present embodiment makes it possible to measure the difference in distribution in consideration of the sequence of characters by extending the above k-order empirical entropy to the k-th empirical cross entropy.

その前段階として、(2),(3)式を一つの式として書き下すと、以下の(4)式を求めることができる。 As a preliminary step, if equations (2) and (3) are written down as one equation, the following equation (4) can be obtained.

Figure 0006783741
Figure 0006783741

(4)式において、p(c,s)は、文字列T中で部分文字列sの直前に文字cが出現する同時確率である。このp(c,s)は、部分文字列c+s(+は文字列同士の結合処理を示す。)は、文字列Tに出現する回数を文字列長|T|で割ったものとなる。したがって、p(c,s)は、k+1長部分文字列c+sの出現率と同等である。また、p(c|s)は、直後の部分文字列がsであると分かっている際に文字cが出現する条件付き確率であり、直前文字連結文字列Tsにおけるcの出現率nc/|Ts|で計算される。 In equation (4), p (c, s) is the simultaneous probability that the character c appears immediately before the substring s in the character string T. This p (c, s) is the substring c + s (+ indicates the concatenation process between strings), which is the number of occurrences in the string T divided by the string length | T |. .. Therefore, p (c, s) is equivalent to the appearance rate of the k + 1 long substring c + s. Also, p (c | s) is the conditional probability that the character c appears when the substring immediately after it is known to be s, and the appearance rate of c in the immediately preceding character concatenated string T s n c. Calculated with / | T s |.

また、以下の(5−2)式のように、文字列c+sの経験情報量I(c+s)を定義すると、k次経験エントロピーは、(5−1)式に示すように、文字列T中のすべてのk+1長部分文字列の経験情報量を出現率に応じて総和したものであるとも記述できる。ただし、p(c+s)はk+1長の部分文字列c+sの出現率であり、p(c,s)と同等である。 Further, if the empirical information amount I (c + s) of the character string c + s is defined as in the following equation (5-2), the kth-order empirical entropy is as shown in the equation (5-1). It can also be described as the sum of the amount of experience information of all k + 1 long substrings in the character string T according to the appearance rate. However, p (c + s) is the appearance rate of the k + 1 long substring c + s, which is equivalent to p (c, s).

Figure 0006783741
Figure 0006783741

そこで、上記式を基に、k次経験交差エントロピーHk(P,Q)(P,Qは文字列)について、以下の(6)式のように定義する。 Therefore, based on the above equation, the k-th-order empirical cross entropy H k (P, Q) (P, Q is a character string) is defined as the following equation (6).

Figure 0006783741
Figure 0006783741

すなわち、本実施の形態では、(6)式に示すように、計測対象の文字列におけるk長部分文字列と該部分文字列の直前に出現する文字とを結合した結合部分文字列の出現率である第1の出現率と、参照元の文字列における直後がk長部分文字列であると判明している文字cの出現率である第2の出現率の対数である経験情報量と、の乗算値の総和である、k次経験交差エントロピーを、計測対象の文字列または文字列リストと、参照元の文字列または文字列リストとの間の距離として算出する。 That is, in the present embodiment, as shown in Eq. (6), the appearance rate of the combined substring that combines the k-length substring and the character that appears immediately before the substring in the character string to be measured. The amount of experience information, which is the logarithm of the first appearance rate, which is the appearance rate of the character c, which is known to be a k-length substring immediately after the reference source character string, and the second appearance rate, which is The k-th-order experience crossing entropy, which is the sum of the multiplication values of, is calculated as the distance between the character string or character string list to be measured and the character string or character string list of the reference source.

ただし、上記の(6)式では、q(c|s)が必ずしも算出できるとは限らないことがある。すなわち、q(c|s)が算出されるためには、少なくとも文字列Q中に部分文字列c+sが含まれていなくてはならない。しかしながら、c+sは文字列Pから取られたものであり、異なる文字列であるQには出現しないことはしばしば有りうる。 However, in the above equation (6), q (c | s) may not always be calculated. That is, in order for q (c | s) to be calculated, at least the substring c + s must be included in the string Q. However, c + s is taken from the string P and often does not appear in the different strings Q.

このため、本実施の形態では、上記の問題を解決するため、q(c|s)が算出できない場合、qにおいて算出できる次数k’にまでに下げて演算を行う。言い変えると、本実施の形態では、参照元文字列の中に結合部分文字列が含まれていない場合、次数kを、参照元文字列の中に結合部分文字列が出現する次数まで下げる。具体的には、本実施の形態では、直前文字cと部分文字列sとの先頭k’長からなる文字列sk’を結合したc+sk’について、文字列Q中に含まれる中で最大のk’のものを使用することとする。 Therefore, in the present embodiment, in order to solve the above problem, when q (c | s) cannot be calculated, the calculation is performed by lowering the order to the order k'that can be calculated in q. In other words, in the present embodiment, when the join substring is not included in the reference source character string, the degree k is lowered to the order in which the join substring appears in the reference source string. Specifically, in the present embodiment, c + s k'combined with the character string s k'consisting of the first k'length of the immediately preceding character c and the substring s is included in the character string Q. We will use the one with the largest k'.

この条件付き確率をq’(c|s)とすると、k次経験交差エントロピーは、以下に示す(7)式のように記述される。 Assuming that this conditional probability is q'(c | s), the k-th-order empirical cross entropy is described by Eq. (7) shown below.

Figure 0006783741
Figure 0006783741

k'=0時のq(c|sk’)は、sk’が空文字列であるので、代わりにq(c)を算出する。q(c)自体も算出できない場合、すなわち、文字cが文字列Q中に含まれない場合は、実施の形態1で後述する手段で代替する。 k '= 0 o'clock q (c | s k'), since s k 'is the empty string, calculates a q (c) instead. If q (c) itself cannot be calculated, that is, if the character c is not included in the character string Q, it is replaced by the means described later in the first embodiment.

[k次経験KL情報量]
次に、k次経験交差エントロピーの各種情報量への適用について説明する。まず、k次経験交差エントロピーを、KL情報量(Kullback−Leibler divergence:相対エントロピー(relative entropy))に適用する場合を例に説明する。
[K-order experience KL information amount]
Next, the application of the k-th empirical cross entropy to various amounts of information will be described. First, a case where the k-th-order empirical cross entropy is applied to the KL information amount (Kullback-Leibler divergence: relative entropy) will be described as an example.

このKL情報量は、確率分布に基づく距離としてよく用いられている。このKL情報量に、上述のk次経験交差エントロピーを適用することによって、以下の(8)式のように、k次経験KL情報量として拡張することができる。 This amount of KL information is often used as a distance based on a probability distribution. By applying the above-mentioned k-th-order experience cross entropy to this KL information amount, it can be expanded as the k-th-order experience KL information amount as shown in the following equation (8).

Figure 0006783741
Figure 0006783741

このように、文字の連なりを考慮したk次経験KL情報量を用いても、文字列間、文字列リスト間の距離を算出することが可能となる。 In this way, it is possible to calculate the distance between character strings and between character string lists even by using the kth-order experience KL information amount considering the sequence of characters.

ここで、上記の文字列間の距離測定手法を文字列リストへと拡張する場合について説明する。この場合には、文字列リストに以下の処理を行い、文字列リストを文字列に変換してから距離測定を行うのが容易である。 Here, a case where the above-mentioned distance measurement method between character strings is extended to a character string list will be described. In this case, it is easy to perform the following processing on the character string list, convert the character string list into a character string, and then measure the distance.

具体的には、経験交差エントロピーの次数をk次で距離測定する場合、リスト先頭、リスト間、リスト末尾に、k個の未使用の文字(例えば、NULL文字「0x00」)を、区分文字として挿入し、一つの文字列に結合する。本実施の形態では、このように文字列リストを一つに結合した文字列を用いて文字列間の距離を測定する。 Specifically, when measuring the order of the empirical cross entropy by the kth order, k unused characters (for example, the NULL character "0x00") are used as the dividing characters at the beginning of the list, between the lists, and at the end of the list. Insert and combine into one string. In the present embodiment, the distance between the character strings is measured using the character strings in which the character string lists are combined into one in this way.

そして、文字列への変換方法の一例について説明する。例えば、次数2の場合の変換について説明する。変換前文字列リストは、例えば、「文字列1,文字列2,・・・,文字列n」である。この場合、文字列1の先頭、文字列1,2,・・・,nの各間、文字列nの末尾に、k個の未使用の文字(例えばNULL文字「0x00」)を挿入して一つの文字列に結合する。この結果、変換後結合文字列は、「(null)(null)文字列1(null)(null)文字列2(null)(null)…(null)(null)文字列n(null)(null)」となる。なお、(null)(null)は、2文字からなる区分文字列である。(null)は、1文字(ASCII値0)を示す。 Then, an example of the conversion method to a character string will be described. For example, the conversion in the case of order 2 will be described. The character string list before conversion is, for example, "character string 1, character string 2, ..., Character string n". In this case, insert k unused characters (for example, the NULL character "0x00") at the beginning of the character string 1, between each of the character strings 1, 2, ..., N, and at the end of the character string n. Combine into one string. As a result, the combined string after conversion is "(null) (null) string 1 (null) (null) string 2 (null) (null) ... (null) (null) string n (null) (null) ) ”. Note that (null) (null) is a divided character string consisting of two characters. (null) indicates one character (ASCII value 0).

そして、本実施の形態では、未使用文字がない場合でも、例えば、1バイトの各文字を2バイトとして取り扱うことによって、未使用文字(例えば「0xffff」等)を生成することができる。また、本実施の形態では、出現率が低いある1文字種(例えば、NULL文字)をエスケープシーケンスし、他の文字種2文字(例えば「\0」)に置換することによって、その1文字種を区分文字として使うこともできる。 Then, in the present embodiment, even if there are no unused characters, an unused character (for example, "0xffff") can be generated by treating each character of 1 byte as 2 bytes. Further, in the present embodiment, one character type (for example, a NULL character) having a low appearance rate is escape-sequenced and replaced with two other character types (for example, "\ 0") to divide the one character type into a division character. Can also be used as.

また、本実施の形態では、リストQに対するリストPの距離について、リストPを一つの列に全て連結してから処理するのではなく、リストの要素1件ずつについて、先頭及び末尾に区分文字を追加し、以下の(9)式のように各要素の文字列長に応じた重みに応じて足し合わせることで、文字列間の距離を測定してもよい。 Further, in the present embodiment, the distance of the list P to the list Q is not processed after all the list Ps are concatenated in one column, but the division characters are added to the beginning and the end of each element of the list. In addition, the distance between the character strings may be measured by adding them according to the weights according to the character string length of each element as in the following equation (9).

Figure 0006783741
Figure 0006783741

ただし、(9)式において、Piは、リストPのi番目の要素である。|Ti|は、リスト要素Piの文字列長である。|T|は、リストP全体の文字列長(|T|=Σ|Ti|)である。 However, in equation (9), P i is the i-th element of the list P. | T i | is the string length of the list element P i . | T | is the string length (| T | = Σ | T i |) of the entire list P.

これによって、文字列のみならず、文字列リスト間の距離も、文字の連なりを考慮したk次経験交差エントロピーを用いて算出可能となる。 As a result, not only the character string but also the distance between the character string lists can be calculated by using the k-th empirical cross entropy in consideration of the character sequence.

なお、上記(4)式〜(7)式において、文字の連なりを考慮した出現率を算出するために、部分文字列sと、その直前の文字cとを用いたが、直前の文字の代わりに直後の文字を用いてもよい。 In the above equations (4) to (7), the substring s and the character c immediately before it were used in order to calculate the appearance rate considering the sequence of characters, but instead of the character immediately before. You may use the character immediately after.

[k次経験JS情報量]
次に、k次経験交差エントロピーを、JS情報量(Jensen-Shannon divergence)に適用する場合を例に説明する。JS情報量は、以下の(10)式のように示すことができ、距離として用いられる。
[K-order experience JS information amount]
Next, a case where the k-th-order empirical cross entropy is applied to the JS information amount (Jensen-Shannon divergence) will be described as an example. The amount of JS information can be expressed as the following equation (10) and is used as a distance.

Figure 0006783741
Figure 0006783741

(10)式において、Mは、PとQを結合した文字列であり、M/2は、その出現率を1/2して使用することを意味する。 In equation (10), M is a character string obtained by combining P and Q, and M / 2 means that the appearance rate is halved.

このJS情報量についても、k次経験交差エントロピーを適用することによって、KL情報量と同様に、(11−1)〜(11−3)式のように、k次経験JS情報量として定義することができる。 By applying the k-th-order experience cross entropy, this JS information amount is also defined as the k-th-order experience JS information amount as shown in equations (11-1) to (11-3), like the KL information amount. be able to.

Figure 0006783741
Figure 0006783741

ただし、(11−1)〜(11−3)式において、P,Qが文字列の場合は、文字列全体を一つのリストとしてMを構成する。P,Qともに文字列の場合は、Mは、2要素のリストとなるためである。Mには、PとQとの部分文字列が全て含まれているため、k次経験JS情報量は、k次経験KL情報量と異なり、k長の文字列c+sの情報量Imを必ず算出できる。したがって、k次経験JS情報量を算出する場合は、より短い文字列c+s’の情報量を代わりに用いなくともよい。 However, in the equations (11-1) to (11-3), when P and Q are character strings, M is composed of the entire character string as one list. This is because if both P and Q are character strings, M is a two-element list. Since M contains all the substrings of P and Q, the k-th experience JS information amount is different from the k-th experience KL information amount, and the information amount of the k-length character string c + s I m. Can always be calculated. Therefore, when calculating the k-th experience JS information amount, it is not necessary to use the information amount of the shorter character string c + s'instead.

このように、本実施の形態では、文字の連なりに関する確率モデルを事前に決定する必要なく、(6),(7)式に示す、文字の連なりを考慮したk次経験交差エントロピーを用いることによって、文字列間の距離を効率的に算出することができる。また、本実施の形態では、(8)式のように、k次経験交差エントロピーをKL情報量に適用し、k次経験KL情報量として拡張することによって、文字列間の距離を適切に算出することが可能となる。また、本実施の形態では、(8)式のように、k次経験交差エントロピーをJS情報量に適用し、k次経験JS情報量として拡張することによって、文字列間の距離を適切に算出することが可能となる。 As described above, in the present embodiment, it is not necessary to determine the probabilistic model for the character string in advance, and by using the k-th empirical cross entropy in consideration of the character string shown in the equations (6) and (7). , The distance between character strings can be calculated efficiently. Further, in the present embodiment, the distance between character strings is appropriately calculated by applying the k-th experience cross entropy to the KL information amount and expanding it as the k-th experience KL information amount as in the equation (8). It becomes possible to do. Further, in the present embodiment, the distance between character strings is appropriately calculated by applying the k-th experience cross entropy to the JS information amount and expanding it as the k-th experience JS information amount as in the equation (8). It becomes possible to do.

[実施の形態1]
次に、実施の形態1について説明する。本実施の形態1では、例えば、k次経験KL情報量を用いて、文字列または文字列リスト間の距離を測定する距離装置について説明する。
[Embodiment 1]
Next, the first embodiment will be described. In the first embodiment, for example, a distance device for measuring the distance between a character string or a character string list using the k-th empirical KL information amount will be described.

図1は、実施の形態1に係る距離測定装置の構成の一例を示す図である。図1に示すように、本実施の形態1に係る距離測定装置10は、変換部11、出現数算出部12、経験情報量算出部13、距離算出部14及び経験情報量格納部15を有する。距離測定装置10は、例えば、ROM(Read Only Memory)、RAM(Random Access Memory)、CPU(Central Processing Unit)等を含むコンピュータ等に所定のプログラムが読み込まれて、CPUが所定のプログラムを実行することで実現される。 FIG. 1 is a diagram showing an example of the configuration of the distance measuring device according to the first embodiment. As shown in FIG. 1, the distance measuring device 10 according to the first embodiment includes a conversion unit 11, an appearance number calculation unit 12, an experience information amount calculation unit 13, a distance calculation unit 14, and an experience information amount storage unit 15. .. In the distance measuring device 10, for example, a predetermined program is read into a computer or the like including a ROM (Read Only Memory), RAM (Random Access Memory), CPU (Central Processing Unit), etc., and the CPU executes the predetermined program. It will be realized by.

距離測定装置10は、距離の測定対象の文字列または文字リストの入力を受け付ける。図1の例では、計測対象である対象文字列または文字列リストと、参照元である参照文字列または文字列リストと、の入力を受け付ける。また、距離測定装置10は、距離を演算する際に要する次数k等の設定情報の入力も受け付ける。そして、距離測定装置10は、対象文字列または文字列リストと、参照文字列または文字列リストと、の間の距離を測定し、該測定した距離等の情報を出力する。 The distance measuring device 10 accepts the input of a character string or a character list for measuring the distance. In the example of FIG. 1, input of a target character string or character string list as a measurement target and a reference character string or character string list as a reference source is accepted. In addition, the distance measuring device 10 also accepts input of setting information such as order k required for calculating the distance. Then, the distance measuring device 10 measures the distance between the target character string or the character string list and the reference character string or the character string list, and outputs information such as the measured distance.

変換部11は、入力された対象文字列または文字列リストと、参照元である参照文字列または文字列リストと、に対して変換処理を行い、距離測定に適した文字列へと変換する。 The conversion unit 11 performs conversion processing on the input target character string or character string list and the reference character string or character string list which is the reference source, and converts the input target character string or character string list into a character string suitable for distance measurement.

出現数算出部12は、変換済対象文字列に対しては、k長部分文字列と該k長部分文字列の直前の文字との出現数を算出する。出現数算出部12は、変換済参照文字列に対しては、0,1,…,k長部分文字列と該k長部分文字列の直前の文字との出現数を算出する。経験情報量算出部13は、変換済みの参照文字列の出現数を基に、それぞれ0,1,…,k次経験KL情報量を算出し、経験情報量格納部15に格納する。 The appearance number calculation unit 12 calculates the number of appearances of the k-length sub-character string and the character immediately before the k-length sub-character string for the converted target character string. The appearance number calculation unit 12 calculates the number of appearances of the 0, 1, ..., K long sub-character string and the character immediately before the k-long sub-character string for the converted reference character string. The experience information amount calculation unit 13 calculates the 0, 1, ..., Kth-order experience KL information amount based on the number of appearances of the converted reference character string, and stores the experience information amount storage unit 15.

距離算出部14は、変換済みの対象文字列の出現数と、経験情報量格納部15に格納された経験情報量とを基にk次経験交差エントロピーを計算し、対象文字列または文字列リストと、参照元である参照文字列または文字列リストとの距離として出力する。k次経験交差エントロピーは、変換部11が変換した計測対象の文字列におけるk長部分文字列と該部分文字列の直前に出現する文字とを結合した結合部分文字列の出現率である第1の出現率と、変換部11が変換した参照元の文字列における直後がk長部分文字列であると判明している文字cの出現率である第2の出現率の対数である経験情報量と、の乗算値の総和である。距離算出部14は、変換部11が変換した参照元データ列の中に結合部分データ列が含まれていない場合、次数kを、変換部11が変換した参照元データ列の中に結合部分データ列が出現する次数まで下げる。 The distance calculation unit 14 calculates the k-th-order experience cross entropy based on the number of occurrences of the converted target character string and the amount of experience information stored in the experience information amount storage unit 15, and calculates the k-order experience cross entropy, and the target character string or character string list And output as the distance from the reference character string or character string list that is the reference source. The k-th-order experience cross entropy is the first appearance rate of the combined substring that combines the k-length substring and the character that appears immediately before the substring in the character string to be measured converted by the conversion unit 11. The amount of experience information that is the logarithm of the second appearance rate, which is the appearance rate of the character c, which is the appearance rate of the character c, which is known to be the k-length substring immediately after the character string of the reference source converted by the conversion unit 11. Is the sum of the multiplication values of and. When the combined sub data string is not included in the reference source data string converted by the conversion unit 11, the distance calculation unit 14 shifts the order k into the reference source data string converted by the conversion unit 11. Decrease to the order in which the column appears.

経験情報量格納部15は、経験情報量算出部13が算出した経験情報量を記憶する。 The experience information amount storage unit 15 stores the experience information amount calculated by the experience information amount calculation unit 13.

[変換部の処理]
まず、変換部11の処理について説明する。変換部11は、計測対象の文字列または文字列リスト、及び、参照元の文字列または文字列リストに対して、k個の未使用の文字コードを区分文字列として入力して文字列または文字列リストを1つの文字列に変換する。
[Processing of conversion unit]
First, the processing of the conversion unit 11 will be described. The conversion unit 11 inputs k unused character codes as a division character string to the character string or character string list to be measured and the character string or character string list of the reference source, and character strings or characters. Converts a column list into a single string.

例えば、変換部11は、入力が文字列の場合には、先頭と末尾とに区分文字列を追加する。また、変換部11は、入力が文字列リストの場合には、先頭と末尾とに区分文字列を追加するとともにリスト間に区分文字列を挟み一つの文字列として連結する。 For example, when the input is a character string, the conversion unit 11 adds a division character string to the beginning and the end. Further, when the input is a character string list, the conversion unit 11 adds a division character string at the beginning and the end, sandwiches the division character string between the lists, and concatenates them as one character string.

[出現数算出部の処理]
次に、出現数算出部12の処理について説明する。出現数算出部12は、i長(0≦i≦k、iは整数)の部分文字列と該部分文字列の直前文字とを用いて、例えば、以下のように出現数を算出する。
[Processing of appearance number calculation unit]
Next, the processing of the appearance number calculation unit 12 will be described. The appearance number calculation unit 12 calculates the appearance number as follows, for example, by using the sub-character string of i length (0 ≦ i ≦ k, i is an integer) and the character immediately before the sub-character string.

まず、出現数算出部12は、文字列から先頭の(i+1)文字を取得する。そして、出現数算出部12は、取得した(i+1)文字を先頭1文字cと続く部分文字列siに分け、その出現数を変数N[si][c]に1を加算することによって記録する。次に、出現数算出部12は、1文字ずらして、(i+1)文字を取得し、同様に出現数Nを記録する。出現数算出部12は、この処理を、文字列の最後まで実行する。そして、出現数算出部12は、各部分文字列siの出現数N[si]=ΣcN[si][c]を算出する。 First, the appearance number calculation unit 12 acquires the first (i + 1) character from the character string. Then, the appearance number calculation unit 12 divides the acquired (i + 1) character into the first character c and the subsequent substring s i , and adds 1 to the variable N [s i ] [c]. Record by. Next, the appearance number calculation unit 12 shifts by one character, acquires the (i + 1) character, and similarly records the appearance number N. The appearance number calculation unit 12 executes this process until the end of the character string. Then, the appearance number calculation unit 12 calculates the appearance number N [s i ] = Σ c N [s i ] [c] of each substring s i .

なお、出現数算出部12は、i=0長の場合も、部分文字列siを空文字列“”と対応させることによって、同様の算出処理を実行することが可能である。以下、変換済対象文字列に関する出現数(配列)をNpとし、変換済参照文字列に関する出現数(配列)をNqとする。出現数算出部12は、対象文字列出現数Npを、k長について算出し、参照文字列出現数Nqを、0, 1,…,k長について算出する。 Even when i = 0 length, the appearance number calculation unit 12 can execute the same calculation process by associating the sub-character string s i with the empty character string “”. Hereinafter, the number of appearances (array) related to the converted target character string is Np, and the number of appearances (array) related to the converted reference character string is Nq. The appearance number calculation unit 12 calculates the target character string appearance number Np for the k length, and calculates the reference character string appearance number Nq for 0, 1, ..., K length.

[経験情報量算出部の処理]
次に、経験情報量算出部13の処理について説明する。経験情報量算出部13は、参照文字列出現数Nqに基づき、0〜k次までの全ての経験情報量を算出する。経験情報量算出部13は、i次(0≦i≦k、iは整数)の経験情報量I[c+si]を、以下の(12)式を用いて、算出する。なお、(12)式は、(5−2)式に基づく。
[Processing of experience information amount calculation unit]
Next, the processing of the experience information amount calculation unit 13 will be described. The experience information amount calculation unit 13 calculates all the experience information amounts from the 0th to the kth order based on the reference character string appearance number Nq. The experience information amount calculation unit 13 calculates the experience information amount I [c + s i ] of the i- th order (0 ≦ i ≦ k, i is an integer) using the following equation (12). Equation (12) is based on Equation (5-2).

Figure 0006783741
Figure 0006783741

経験情報量算出部13は、このi次の経験情報量I[c+si]について、文字列c+siをキーとして経験情報量格納部15に格納する。経験情報量算出部13は、0次の場合もsiを空文字に対応させることによって、同様にi次の経験情報量I[c+si]の算出及び格納を行うことができる。 The experience information amount calculation unit 13 stores the i-order experience information amount I [c + s i ] in the experience information amount storage unit 15 using the character string c + s i as a key. The experience information amount calculation unit 13 can similarly calculate and store the i-order experience information amount I [c + s i ] by making s i correspond to an empty string even in the case of the 0th order.

[距離算出部の処理]
次に、距離算出部14の処理について説明する。距離算出部14は、k次経験交差エントロピーを、計測対象の文字列または文字列リストと、参照元の文字列または文字列リストとの間の距離として算出する。この実施の形態1では、距離算出部14は、対象文字列の出現数と経験情報量とに基づき、k次経験KL情報量を算出し、距離として出力する。
[Processing of distance calculation unit]
Next, the processing of the distance calculation unit 14 will be described. The distance calculation unit 14 calculates the k-th-order experience cross entropy as the distance between the character string or character string list to be measured and the character string or character string list of the reference source. In the first embodiment, the distance calculation unit 14 calculates the k-th experience KL information amount based on the number of appearances of the target character string and the experience information amount, and outputs it as a distance.

まず、距離算出部14は、変換済みの対象文字列の部分文字列c+s(cは直前文字、sはk長部分文字列)について、以下の(13)式のように、値dを算出する。なお、cは、直前文字であり、sは、k長部分文字列である。なお、値dは、(6)式におけるp(c,s)×logq(c|s)に該当する。 First, the distance calculation unit 14 sets the value d for the substring c + s (c is the immediately preceding character and s is the k-length substring) of the converted target character string as shown in the following equation (13). calculate. Note that c is the immediately preceding character and s is the k-length substring. The value d corresponds to p (c, s) × logq (c | s) in Eq. (6).

Figure 0006783741
Figure 0006783741

ここで、(13)式において、Npは、前述したように変換済みの対象文字列における出現数であり、Iは、経験情報量格納部15から取得される経験情報量である。また、|TP|は、変換済み対象文字列から区分文字列を取り除いた文字長である。 Here, in the equation (13), Np is the number of occurrences in the converted target character string as described above, and I is the amount of experience information acquired from the experience information amount storage unit 15. | T P | is the character length obtained by removing the division character string from the converted target character string.

(6)式より、全ての部分文字列について算出した値dの総和は、k次経験KL情報量である。このため、距離算出部14は、この値dを全ての部分文字列で算出する。そして、距離算出部14は、算出した値dを全て総和したものをk次経験KL情報量として求め、求めたk次経験KL情報量を距離として出力する。 The sum of the values d calculated for all the substrings from Eq. (6) is the kth-order experience KL information amount. Therefore, the distance calculation unit 14 calculates this value d with all the sub-character strings. Then, the distance calculation unit 14 obtains the sum of all the calculated values d as the k-th experience KL information amount, and outputs the obtained k-th experience KL information amount as the distance.

[経験情報量格納部の構成]
次に、経験情報量格納部15の構成について説明する。経験情報量格納部15は、文字列をインデックスとして、文字列に対応する経験情報量を収めたデータ構造として構成される。経験情報量格納部15は、文字列をキーに問い合わせがあると、問い合わせ対象の文字列とインデックスとの前方一致を行い、文字列長が最長となるインデックスに対応する情報量を、問い合わせ元に返却する。
[Structure of experience information storage unit]
Next, the configuration of the experience information amount storage unit 15 will be described. The experience information amount storage unit 15 is configured as a data structure containing the amount of experience information corresponding to the character string, using the character string as an index. When an inquiry is made using a character string as a key, the experience information amount storage unit 15 performs a prefix match between the character string to be inquired and the index, and sends the amount of information corresponding to the index having the longest character string length to the inquiry source. return.

経験情報量格納部15のデータ構造は、例えば、トライ木アルゴリズムを利用して構成できる。トライ木アルゴリズムは登録したインデックス数Nについて、検索時の平均計算量は、O(logN)であることが知られており、高速に検索を行える。 The data structure of the empirical information amount storage unit 15 can be configured by using, for example, a tri-tree algorithm. The tri-tree algorithm is known to have an average calculation amount of O (logN) for the registered index number N, and can perform a high-speed search.

経験情報量格納部15は、問い合わせがあったキーがインデックスと、全く、前方一致しない場合、事前設定等で定められた方法に基づき、値を、問い合わせ元に返却する。例えば、経験情報量格納部15は、規定値(0以上の値)を返却する。また、例えば、経験情報量格納部15は、log|TQ|を返却する。|TQ|は、変換済み参照文字列から区分文字列を取り除いた文字長である。もちろん、経験情報量格納部15は、他の方法を用いて値を返却してもよい。 If the inquired key does not match the index at all, the experience information amount storage unit 15 returns the value to the inquiring source based on the method determined by the preset or the like. For example, the experience information amount storage unit 15 returns a specified value (value of 0 or more). Further, for example, the experience information amount storage unit 15 returns log | T Q |. | T Q | is the character length obtained by removing the partition character string from the converted reference character string. Of course, the experience information amount storage unit 15 may return the value by using another method.

[距離測定方法の処理手順]
次に、距離測定装置10が実行する距離測定方法について説明する。図2は、図1に示す距離測定装置10が実行する距離測定方法の処理手順を示すフローチャートである。
[Processing procedure of distance measurement method]
Next, the distance measuring method executed by the distance measuring device 10 will be described. FIG. 2 is a flowchart showing a processing procedure of the distance measuring method executed by the distance measuring device 10 shown in FIG.

距離測定装置10では、まず、変換部11が、入力を受付けた対象文字列または文字列リストと、参照文字列または文字列リストとのそれぞれについて、距離測定に適した文字列へと変換する変換処理を行う(ステップS11)。変換部11は、先頭、リスト間、末尾にk長区分文字列を挿入し、リスト間に区分文字列を挟み一つの文字列として連結することによって変換済対象文字列及び変換済参照文字列を生成する。 In the distance measuring device 10, first, the conversion unit 11 converts each of the target character string or character string list that has received the input and the reference character string or character string list into a character string suitable for distance measurement. Perform the process (step S11). The conversion unit 11 inserts a k-length division character string at the beginning, between lists, and at the end, sandwiches the division character string between the lists, and concatenates them as one character string to convert the converted target character string and the converted reference character string. Generate.

そして、出現数算出部12は、変換済対象文字列に対して、k長部分文字列と該k長部分文字列の直前の文字との出現数を算出し、変換済参照文字列に対して、0,1,…,k長部分文字列と該k長部分文字列の直前の文字との出現数を算出する出現数算出処理を行う(ステップS12)。 Then, the appearance number calculation unit 12 calculates the number of appearances of the k-length sub-character string and the character immediately before the k-length sub-character string with respect to the converted target character string, and with respect to the converted reference character string. , 0,1, ..., Performs the appearance number calculation process for calculating the number of appearances of the k-length sub-character string and the character immediately before the k-length sub-character string (step S12).

続いて、経験情報量算出部13は、変換済参照文字列の出現数に基づき、0〜k次までの全ての経験情報量を算出し、経験情報量格納部15へ格納する経験情報量算出処理を行う(ステップS13)。 Subsequently, the experience information amount calculation unit 13 calculates all the experience information amounts from the 0th to the kth order based on the number of appearances of the converted reference character string, and calculates the experience information amount to be stored in the experience information amount storage unit 15. Perform the process (step S13).

そして、距離算出部14は、変換済対象文字列の出現数と、経験情報量格納部15に格納された経験情報量と、に基づき、距離等を算出する距離算出処理を行う(ステップS14)。なお、距離測定装置10は、参照文字列または文字列リストに対する変換処理、出現数算出処理及び経験情報量算出処理を、参照文字列または文字列リストの入力を受け付けた際に実行すれば足りる。 Then, the distance calculation unit 14 performs a distance calculation process for calculating a distance or the like based on the number of appearances of the converted target character string and the amount of experience information stored in the experience information amount storage unit 15 (step S14). .. It is sufficient that the distance measuring device 10 executes the conversion process for the reference character string or the character string list, the appearance number calculation process, and the experience information amount calculation process when the input of the reference character string or the character string list is received.

[本実施の形態1の効果]
本実施の形態では、文字の連なりを考慮したk次経験交差エントロピーを、文字列間または文字列リスト間の距離として算出している。k次経験交差エントロピーは、変換部11が変換した計測対象の文字列におけるk長部分文字列と該部分文字列の直前に出現する文字とを結合した結合部分文字列の出現率である第1の出現率と、変換部11が変換した参照元の文字列における直後がk長部分文字列であると判明している文字cの出現率である第2の出現率の対数である経験情報量と、の乗算値の総和である。
[Effect of Embodiment 1]
In the present embodiment, the k-th-order empirical cross entropy considering the sequence of characters is calculated as the distance between character strings or between character string lists. The k-th-order experience cross entropy is the first appearance rate of the combined substring that combines the k-length substring and the character that appears immediately before the substring in the character string to be measured converted by the conversion unit 11. The amount of experience information that is the logarithm of the second appearance rate, which is the appearance rate of the character c, which is the appearance rate of the character c, which is known to be the k-length substring immediately after the character string of the reference source converted by the conversion unit 11. Is the sum of the multiplication values of and.

例えば、文字列m個のリストと文字列n個の文字列リストについて、文字列リスト間の距離を求めるために、文字列リスト間の各文字列同士を組合せてその距離を測り、それらの距離に対して、(平均等の)処理を行う方法がある。ただし、この方法では、少なくとも(m×n)回の距離計算が必要であり、計算量はO(N2)と大きくなる。これに対し、本実施の形態1では、経験情報量としたリスト部分はlogのオーダで済むため、その計算量がO(NlogN)となり、前述の手法による計算量O(N2)よりも格段に少なくなる。したがって、本実施の形態によれば、文字列または文字列リスト間同士の距離を、効率的に求めることができる。 For example, for a list of m character strings and a list of n character strings, in order to obtain the distance between the character string lists, each character string between the character string lists is combined and measured, and the distance between them is measured. There is a method of processing (such as averaging). However, this method requires at least (m × n) distance calculations, and the amount of calculation is as large as O (N 2 ). On the other hand, in the first embodiment, since the list part as the empirical information amount can be ordered by log, the calculation amount is O (NlogN), which is much larger than the calculation amount O (N 2 ) by the above-mentioned method. To less. Therefore, according to the present embodiment, the distance between the character strings or the character string lists can be efficiently obtained.

また、本実施の形態1では、確率モデルを使用せずにk次経験交差エントロピーを算出するため、文字の連なりに関する確率モデルを事前に決定せずとも、対象文字列と参照文字列との距離を算出することが可能である。 Further, in the first embodiment, since the k-th empirical cross entropy is calculated without using the probability model, the distance between the target character string and the reference character string does not need to be determined in advance for the probability model regarding the sequence of characters. Can be calculated.

また、本実施の形態1では、距離算出前に、対象文字列または文字列リストと、参照元である参照文字列または文字列リストとを、距離測定に適した一つの連結した文字列へと変換し、k次経験交差エントロピーの算出を適切に実行できる。 Further, in the first embodiment, before the distance calculation, the target character string or the character string list and the reference character string or the character string list which is the reference source are combined into one concatenated character string suitable for the distance measurement. It can be transformed and the calculation of k-th empirical cross entropy can be performed appropriately.

[実施の形態2]
次に、実施の形態2について説明する。実施の形態2では、図1に示す距離測定装置10と同様の機能を有する距離測定部10´を用い、通信ログから悪性通信を検出する通信システムについて説明する。
[Embodiment 2]
Next, the second embodiment will be described. In the second embodiment, a communication system for detecting malignant communication from a communication log will be described using a distance measuring unit 10'having the same function as the distance measuring device 10 shown in FIG.

[通信システムの構成]
図3は、実施の形態2に係る通信システムの構成の一例を示す図である。図3に示すように、実施の形態2に係る通信システム201は、悪性距離測定装置210と、検出装置220とを有する。
[Communication system configuration]
FIG. 3 is a diagram showing an example of the configuration of the communication system according to the second embodiment. As shown in FIG. 3, the communication system 201 according to the second embodiment has a malignant distance measuring device 210 and a detecting device 220.

悪性距離測定装置210は、図1に示す距離測定装置10と同様の機能を有する距離測定部10´を有する。悪性距離測定装置210は、悪性通信ログを教師データとして学習し、学習した悪性ログと、検出対象データである通信ログとの距離である悪性距離を算出する。 The malignant distance measuring device 210 has a distance measuring unit 10'having the same function as the distance measuring device 10 shown in FIG. The malignant distance measuring device 210 learns the malignant communication log as teacher data, and calculates the malignant distance which is the distance between the learned malignant log and the communication log which is the detection target data.

検出装置220は、悪性距離測定装置210が算出した悪性距離が、所定の距離以下の場合、距離測定対象の通信ログに悪性通信が含まれることを検出する。なお、図3では、悪性距離測定装置210と検出装置220とを別の装置として示すが、もちろん、悪性距離測定装置210と検出装置220との機能が同一の装置に備わっていてもよい。 When the malignant distance calculated by the malignant distance measuring device 210 is equal to or less than a predetermined distance, the detection device 220 detects that the malignant communication is included in the communication log of the distance measurement target. Although the malignant distance measuring device 210 and the detecting device 220 are shown as separate devices in FIG. 3, of course, the same device may be provided with the functions of the malignant distance measuring device 210 and the detecting device 220.

[悪性距離測定装置の構成]
次に、悪性距離測定装置210について説明する。図3に示すように、悪性距離測定装置210は、距離測定部10´、学習部211及び推論部212を有する。
[Configuration of malignant distance measuring device]
Next, the malignant distance measuring device 210 will be described. As shown in FIG. 3, the malignant distance measuring device 210 has a distance measuring unit 10', a learning unit 211, and an inference unit 212.

学習部211は、距離測定部10´に、悪性通信ログ及び良性通信ログを教師データとして学習させ、良性通信ログ及び悪性通信ログの経験情報量を、参照元の文字列または文字列リストの経験情報量として、経験情報量格納部15に蓄積する。 The learning unit 211 causes the distance measuring unit 10'to learn the malignant communication log and the benign communication log as teacher data, and obtains the amount of experience information of the benign communication log and the malignant communication log as the experience of the character string or the character string list of the reference source. As the amount of information, it is stored in the experience information amount storage unit 15.

推論部212は、距離測定部10´に、良性通信ログ及び悪性通信ログの経験情報量を基に、検出対象の通信ログと、教師データである悪性通信ログとの距離を算出させる。推論部212は、経験情報量格納部15に蓄積された悪性ログの経験情報量と、検出対象の通信ログにおけるk長部分文字列及び該k長部分文字列の直前の文字との出現数と、を基に、距離測定部10´に悪性距離を算出させる。なお、次数kは、事前に設定される。 The inference unit 212 causes the distance measurement unit 10'to calculate the distance between the communication log to be detected and the malignant communication log, which is the teacher data, based on the amount of experience information of the benign communication log and the malignant communication log. The inference unit 212 determines the amount of experience information of the malignant log stored in the experience information amount storage unit 15, and the number of occurrences of the k-long partial character string and the character immediately before the k-long partial character string in the communication log to be detected. , And let the distance measuring unit 10'calculate the malignant distance. The order k is set in advance.

[学習部の処理]
次に、学習部211の処理について説明する。学習部211は、教師データである悪性通信ログ及び良性通信ログの入力を受け付ける。ここで、通信ログは、その1行を文字列リストの1リストとして取り扱う。
[Processing of learning department]
Next, the processing of the learning unit 211 will be described. The learning unit 211 accepts the input of the malignant communication log and the benign communication log which are teacher data. Here, the communication log treats one line as one list of the character string list.

まず、学習部211は、各教師データに対して、適宜、不要文字列の削除やログ形式の統一等の整形等の前処理を行う。学習部211は、不要文字列削除として、例えば、多数回出現する同一ログ行の削減等を行ってもよい。学習部211は、実施の形態1と同様に、距離測定部10´に、前処理済みの教師データを参照元の文字列リストとして処理させ、そのk次経験情報量を経験情報量格納部15に格納させる。 First, the learning unit 211 performs preprocessing such as deletion of unnecessary character strings and unification of log formats for each teacher data as appropriate. The learning unit 211 may, for example, reduce the same log line that appears many times as unnecessary character string deletion. Similar to the first embodiment, the learning unit 211 causes the distance measuring unit 10'to process the preprocessed teacher data as a character string list of the reference source, and stores the kth-order experience information amount as the experience information amount storage unit 15. To store in.

[推論部の処理]
次に、推論部212の処理について説明する。推論部212は、検出対象データである通信ログに対して、学習部211と同様に、前処理を実施する。
[Processing of inference part]
Next, the processing of the inference unit 212 will be described. The inference unit 212 performs preprocessing on the communication log, which is the data to be detected, in the same manner as the learning unit 211.

続いて、推論部212は、前所済みの検出対象データの通信ログから、教師データとして与えた良性通信ログと類似するログを除去する。例えば、推論部212は、単純に良性通信先ドメインと同一のログを、良性通信ログと類似するログであると判定してもよい。また、推論部212は、距離測定部10´に、実施の形態1と同様の処理を実行させ、検出対象データである通信ログと、教師データである良性通信ログとの距離を測定させ、測定距離が所定以下のものを、良性通信ログと類似するログであると判定してもよい。 Subsequently, the inference unit 212 removes a log similar to the benign communication log given as the teacher data from the communication log of the previously detected detection target data. For example, the inference unit 212 may simply determine that the same log as the benign communication destination domain is a log similar to the benign communication log. Further, the inference unit 212 causes the distance measurement unit 10'to execute the same processing as in the first embodiment to measure the distance between the communication log which is the detection target data and the benign communication log which is the teacher data, and measures the distance. A log having a distance of a predetermined distance or less may be determined to be a log similar to a benign communication log.

推論部212は、距離測定部10´に、良性通信ログを除去した検出対象データである通信ログと、教師データである悪性通信ログとの悪性距離を測定させる。この悪性距離は、距離測定部10´に、実施の形態1と同様の処理を実行させ、距離測定部10´の経験情報量格納部15に保存された経験情報量を用いて算出される。 The inference unit 212 causes the distance measurement unit 10'to measure the malignant distance between the communication log, which is the detection target data from which the benign communication log has been removed, and the malignant communication log, which is the teacher data. This malignant distance is calculated by having the distance measuring unit 10'perform the same processing as in the first embodiment and using the amount of experience information stored in the experience information amount storage unit 15 of the distance measuring unit 10'.

推論部212は、測定した悪性距離を検出装置220に出力する。検出装置220は、悪性距離測定装置210から出力された悪性距離が、所定の距離以下の場合に、検出対象データである通信ログに悪性通信が含まれることを検出する。 The inference unit 212 outputs the measured malignant distance to the detection device 220. When the malignant distance output from the malignant distance measuring device 210 is equal to or less than a predetermined distance, the detection device 220 detects that the malignant communication is included in the communication log which is the detection target data.

なお、推論部212は、検出対象データである通信ログを一括して推論する代わりに、検出対象データである通信ログを、送信元IPアドレス毎(端末毎)や単位時間毎等に応じて分割し、分割した通信ログごとに悪性距離を測定してよい。例えば、推論部212が、検出対象データである通信ログを端末毎に分割した場合、検出装置220は、悪性距離が所定以下だった端末をマルウェア感染端末として検出することができる。 The inference unit 212 divides the communication log, which is the detection target data, according to the source IP address (each terminal), each unit time, etc., instead of inferring the communication log which is the detection target data in a batch. Then, the malignant distance may be measured for each divided communication log. For example, when the inference unit 212 divides the communication log, which is the detection target data, for each terminal, the detection device 220 can detect the terminal whose malignant distance is equal to or less than a predetermined value as a malware-infected terminal.

[学習処理の処理手順]
次に、悪性距離測定装置210における学習処理の処理手順について説明する。図4は、図3に示す悪性距離測定装置210における学習処理の処理手順を示すフローチャートである。
[Processing procedure of learning process]
Next, the processing procedure of the learning process in the malignant distance measuring device 210 will be described. FIG. 4 is a flowchart showing a processing procedure of the learning process in the malignant distance measuring device 210 shown in FIG.

悪性距離測定装置210では、まず、学習部211が、入力を受け付けた各教師データに対し、不要文字列の削除やログ形式の統一等の整形等の前処理を行う(ステップS21)。そして、学習部211は、距離測定部10´に、各教師データ別に経験情報量を算出させ、経験情報量格納部15へ格納させる経験情報量算出処理を行う(ステップS22)。 In the malignant distance measuring device 210, first, the learning unit 211 performs preprocessing such as deletion of unnecessary character strings and unification of log formats for each teacher data that has received input (step S21). Then, the learning unit 211 causes the distance measurement unit 10'to calculate the amount of experience information for each teacher data, and performs the experience information amount calculation process to be stored in the experience information amount storage unit 15 (step S22).

[推論処理の処理手順]
次に、悪性距離測定装置210における推論処理の処理手順について説明する。図5は、図3に示す悪性距離測定装置210における推論理の処理手順を示すフローチャートである。
[Processing procedure for inference processing]
Next, the processing procedure of the inference processing in the malignant distance measuring device 210 will be described. FIG. 5 is a flowchart showing a processing procedure of inference logic in the malignant distance measuring device 210 shown in FIG.

推論処理では、推論部212が、検出対象データである通信ログに対し、不要文字列削除、形式整形及び分割等の前処理を実施する(ステップS23)。そして、推論部212は、検出対象データである通信ログから、教師データである良性通信ログと類似するログを除去する除去処理を行う(ステップS24)。 In the inference process, the inference unit 212 performs preprocessing such as unnecessary character string deletion, format shaping, and division on the communication log which is the detection target data (step S23). Then, the inference unit 212 performs a removal process of removing a log similar to the benign communication log which is the teacher data from the communication log which is the detection target data (step S24).

続いて、推論部212は、距離測定部10´に、良性通信ログを除去した検出対象データである通信ログと、教師データである悪性通信ログとの悪性距離を測定させる距離測定処理を行い(ステップS25)、測定した悪性距離を検出装置220に出力する。 Subsequently, the inference unit 212 performs a distance measurement process for causing the distance measurement unit 10'to measure the malignant distance between the communication log, which is the detection target data from which the benign communication log has been removed, and the malignant communication log, which is the teacher data. Step S25), the measured malignant distance is output to the detection device 220.

[検出処理の処理手順]
次に、検出装置220における検出処理の処理手順について説明する。図6は、図3に示す検出装置220における検出処理の処理手順を示すフローチャートである。
[Processing procedure for detection processing]
Next, the processing procedure of the detection process in the detection device 220 will be described. FIG. 6 is a flowchart showing a processing procedure of the detection process in the detection device 220 shown in FIG.

図6に示すように、まず、検出装置220は、悪性距離測定装置210による悪性距離の入力を受け付ける(ステップS26)。そして、検出装置220は、悪性距離が、所定の距離以下の場合に、検出対象データである通信ログに悪性通信が含まれることを検出する検出処理を行い(ステップS27)、悪性通信が含まれる通信ログを示す検出結果を対処装置等に出力する。 As shown in FIG. 6, first, the detection device 220 receives the input of the malignant distance by the malignant distance measuring device 210 (step S26). Then, when the malignant distance is equal to or less than a predetermined distance, the detection device 220 performs a detection process for detecting that the malignant communication is included in the communication log which is the detection target data (step S27), and the malignant communication is included. The detection result showing the communication log is output to the coping device.

[実施の形態2の効果]
このように、実施の形態2の通信システム201によれば、ブラックリストと、対象の通信ログとを1件ずつ個別に比較するのに対し、マルウェアの通信をひとまとめにして比較できることから、比較処理の高速化および検知精度の向上を図ることができるという効果を奏する。
[Effect of Embodiment 2]
As described above, according to the communication system 201 of the second embodiment, the blacklist and the target communication log are individually compared one by one, whereas the malware communication can be compared collectively, so that the comparison process is performed. It has the effect of increasing the speed and improving the detection accuracy.

[実施の形態3]
次に、実施の形態3について説明する。実施の形態3では、距離測定部10´を用い、通信ログに含まれる悪性通信の原因のマルウェアを判定する通信システムについて説明する。
[Embodiment 3]
Next, the third embodiment will be described. In the third embodiment, a communication system for determining the malware that causes the malicious communication included in the communication log will be described using the distance measuring unit 10'.

[通信システムの構成]
図7は、実施の形態3に係る通信システムの構成の一例を示す図である。図7に示すように、実施の形態3に係る通信システム301は、マルウェア種別距離測定装置310と、判定装置320とを有する。
[Communication system configuration]
FIG. 7 is a diagram showing an example of the configuration of the communication system according to the third embodiment. As shown in FIG. 7, the communication system 301 according to the third embodiment includes a malware type distance measuring device 310 and a determining device 320.

マルウェア種別距離測定装置310は、距離測定部10´を有する。マルウェア種別距離測定装置310は、マルウェア種別ごとの悪性通信ログを教師データとして学習し、学習したマルウェア種別ごとの悪性通信ログと、検出対象データである通信ログとの距離であるマルウェア距離を算出する。 The malware type distance measuring device 310 has a distance measuring unit 10'. The malware type distance measuring device 310 learns the malicious communication log for each malware type as teacher data, and calculates the malware distance which is the distance between the learned malicious communication log for each malware type and the communication log which is the detection target data. ..

判定装置320は、マルウェア種別距離測定装置310が算出したマルウェア距離が最も短い距離に対応するマルウェア種別を、検出対象の通信ログの悪性通信のマルウェアとして判定する。なお、図7では、マルウェア種別距離測定装置310と判定装置320とを別の装置として示すが、もちろん、マルウェア種別距離測定装置310と判定装置320との機能が同一の装置に備わっていてもよい。 The determination device 320 determines the malware type corresponding to the distance with the shortest malware distance calculated by the malware type distance measuring device 310 as the malware for malicious communication in the communication log to be detected. In FIG. 7, the malware type distance measuring device 310 and the determining device 320 are shown as separate devices, but of course, the same device may be provided with the functions of the malware type distance measuring device 310 and the determining device 320. ..

[マルウェア種別距離測定装置の構成]
次に、マルウェア種別距離測定装置310について説明する。図7に示すように、マルウェア種別距離測定装置310は、距離測定部10´、学習部311及び推論部312を有する。
[Malware type distance measuring device configuration]
Next, the malware type distance measuring device 310 will be described. As shown in FIG. 7, the malware type distance measuring device 310 includes a distance measuring unit 10', a learning unit 311 and an inference unit 312.

学習部311は、距離測定部10´に、マルウェア種別ごとに分別された悪性通信ログを教師データとして学習させ、マルウェア種別ごとに求めさせた経験情報量を、参照元の文字列または文字列リストの経験情報量として経験情報量格納部15に蓄積する。 The learning unit 311 causes the distance measuring unit 10'to learn the malignant communication log sorted for each malware type as teacher data, and obtains the amount of experience information obtained for each malware type as a reference source character string or character string list. The amount of experience information is stored in the experience information amount storage unit 15.

推論部312は、距離測定部10´に、検出対象データである通信ログと、教師データとして学習された各マルウェア種別の悪性通信ログとの距離であるマルウェア距離を算出させる。推論部312は、距離測定部10に、経験情報量格納部15に蓄積されたマルウェア種別ごとの悪性ログの経験情報量と、検出対象の通信ログにおけるk長部分文字列及び該k長部分文字列の直前の文字の出現数と、を基に、マルウェア距離をマルウェア種別毎に算出させる。なお、次数kは、事前に設定される。 The inference unit 312 causes the distance measurement unit 10'to calculate the malware distance, which is the distance between the communication log, which is the detection target data, and the malicious communication log of each malware type learned as the teacher data. The inference unit 312 stores the experience information amount of the malicious log for each malware type stored in the experience information amount storage unit 15 in the distance measurement unit 10, the k-length partial character string in the communication log to be detected, and the k-length partial character. Based on the number of appearances of the character immediately before the column, the malware distance is calculated for each malware type. The order k is set in advance.

[学習部の処理]
次に、学習部311の処理について説明する。学習部311は、教師データであるマルウェア種別ごとに分別された悪性通信ログの入力を受け付ける。ここで、通信ログは、その1行を文字列リストの1リストとして取り扱う。
[Processing of learning department]
Next, the processing of the learning unit 311 will be described. The learning unit 311 accepts the input of the malicious communication log sorted according to the malware type which is the teacher data. Here, the communication log treats one line as one list of the character string list.

まず、学習部311は、学習部211と同様に、各教師データに対して、適宜、不要文字列の削除やログ形式の統一等の整形等の前処理を行う。学習部311は、不要文字列削除として、例えば、多数回出現する同一ログ行の削減等を行ってもよい。学習部311は、距離測定部10´に、実施の形態1と同様の処理を実行させ、前処理済みの教師データを参照元の文字列リストとして処理させ、そのk次経験情報量を経験情報量格納部15に格納させる。k次経験情報量は、マルウェア種別毎に経験情報量格納部15に蓄積される。 First, the learning unit 311 performs preprocessing such as deletion of unnecessary character strings and unification of the log format for each teacher data, as in the case of the learning unit 211. The learning unit 311 may delete unnecessary character strings, for example, reduce the same log line that appears many times. The learning unit 311 causes the distance measuring unit 10'to execute the same processing as in the first embodiment, processes the preprocessed teacher data as a character string list of the reference source, and processes the kth-order experience information amount as the experience information. It is stored in the quantity storage unit 15. The k-order experience information amount is accumulated in the experience information amount storage unit 15 for each malware type.

[推論部の処理]
次に、推論部312の処理について説明する。推論部312は、検出対象データである通信ログに対して、学習部311と同様に、前処理を実施する。
[Processing of inference part]
Next, the processing of the inference unit 312 will be described. The inference unit 312 performs preprocessing on the communication log, which is the detection target data, in the same manner as the learning unit 311.

続いて、推論部312は、距離測定部10´に、実施の形態1と同様の処理を実行させ、経験情報量格納部15に蓄積されたマルウェア種別毎の経験情報量を基に、検出対象データである通信ログと各マルウェア種別の悪性通信ログとのマルウェア距離を、マルウェア種別毎に算出させる。推論部312は、測定したマルウェア距離を判定装置320に出力する。 Subsequently, the inference unit 312 causes the distance measurement unit 10'to execute the same processing as in the first embodiment, and detects the detection target based on the amount of experience information for each malware type accumulated in the experience information amount storage unit 15. The malware distance between the communication log, which is data, and the malicious communication log of each malware type is calculated for each malware type. The inference unit 312 outputs the measured malware distance to the determination device 320.

[判定装置の処理]
判定装置320は、マルウェア種別距離測定装置210から出力されたマルウェア距離が最も短い距離に対応するマルウェア種別を、検出対象の通信ログの悪性通信のマルウェアとして判定する。判定装置320は、判定結果を対処装置等に出力する。判定装置320は、判定結果として、マルウェア種別名とともにその距離を出力してもよいし、距離が近い順または特定距離内のマルウェア種別名を複数件出力してもよい。
[Processing of judgment device]
The determination device 320 determines the malware type corresponding to the distance with the shortest malware distance output from the malware type distance measuring device 210 as the malware for malicious communication in the communication log to be detected. The determination device 320 outputs the determination result to the coping device or the like. As a determination result, the determination device 320 may output the distance together with the malware type name, or may output a plurality of malware type names in order of proximity or within a specific distance.

[学習処理の処理手順]
次に、マルウェア種別距離測定装置310における学習処理の処理手順について説明する。図8は、図7に示すマルウェア種別距離測定装置310における学習処理の処理手順を示すフローチャートである。
[Processing procedure of learning process]
Next, the processing procedure of the learning process in the malware type distance measuring device 310 will be described. FIG. 8 is a flowchart showing a processing procedure of the learning process in the malware type distance measuring device 310 shown in FIG. 7.

マルウェア種別距離測定装置310では、まず、学習部311が、入力を受け付けた各教師データに対し、不要文字列の削除やログ形式の統一等の整形等の前処理を行う(ステップS31)。そして、学習部311は、距離測定部10´に、マルウェア種別ごとに、教師データに対する経験情報量を算出させ、マルウェア種別毎に経験情報量を経験情報量格納部15へ格納させる経験情報量算出処理を行う(ステップS32)。 In the malware type distance measuring device 310, first, the learning unit 311 performs preprocessing such as deletion of unnecessary character strings and unification of log formats for each teacher data that has received input (step S31). Then, the learning unit 311 causes the distance measurement unit 10'to calculate the amount of experience information for the teacher data for each malware type, and stores the amount of experience information for each type of malware in the experience information amount storage unit 15. Process (step S32).

[推論処理の処理手順]
次に、マルウェア種別距離測定装置310における推論処理の処理手順について説明する。図9は、図7に示すマルウェア種別距離測定装置310における推論理の処理手順を示すフローチャートである。
[Processing procedure for inference processing]
Next, the processing procedure of the inference processing in the malware type distance measuring device 310 will be described. FIG. 9 is a flowchart showing a processing procedure of inference logic in the malware type distance measuring device 310 shown in FIG. 7.

推論処理では、推論部312が、検出対象データである通信ログに対し、不要文字列削除、形式整形及び分割等の前処理を実施する(ステップS33)。続いて、推論部312は、距離測定部10´に、検出対象データである通信ログと、教師データとして学習された各マルウェア種別の悪性通信ログとのマルウェア距離をマルウェア毎に測定させる距離測定処理を行い(ステップS34)、測定したマルウェア距離を判定装置320に出力する。 In the inference process, the inference unit 312 performs preprocessing such as deletion of unnecessary character strings, formatting, and division of the communication log which is the data to be detected (step S33). Subsequently, the inference unit 312 causes the distance measurement unit 10'to measure the malware distance between the communication log, which is the detection target data, and the malignant communication log of each malware type learned as the teacher data for each malware. (Step S34), and the measured malware distance is output to the determination device 320.

[判定処理の処理手順]
次に、判定装置320における判定処理の処理手順について説明する。図10は、図7に示す判定装置320における検出処理の処理手順を示すフローチャートである。
[Judgment processing procedure]
Next, the processing procedure of the determination process in the determination device 320 will be described. FIG. 10 is a flowchart showing a processing procedure of the detection process in the determination device 320 shown in FIG.

図10に示すように、まず、判定装置320は、マルウェア種別距離測定装置310によるマルウェア距離の入力を受け付ける(ステップS35)。そして、判定装置320は、マルウェア距離が、マルウェア種別距離測定装置310から出力されたマルウェア距離が最も短い距離に対応するマルウェア種別を、検出対象の通信ログの悪性通信のマルウェアとして判定する判定処理を行い(ステップS36)、判定結果を対処装置等に出力する。 As shown in FIG. 10, first, the determination device 320 receives the input of the malware distance by the malware type distance measuring device 310 (step S35). Then, the determination device 320 determines the malware type corresponding to the distance with the shortest malware distance output from the malware type distance measuring device 310 as the malware of the malicious communication of the communication log to be detected. Perform (step S36), and output the determination result to the coping device or the like.

[実施の形態3の効果]
マルウェアの多くは、特定の複数回通信を行うことが多い。そこで、実施の形態3で説明したように、複数回通信の効率的な比較処理によって、マルウェア種別判定の判定精度向上を図ることができる。また、実施の形態3によれば、未知のマルウェアの通信であっても、その類似の通信のものを判定及び出力することが可能であり、その亜種マルウェアとして分析及び対策を実施することも可能となる。
[Effect of Embodiment 3]
Most malware often communicates multiple times. Therefore, as described in the third embodiment, it is possible to improve the determination accuracy of the malware type determination by the efficient comparison processing of the multiple times communication. Further, according to the third embodiment, it is possible to determine and output similar communication even if the communication is unknown malware, and it is also possible to carry out analysis and countermeasures as a variant malware thereof. It will be possible.

[実施の形態4]
次に、実施の形態4について説明する。実施の形態4では、実施の形態1に係る距離測定部10´を用い、マルウェア種別ごとの悪性通信ログ間の距離を測定して、マルウェア種別ごとの悪性通信ログ間の距離を基にマルウェア関連マップまたは関連グラフ(系統樹)を生成する作成装置について説明する。
[Embodiment 4]
Next, the fourth embodiment will be described. In the fourth embodiment, the distance measuring unit 10'according to the first embodiment is used to measure the distance between the malicious communication logs for each malware type, and the malware-related is based on the distance between the malicious communication logs for each malware type. A device for generating a map or a related graph (phylogenetic tree) will be described.

[作成装置の構成]
図11は、実施の形態4に係る作成装置の構成の一例を示す図である。図11に示すように、実施の形態4に係る作成装置410は、マルウェア間距離測定部411、作成部412及び距離測定部10´を有する。
[Configuration of creation device]
FIG. 11 is a diagram showing an example of the configuration of the creating device according to the fourth embodiment. As shown in FIG. 11, the creation device 410 according to the fourth embodiment has an inter-malware distance measurement unit 411, a creation unit 412, and a distance measurement unit 10'.

マルウェア間距離測定部411は、距離測定部10´に、マルウェア種別ごとの悪性通信ログ間の距離をそれぞれ測定させ、測定させたマルウェア種別毎の通信ログ間の距離であるマルウェア間距離を、マルウェア間距離格納部415へ格納する。また、マルウェア間距離測定部411は、実施の形態2,3と同様に、マルウェア種別毎の悪性通信ログに対し、不要文字列削除、形式整形等の前処理を行ってから、種別毎の通信ログ間の距離の測定を行う。 The inter-malware distance measuring unit 411 causes the distance measuring unit 10'to measure the distance between the malicious communication logs for each malware type, and measures the distance between the malware, which is the distance between the measured communication logs for each malware type. It is stored in the distance storage unit 415. Further, the inter-malware distance measuring unit 411 performs preprocessing such as deleting unnecessary character strings and formatting the malicious communication log for each malware type, as in the second and third embodiments, and then communicates for each type. Measure the distance between logs.

作成部412は、マルウェア間距離格納部415に格納されたマルウェア間距離を用いて関連マップ、関連グラフを作成する。作成部412は、マルウェア間距離を用いて、マルウェア間の関係をマップ化したマルウェア関連マップ、または、マルウェア間を関連付けた関連グラフを作成する。 The creation unit 412 creates a related map and a related graph using the inter-malware distance stored in the inter-malware distance storage unit 415. The creation unit 412 uses the distance between malware to create a malware-related map that maps the relationship between malware, or a related graph that associates malware.

ここで、k次経験KL情報量について、一般的にKLk(P|Q)≠KLk(Q|P)であり、マルウェア間距離として二つの値が出現する。このため、作成部412では、k次経験KL情報量に対し、平均、最小値または最大値等の各種処理を行ってから、マルウェア間距離として用いる。または、k次経験JS情報量は、JSk(P|Q)=JSk(Q|P)であるため、作成部412は、このk次経験JS情報量をマルウェア間距離として用いてもよい。 Here, regarding the amount of k-th experience KL information, generally KL k (P | Q) ≠ KL k (Q | P), and two values appear as the distance between malware. For this reason, the creation unit 412 performs various processes such as an average, a minimum value, or a maximum value on the k-th experience KL information amount, and then uses it as the distance between malware. Alternatively, since the k-th experience JS information amount is JS k (P | Q) = JS k (Q | P), the creation unit 412 may use this k-th experience JS information amount as the distance between malware. ..

ここで、関連マップの作成には、距離を用いる手法として、多次元尺度構成法(MDS)、isomap等の手法が知られている。このため、作成部412は、MDS、isomap等の手法を用いて、関連マップを作成する。また、作成部412は、関連グラフについては、距離が近いもの同士から順に関連付けを行っていく、階層的クラスタリング手法を用いて、関連グラフを作成する。 Here, methods such as multidimensional scaling (MDS) and isomap are known as methods using distance for creating related maps. Therefore, the creation unit 412 creates a related map by using a method such as MDS or isomap. In addition, the creation unit 412 creates a relational graph by using a hierarchical clustering method in which the relational graphs are associated with each other in order from the one having the closest distance.

[作成処理の処理手順]
次に、作成装置410が実行する作成処理の処理手順について説明する。図12は、図11に示す作成装置410が実行する作成処理の処理手順を示すフローチャートである。
[Processing procedure of creation process]
Next, the processing procedure of the creation process executed by the creation device 410 will be described. FIG. 12 is a flowchart showing a processing procedure of the creation process executed by the creation device 410 shown in FIG.

図12に示すように、作成装置10は、マルウェア間距離測定部411が、各通信ログに対する不要文字列削除、形式整形等の前処理を行う(ステップS51)。続いて、マルウェア間距離測定部411は、距離測定部10´に、マルウェア種別ごとの悪性通信ログ間の距離をそれぞれ測定させる距離測定処理を行う(ステップS52)。マルウェア間距離測定部411は、測定したマルウェア種別毎の通信ログ間の距離であるマルウェア間距離を、マルウェア間距離格納部415へ格納する。 As shown in FIG. 12, in the creation device 10, the inter-malware distance measurement unit 411 performs preprocessing such as deletion of unnecessary character strings and format shaping for each communication log (step S51). Subsequently, the inter-malware distance measurement unit 411 performs a distance measurement process for causing the distance measurement unit 10'to measure the distance between the malicious communication logs for each malware type (step S52). The inter-malware distance measurement unit 411 stores the inter-malware distance, which is the distance between the measured communication logs for each malware type, in the inter-malware distance storage unit 415.

作成部412は、マルウェア間距離格納部415に格納されたマルウェア間距離を用いてマルウェアの関連マップ、関連グラフを作成する作成処理を行う(ステップS53)。作成部412は、作成したマルウェアの関連マップ、関連グラフを対処装置に出力する。 The creation unit 412 performs a creation process of creating a malware-related map and a relation graph using the malware-to-malware distance stored in the malware-to-malware distance storage unit 415 (step S53). The creation unit 412 outputs the created malware-related map and related graph to the coping device.

[実施の形態4の効果]
マルウェアは、完全に新しく作られることは珍しく、既存のマルウェアやマルウェア作成ツールを改造して作成されることが大半であり、通信パターンもその既存のものと似通っていることが多い。そこで、実施の形態4では、通信に基づくマルウェアの関連マップ、関連グラフを生成することによって、マルウェアの作成系統を推測する等、マルウェア対策に寄与することができるという効果を奏する。
[Effect of Embodiment 4]
Malware is rarely created completely new, and is mostly created by modifying existing malware and malware creation tools, and communication patterns are often similar to those of existing ones. Therefore, in the fourth embodiment, by generating a related map and a related graph of malware based on communication, it is possible to contribute to anti-malware measures such as estimating the malware creation system.

[システム構成等]
図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況等に応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。さらに、各装置にて行なわれる各処理機能は、その全部又は任意の一部が、CPU及び当該CPUにて解析実行されるプログラムにて実現され、あるいは、ワイヤードロジックによるハードウェアとして実現され得る。
[System configuration, etc.]
Each component of each of the illustrated devices is a functional concept and does not necessarily have to be physically configured as shown in the figure. That is, the specific form of distribution / integration of each device is not limited to the one shown in the figure, and all or part of the device is functionally or physically distributed in arbitrary units according to various loads and usage conditions. It can be integrated and configured. Further, each processing function performed by each device may be realized by a CPU and a program analyzed and executed by the CPU, or may be realized as hardware by wired logic.

また、本実施の形態において説明した各処理のうち、自動的に行なわれるものとして説明した処理の全部又は一部を手動的に行なうこともでき、あるいは、手動的に行なわれるものとして説明した処理の全部又は一部を公知の方法で自動的に行なうこともできる。この他、上記文書中や図面中で示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。 Further, among the processes described in the present embodiment, all or part of the processes described as being automatically performed can be manually performed, or the processes described as being manually performed. It is also possible to automatically perform all or part of the above by a known method. In addition, the processing procedure, control procedure, specific name, and information including various data and parameters shown in the above document and drawings can be arbitrarily changed unless otherwise specified.

[プログラム]
図13は、プログラムが実行されることにより、距離測定装置10、悪性距離測定装置210、マルウェア種別距離測定装置310及び作成装置410が実現されるコンピュータの一例を示す図である。コンピュータ1000は、例えば、メモリ1010、CPU1020を有する。また、コンピュータ1000は、ハードディスクドライブインタフェース1030、ディスクドライブインタフェース1040、シリアルポートインタフェース1050、ビデオアダプタ1060、ネットワークインタフェース1070を有する。これらの各部は、バス1080によって接続される。
[program]
FIG. 13 is a diagram showing an example of a computer in which a distance measuring device 10, a malignant distance measuring device 210, a malware type distance measuring device 310, and a creating device 410 are realized by executing a program. The computer 1000 has, for example, a memory 1010 and a CPU 1020. The computer 1000 also has a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. Each of these parts is connected by a bus 1080.

メモリ1010は、ROM1011及びRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1090に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1100に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブ1100に挿入される。シリアルポートインタフェース1050は、例えばマウス1110、キーボード1120に接続される。ビデオアダプタ1060は、例えばディスプレイ1130に接続される。 Memory 1010 includes ROM 1011 and RAM 1012. The ROM 1011 stores, for example, a boot program such as a BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to the hard disk drive 1090. The disk drive interface 1040 is connected to the disk drive 1100. For example, a removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to, for example, a mouse 1110 and a keyboard 1120. The video adapter 1060 is connected to, for example, the display 1130.

ハードディスクドライブ1090は、例えば、OS(Operating System)1091、アプリケーションプログラム1092、プログラムモジュール1093、プログラムデータ1094を記憶する。すなわち、距離測定装置10、悪性距離測定装置210、マルウェア種別距離測定装置310及び作成装置410の各処理を規定するプログラムは、コンピュータにより実行可能なコードが記述されたプログラムモジュール1093として実装される。プログラムモジュール1093は、例えばハードディスクドライブ1090に記憶される。例えば、距離測定装置10、悪性距離測定装置210、マルウェア種別距離測定装置310及び作成装置410における機能構成と同様の処理を実行するためのプログラムモジュール1093が、ハードディスクドライブ1090に記憶される。なお、ハードディスクドライブ1090は、SSD(Solid State Drive)により代替されてもよい。 The hard disk drive 1090 stores, for example, an OS (Operating System) 1091, an application program 1092, a program module 1093, and program data 1094. That is, the program that defines each process of the distance measuring device 10, the malignant distance measuring device 210, the malware type distance measuring device 310, and the creating device 410 is implemented as a program module 1093 in which a code that can be executed by a computer is described. The program module 1093 is stored in, for example, the hard disk drive 1090. For example, a program module 1093 for executing a process similar to the functional configuration in the distance measuring device 10, the malignant distance measuring device 210, the malware type distance measuring device 310, and the creating device 410 is stored in the hard disk drive 1090. The hard disk drive 1090 may be replaced by an SSD (Solid State Drive).

また、上述した実施の形態の処理で用いられる設定データは、プログラムデータ1094として、例えばメモリ1010やハードディスクドライブ1090に記憶される。そして、CPU1020が、メモリ1010やハードディスクドライブ1090に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して実行する。 Further, the setting data used in the processing of the above-described embodiment is stored as program data 1094 in, for example, a memory 1010 or a hard disk drive 1090. Then, the CPU 1020 reads the program module 1093 and the program data 1094 stored in the memory 1010 and the hard disk drive 1090 into the RAM 1012 as needed, and executes the program.

なお、プログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1090に記憶される場合に限らず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ1100等を介してCPU1020によって読み出されてもよい。あるいは、プログラムモジュール1093及びプログラムデータ1094は、ネットワーク(LAN(Local Area Network)、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶されてもよい。そして、プログラムモジュール1093及びプログラムデータ1094は、他のコンピュータから、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。 The program module 1093 and the program data 1094 are not limited to those stored in the hard disk drive 1090, but may be stored in, for example, a removable storage medium and read by the CPU 1020 via the disk drive 1100 or the like. Alternatively, the program module 1093 and the program data 1094 may be stored in another computer connected via a network (LAN (Local Area Network), WAN (Wide Area Network), etc.). Then, the program module 1093 and the program data 1094 may be read by the CPU 1020 from another computer via the network interface 1070.

以上、本発明者によってなされた発明を適用した実施の形態について説明したが、本実施の形態による本発明の開示の一部をなす記述及び図面により本発明は限定されることはない。すなわち、本実施の形態に基づいて当業者等によりなされる他の実施の形態、実施例及び運用技術等は全て本発明の範疇に含まれる。 Although the embodiment to which the invention made by the present inventor is applied has been described above, the present invention is not limited by the description and the drawings which form a part of the disclosure of the present invention according to the present embodiment. That is, all other embodiments, examples, operational techniques, and the like made by those skilled in the art based on the present embodiment are included in the scope of the present invention.

10 距離測定装置
11 変換部
12 出現数算出部
13 経験情報量算出部
14 距離算出部
15 経験情報量格納部
201,301 通信システム
210 悪性距離測定装置
211,311 学習部
212,312 推論部
220 検出装置
310 マルウェア種別距離測定装置
320 判定装置
410 作成装置
411 マルウェア間距離測定部
412 作成部
10 Distance measuring device 11 Conversion unit 12 Appearance number calculation unit 13 Experience information amount calculation unit 14 Distance calculation unit 15 Experience information amount storage unit 201,301 Communication system 210 Malignant distance measurement device 211,311 Learning unit 212,312 Reasoning unit 220 Detection Device 310 Maltese type distance measurement device 320 Judgment device 410 Creation device 411 Inter-malware distance measurement unit 412 Creation unit

Claims (8)

計測対象のデータ列またはデータ列リスト、及び、参照元のデータ列またはデータ列リストに対し、k(kは任意の自然数)個の未使用の文字コードを区分データ列として入力してデータ列またはデータ列リストを1つのデータ列に変換する変換部と、
前記変換部が変換した計測対象のデータ列におけるk長部分データ列と該部分データ列の直前に出現する文字とを結合した結合部分データ列の出現率である第1の出現率と、前記変換部が変換した前記参照元のデータ列における直後がk長部分データ列であると判明している文字の出現率である第2の出現率の対数である経験情報量と、の乗算値の総和である、k次経験交差エントロピーを、前記計測対象のデータ列またはデータ列リストと、前記参照元のデータ列またはデータ列リストとの間の距離として算出する距離算出部と、
を有することを特徴とする距離測定装置。
For the data string or data column list to be measured and the data string or data string list of the reference source, enter k (k is an arbitrary natural number) unused character codes as the partitioned data string to enter the data string or data string. A conversion unit that converts a data string list into one data string,
The first appearance rate, which is the appearance rate of the combined partial data string obtained by combining the k-length partial data string and the character appearing immediately before the partial data string in the data string to be measured converted by the conversion unit, and the conversion. The sum of the multiplication values of the amount of empirical information, which is the logarithm of the second appearance rate, which is the appearance rate of characters that are known to be the k-length partial data string immediately after the data string of the reference source converted by the part. A distance calculation unit that calculates the k-th-order empirical intersection entropy as the distance between the data string or data string list to be measured and the data string or data string list of the reference source.
A distance measuring device characterized by having.
前記距離算出部は、以下の(1)式を用いて前記k次経験交差エントロピーを算出することを特徴とする請求項1に記載の距離測定装置。
Figure 0006783741
The distance measuring device according to claim 1, wherein the distance calculating unit calculates the k-th empirical cross entropy using the following equation (1).
Figure 0006783741
前記距離算出部は、前記変換部が変換した参照元データ列の中に前記結合部分データ列が含まれていない場合、次数kを、前記変換部が変換した参照元データ列の中に前記結合部分データ列が出現する次数まで下げることを特徴とする請求項1または2に記載の距離測定装置。 When the combined sub data string is not included in the reference source data string converted by the conversion unit, the distance calculation unit transfers the order k into the reference source data string converted by the conversion unit. The distance measuring device according to claim 1 or 2, wherein the partial data string is lowered to the order in which it appears. 前記変換部は、入力がデータ列の場合には、先頭と末尾とに前記区分データ列を追加し、入力がデータ列リストの場合には、先頭と末尾とに前記区分データ列を追加するとともにリスト間に区分データ列を挟み一つのデータ列として連結することを特徴とする請求項1〜3のいずれか一つに記載の距離測定装置。 When the input is a data string, the conversion unit adds the division data string to the beginning and the end, and when the input is a data string list, the division data string is added to the beginning and the end. The distance measuring device according to any one of claims 1 to 3, wherein a divided data string is sandwiched between lists and connected as one data string. 検出対象の通信ログと悪性通信ログとの距離を測定する悪性距離測定装置と、悪性距離測定装置が測定した距離を基に前記通信ログに悪性通信が含まれることを検出する検出装置と、を有する通信システムであって、
前記悪性距離測定装置は、
計測対象のデータ列またはデータ列リスト、及び、参照元のデータ列またはデータ列リストに対し、k(kは任意の自然数)個の未使用の文字コードを区分データ列として入力してデータ列またはデータ列リストを1つのデータ列に変換する変換部と、
前記変換部が変換した計測対象のデータ列におけるk長部分データ列と該部分データ列の直前に出現する文字とを結合した結合部分データ列の出現率である第1の出現率と、前記変換部が変換した前記参照元のデータ列における直後がk長部分データ列であると判明している文字の出現率である第2の出現率の対数である経験情報量と、の乗算値の総和である、k次経験交差エントロピーを、前記計測対象のデータ列またはデータ列リストと、前記参照元のデータ列またはデータ列リストとの間の距離として算出する距離算出部と、 前記距離測定部に、悪性通信ログ及び良性通信ログを教師データとして学習させ、良性通信ログ及び悪性通信ログの経験情報量を、前記参照元のデータ列またはデータ列リストの経験情報量として蓄積させる学習部と、
前記距離測定部に、前記良性通信ログ及び悪性通信ログの経験情報量を基に、検出対象の通信ログと、教師データである悪性通信ログとの距離を算出させる推論部と、
を有し、
前記検出装置は、検出対象の通信ログと悪性通信ログとの距離が所定の距離以下の場合には、前記検出対象の通信ログに悪性通信が含まれることを検出する
ことを特徴とする通信システム。
A malignant distance measuring device that measures the distance between the communication log to be detected and the malignant communication log, and a detection device that detects that the communication log contains malignant communication based on the distance measured by the malignant distance measuring device. It is a communication system that has
The malignant distance measuring device
For the data string or data column list to be measured and the data string or data string list of the reference source, enter k (k is an arbitrary natural number) unused character codes as the partitioned data string to enter the data string or data string. A conversion unit that converts a data string list into one data string,
The first appearance rate, which is the appearance rate of the combined partial data string obtained by combining the k-length partial data string and the character appearing immediately before the partial data string in the data string to be measured converted by the conversion unit, and the conversion. The sum of the multiplication values of the amount of empirical information, which is the logarithm of the second appearance rate, which is the appearance rate of characters that are known to be the k-length partial data string immediately after the data string of the reference source converted by the part. In the distance calculation unit and the distance measurement unit, which calculates the k-th empirical intersection entropy as the distance between the data string or data string list to be measured and the data string or data string list of the reference source. , A learning unit that learns the malignant communication log and the benign communication log as teacher data, and accumulates the amount of experience information of the benign communication log and the malignant communication log as the amount of experience information of the data string or data string list of the reference source.
An inference unit that causes the distance measurement unit to calculate the distance between the communication log to be detected and the malignant communication log that is the teacher data based on the amount of experience information of the benign communication log and the malignant communication log.
Have,
The detection device is a communication system characterized in that when the distance between the communication log to be detected and the malicious communication log is less than or equal to a predetermined distance, the detection device detects that the communication log to be detected includes malicious communication. ..
検出対象の通信ログと悪性通信ログとの距離を測定するマルウェア種別距離測定装置と、距離測定装置が測定した距離を基に前記通信ログに含まれる悪性通信の原因のマルウェアを判定する判定装置と、を有する通信システムであって、
前記マルウェア種別距離測定装置は、
計測対象のデータ列またはデータ列リスト、及び、参照元のデータ列またはデータ列リストに対し、k(kは任意の自然数)個の未使用の文字コードを区分データ列として入力してデータ列またはデータ列リストを1つのデータ列に変換する変換部と、
前記変換部が変換した計測対象のデータ列におけるk長部分データ列と該部分データ列の直前に出現する文字とを結合した結合部分データ列の出現率である第1の出現率と、前記変換部が変換した前記参照元のデータ列における直後がk長部分データ列であると判明している文字の出現率である第2の出現率の対数である経験情報量と、の乗算値の総和である、k次経験交差エントロピーを、前記計測対象のデータ列またはデータ列リストと、前記参照元のデータ列またはデータ列リストとの間の距離として算出する距離算出部と、
前記距離測定部に、マルウェア種別ごとに分別された悪性通信ログを教師データとして学習させ、マルウェア種別ごとに求めさせた経験情報量を、前記参照元のデータ列またはデータ列リストの経験情報量として蓄積させる学習部と、
前記距離測定部に、前記マルウェア種別ごとの経験情報量を基に、検出対象の通信ログと、各マルウェア種別の悪性通信ログとの距離をマルウェア種別毎に算出させる推論部と、
を有し、
前記判定装置は、前記推論部が推論した距離が最も短い距離に対応するマルウェア種別を、検出対象の通信ログに含まれる悪性通信の原因のマルウェアとして判定する
ことを特徴とする通信システム。
A malware type distance measuring device that measures the distance between the communication log to be detected and the malignant communication log, and a determination device that determines the malware that causes the malignant communication contained in the communication log based on the distance measured by the distance measuring device. , Which is a communication system having
The malware type distance measuring device is
For the data string or data column list to be measured and the data string or data string list of the reference source, enter k (k is an arbitrary natural number) unused character codes as the partitioned data string to enter the data string or data string. A conversion unit that converts a data string list into one data string,
The first appearance rate, which is the appearance rate of the combined partial data string obtained by combining the k-length partial data string and the character appearing immediately before the partial data string in the data string to be measured converted by the conversion unit, and the conversion. The sum of the multiplication values of the amount of experience information, which is the logarithm of the second appearance rate, which is the appearance rate of characters that are known to be the k-length partial data string immediately after the data string of the reference source converted by the part. A distance calculation unit that calculates the k-th-order empirical intersection entropy as the distance between the data string or data string list to be measured and the data string or data string list of the reference source.
The distance measuring unit is made to learn the malignant communication log sorted for each malware type as teacher data, and the amount of experience information obtained for each type of malware is used as the amount of experience information in the data string or data string list of the reference source. Learning department to accumulate and
An inference unit that causes the distance measurement unit to calculate the distance between the communication log to be detected and the malicious communication log of each malware type for each malware type based on the amount of experience information for each malware type.
Have,
The determination device is a communication system characterized in that the malware type corresponding to the distance inferred by the inference unit with the shortest distance is determined as the malware causing the malicious communication included in the communication log to be detected.
計測対象のデータ列またはデータ列リスト、及び、参照元のデータ列またはデータ列リストに対し、k(kは任意の自然数)個の未使用の文字コードを区分データ列として入力してデータ列またはデータ列リストを1つのデータ列に変換する変換部であって、マルウェア種別ごとの悪性通信ログを変換する変換部と、
前記変換部が変換した計測対象のデータ列におけるk長部分データ列と該部分データ列の直前に出現する文字とを結合した結合部分データ列の出現率である第1の出現率と、前記変換部が変換した前記参照元のデータ列における直後がk長部分データ列であると判明している文字の出現率である第2の出現率の対数である経験情報量と、の乗算値の総和である、k次経験交差エントロピーを、前記計測対象のデータ列またはデータ列リストと、前記参照元のデータ列またはデータ列リストとの間の距離として算出する距離算出部であって、マルウェア種別ごとの悪性通信ログ間の距離を算出する距離算出部と、
マルウェア種別ごとの悪性通信ログ間の距離を用いて、マルウェア間の関係をマップ化したマルウェア関連マップ、または、マルウェア間を関連付けた関連グラフを作成する作成部と、
を有することを特徴とする作成装置。
For the data string or data column list to be measured and the data string or data string list of the reference source, enter k (k is an arbitrary natural number) unused character codes as the partitioned data string to enter the data string or data string. A conversion unit that converts a data string list into a single data string, and a conversion unit that converts malicious communication logs for each type of malware.
The first appearance rate, which is the appearance rate of the combined partial data string obtained by combining the k-length partial data string and the character appearing immediately before the partial data string in the data string to be measured converted by the conversion unit, and the conversion. The sum of the multiplication values of the amount of empirical information, which is the logarithm of the second appearance rate, which is the appearance rate of characters that are known to be the k-length partial data string immediately after the data string of the reference source converted by the part. It is a distance calculation unit that calculates the k-th-order experience crossing entropy as the distance between the data string or data string list to be measured and the data string or data string list of the reference source, and is for each malware type. Distance calculation unit that calculates the distance between malicious communication logs of
A malware-related map that maps the relationship between malware using the distance between malicious communication logs for each type of malware, or a creator that creates a related graph that associates malware.
A production device characterized by having.
コンピュータを、請求項1〜4のいずれか一つに記載の距離測定装置として機能させるための距離測定プログラム。 A distance measuring program for operating a computer as a distance measuring device according to any one of claims 1 to 4.
JP2017225395A 2017-11-24 2017-11-24 Distance measuring device, communication system, creating device and distance measuring program Active JP6783741B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017225395A JP6783741B2 (en) 2017-11-24 2017-11-24 Distance measuring device, communication system, creating device and distance measuring program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017225395A JP6783741B2 (en) 2017-11-24 2017-11-24 Distance measuring device, communication system, creating device and distance measuring program

Publications (2)

Publication Number Publication Date
JP2019096088A JP2019096088A (en) 2019-06-20
JP6783741B2 true JP6783741B2 (en) 2020-11-11

Family

ID=66971779

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017225395A Active JP6783741B2 (en) 2017-11-24 2017-11-24 Distance measuring device, communication system, creating device and distance measuring program

Country Status (1)

Country Link
JP (1) JP6783741B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015128613A1 (en) * 2014-02-28 2015-09-03 British Telecommunications Public Limited Company Malicious encrypted network traffic identification
JP6204318B2 (en) * 2014-09-24 2017-09-27 日本電信電話株式会社 Similarity Evaluation Device, Similarity Evaluation System, Similarity Evaluation Device Method, and Similarity Evaluation Program
JP2017102566A (en) * 2015-11-30 2017-06-08 日本電信電話株式会社 Unauthorized file detection device, unauthorized file detection method and unauthorized file detection program
JP7024720B2 (en) * 2016-10-14 2022-02-24 日本電気株式会社 Malware analysis device, malware analysis method, and malware analysis program

Also Published As

Publication number Publication date
JP2019096088A (en) 2019-06-20

Similar Documents

Publication Publication Date Title
US20210256127A1 (en) System and method for automated machine-learning, zero-day malware detection
US9665713B2 (en) System and method for automated machine-learning, zero-day malware detection
US9003529B2 (en) Apparatus and method for identifying related code variants in binaries
JP6560451B2 (en) Malignant communication log detection device, malignant communication log detection method, malignant communication log detection program
JP6055391B2 (en) Relevance determination device, relevance determination program, and relevance determination method
US9298757B1 (en) Determining similarity of linguistic objects
US11250129B2 (en) Method and system for determining affiliation of software to software families
Yang et al. Local filtering: Improving the performance of approximate queries on string collections
US20230418578A1 (en) Systems and methods for detection of code clones
CN116149669B (en) Binary file-based software component analysis method, binary file-based software component analysis device and binary file-based medium
CN113901474A (en) Vulnerability detection method based on function-level code similarity
Li et al. Detection of SQL injection attacks based on improved TFIDF algorithm
CN110674635A (en) Method and device for text paragraph division
CN116302089B (en) Picture similarity-based code clone detection method, system and storage medium
KR102289395B1 (en) Document search device and method based on jaccard model
JP6783741B2 (en) Distance measuring device, communication system, creating device and distance measuring program
Zhang et al. Effective and fast near duplicate detection via signature-based compression metrics
Lulu et al. Overview of fingerprinting methods for local text reuse detection
US20130226941A1 (en) System and method for classifying signals using the bloom filter
CN112347477A (en) Family variant malicious file mining method and device
Moia et al. A comparative analysis about similarity search strategies for digital forensics investigations
Ting et al. Faster classification using compression analytics
Xiao et al. Matching similar functions in different versions of a malware
WO2019163643A1 (en) Summary evaluation device, method, program and storage medium
CN112989793B (en) Article detection method and device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191217

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201012

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20201020

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201022

R150 Certificate of patent or registration of utility model

Ref document number: 6783741

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150