RFB protocol security proxy system and connection method

Through the RFB protocol security proxy system, temporary connection information and two-factor authentication are dynamically generated, combined with access control policies, to solve the problem of insufficient security of the RFB protocol and improve the security and stability of remote office.

CN118611932APending Publication Date: 2024-09-06YANGTZE DELTA REGION INST OF TSINGHUA UNIV ZHEJIANG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410730218.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The RFB protocol has problems such as unencrypted communication, insufficient authentication, lack of access control, and vulnerability to DoS/DDoS attacks, resulting in insufficient remote office security.

Method used

Provide an RFB protocol security proxy system, including client, proxy server and server. The proxy server dynamically generates temporary network addresses and ports, performs IP inspection, double authentication and access control policies, intercepts and filters RFB messages, and achieves secure connections. and data transmission.

Benefits of technology

The proxy server exposes temporary connection information to the client, dynamically establishes an RFB proxy, performs IP security checks and double authentication, and realizes access control of RFB messages, which improves the security of remote office and prevents man-in-the-middle attacks and denial of service attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118611932A
    Figure CN118611932A
Patent Text Reader

Abstract

The invention discloses an RFB protocol security proxy system and a connection method, the system comprises a client, a proxy server and a server, and a proxy service is operated on the proxy server; the client requests a proxy service to obtain a network address, a port and a connection password of the RFB proxy; the proxy service dynamically distributes and creates an RFB proxy according to the load condition; information which is set by the server and comprises a network address, a port and a connection password is stored and managed by the proxy service; the network address, the port and the temporary password of the RFB proxy are dynamically generated by the proxy service and have certain timeliness; after the client successfully establishes the TCP connection with the RFB proxy, the RFB proxy obtains the network address, the port and the connection password of the server from the proxy service; and after the RFB proxy successfully obtains the server connection information, the client establishes RFB protocol connection with the server through the RFB proxy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of information technology, and in particular relates to an RFB protocol security proxy system and a connection method. Background Art

[0002] The rapid development of information technology has brought great convenience to the daily work of enterprises and government agencies, but it has also brought unprecedented challenges to cyberspace security. While people enjoy the convenience brought by remote work, they are also worried about the threats brought by remote work.

[0003] Virtual Network Computing (VNC) is an open source remote desktop system implemented using the Remote Framebuffer (RFB) protocol. It allows users to connect to another computer through the network and see the desktop environment of the computer, and then perform real-time operations and controls. Therefore, using VNC and RFB technology can better achieve secure remote office.

[0004] The RFB protocol is a protocol for remote access and control of computer graphical interfaces. It works at the application layer of the seven-layer network protocol and allows users to view and operate the desktop of another computer from a remote location through a network connection. The RFB protocol works at the application layer and is designed to provide a thin client solution, that is, the client does not need to have powerful processing power or a complex software environment to achieve interactive control of the remote desktop. The data transmitted by the RFB protocol includes frame buffer change information, so it can reflect the status changes of the remote computer desktop in real time and transmit these changes to the local client in the form of images for display. Since RFB is based on frame buffer operations, it is compatible with graphical interfaces on various operating system platforms, such as Windows, Mac OS X, Linux, etc. When the RFB protocol itself was originally designed, it mainly focused on providing basic remote desktop functions and did not consider security more. Therefore, the RFB protocol has some security issues: (1) Unencrypted communication problem. The RFB protocol does not encrypt data by default. All transmitted information (including mouse movement, keyboard input, and screen content) is transmitted in plain text on the Internet, which is vulnerable to man-in-the-middle attacks (MITM), exposing sensitive information; (2) Insufficient authentication. The initial version of the RFB protocol only provides very basic authentication mechanisms, such as VNC password verification. This verification method is very simple and vulnerable to brute force attacks; (3) Lack of access control. The early version of the RFB protocol did not have a built-in strict access control mechanism. Anyone who knew the correct password could directly connect to the VNC server; (4) Vulnerable to DoS / DDoS attacks. Due to the lack of appropriate traffic control and defense mechanisms, the RFB service may become the target of denial of service attacks. Summary of the invention

[0005] In view of the above problems, the present invention provides an RFB protocol security proxy system and a connection method.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0007] On one hand, the present invention provides an RFB protocol security proxy system, comprising a client, a proxy server and a server, wherein the proxy service runs on the proxy server; the client requests the proxy service to obtain the network address, port and connection password of the RFB proxy; the proxy service dynamically allocates and creates the RFB proxy according to the load situation; the information including the network address, port and connection password set by the server is saved and managed by the proxy service; the network address, port and temporary password of the RFB proxy are dynamically generated by the proxy service and have a certain timeliness; after the client successfully establishes a TCP connection with the RFB proxy, the RFB proxy obtains the network address, port and connection password of the server from the proxy service; after the RFB proxy successfully obtains the server connection information, the client establishes an RFB protocol connection with the server via the RFB proxy.

[0008] Another aspect of the present invention provides an RFB protocol secure proxy connection method, which adopts the RFB protocol secure proxy system as described above, and is characterized in that the client establishes an RFB protocol connection with the server via the RFB proxy, including a handshake stage.

[0009] In a possible implementation, the handshake phase includes: after the client establishes a TCP connection with the proxy server, the proxy server checks whether the client's IP complies with the security rules set by the proxy server; if the client's IP complies with the security rules set by the proxy server, the proxy server continues to establish a TCP connection with the VNC server, after which the proxy server first sends version X to the client; after receiving X, the client sends version Y not higher than X to the server to complete the handshake; if the client's IP does not comply with the security rules set by the proxy server, the proxy server directly disconnects the client and does not proceed to the next step.

[0010] In a possible implementation manner, the establishment of an RFB protocol connection between the client and the server via the RFB proxy further includes an RFB protocol authentication process.

[0011] In a possible implementation manner, the authentication process of the RFB protocol includes:

[0012] The server sends a list of optional authentication to the client;

[0013] The proxy server intercepts the optional authentication list, filters out unsafe methods, and sends the new optional authentication list to the client;

[0014] The client responds with the selected authentication method;

[0015] The proxy server intercepts the authentication method replied by the client, checks whether the authentication method meets the requirements, and forwards it to the server if it meets the requirements; otherwise, terminates the client connection;

[0016] The server requires the client to authenticate, and the proxy server forwards directly;

[0017] The client submits authentication information to the server;

[0018] After the proxy server intercepts the authentication information, it sends it to the authentication center for third-party authentication;

[0019] The authentication center replies to the proxy server with the authentication result. If the authentication is successful, the reply includes the real authentication information of the server. If the authentication fails, the proxy server sends a failure message to the client.

[0020] After the third-party authentication is passed, the proxy server sends the real authentication information to the server;

[0021] The server responds with the authentication result;

[0022] The proxy server forwards the authentication result of the server to the client;

[0023] After successful authentication, the client sends initialization information to the server;

[0024] The server sends initialization information to the client.

[0025] In a possible implementation, the client establishes an RFB protocol connection with the server via the RFB proxy, further including an interaction phase, the RFB proxy intercepts RFB messages in the interaction phase and filters the messages according to the access control policy, and saves the RFB message records to the RFB file.

[0026] In a possible implementation, the interaction phase further includes a two-way event of copying and pasting between the client and the server. The RFB agent intercepts and processes the client message ClientCutText and the server message ServerCutText to implement access control policies for the remote desktop, including "in and out", "in only but not out" or "out only but not in". The ServerCutText message is used by the server to actively inform the client that its clipboard content has changed. When the clipboard content on the remote server is updated, the server will send a ServerCutText message to the client to notify the client to update the local clipboard content to achieve real-time synchronization of the clipboard content. The ClientCutText message is sent by the client to the server, indicating that the client's clipboard content has changed and the new text data is now available to the server. When the user performs a copy operation on the local computer, the client packages the text content in the clipboard into this message and then sends it to the remote server. After receiving the ClientCutText message, the server will update its own clipboard content so that the user can insert this data into the remote desktop application through a paste operation during the remote session.

[0027] In a possible implementation, the following is further included: a specific copy and paste access control policy is as follows:

[0028] (1) No entry and no exit: The client's clipboard content cannot enter the server's clipboard, and the server's content cannot enter the client. The RFB proxy intercepts all ClientCutText and ServerCutText messages and discards them all.

[0029] (2) Only in but not out: This means that the client's clipboard content can enter the server's clipboard, but the server's content cannot enter the client. The RFB proxy intercepts all ServerCutText messages and discards them, while allowing all ClientCutText messages to pass.

[0030] (3) Only outgoing but not incoming: Indicates that the client's clipboard content cannot enter the server's clipboard, but the server's content can enter the client. The RFB proxy intercepts all ClientCutText messages, discards them all, and allows all ServerCutText messages to pass.

[0031] (4) Accessible: This means that the client's clipboard content can enter the server's clipboard, and the server's content can also enter the client's clipboard. The RFB proxy can allow all ClientCutText and ServerCutText messages to pass.

[0032] The present invention has the following beneficial effects:

[0033] (1) Expose temporary connection information (such as IP and port) to the client through the proxy server, and do not directly expose the connection information of the RFB server.

[0034] (2) Considering the entire system, the RFB proxy is dynamically established on demand, and there is no proxy when the client does not request it.

[0035] (3) After the client establishes a TCP connection with the proxy server, a security check is performed on the client IP. Security rules include blacklist or whitelist rules, whether there are frequent connection requests within a period of time, etc. If the client does not meet the security rules set by the proxy server, the client will be disconnected directly.

[0036] (4) Double authentication strategy: the authentication from the client to the proxy server is completed by the authentication center, and after the authentication, the proxy server goes to the server for authentication.

[0037] (5) During the interaction process, the RFB proxy intercepts and processes the ClientCutText and ServerCutText messages to achieve copy and paste control between the client and the server.

[0038] (6) All messages from the client to the server pass through the RFB agent, which can save these messages as files to facilitate audit tracing. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a principle block diagram of the RFB protocol security proxy system according to an embodiment of the present invention;

[0040] Figure 2 It is a flow chart of the handshake phase in the RFB protocol secure proxy connection method according to an embodiment of the present invention;

[0041] Figure 3 It is a flow chart of the authentication phase in the RFB protocol secure proxy connection method according to an embodiment of the present invention;

[0042] Figure 4 It is a flow chart of the interaction phase in the RFB protocol secure proxy connection method according to an embodiment of the present invention;

[0043] Figure 5 A schematic diagram of the clipboard message structure of the RFB protocol in the interactive phase of the RFB protocol secure proxy connection method according to an embodiment of the present invention;

[0044] Figure 6 The present invention is a schematic diagram of the data structure of the extended clipboard in the interactive phase of the RFB protocol secure proxy connection method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] Reference Figure 1 The present invention discloses an RFB protocol security proxy system, including a client, a proxy server and a server, wherein the proxy service runs on the proxy server; the client requests the proxy service to obtain the network address, port and connection password of the RFB proxy; the proxy service dynamically allocates and creates the RFB proxy according to the load situation; the information including the network address, port and connection password set by the server is saved and managed by the proxy service; the network address, port and temporary password of the RFB proxy are dynamically generated by the proxy service and have a certain timeliness; after the client successfully establishes a TCP connection with the RFB proxy, the RFB proxy obtains the network address, port and connection password of the server from the proxy service; after the RFB proxy successfully obtains the server connection information, the client establishes an RFB protocol connection with the server via the RFB proxy.

[0047] Using the RFB protocol security proxy system set up above, the embodiment of the present invention also provides an RFB protocol security proxy connection method. The client establishes an RFB protocol connection with the server via the RFB proxy, including a handshake phase, an authentication phase, an interaction phase and a waving phase.

[0048] The protocol handshake reaches a consensus on the protocol version used by the client and server during the communication process, and if possible, achieves forward compatibility with different protocol versions. The RFB protocol itself is an application layer protocol based on the TCP protocol, so a TCP connection must be established first. After the connection is established, the server first sends version X to the client. After receiving X, the client sends version Y not higher than X to the server to complete the handshake. RFB has three public optional versions 3.3 / 3.7 / 3.8. See Figure 2In another embodiment of the present invention, the handshake stage in the RFB protocol secure proxy connection method includes: after the client establishes a TCP connection with the proxy server, the proxy server checks whether the client's IP meets the security rules set by the proxy server. If the client's IP meets the security rules set by the proxy server, the proxy server continues to establish a TCP connection with the server. Thereafter, the proxy server first sends version X to the client. After receiving X, the client sends version Y not higher than X to the server to complete the handshake; if the client IP does not meet the security rules set by the proxy server, the proxy server directly disconnects the client and does not proceed to the next step.

[0049] After the protocol version is negotiated, the client and server perform a secure handshake, reach a consensus on the authentication method, and complete the authentication process. Figure 3 In another embodiment of the present invention, the authentication process of the RFB protocol in the RFB protocol secure proxy connection method includes:

[0050] The server sends a list of optional authentication to the client;

[0051] The proxy server intercepts the optional authentication list, filters out unsafe methods, and sends the new optional authentication list to the client;

[0052] The client responds with the selected authentication method;

[0053] The proxy server intercepts the authentication method replied by the client, checks whether the authentication method meets the requirements, and forwards it to the server if it meets the requirements; otherwise, terminates the client connection;

[0054] The server requires the client to authenticate, and the proxy server forwards directly;

[0055] The client submits authentication information to the server;

[0056] After the proxy server intercepts the authentication information, it sends it to the authentication center for third-party authentication;

[0057] The authentication center replies to the proxy server with the authentication result. If the authentication is successful, the reply includes the real authentication information of the server. If the authentication fails, the proxy server sends a failure message to the client.

[0058] After the third-party authentication is passed, the proxy server sends the real authentication information to the server;

[0059] The server responds with the authentication result;

[0060] The proxy server forwards the authentication result of the server to the client;

[0061] After successful authentication, the client sends initialization information to the server;

[0062] The server sends initialization information to the client.

[0063] In the interactive phase of the RFB protocol security proxy connection method of another embodiment of the present invention, the RFB proxy intercepts the RFB message of the interactive phase and filters the message according to the access control policy, and saves the RFB message record to the RFB file. Figure 4 The interaction phase further includes two-way events of copying and pasting between the client and the server. The RFB agent intercepts and processes the client message ClientCutText and the server message ServerCutText to implement access control policies for the remote desktop, including "in and out", "in only but not out" or "out only but not in". The ServerCutText message is used by the server to actively inform the client that its clipboard content has changed. When the clipboard content on the remote server is updated, the server will send a ServerCutText message to the client to notify the client to update the local clipboard content to achieve real-time synchronization of the clipboard content. The ClientCutText message is sent by the client to the server, indicating that the client's clipboard content has changed and the new text data is now available to the server. When the user performs a copy operation on the local computer, the client packages the text content in the clipboard into this message and then sends it to the remote server. After receiving the ClientCutText message, the server will update its own clipboard content, so that the user can insert this data into the remote desktop application through a paste operation during the remote session.

[0064] The message structure of ServerCutText and ClientCutText of the native RFB protocol includes 1 byte of message-type, 3 bytes of blank, 4 bytes of length and several bytes of content, such as Figure 5The figure shows the clipboard message structure of the RFB protocol, and stipulates that the message-type of ServerCutText is 0x3, and the message-type of ClientCutText is 0x6. So if you only control "no in and no out", "both in and out", "only in and no out" or "only out and no in", the RFB agent only intercepts the message types "0x3" of Server to Client Messages and "0x6" of Client to Server Messages, and releases or discards the two types of messages according to the policy. Furthermore, it can also process the content type of copy and paste. Although the RFB 3.8 protocol limits the clipboard to only transmit the Latin-1 character set. However, in 2016, Cendio Ossman merged Extended Clipboard Pseudo-Encoding into the main branch of the protocol to support the transmission of unicode character sets in clipboard messages. UltraVNC / TigerVNC / RealVNC servers all support this extended protocol. For example Figure 6 As shown in the figure, the 4-byte text-type is extended in the message structure of Extended Cliboard. The type of message content can be distinguished by the different values ​​of this field, such as text, rft, html, files, etc. The access control policy of the RFB agent can more accurately control the type of content copied and pasted.

[0065] Furthermore, the specific copy and paste access control policy is as follows:

[0066] (1) No entry and no exit: The client's clipboard content cannot enter the server's clipboard, and the server's content cannot enter the client. The RFB proxy intercepts all ClientCutText and ServerCutText messages and discards them all.

[0067] (2) Only in but not out: This means that the client's clipboard content can enter the server's clipboard, but the server's content cannot enter the client. The RFB proxy intercepts all ServerCutText messages and discards them, while allowing all ClientCutText messages to pass.

[0068] (3) Only outgoing but not incoming: Indicates that the client's clipboard content cannot enter the server's clipboard, but the server's content can enter the client. The RFB proxy intercepts all ClientCutText messages, discards them all, and allows all ServerCutText messages to pass.

[0069] (4) Accessible: This means that the client's clipboard content can enter the server's clipboard, and the server's content can also enter the client's clipboard. The RFB proxy can allow all ClientCutText and ServerCutText messages to pass.

[0070] To further control the above four policies and control the type of copy and paste content, it is necessary to further analyze the message type of the intercepted content. First, it is necessary to determine whether Extended Clipboard Pseudo-Encoding is supported, then it is necessary to intercept ClientCutText or ServerCutText messages, and finally it is necessary to control the release or discard of the message based on the text-type of the intercepted message and the set policy.

[0071] It should be understood that the exemplary embodiments described herein are illustrative rather than restrictive. Although one or more embodiments of the present invention are described in conjunction with the accompanying drawings, it should be understood by those skilled in the art that various changes in form and detail may be made without departing from the spirit and scope of the present invention as defined by the appended claims.

Claims

1. An RFB protocol security proxy system, characterized in that: The invention comprises a client, a proxy server and a server, wherein the proxy service runs on the proxy server; the client requests the proxy service to obtain the network address, port and connection password of the RFB proxy; the proxy service dynamically allocates and creates the RFB proxy according to the load situation; the information including the network address, port and connection password set by the server is saved and managed by the proxy service; the network address, port and temporary password of the RFB proxy are dynamically generated by the proxy service and have a certain timeliness; after the client successfully establishes a TCP connection with the RFB proxy, the RFB proxy obtains the network address, port and connection password of the server from the proxy service; after the RFB proxy successfully obtains the server connection information, the client establishes an RFB protocol connection with the server via the RFB proxy.

2. A RFB protocol secure proxy connection method, using the RFB protocol secure proxy system as claimed in claim 1, characterized in that: The client establishes an RFB protocol connection with the server via the RFB proxy, including the handshake phase.

3. The RFB protocol secure proxy connection method as claimed in claim 2, characterized in that: The handshake stage includes: after the client establishes a TCP connection with the proxy server, the proxy server checks whether the client's IP meets the security rules set by the proxy server. If the client's IP meets the security rules set by the proxy server, the proxy server continues to establish a TCP connection with the server. Thereafter, the proxy server first sends version X to the client. After receiving X, the client sends version Y not higher than X to the server to complete the handshake; if the client's IP does not meet the security rules set by the proxy server, the proxy server directly disconnects the client and does not proceed to the next step.

4. The RFB protocol secure proxy connection method as claimed in claim 3, characterized in that: The client establishes an RFB protocol connection with the server via the RFB proxy, which further includes an RFB protocol authentication process.

5. The RFB protocol secure proxy connection method as claimed in claim 4, characterized in that: The authentication process of the RFB protocol includes: The server sends a list of optional authentication to the client; The proxy server intercepts the optional authentication list, filters out unsafe methods, and sends the new optional authentication list to the client; The client responds with the selected authentication method; The proxy server intercepts the authentication method replied by the client, checks whether the authentication method meets the requirements, and forwards it to the server if it meets the requirements; otherwise, terminates the client connection; The server requires the client to authenticate, and the proxy server forwards directly; The client submits authentication information to the server; After the proxy server intercepts the authentication information, it sends it to the authentication center for third-party authentication; The authentication center replies to the proxy server with the authentication result. If the authentication is successful, the reply includes the real authentication information of the server. If the authentication fails, the proxy server sends a failure message to the client. After the third-party authentication is passed, the proxy server sends the real authentication information to the server; The server responds with the authentication result; The proxy server forwards the authentication result of the server to the client; After successful authentication, the client sends initialization information to the server; The server sends initialization information to the client.

6. The RFB protocol secure proxy connection method as claimed in claim 5, characterized in that: The client establishes an RFB protocol connection with the server via the RFB proxy, which further includes an interaction phase. The RFB proxy intercepts RFB messages in the interaction phase and filters the messages according to the access control policy, and saves the RFB message records to the RFB file.

7. The RFB protocol secure proxy connection method as claimed in claim 6, characterized in that: The interactive phase further includes two-way events of copying and pasting between the client and the server. The RFB agent intercepts and processes the client message ClientCutText and the server message ServerCutText to implement access control policies for the remote desktop, including "in and out", "in only, no out" or "out only, no in". The ServerCutText message is used by the server to actively inform the client that its clipboard content has changed. When the clipboard content on the remote server is updated, the server will send a ServerCutText message to the client to notify the client to update the local clipboard content to achieve real-time synchronization of the clipboard content. The ClientCutText message is sent by the client to the server, indicating that the client's clipboard content has changed and the new text data is now available to the server. When the user performs a copy operation on the local computer, the client packages the text content in the clipboard into this message and then sends it to the remote server. After receiving the ClientCutText message, the server will update its own clipboard content so that the user can insert these data into the remote desktop application through a paste operation during the remote session.

8. The RFB protocol secure proxy connection method as claimed in claim 6, characterized in that: Further including: The specific copy and paste access control policy is as follows: (1) No entry and no exit: The client's clipboard content cannot enter the server's clipboard, and the server's content cannot enter the client. The RFB proxy intercepts all ClientCutText and ServerCutText messages and discards them all. (2) Only in but not out: This means that the client's clipboard content can enter the server's clipboard, but the server's content cannot enter the client. The RFB proxy intercepts all ServerCutText messages and discards them, while allowing all ClientCutText messages to pass. (3) Only outgoing but not incoming: Indicates that the client's clipboard content cannot enter the server's clipboard, but the server's content can enter the client. The RFB proxy intercepts all ClientCutText messages and discards them all, and allows all ServerCutText messages to pass. (4) Accessible: This means that the client's clipboard content can enter the server's clipboard, and the server's content can also enter the client's clipboard. The RFB proxy can allow all ClientCutText and ServerCutText messages to pass.