TWI648978B - Hacker reverse connection behavior detection method - Google Patents

Hacker reverse connection behavior detection method Download PDF

Info

Publication number
TWI648978B
TWI648978B TW106123921A TW106123921A TWI648978B TW I648978 B TWI648978 B TW I648978B TW 106123921 A TW106123921 A TW 106123921A TW 106123921 A TW106123921 A TW 106123921A TW I648978 B TWI648978 B TW I648978B
Authority
TW
Taiwan
Prior art keywords
connection
connection behavior
behavior
hacker
packet
Prior art date
Application number
TW106123921A
Other languages
Chinese (zh)
Other versions
TW201909592A (en
Inventor
羅文揚
徐正磬
張光宏
Original Assignee
中華電信股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中華電信股份有限公司 filed Critical 中華電信股份有限公司
Priority to TW106123921A priority Critical patent/TWI648978B/en
Application granted granted Critical
Publication of TWI648978B publication Critical patent/TWI648978B/en
Publication of TW201909592A publication Critical patent/TW201909592A/en

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

本發明係提供一種提出一種駭客反向連線行為偵測方法,其包含在一統計單位時間內,統計每兩個IP位址的連線次數,當任兩個IP位址的連線次數超過一連線次數門檻值,判定此兩個IP出現可疑連線行為,當此可疑連線行為係使用HTTP協定連線時,統計其每一個連線對話(Session)的封包內容長度,當封包內容長度值的發生次數具有規律性特徵時,則對每一個連線對話的封包內容進行人為分析,以判斷該可疑連線行為中的目的IP位址是否為惡意中繼站,本發明之優點在於僅使用了簡單又快速的統計方式,即能過濾出異常的對外網路連線,進而分析出受害主機範圍以及駭客攻擊手法。 The present invention provides a method for detecting a hacker reverse connection behavior, which includes counting the number of connections of each two IP addresses in a statistical unit time, and the number of connections of any two IP addresses. More than one connection threshold, it is determined that the two IPs have suspicious connection behavior. When the suspicious connection behavior is connected by HTTP protocol, the length of the packet content of each connection session is counted. When the number of occurrences of the content length value has a regularity characteristic, the packet content of each connection session is manually analyzed to determine whether the destination IP address in the suspicious connection behavior is a malicious relay station, and the advantage of the present invention is that only Using a simple and fast statistical method, it can filter out abnormal external network connections, and then analyze the scope of the victim host and the hacking attack method.

Description

駭客反向連線行為偵測方法 Hacker reverse connection behavior detection method

本發明係一種駭客反向連線行為的偵測方法,尤指一種基於網路流量分析的駭客反向連線行為偵測方法。 The invention relates to a method for detecting a hacker reverse connection behavior, in particular to a method for detecting a hacker reverse connection behavior based on network traffic analysis.

針對性攻擊/鎖定目標攻擊(Target attack)可說是今日網路環境中,對各類組織最大的網路威脅之一,被鎖定作為目標的公司不僅會商譽受損,也可能在金錢上有數以百萬計的損失。 Target attack can be said to be one of the biggest cyber threats to organizations of all types in today's online environment. Companies that are targeted as targets will not only be damaged but also in money. There are millions of losses.

在此類駭客攻擊當中,最有能力在企業網路內部四處躲藏及遊走的,應該是「進階持續威脅」(Advanced Persistent Threat,APT)攻擊。這些攻擊之所以被稱為「進階」,是因為駭客使用了零日攻擊(0-day Attack)技術和隱密性連線手法,使用者經常被入侵了很長的時間之後,仍然不知道自己已經受害,即便企業採購先進的安全防護設備,仍無法阻止駭客入侵或提出預警,往往是本身機敏資料外洩或是被其他資安專家通報後,才回過頭來進行調查。 Among such hacking attacks, the most capable of hiding and wandering around the corporate network should be an Advanced Persistent Threat (APT) attack. These attacks are called "advanced" because hackers use zero-day attack (0-day Attack) technology and hidden connection methods. Users are often hacked for a long time, still not Knowing that you have been victimized, even if the company purchases advanced security equipment, it still cannot prevent hackers from invading or making early warnings. It is often the case that the sensitive information is leaked or notified by other security experts before returning to investigate.

常見的APT攻擊防範方法,一是以黑名單機制進行防堵,二是使用機器學習演算法分析網路流量資料,以偵測是否有駭客入侵的跡象,然而前者的黑名單資料須隨時更新方能有效,故維護成本並不低;後者需要進行大量資料訓練,同樣具有運作成本過高之問題,且就實際表現 來看,其準確度並不算高。 Common APT attack prevention methods, one is to use the blacklist mechanism to prevent blocking, and the other is to use machine learning algorithms to analyze network traffic data to detect whether there are signs of hacking, but the former blacklist information must be updated at any time. It can be effective, so the maintenance cost is not low; the latter needs a lot of data training, and it also has the problem of high operating cost, and the actual performance In view, its accuracy is not high.

為解決前揭之問題,本發明之目的係提供一種基於網路流量分析、步驟簡單且僅使用簡單統計方法的駭客反向連線行為偵測方法。 In order to solve the problems disclosed above, the object of the present invention is to provide a hacker reverse connection behavior detection method based on network traffic analysis, simple steps and using only simple statistical methods.

為達上述目的,本發明提出一種駭客反向連線行為偵測方法,其包含:在一統計單位時間內,統計每兩個IP(Internet Protocol)位址間的連線次數,當任兩個IP位址間的連線次數超過一連線次數門檻值,判定此兩個IP位址出現可疑連線行為,當此可疑連線行為係使用HTTP協定連線時,統計該可疑連線行為的每一個連線對話(Session)的封包內容長度(Content Length)值,當封包內容長度值的發生次數具有規律性特徵時,則對每一個連線對話的封包內容進行人為分析,以判斷該可疑連線行為中的目的IP位址是否為一惡意中繼站。 To achieve the above objective, the present invention provides a hacker reverse connection behavior detection method, which includes: counting the number of connections between two IP (Internet Protocol) addresses in a statistical unit time, when two The number of connections between IP addresses exceeds the threshold of the number of connections, and it is determined that the two IP addresses have suspicious connection behavior. When the suspicious connection behavior is connected by HTTP protocol, the suspicious connection behavior is counted. The value of the content length of each connection session (Session), when the number of occurrences of the packet content length value has a regular feature, the human content analysis is performed on the content of each connection session to determine the Whether the destination IP address in the suspicious connection behavior is a malicious relay station.

綜上所述,本發明至少包含下列優點: In summary, the present invention includes at least the following advantages:

1.本發明可簡單又快速地發現駭客隱蔽的反向連線行為,僅需要針對網路封包的表頭資料執行簡單的統計操作,而無需使用複雜地演算法來計算。 1. The present invention can easily and quickly find the hacker's concealed reverse connection behavior, and only needs to perform simple statistical operations on the header data of the network packet without using complicated algorithms to calculate.

2.本發明可適用於偵測殭屍網路主機和APT攻擊事件,可找出受害主機、惡意中繼站,以及駭客的攻擊手法,讓企業可以了解駭客攻擊受影響的範圍,並透過攻擊手法的認知得於下一次攻擊前提早防範。 2. The present invention can be applied to detect botnet host and APT attack events, and can find the victim host, malicious relay station, and hacker attack method, so that the enterprise can understand the affected range of the hacker attack, and through the attack method. The cognition is due to the early precautions of the next attack.

3.本發明可以藉由網路流量分析找出惡意中繼站,而非由鑑識受害電腦主機後查知,可減少管理上的困擾。 3. The invention can find a malicious relay station by network traffic analysis, instead of identifying the victim computer host, and reducing management troubles.

S21-S24、S31-S36‧‧‧步驟 S21-S24, S31-S36‧‧‧ steps

1‧‧‧網際網路 1‧‧‧Internet

11‧‧‧惡意中繼站 11‧‧‧ malicious relay station

12‧‧‧駭客跳板主機 12‧‧‧Visitor Springboard Host

2‧‧‧企業內部網路 2‧‧‧Intranet

21‧‧‧閘道防火牆 21‧‧‧ Gateway Firewall

22‧‧‧受害主機 22‧‧‧ victim host

23‧‧‧其他內部主機 23‧‧‧Other internal hosts

24‧‧‧郵件伺服器 24‧‧‧ mail server

25‧‧‧網頁伺服器 25‧‧‧Web server

26‧‧‧資料庫伺服器 26‧‧‧Database Server

圖1係為本發明駭客反向連線行為偵測方法之應用場景示意圖。 FIG. 1 is a schematic diagram of an application scenario of a method for detecting a hacker reverse connection behavior according to the present invention.

圖2係為本發明駭客反向連線行為偵測方法之流程圖。 2 is a flow chart of a method for detecting a hacker reverse connection behavior according to the present invention.

圖3係為本發明駭客反向連線行為偵測方法一實施例之流程圖。 FIG. 3 is a flow chart of an embodiment of a method for detecting a hacker reverse connection behavior according to the present invention.

以下將描述具體之實施例以說明本發明之實施態樣,惟其並非用以限制本發明所欲保護之範疇。 The specific embodiments are described below to illustrate the embodiments of the invention, but are not intended to limit the scope of the invention.

在「進階持續威脅」(Advanced Persistent Threat,APT)攻擊的多種攻擊手法之中,駭客常使用一種進階的「反向連線技術」,其手法為在受害主機上植入木馬或蠕蟲程式,控制受害主機偽裝成對外瀏覽網站,其實是向惡意中繼站進行報到,讓駭客知道該受害主機還可以被操縱。此外,駭客也可以利用在回傳網頁時夾帶控制指令給受害主機,而執行結果再藉由下一次瀏覽惡意中繼站時傳送。 Among the various attack methods of the Advanced Persistent Threat (APT) attack, hackers often use an advanced "reverse connection technology" in which Trojans or creeps are implanted on the victim host. The worm program controls the victim host to pretend to browse the website. In fact, it reports to the malicious relay station, so that the hacker knows that the victim host can also be manipulated. In addition, the hacker can also use the control command to the victim host when returning the web page, and the execution result is transmitted by the next time browsing the malicious relay station.

請參閱圖1,其為一典型的企業網路的示意圖,企業內部網路2透過一閘道防火牆21連接網際網路1,現在假設企業內部網路2中有一受害主機22已受到進階持續威脅攻擊的入侵,故其具有前述的反向連線行為,不斷透過網際網路1向一惡意中繼站11報到。 Please refer to FIG. 1 , which is a schematic diagram of a typical enterprise network. The internal network 2 of the enterprise is connected to the Internet 1 through a gateway firewall 21 . Now, it is assumed that a victim host 22 in the internal network 2 of the enterprise has been continuously advanced. The intrusion of the threat attack, so it has the aforementioned reverse connection behavior, and continuously reports to the malicious relay station 11 through the Internet 1.

請參閱圖2,針對上述應用「反向連線技術」的攻擊方式,本發明提出了一種駭客反向連線行為的偵測方法,以下則針對各個步驟進行一詳細解說。 Referring to FIG. 2, in view of the above-mentioned attack mode of the "reverse connection technology", the present invention proposes a method for detecting the hacker reverse connection behavior, and a detailed explanation is given below for each step.

步驟S21,是在一統計單位時間內,統計每兩個IP位址間的 連線對話的連線次數。其中,兩個IP位址包含位於內網的一內部IP,以及位於外網的一外部IP,本步驟是針對一統計單位時間內的網路流量資料,統計由每一個內部IP位址與外部IP位址間的連線對話的次數。 Step S21 is to count the statistics between every two IP addresses in a statistical unit time. The number of connections to the connection. The two IP addresses include an internal IP located on the internal network and an external IP located on the external network. This step is for a statistical unit time network traffic data, and statistics are performed by each internal IP address and external. The number of connection sessions between IP addresses.

其中,統計單位時間為自行訂定的時間參數,例如15分鐘、1小時等,連線次數是以連線對話(Session)的發生次數做計算,一連線對話的判定,是在連線對話時間或統計單位時間結束前,來源IP位址、來源埠號、目的IP位址以及目的埠號皆相同,才視為同一連線對話,反之,此四項資訊若有一項資訊不同,則視為不同的連線對話,而網路流量資料則可使用如Wireshark、SmartSniff等的網路封包檢測軟體取得。 The statistical unit time is a self-defined time parameter, such as 15 minutes, 1 hour, etc. The number of connections is calculated by the number of occurrences of the session, and the determination of a connection is in the connection dialog. Before the end of the time or statistical unit time, the source IP address, the source nickname, the destination IP address, and the destination nickname are the same, and they are regarded as the same connection dialogue. Otherwise, if one of the four pieces of information has different information, then For different connection dialogs, network traffic data can be obtained using network packet inspection software such as Wireshark and SmartSniff.

步驟S22,當任兩個IP位址的連線次數超過一連線次數門檻值,判定此兩個IP出現可疑連線行為,將其視為一可疑連線。此步驟旨在定義偵測駭客反向連線行為的敏感度,連線次數門檻值設定的愈低,則敏感度愈高,容易有誤報發生,連線次數門檻值設定的愈高,則敏感度愈低,容易有漏報發生。 In step S22, when the number of connections of any two IP addresses exceeds the threshold of the number of connections, it is determined that the two IPs have suspicious connection behavior and regarded as a suspicious connection. This step is to define the sensitivity of detecting the reverse connection behavior of the hacker. The lower the threshold value of the connection threshold is, the higher the sensitivity is, and the false alarm is easy to occur. The higher the threshold is set, the higher the threshold is set. The lower the sensitivity, the easier it is to have an underreport.

步驟S23,當該可疑連線行為是使用HTTP(Hyper Text Transfer Protocol,超文字傳輸協定)協定連線時,統計此可疑連線行為的其每一個連線對話(Session)的封包內容長度(Content Length)值。 Step S23, when the suspicious connection behavior is to use the HTTP (Hyper Text Transfer Protocol) protocol connection, the packet content length of each of the connection sessions (Session) of the suspicious connection behavior is counted (Content Length) value.

具體而言,即是使用網路應用層檢測設備(如次世代防火牆(NGFW))或網路封包檢測軟體(如Wireshark或SmartSniff等),以判斷可疑連線行為是否是使用HTTP協定進行連線,若是,則以同樣的工具取得這些可疑連線行為的封包內容長度,接著進入步驟S24。 Specifically, it uses a network application layer detection device (such as Next Generation Firewall (NGFW)) or a network packet inspection software (such as Wireshark or SmartSniff) to determine whether the suspicious connection behavior is connected using the HTTP protocol. If yes, the length of the packet content of these suspicious connection behaviors is obtained by the same tool, and then proceeds to step S24.

通常而言,封包是由表頭部分及資料部分所構成,前述的封 包內容長度即為一網路連線對話的封包內容的資料部分的位元數。 Generally speaking, the packet is composed of a header part and a data part, and the aforementioned seal The packet content length is the number of bits in the data portion of the packet content of a network connection session.

順帶一提的是,由於HTTP連線的傳輸埠可以自行更改,本發明並無限制埠號一定是80,只不過企業常會限制埠號為53、80、8080或443才能通過防火牆對外連線,所以駭客常使用非埠號80(如53或443)來規避資安防護設備檢查。有鑑於此,非埠號80的HTTP連線行為更容易令網管人員懷疑。 Incidentally, since the transmission of the HTTP connection can be changed by itself, the present invention does not limit the nickname to 80, but the enterprise often restricts the nickname to 53, 80, 8080 or 443 to be externally connected through the firewall. Therefore, hackers often use non-nicknames 80 (such as 53 or 443) to circumvent the inspection of security equipment. In view of this, the HTTP connection behavior of the non-nickname 80 is more likely to be suspected by network administrators.

步驟S24,當前述的封包內容長度值的發生次數具有規律性特徵時,則對每一個連線對話的封包內容進行人工檢視和關聯分析,以判斷該可疑連線行為中的目的IP位址是否為一惡意中繼站。 Step S24: When the number of occurrences of the foregoing packet content length value has a regular feature, manually check and correlate the packet content of each connection session to determine whether the destination IP address in the suspicious connection behavior is For a malicious relay station.

瀏覽不同的網頁時,網站回傳的封包應具有不同的封包內容長度,即使是瀏覽相同網頁,在不同時間也可能會有不同的內容,造成封包內容長度不同。因此,若網站回傳的封包集中在某個封包內容長度值上,則有可能是受害主機持續向惡意中繼站報到,且很有可能是駭客並未下達新的指令,故其值一直沒有變動。因此,從連線對話的內容長度值的變化,亦能判斷駭客是否有在活動。 When browsing different web pages, the packets returned by the website should have different lengths of the package content. Even if the same web page is browsed, different contents may be generated at different times, resulting in different lengths of the package contents. Therefore, if the packet returned by the website is concentrated on the length of a certain packet content, it may be that the victim host continues to report to the malicious relay station, and it is likely that the hacker has not issued a new command, so the value has not changed. . Therefore, it is also possible to judge whether the hacker is active or not from the change in the content length value of the connection dialogue.

因此,當封包內容長度值的發生次數具有規律性特徵時,意即該可疑連線行為中,其連線對話的封包內容長度值,集中在一個或特定幾個內容長度值上,即對每一個連線對話的封包內容進行人為分析,以判斷前述的可疑連線行為中的目的IP位址是否為一惡意中繼站,具體而言,此目的IP是指可疑連線行為中,位於外網的外部IP位址。 Therefore, when the number of occurrences of the packet content length value has a regularity characteristic, that is, in the suspicious connection behavior, the packet content length value of the connection session is concentrated on one or a specific number of content length values, that is, for each The content of the packet of a connection dialogue is manually analyzed to determine whether the destination IP address in the aforementioned suspicious connection behavior is a malicious relay station. Specifically, the destination IP refers to the suspicious connection behavior and is located in the external network. External IP address.

接著則對前述的人為分析,配合網路封包檢測軟體Wireshark之檢測結果,作一細節之闡釋。 Then, the above-mentioned human analysis is combined with the detection result of the network packet inspection software Wireshark to explain the details.

為方便解說,本文接下來將可疑連線行為中使用HTTP協定的網路連線對話皆簡稱為「HTTP連線」,「HTTP請求(Request)」是指由受害主機傳向惡意中繼站且使用HTTP協定的網路連線對話,「HTTP回覆(Response)」則是指由惡意中繼站傳向受害主機且使用HTTP協定的網路連線對話。 For the convenience of explanation, this article will refer to the network connection dialog using the HTTP protocol in the suspicious connection behavior as “HTTP connection”. “HTTP request (Request)” refers to the malicious host transmitting to the malicious relay station and using HTTP. The agreed network connection dialog, "HTTP Reply" refers to the network connection dialog that is transmitted by the malicious relay station to the victim host and uses the HTTP protocol.

本發明中,人為分析包含了比對封包內容是否含有非HTML語法的內容,以及比對封包內容是否含有命令提示字元指令,如cmd等。 In the present invention, the human analysis includes comparing whether the content of the packet contains non-HTML syntax, and whether the content of the packet contains a command prompt character instruction, such as cmd.

在正常情況下,網站回傳之封包內容只會單純包含網頁內容之HTML程式碼,如表1及表2所示,其分別是使用Wireshark檢測本地主機與Google連線之HTTP請求與HTTP回覆之內容,其中,由表2下方之內容(後面的7行)可看出其為單純的HTML程式碼。 Under normal circumstances, the content of the package returned by the website will only contain the HTML code of the content of the webpage, as shown in Table 1 and Table 2, which are respectively used to detect the HTTP request and HTTP reply of the local host and Google connection using Wireshark. The content, which is shown by the content below Table 2 (the next 7 lines), can be seen as a simple HTML code.

但在駭客反向連線行為的攻擊手法中,惡意中繼站回傳之封包內容卻常夾雜無意義且非屬HTML語法的內容,如表3和表4所示,其分別是使用網路封包檢測軟體Wireshark擷取的異常HTTP回覆及請求之封包檢測結果。其中表3下方的「P............」顯然不是HTML語法,而表4則包含非屬HTML語法且疑似經過編碼之字串,此類疑似經過編碼之字串的特徵,經常包含出現多個重複的字元,故於本發明中,亦將之視為判斷目標IP位址為惡意中繼站的指標之一。 However, in the attack method of hacker reverse connection behavior, the content of the packet returned by the malicious relay station is often mixed with content that is meaningless and not HTML grammar, as shown in Table 3 and Table 4, respectively, using the network packet. Detects the abnormal HTTP reply retrieved by the software Wireshark and the packet detection result of the request. The "P........." below Table 3 is obviously not the HTML syntax, and Table 4 contains the strings that are not HTML syntax and are suspected to be encoded. Such suspected encoded strings The feature often includes multiple repeated characters, so in the present invention, it is also regarded as one of the indicators for determining that the target IP address is a malicious relay station.

同樣的,在駭客反向連線行為的攻擊手法中,惡意中繼站回傳之封包內容常夾雜命令提示字元指令,以控制受害主機進行各式操作,如表5及表6的其最後一行之內容所示,其分別是以「cmd/c dir c:\.」命令本地主機執行查詢資料夾,以及以「cmd/c ipconfig/all」命令本地主機執行查詢IP組態,顯然不是一般的網頁會要求本地主機執行的動作,故於本發明中,將之視為判斷目標IP位址為惡意中繼站的另一指標。 Similarly, in the attack method of hacker reverse connection behavior, the content of the packet returned by the malicious relay station is often mixed with the command prompt character command to control the victim host to perform various operations, such as the last row of Table 5 and Table 6. As shown in the content, the "cmd/c dir c:\." command local host executes the query folder, and the "cmd/c ipconfig/all" command local host performs the query IP configuration, which is obviously not normal. The web page will require the action performed by the local host, so in the present invention, it is regarded as another indicator for judging that the target IP address is a malicious relay station.

又於本發明之另一實施例中,上述的人工分析方法,亦可以程式自動化的方法予以實現,僅須採用同樣的判斷規則即可,然而以程式實現之方法應屬習知技術,在此不再贅述。 In another embodiment of the present invention, the manual analysis method described above may also be implemented by a program automation method, and only the same judgment rule may be used. However, the method implemented by the program should be a conventional technique. No longer.

請參閱圖3,以下則以應用本發明駭客反向連線行為方法的一實施例,進行具體範例解說。 Referring to FIG. 3, the following is a specific example explanation of an embodiment of the method for applying the hacker reverse connection behavior of the present invention.

請參閱圖1,企業內部網路2裡,有閘道防火牆21(負責阻擋來自網際網路1的攻擊)、受害主機22、其他內部主機23、郵件伺服器24、網頁伺服器25和資料庫伺服器26。由於該企業對外部的網際網路1有開啟 NAT功能,並僅開放DNS、HTTP和HTTPS網路服務,所以駭客無法以簡單的遠端遙控方式遙控被害者電腦主機,並更新惡意程式。 Referring to FIG. 1, in the enterprise internal network 2, there is a gateway firewall 21 (responsible for blocking attacks from Internet 1), a victim host 22, other internal hosts 23, a mail server 24, a web server 25, and a database. Server 26. Since the company has opened to the external Internet 1 NAT function, and only open DNS, HTTP and HTTPS network services, so hackers can not remotely control the victim computer host and update malicious programs with a simple remote remote control.

假設某企業內部網路2中有一受害主機22(IP:10.1.1.100)已經被駭客人侵成功,並已安裝惡意程式,使其以反向連線行為之方式,定期連線至惡意中繼站11接收由駭客跳板主機12所下達的控制指令,並更新惡意程式或其他資訊,假設此受害主機22每隔1分鐘會向惡意中繼站(IP:200.1.1.200)報到(使用埠號443)。 Assume that a victim host 22 (IP: 10.1.1.100) in an enterprise's internal network 2 has been successfully attacked by a guest, and a malicious program has been installed to periodically connect to the malicious relay station in a reverse connection manner. The control command issued by the hacker springboard host 12 is received, and the malware or other information is updated, assuming that the victim host 22 reports to the malicious relay station (IP: 200.1.1.200) every 1 minute (using the nickname 443).

步驟S31,本發明的駭客反向連線行為方法,統計單位時間設定為15分鐘,連線次數門檻值設定為10次。意即每隔15分鐘就會從網路流量資料(Netflow)中,統計內部IP(網段為10.1.1.0/24)和外部IP間的連線次數,即每兩個IP位址間的連線次數,並按照連線次數的多寡進行排序。 Step S31, the hacker reverse connection behavior method of the present invention, the statistical unit time is set to 15 minutes, and the connection threshold is set to 10 times. This means that every 15 minutes, from the network traffic data (Netflow), the number of connections between the internal IP (network segment 10.1.1.0/24) and the external IP is counted, that is, the connection between each two IP addresses. The number of lines, sorted by the number of connections.

步驟S32,排序後發現排行第一名的是受害主機22(IP:10.1.1.100)連線至惡意中繼站11(IP:200.1.1.100)的連線對話,其連線次數高達16次,超過連線次數門檻值的10次,將其視為可疑連線行為,繼續進行檢測。 In step S32, after sorting, it is found that the first line of the ranking is the connection dialogue of the victim host 22 (IP: 10.1.1.100) to the malicious relay station 11 (IP: 200.1.1.100), and the number of connections is up to 16 times, exceeding the connection. The threshold of the line number is 10 times, and it is regarded as a suspicious connection behavior, and the detection is continued.

步驟S33,接著則利用網路應用層檢測軟體檢查當時側錄的網路流量檔案,以使用Wireshark為例,於其中輸入過濾字串:(ip.src==10.1.1.100 && ip.dst==200.1.1.200)∥(ip.src==200.1.1.200 && ip.dst==10.1.1.100),結果有199筆封包符合過濾條件,接著再輸入過濾字串http,過濾之結果顯示有32個HTTP封包符合此條件,代表該可疑連線行為包含16組使用HTTP協定的網路連線對話(以下簡稱HTTP連線)。 Step S33, and then use the network application layer detection software to check the network traffic file recorded at the time, using Wireshark as an example, and input a filter string: (ip.src==10.1.1.100 && ip.dst== 200.1.1.200)∥(ip.src==200.1.1.200 && ip.dst==10.1.1.100), the result is that 199 packets match the filter condition, then enter the filter string http, and the filtered result shows 32 HTTPs. The packet meets this condition, and the suspicious connection behavior includes 16 sets of network connection dialogs (hereinafter referred to as HTTP connections) using the HTTP protocol.

步驟S34,統計此可疑連線行為的連線對話的封包內容長度 值,在此將之分為由受害主機22向惡意中繼站11送出的HTTP請求(Request),以及由惡意中繼站11送出至受害主機22的HTTP回覆(Response)。 Step S34, counting the length of the packet content of the connection dialog of the suspicious connection behavior The value is here divided into an HTTP request (Request) sent by the victim host 22 to the malicious relay station 11, and an HTTP response (Response) sent by the malicious relay station 11 to the victim host 22.

HTTP請求的封包內容長度的統計結果為:112bytes共9次、132bytes共2次、740bytes共1次、1216bytes共1次、1512bytes共1次、1736bytes共1次,和3572bytes共1次。 The statistical result of the packet content length of the HTTP request is: 112 bytes total 9 times, 132 bytes total 2 times, 740 bytes total 1 time, 1216 bytes total 1 time, 1512 bytes total 1 time, 1736 bytes total 1 time, and 3572 bytes total 1 time.

HTTP回覆的封包內容長度的統計結果為:16bytes共10次、22bytes共1次、31bytes共1次、36bytes共1次、37bytes共1次、51bytes共1次、67bytes共1次。 The statistical result of the length of the HTTP reply packet is: 16 bytes for 10 times, 22 bytes for 1 time, 31 bytes for 1 time, 36 bytes for 1 time, 37 bytes for 1 time, 51 bytes for 1 time, and 67 bytes for 1 time.

步驟S35,根據前述結果,可發現HTTP請求的封包內容長度集中在112bytes,而HTTP回覆的封包內容長度集中在16bytes,符合集中在一個或特定幾個內容長度值上之特徵,於是繼續進行人為分析。 Step S35, according to the foregoing result, it can be found that the length of the packet content of the HTTP request is concentrated at 112 bytes, and the length of the packet content of the HTTP reply is concentrated at 16 bytes, which conforms to the feature of focusing on one or a specific number of content length values, so the human analysis is continued. .

步驟S36,分析封包內容之後,發現HTTP回覆的封包內容,皆回傳以5個A開頭的字串(字串數為112至3572個),且這些字串似乎有經過編碼。 Step S36, after analyzing the contents of the packet, discovering the content of the HTTP reply packet, and returning the string starting with 5 A (the number of strings is 112 to 3572), and the strings seem to be encoded.

在HTTP請求的內容部分,發現內容長度大於16bytes時,第17個bytes會出現命令提示字元的指令,如cmd/c ipconfig/all、cmd/c dir c:\和cmd/dir c:\users等,可推知其是執行查詢IP組態、資料夾內容等正常網頁不會要求的行為,則可判定IP為200.1.1.100的主機為駭客所安排的惡意中繼站。 In the content part of the HTTP request, when the content length is greater than 16 bytes, the 17th byte will appear command prompt characters, such as cmd/c ipconfig/all, cmd/c dir c:\, and cmd/dir c:\users Etc., it can be inferred that it is a behavior that does not require a normal web page such as querying the IP configuration and the contents of the folder, and it can be determined that the host with the IP of 200.1.1.100 is a malicious relay station arranged by the hacker.

經過使用本發明駭客反向連線行為偵測方法之後,可以確定本實施例為駭客所操縱的反向連線行為,受害主機22向惡意中繼站11送出 HTTP請求,實際作用為向惡意中繼站11進行報到,並在駭客下達控制指令後的HTTP請求封包上顯示執行指令後的結果。 After using the hacker reverse connection behavior detection method of the present invention, it can be determined that the reverse connection behavior manipulated by the hacker in this embodiment is sent to the malicious relay station 11 by the victim host 22. The HTTP request actually acts to report to the malicious relay station 11 and displays the result of the execution command on the HTTP request packet after the hacker issues the control command.

上列詳細說明係針對本發明之一可行實施例之具體說明,惟該實施例並非用以限制本發明之專利範圍,凡未脫離本發明技藝精神所為之等效實施或變更,均應包含於本案之專利範圍中。 The detailed description of the preferred embodiments of the present invention is intended to be limited to the scope of the invention, and is not intended to limit the scope of the invention. The patent scope of this case.

Claims (9)

一種駭客反向連線行為偵測方法,包含:在一統計單位時間內,統計每兩個IP位址間的連線次數;當任兩個IP位址間的連線次數超過一連線次數門檻值,判定該兩個IP位址出現可疑連線行為;當該可疑連線行為係使用HTTP協定連線時,統計該可疑連線行為的每一個連線對話的封包內容長度值,其中,係利用網路封包檢測軟體或網路應用層檢測設備,以判斷該可疑連線行為是否使用HTTP協定連線;以及當該等封包內容長度值的發生次數具有規律性特徵時,對該等連線對話的封包內容進行進一步分析,以判斷該可疑連線行為中的目的IP位址是否為一惡意中繼站。 A method for detecting hacking reverse connection behavior includes: counting the number of connections between two IP addresses in a statistical unit time; when the number of connections between two IP addresses exceeds one connection The threshold value of the number of times, determining that the two IP addresses have suspicious connection behavior; when the suspicious connection behavior is connected by using an HTTP protocol, the packet content length value of each connection session of the suspicious connection behavior is counted, wherein Using a network packet inspection software or network application layer detection device to determine whether the suspicious connection behavior uses HTTP protocol connection; and when the number of occurrences of the packet content length values has regular characteristics, The packet content of the connection dialog is further analyzed to determine whether the destination IP address in the suspicious connection behavior is a malicious relay station. 如請求項1所述的駭客反向連線行為偵測方法,其中,該連線次數係指連線對話的發生次數,該連線對話係指在連線對話時間或統計單位時間結束前,來源IP位址、來源埠號、目的IP位址以及目的埠號,此四項資訊若有一項資訊不同,則視為不同的連線對話。 The method for detecting a hacker reverse connection behavior as described in claim 1, wherein the number of connections refers to the number of occurrences of the connection session, and the connection session refers to the time before the connection session time or the statistical unit time ends. , source IP address, source nickname, destination IP address and destination nickname. If there is a different information, the four pieces of information are regarded as different connection dialogues. 如請求項1所述的駭客反向連線行為偵測方法,其中,該封包內容長度係為連線對話的封包內容的資料部分的位元數。 The hacker reverse connection behavior detecting method according to claim 1, wherein the packet content length is the number of bits of the data portion of the packet content of the connection session. 如請求項1所述的駭客反向連線行為偵測方法,其中,該規律性特徵包含:多個連線對話的封包內容長度值集中在一個或特定幾個內容長度值上。 The hacker reverse connection behavior detecting method according to claim 1, wherein the regularity feature comprises: the packet content length values of the plurality of connection conversations are concentrated on one or a plurality of content length values. 如請求項1所述的駭客反向連線行為偵測方法,其中,該進一步分析包 含:比對該等封包內容是否含有非HTML語法的內容。 The hacker reverse connection behavior detecting method according to claim 1, wherein the further analysis package Contains: Whether the content of the packet contains non-HTML syntax. 如請求項1所述的駭客反向連線行為偵測方法,其中,該進一步分析包含:比對該等封包內容是否含有命令提示字元指令。 The hacker reverse connection behavior detecting method of claim 1, wherein the further analyzing comprises: whether the content of the packet contains a command prompt character instruction. 如請求項6所述的駭客反向連線行為偵測方法,其中,更包含:根據該命令提示字元指令判斷駭客的攻擊手法。 The method for detecting a hacker reverse connection behavior as described in claim 6, wherein the method further comprises: determining, according to the command prompt character command, the attacking method of the hacker. 如請求項1所述的駭客反向連線行為偵測方法,其中,該進一步分析包含:比對該等封包內容是否包含疑似經過編碼的字串。 The hacking reverse connection behavior detecting method of claim 1, wherein the further analyzing comprises: comparing whether the content of the packets includes a suspected encoded string. 如請求項8所述的駭客反向連線行為偵測方法,其中,該疑似經過編碼的字串的特徵包含出現重複的字元。 The hacking reverse connection behavior detecting method of claim 8, wherein the feature of the suspected encoded string comprises a repeated occurrence of a character.
TW106123921A 2017-07-18 2017-07-18 Hacker reverse connection behavior detection method TWI648978B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW106123921A TWI648978B (en) 2017-07-18 2017-07-18 Hacker reverse connection behavior detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106123921A TWI648978B (en) 2017-07-18 2017-07-18 Hacker reverse connection behavior detection method

Publications (2)

Publication Number Publication Date
TWI648978B true TWI648978B (en) 2019-01-21
TW201909592A TW201909592A (en) 2019-03-01

Family

ID=65803878

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106123921A TWI648978B (en) 2017-07-18 2017-07-18 Hacker reverse connection behavior detection method

Country Status (1)

Country Link
TW (1) TWI648978B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101686235A (en) * 2008-09-26 2010-03-31 中联绿盟信息技术(北京)有限公司 Device and method for analyzing abnormal network flow
CN103491095A (en) * 2013-09-25 2014-01-01 中国联合网络通信集团有限公司 Flow cleaning framework and device and flow lead and reinjection method
TW201537381A (en) * 2014-03-31 2015-10-01 Ibm Computer devices and security management device communicationally-connected to the same
US20150381642A1 (en) * 2014-06-30 2015-12-31 Electronics And Telecommunications Research Institute Abnormal traffic detection apparatus and method based on modbus communication pattern learning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101686235A (en) * 2008-09-26 2010-03-31 中联绿盟信息技术(北京)有限公司 Device and method for analyzing abnormal network flow
CN103491095A (en) * 2013-09-25 2014-01-01 中国联合网络通信集团有限公司 Flow cleaning framework and device and flow lead and reinjection method
TW201537381A (en) * 2014-03-31 2015-10-01 Ibm Computer devices and security management device communicationally-connected to the same
US20150381642A1 (en) * 2014-06-30 2015-12-31 Electronics And Telecommunications Research Institute Abnormal traffic detection apparatus and method based on modbus communication pattern learning

Also Published As

Publication number Publication date
TW201909592A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
US11102223B2 (en) Multi-host threat tracking
US20200280572A1 (en) Dga behavior detection
RU2668710C1 (en) Computing device and method for detecting malicious domain names in network traffic
US10587647B1 (en) Technique for malware detection capability comparison of network security devices
US9369434B2 (en) Whitelist-based network switch
KR101890272B1 (en) Automated verification method of security event and automated verification apparatus of security event
US9661008B2 (en) Network monitoring apparatus, network monitoring method, and network monitoring program
US7509681B2 (en) Interoperability of vulnerability and intrusion detection systems
Acer et al. Where the wild warnings are: Root causes of Chrome HTTPS certificate errors
JP2020515962A (en) Protection against APT attacks
WO2021139643A1 (en) Method and apparatus for detecting encrypted network attack traffic, and electronic device
CN112788034B (en) Processing method and device for resisting network attack, electronic equipment and storage medium
US11258812B2 (en) Automatic characterization of malicious data flows
US8713674B1 (en) Systems and methods for excluding undesirable network transactions
CN110348210B (en) Safety protection method and device
Ghafir et al. DNS query failure and algorithmically generated domain-flux detection
TWI677209B (en) Domain name filtering method
CN116451215A (en) Correlation analysis method and related equipment
La et al. Network monitoring using mmt: An application based on the user-agent field in http headers
WO2024036822A1 (en) Method and apparatus for determining malicious domain name, device, and medium
TWI648978B (en) Hacker reverse connection behavior detection method
KR100961870B1 (en) Web security system and method by examination in each network layer
Frank Jr Mirai bot scanner summation prototype
Hsiao et al. Detecting stepping‐stone intrusion using association rule mining
JP2022541250A (en) Inline malware detection