Message receiving and sending method and device

文档序号:1078586 发布日期:2020-10-16 浏览:6次 中文

阅读说明:本技术 一种报文收发方法及装置 (Message receiving and sending method and device ) 是由 叶朝岭 刘贤 刘成伟 于 2018-11-23 设计创作,主要内容包括:一种报文收发方法及装置,用于用户设备访问互联网时降低DNS请求被篡改的概率,从而降低用户设备被恶意攻击的风险,提高用户设备网络访问的安全性。方法包括:用户设备向域名系统DNS服务器发送DNS请求报文,DNS请求报文中包括有效数据部分和随机数据部分,有效数据部分中携带用户设备请求访问的目的域名;用户设备接收来自DNS服务器的DNS响应报文,DNS响应报文中携带目的域名对应的互联网协议IP地址。(A message receiving and sending method and device are used for reducing the probability of tampering DNS requests when user equipment accesses the Internet, so that the risk of malicious attack on the user equipment is reduced, and the security of network access of the user equipment is improved. The method comprises the following steps: user equipment sends a DNS request message to a domain name system DNS server, wherein the DNS request message comprises an effective data part and a random data part, and the effective data part carries a target domain name which the user equipment requests to access; and the user equipment receives a DNS response message from the DNS server, wherein the DNS response message carries the Internet protocol IP address corresponding to the destination domain name.)

A method for transmitting and receiving a message, comprising:

user equipment sends a DNS request message to a domain name system DNS server, wherein the DNS request message comprises an effective data part and a random data part, and the effective data part carries a target domain name which the user equipment requests to access;

and the user equipment receives a DNS response message from the DNS server, wherein the DNS response message carries the Internet protocol IP address corresponding to the target domain name.

The method of claim 1, wherein before the user equipment sends the DNS request message to the domain name system DNS server, further comprising:

the user equipment identifies a source port number of a message to be sent, wherein the message to be sent comprises the effective data part;

and the user equipment adds the random data part at the tail part of the message to be sent to form the DNS request message under the condition that the source port number of the message to be sent is a preset port number.

The method of claim 1 or 2, wherein the length of the random data portion satisfies a preset range.

A method according to any of claims 1 to 3, wherein the data of the random data portion is randomly generated by the user equipment.

The method according to any one of claims 1 to 4, wherein an IP header is included in the DNS request message, length field information in the IP header is used to indicate the length of the DNS request message, and the length indicated by the length field information is the length of the valid data portion or the sum of the lengths of the valid data portion and the random data portion.

A message transceiver, comprising:

the sending module is used for sending a DNS request message to a domain name system DNS server, wherein the DNS request message comprises an effective data part and a random data part, and the effective data part carries a target domain name which is requested to be accessed by the message receiving and sending device;

and the receiving module is used for receiving a DNS response message from the DNS server, wherein the DNS response message carries the Internet protocol IP address corresponding to the destination domain name.

The messaging device of claim 6, further comprising:

a processing module, configured to identify a source port number of a to-be-sent message before the sending module sends the DNS request message to the DNS server, where the to-be-sent message includes the valid data portion; and adding the random data part at the tail of the message to be sent to form the DNS request message under the condition that the source port number of the message to be sent is a preset port number.

The messaging device of claim 6 or 7, wherein the length of the random data portion satisfies a predetermined range.

The messaging device of any of claims 6 to 8, wherein the data of the random data portion is randomly generated by the messaging device.

The messaging device according to any one of claims 6 to 9, wherein an IP header is included in the DNS request message, length field information in the IP header is used to indicate a length of the DNS request message, and the length indicated by the length field information is a length of the valid data portion or a sum of the lengths of the valid data portion and the random data portion.

A computer storage medium, having a program stored thereon, which, when executed by a processor, is adapted to carry out the method of any one of claims 1 to 5.

A computer program product comprising program code which, when run on a computer, causes the computer to perform the method according to any one of claims 1 to 5.

25页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于机动车的控制系统、用于运行控制系统的方法以及具有这种控制系统的机动车

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类