patents.google.com

CN104754071A - Method for detecting DNS (Domain Name-implementation and Specification) tunnel data based on DNS protocol standard - Google Patents

  • ️Wed Jul 01 2015
Method for detecting DNS (Domain Name-implementation and Specification) tunnel data based on DNS protocol standard Download PDF

Info

Publication number
CN104754071A
CN104754071A CN201310755997.7A CN201310755997A CN104754071A CN 104754071 A CN104754071 A CN 104754071A CN 201310755997 A CN201310755997 A CN 201310755997A CN 104754071 A CN104754071 A CN 104754071A Authority
CN
China
Prior art keywords
dns
packet
data
protocol
content
Prior art date
2013-12-31
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.)
Pending
Application number
CN201310755997.7A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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.)
2013-12-31
Filing date
2013-12-31
Publication date
2015-07-01
2013-12-31 Application filed by Individual filed Critical Individual
2013-12-31 Priority to CN201310755997.7A priority Critical patent/CN104754071A/en
2015-07-01 Publication of CN104754071A publication Critical patent/CN104754071A/en
Status Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention belongs to the technical field of computer networks, and discloses a method for distinguishing standard DNS (Domain Name-implementation and Specification) protocol data and DNS tunnel data. The system acquires a data packet of a DNS port. When the data packet reaches a detection system, 1, the system examines the length of data packet content and considers that the data is the DNS tunnel data if the length is greater than 512 bits; 2, the system examines the content of the data packet and judges whether the standard DNS protocol is met (for example, a client transmits DNS Query, and a server responds DNS Response). If the standard DNS protocol is met, the system considers that the data is the DNS protocol data, and otherwise considers that the data is the DNS tunnel data. By using the method, the DNS tunnel data can be recognized and differentiated service is performed, or the non-DNS protocol data is stopped from penetrating through the DNS port.

Description

Based on the method for DNS Protocol standard detection DNS tunneling data

Technical field

The invention belongs to technical field of the computer network, is a kind of method distinguishing standard DNS Protocol data and DNS tunneling data.

Background technology

Along with the development of Internet technology, how to control Intranet user access the Internet and become the emphasis of network management.Traditional network management distinguishes various network service with port, is realized the control of extranet access by open or closedown certain port.DNS name resolution, as most basic Internet service, needs to open to use to user usually.Its DNS Protocol that uses, default port is UDP53.In view of DNS port is generally open, much software employs DNS tunneling technique one after another and outside connects.DNS Protocol data and DNS tunneling data all use identical port, therefore can not simply by close port control DNS tunneling data, otherwise user cannot resolve domain name.Traditional port controlling method cannot tackle DNS penetration tunnel technology, and the safety of internal network in unwarranted extranet access serious threat.

Summary of the invention

The object of the invention is to propose a kind of method distinguishing standard DNS Protocol data and DNS tunneling data, use the present invention can identify DNS tunneling data and differentiated services is carried out to it, or stoping non-DNS Protocol data to penetrate DNS port.

DNS tunneling data Cleaning Principle:

The DNS Protocol of standard defers to RFC1035 (Domain names-implementation and specification) standard.

Description according to RFC document:

1, the content size (not comprising IP head and UDP head) entrained by DNS packet must not more than 512 bytes.

2, DNS packet must comprise header information, and in header information, show that this packet is DNS Query or DNS is Response.

3, DNS client sends DNS Query inquiry of the domain name request to service end, after DNS service end receives client query request, will return the DNS Response response message of identical ID.

DNS tunneling data then adopts proprietary protocol, and it does not defer to DNS Protocol standard.In order to carry more data information, the content size of packet usually can more than 512 bytes.The packet content that client issues service end does not meet DNS Query inquiry of the domain name request format; The packet content that service end returns to client does not meet DNS Response response message format yet.

According to these difference, we can distinguish by the packet of DNS port is DNS Protocol packet or DNS tunneling data bag.

Accompanying drawing explanation

Fig. 1 is present system network design mode figure

Fig. 2 is DNS data packet header information format

Fig. 3 is that present system is to client data bag overhaul flow chart

Fig. 4 is that present system is to service end packet overhaul flow chart

Embodiment

Below in conjunction with accompanying drawing, the present invention is further described in detail.

Grid deployment way:

See Fig. 1, present system is deployed in the egress gateways place of local area network (LAN) connecting Internet usually, catches the packet of designated port from network.This port is generally UDP53, also can specify or increase other ports if desired.

Data packet detection method:

The standard detected is to judge whether the packet by this port meets DNS Protocol, as long as the packet not meeting RFC1035 document description can be judged to be DNS tunneling data bag, otherwise is DNS Protocol packet.

RFC1035 regulation DNS packet content length must not more than 512 bytes.If packet content length is greater than 512 bytes, then this packet can be judged to be DNS tunneling data bag.

Specify that DNS packet must comprise the header information of 12 bytes see Fig. 2, RFC1035.Header information the first two byte (totally 16) is No. ID, and the DNS query bag that client sends and the DNS respond packet that service end returns must have identical ID.Header information the 17th is QR flag bit, and QR flag bit is this packet of 0 expression is DNS Query packet, and QR flag bit is this packet of 1 expression is DNSResponse packet.Header information 26-28 position retains position (Z flag bit), and the Z flag bit of DNS packet is necessary for 0.

Here select for the efficient detection mode of one: by detecting packet content length, QR flag bit and Z flag bit, determine whether DNS Protocol packet.But and do not mean that the present invention can only in this, as unique detection method.

1, client data detects

See Fig. 3, system acquisition issues the packet of service end to client, first calculates the packet content length not containing IP head and UDP head.If packet content length is greater than 512 bytes, then judge that this packet is as DNS tunneling data bag.Then packet content the 17th (QR flag bit) is extracted.If QR flag bit is not 0, then judge that this packet is as DNS tunneling data bag.Then packet content 26-28 position (Z flag bit) is extracted.If Z flag bit is not 0, then judges that this packet is as DNS tunneling data bag, otherwise be DNS Protocol packet.

2, service end Data Detection

See Fig. 4, system acquisition issues the packet of client to service end, first calculates the packet content length not containing IP head and UDP head.If packet content length is greater than 512 bytes, then judge that this packet is as DNS tunneling data bag.Then packet content the 17th (QR flag bit) is extracted.If QR flag bit is not 1, then judge that this packet is as DNS tunneling data bag.Then packet content 26-28 position (Z flag bit) is extracted.If Z flag bit is not 0, then judges that this packet is as DNS tunneling data bag, otherwise be DNS Protocol packet.

The data communication of client and service end is two-way.Therefore can select only to detect client data, also can select only to detect service end data, can also select to detect client data and service end data simultaneously.

The advantage of this detection method is that it is simply efficient.Use the method to filter DNS port data, can ensure all DNS Protocol packets normal through, tackle most of non-DNS Protocol packet simultaneously, make it to form DNS tunnel.Want complete identification DNS Protocol packet or DNS tunneling data bag, suitably increase ID checking, the checking of other flag bits and inquiry response content format and verify.

Above embodiment is only unrestricted for illustration of the present invention.Those of ordinary skill in the art should be appreciated that and revise distortion to the present invention or equivalent to replace, and do not depart from scope of the present invention, and it all should be encompassed in the middle of claim of the present invention.

Claims (4)

1. distinguish the method for standard DNS Protocol data and DNS tunneling data for one kind.It comprises following steps:

(1): system acquisition designated port packet;

(2): check the content-length of packet and judge whether it exceedes designated length, if exceeded, thinking DNS tunneling data;

(3): check packet content and judge whether it meets standard DNS Protocol.If met, think DNS Protocol data, otherwise think DNS tunneling data.

2. method according to claim 1, described step (2) judges whether packet is DNS Protocol packet.It is characterized in that: check that whether the content-length of packet is more than 512 bytes.

3. method according to claim 1, described step (3) judges whether packet is DNS Protocol packet.It is characterized in that: check the DNS Query data packet format whether packet content that client issues service end meets RFC1035 and describe.

4. method according to claim 1, described step (3) judges whether packet is DNS Protocol packet.It is characterized in that: check the DNS Response data packet format whether packet content that service end issues client meets RFC1035 and describe.

CN201310755997.7A 2013-12-31 2013-12-31 Method for detecting DNS (Domain Name-implementation and Specification) tunnel data based on DNS protocol standard Pending CN104754071A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310755997.7A CN104754071A (en) 2013-12-31 2013-12-31 Method for detecting DNS (Domain Name-implementation and Specification) tunnel data based on DNS protocol standard

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310755997.7A CN104754071A (en) 2013-12-31 2013-12-31 Method for detecting DNS (Domain Name-implementation and Specification) tunnel data based on DNS protocol standard

Publications (1)

Publication Number Publication Date
CN104754071A true CN104754071A (en) 2015-07-01

Family

ID=53593157

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310755997.7A Pending CN104754071A (en) 2013-12-31 2013-12-31 Method for detecting DNS (Domain Name-implementation and Specification) tunnel data based on DNS protocol standard

Country Status (1)

Country Link
CN (1) CN104754071A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109474575A (en) * 2018-09-11 2019-03-15 北京奇安信科技有限公司 A kind of detection method and device in the tunnel DNS
CN109842588A (en) * 2017-11-27 2019-06-04 腾讯科技(深圳)有限公司 Network data detection method and relevant device
CN111343042A (en) * 2020-02-05 2020-06-26 网宿科技股份有限公司 DNS analysis test method and test system
CN112367312A (en) * 2020-10-30 2021-02-12 北京亚鸿世纪科技发展有限公司 Detection method and device for studying and judging DNS hidden tunnel
CN115297083A (en) * 2022-08-03 2022-11-04 左道明 Domain name system tunnel detection method and system based on data volume and behavior characteristics

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103179100A (en) * 2011-12-26 2013-06-26 中国移动通信集团广西有限公司 A method and device for preventing domain name system tunnel attack
CN103326894A (en) * 2013-05-29 2013-09-25 深信服网络科技(深圳)有限公司 DNS tunnel detection method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103179100A (en) * 2011-12-26 2013-06-26 中国移动通信集团广西有限公司 A method and device for preventing domain name system tunnel attack
CN103326894A (en) * 2013-05-29 2013-09-25 深信服网络科技(深圳)有限公司 DNS tunnel detection method and device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109842588A (en) * 2017-11-27 2019-06-04 腾讯科技(深圳)有限公司 Network data detection method and relevant device
CN109842588B (en) * 2017-11-27 2022-01-07 腾讯科技(深圳)有限公司 Network data detection method and related equipment
CN109474575A (en) * 2018-09-11 2019-03-15 北京奇安信科技有限公司 A kind of detection method and device in the tunnel DNS
CN109474575B (en) * 2018-09-11 2022-04-12 奇安信科技集团股份有限公司 A kind of detection method and device of DNS tunnel
CN111343042A (en) * 2020-02-05 2020-06-26 网宿科技股份有限公司 DNS analysis test method and test system
CN111343042B (en) * 2020-02-05 2022-02-22 网宿科技股份有限公司 DNS analysis test method and test system
CN112367312A (en) * 2020-10-30 2021-02-12 北京亚鸿世纪科技发展有限公司 Detection method and device for studying and judging DNS hidden tunnel
CN112367312B (en) * 2020-10-30 2022-10-11 北京亚鸿世纪科技发展有限公司 Detection method and device for studying and judging DNS hidden tunnel
CN115297083A (en) * 2022-08-03 2022-11-04 左道明 Domain name system tunnel detection method and system based on data volume and behavior characteristics
CN115297083B (en) * 2022-08-03 2023-09-12 左道明 Domain name system tunnel detection method and system based on data volume and behavior characteristics

Similar Documents

Publication Publication Date Title
CN104754071A (en) 2015-07-01 Method for detecting DNS (Domain Name-implementation and Specification) tunnel data based on DNS protocol standard
CN105577496B (en) 2018-06-15 The system that a kind of home gateway identifies access device type using cloud platform
CN104320304A (en) 2015-01-28 Multimode integration core network user traffic application identification method easy to expand
CN101599897B (en) 2012-02-22 A peer-to-peer network traffic control method based on application layer detection
CN105491018B (en) 2019-02-12 A kind of network data security analysis method based on DPI technology
CN109587156A (en) 2019-04-05 Abnormal network access connection identification and blocking-up method, system, medium and equipment
CN101820396A (en) 2010-09-01 Method and device for verifying message safety
US20160006740A1 (en) 2016-01-07 Method and system for extracting access control list
CN106657035B (en) 2019-12-03 A kind of network message transmission method and device
CN107317729A (en) 2017-11-03 A kind of active probe method of the multiple network interconnection based on ICMP agreements
CN101309274A (en) 2008-11-19 Method for Creating Rule Base of Hybrid Architecture Intrusion Detection System
CN106850731A (en) 2017-06-13 Remote control method, server and system
CN101184089A (en) 2008-05-21 A Protocol Identification Method Based on Port and Content Confusion Detection
CN103905421A (en) 2014-07-02 Suspicious event detection method and system based on URL heterogeneity
CN106131153B (en) 2019-09-10 Business recognition method and device based on intelligent gateway
CN103001966B (en) 2016-06-08 The process of a kind of private network IP, recognition methods and device
CN104702591A (en) 2015-06-10 Method and system for penetrating through firewall based on port forwarding multiplexing technology
CN102546548B (en) 2015-04-01 Method and device for recognizing layer protocol
CN106899616A (en) 2017-06-27 A kind of safety regulation collocation method without IP fire walls
CN105812324A (en) 2016-07-27 Method, device and system for IDC information safety management
CN104243228A (en) 2014-12-24 Method for detecting HTTP tunnel data based on conversation and HTTP protocol standard
CN107196931A (en) 2017-09-22 A kind of deep message detection method based on network isolating device
KR101896551B1 (en) 2018-09-10 Separated network bridge system and control method thereof
CN110493036A (en) 2019-11-22 A kind of management-control method of gateway
CN106534182A (en) 2017-03-22 Traceless network evidence acquisition method based on user state protocol stack

Legal Events

Date Code Title Description
2015-07-01 C06 Publication
2015-07-01 PB01 Publication
2015-07-29 C10 Entry into substantive examination
2015-07-29 SE01 Entry into force of request for substantive examination
2018-07-31 WD01 Invention patent application deemed withdrawn after publication
2018-07-31 WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150701