"Instant messaging technology analysis and practical" study notes 6 - How IM system to ensure the safety message

In the message generation, in all aspects of circulation, we need to ensure the security of message transmission, storage security message, the message content security.

A message transmission security

The important point to prevent the transmission of the message are the two access entrance security, and second transmission link security.
1.HttpDNS ensure secure access entry
access entry refers to the instant messaging service access service provided in a public network, a user messaging gateway, which is provided to the client by way of a domain name. Common problems are DNS hijacking.
The reason DNS hijacking
1) DNS settings of the router hacked tampered with;
2) the operator's access LocalDNS could lead to resolve the domain name was hijacked.
Here to explain: LocalDNS is part of the operators in order to reduce the cross-network traffic, content caching part of the domain name to point, point to the IP address of the domain name to force their own content cache server.

  • Operators may modify the DNS TTL (time-to-live, DNS cache time), causing the DNS changes to take effect delayed, affecting service availability.
  • Operators may order to reduce the pressure of its own resources, to forward DNS requests to other carriers resolved, so the assigned IP address can be problematic inter-carrier access, leading to slow and even requested is not available.

DNS hijacking method of preventing
1) If the router's DNS has been tampered with, you can reset the router's configuration, modifying routing management password.
2) If the operator LocalDNS domain name hijacking and scheduling errors, you can use HttpDNS.

  • HttpDNS bypassing the operator's LocalDNS, through the HTTP protocol to interact directly with the DNS server, effectively prevent domain hijacking operators.
  • HttpDNS server can retrieve the real IP user exit, and thus closer to the user can select an access node, or a plurality of return IP access, so that the client IP faster access speed selected by speed, etc., so that access scheduling more accurate.

2.TLS transport layer encryption protocol to ensure secure transmission link
message transmission link there is a problem mainly in the following reasons:
1) break : an attacker to compromise or cut off network, disrupt service availability, is an active attack;
2) interception : attacker illegal theft message content transmission, a passive attacker;
3) tamper : attackers from modifying the message content transmission, destruction of the integrity and authenticity of the message semantics;
4) forgery : normal correspond attacker to forge a message or analog simulate normal user IM Server.

For the first reason, it can take a multi-channel way to enhance the link availability , in order to address the message link is down;
for the latter three reasons, may use proprietary protocols and TLS (encrypted message content) carried out prevention and control .

TLS skillfully "symmetric encryption algorithm", "asymmetric encryption algorithm", "key exchange algorithm", "a message authentication code algorithm", "digital signature certificate", "the CA certification" binding, effectively solve the message transmission during the interception, tampering, counterfeiting problem.

Second, the message store security

If the message is stored on the server, regardless of the content of the message is plain text or cipher text of risk, there will be leaks. The best way to ensure that the message content storage security are:
1. The message content is not stored in the server (this nothing to say, most of the scenes are estimated to be stored on the server side);
2. message content using "end to end encryption." (E2EE), the middle part of any link does not decrypt the message, so in addition to sending and receiving sides, any other intermediate links can not get the original message content.

"End to end encryption" is all the more secure because TLS encryption and server are not the same.
It is generated by each of the parties of the communication and exchange of public key, the private key is not stored locally to each IM service to the terminal.
Message using the sender's public key to encrypt the receiver, even if the IM server to get the encrypted message, the receiver also because without the private key can not be decrypted.

Third, the message content security

Content security refers primarily to identify and control the spread of content, usually relying on third-party content identification service to guard against. Common scenarios are:
1. Establish a sensitive thesaurus, security identification for the text.
2. Relying on the picture recognition technology to pornographic images / video / advertising, and other related political picture identification, treatment.
3. Use the "speech to text" and OCR (picture text recognition) assist the picture, further tap recognizing speech.
4. Links analyzed by crawler technology to identify "risk outside the chain."

For the IM server, the thing to do is to establish the "recognition" of supporting the disposal of punishment mechanisms, such as the group was made to identify pornographic images on the user "gag" treatment, or a "dissolution of the group" operation, to analyze specific business.

Guess you like

Origin www.cnblogs.com/sunshineliulu/p/11515292.html