Anti-attack method and system based on RDP sandbox

Through sandboxing technology based on RDP protocol, RDP session environment is created, and attackers are detected and isolated, which solves the problem that existing website sandboxes cannot intercept attackers, improves network security, and achieves effective interception and isolation of attackers .

CN118972132APending Publication Date: 2024-11-15HANGZHOU MORESEC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411126353.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing website sandbox cannot effectively intercept attackers, resulting in network security risks.

Method used

By creating an RDP sandbox based on the RDP protocol, creating an RDP session environment, obtaining user behavior data, detecting malicious behavior, and isolating the attacker in a sandbox environment, recording account information for network security protection.

Benefits of technology

It realizes unsensed interception and isolation of attackers, improves network security protection, reduces the possibility of attackers identifying sandboxes, and enhances network security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972132A_ABST
    Figure CN118972132A_ABST
Patent Text Reader

Abstract

The invention relates to an anti-attack method and system based on an RDP sandbox in the technical field of network security, and the method comprises the following steps: making the RDP sandbox according to an RDP protocol, and creating an RDP session environment through the RDP sandbox according to a connection request of a user; based on the connection request, acquiring account information of the user, and acquiring user behavior data in the RDP session environment; malicious behavior detection is carried out based on the user behavior data, if the detection result is malicious behavior, the user is judged to be an attacker, and otherwise, the user is judged to be a non-attacker; according to the method, the attacker is isolated in the RDP sandbox environment, and the account information corresponding to the attacker is reported, so that the problem that the existing website sandbox cannot intercept the attacker to cause potential network safety hazards is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security technology, and in particular to an RDP sandbox-based anti-attack method and system. Background Art

[0002] RDP (Remote Desktop Protocol) is a remote desktop protocol developed by Microsoft. It is used for remote connection and interaction between clients and servers. Users can remotely access and control computers with Windows operating systems through RDP, including opening, editing and saving files, running applications, and viewing and controlling the desktop of the remote computer. Remote desktop connections can be made on a local area network or the Internet. A connection can be established by entering the IP address or host name of the remote computer and the correct credentials (user name and password).

[0003] In the computer field, sandboxing is a security mechanism used to isolate running programs. Its purpose is to limit the access rights of untrusted processes or untrusted code at runtime. Sandboxes provide a virtual environment for programs to be executed. This virtual environment contains some virtual hardware and software resources, such as file systems, networks, operating systems, etc., so that applications or processes can run in this environment; programs running in sandboxes can only access the resources loaded by the sandboxes, without affecting external applications, systems or platforms, to prevent them from causing permanent changes to other programs or data in the computer. Sandboxes are used in the field of network security to isolate virus files in sandboxes to achieve the effect of identifying unknown attacks.

[0004] Currently, sandboxes are mainly website sandboxes. Website sandboxes refer to sandboxes that simulate websites 1:1. Attackers attacking website sandboxes will not cause any harm to the real website. On the contrary, attackers attacking website sandboxes can obtain relevant information of the attackers.

[0005] Attackers have currently created a large number of tools for identifying website sandboxes. They can install website sandbox identification plug-ins through browsers, allowing attackers to recognize that this is a website sandbox and give up attacking the website sandbox. They continue to look for real websites to attack. Staff are unable to further intercept attackers, causing network security risks. Summary of the invention

[0006] The present invention aims at the shortcomings in the prior art and provides an anti-attack method and system based on RDP sandbox, which solves the problem that the existing website sandbox cannot intercept attackers, causing potential network security risks.

[0007] In order to solve the above technical problems, the present invention is solved by the following technical solutions:

[0008] An anti-attack method based on RDP sandbox includes the following steps:

[0009] Create an RDP sandbox according to the RDP protocol, and create an RDP session environment through the RDP sandbox according to the user's connection request;

[0010] Based on the connection request, obtaining user account information, and obtaining user behavior data in the RDP session environment;

[0011] Perform malicious behavior detection based on the user behavior data, and if the detection result is malicious behavior, determine the user to be an attacker, otherwise, determine the user to be a non-attacker;

[0012] The attacker is isolated in an RDP sandbox environment, and the account information corresponding to the attacker is reported.

[0013] Optionally, creating an RDP sandbox according to the RDP protocol includes the following steps:

[0014] Based on the RDP protocol, the connection startup link, basic setting exchange link, channel connection link, and security startup link of the RDP protocol are simulated to obtain basic simulation data;

[0015] Simulating the security setting exchange link of the RDP protocol based on the RDP protocol, and modifying the authentication process of the security setting exchange link to obtain encrypted simulation data;

[0016] The basic simulation data and the encrypted simulation data are encapsulated to obtain an RDP sandbox.

[0017] Optional, malicious behavior detection, including the following steps:

[0018] Detect network traffic data, file operation data, registry access data, and code execution data in user behavior data;

[0019] When the detection result of any one of the network traffic data, the file operation data, the registry access data and the code execution data is malicious behavior, it is determined that the detection result of the user behavior data is malicious behavior.

[0020] Optionally, detecting network traffic data, file operation data, registry access data, and code execution data in the user behavior data includes the following steps:

[0021] Based on the file operation data in the user behavior data, determining whether there is an abnormal file operation in the file operation data, wherein the abnormal file operation includes any one of creating, modifying or deleting important system files;

[0022] If yes, the detection result is malicious behavior, otherwise, it is determined whether there is any modification of the registry key in the registry access data;

[0023] If yes, the detection result is malicious behavior, otherwise, it is determined whether there is a network connection attempt behavior in the network traffic data;

[0024] If yes, the detection result is malicious behavior, otherwise it is determined whether there is abnormal code execution in the code execution data;

[0025] If yes, the detection result is malicious behavior, otherwise the detection result is non-malicious behavior.

[0026] Optionally, modifying the authentication process of the security setting exchange link includes the following steps:

[0027] The authentication process of the client information PDU in the RDP protocol is obtained, and the authentication process of the client information PDU is sent from the client to the server for authentication, and is modified to be sent from the client to the RDP sandbox for authentication.

[0028] Optionally, the simulation connection startup step includes the following steps:

[0029] The connection transmission protocol, connection security protocol and connection flag in the connection startup link of the RDP protocol are obtained, and the connection startup link of the RDP sandbox is constructed based on the connection transmission protocol, connection security protocol and connection flag.

[0030] Optionally, simulate the basic settings exchange process, including the following steps:

[0031] The core data, security data and network data in the simulated basic setting exchange link of the RDP protocol are obtained, and the basic setting exchange link of the RDP sandbox is constructed based on the core data, security data and network data.

[0032] Optionally, the basic simulation data and the encrypted simulation data are packaged through Docker technology.

[0033] An RDP sandbox-based anti-attack system, the RDP sandbox-based anti-attack system is used to execute any one of the above-mentioned RDP sandbox-based anti-attack methods, including a creation unit, a data acquisition unit, a detection unit and an anti-attack unit;

[0034] The creation unit is used to create an RDP sandbox according to the RDP protocol, and create an RDP session environment through the RDP sandbox according to the user's connection request;

[0035] The data acquisition unit is used to acquire the user's account information based on the connection request, and acquire the user behavior data in the RDP session environment;

[0036] The detection unit is used to perform malicious behavior detection based on the user behavior data, and if the detection result is malicious behavior, the user is determined to be an attacker, otherwise, the user is determined to be a non-attacker;

[0037] The anti-attack unit is used to isolate the attacker in an RDP sandbox environment and report the account information corresponding to the attacker.

[0038] A computer program product includes a computer program, which, when executed by a processor, implements any one of the above-mentioned RDP sandbox-based anti-attack methods.

[0039] Compared with the prior art, the technical solution provided by the present invention has the following beneficial effects:

[0040] By making an RDP sandbox based on the RDP protocol, the RDP sandbox is made to have high simulation, so that the attacker is unaware during the attack prevention process. At the same time, the attacker can connect to the RDP sandbox by entering the account and password of the RDP sandbox. Since the RDP sandbox has the same function as the RDP protocol, it will record the attacker's account and password. After detecting the attacker's malicious behavior, the isolation function of the RDP sandbox can be used to isolate the attacker, thereby playing a role in network security protection. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0042] Figure 1 This is a flow chart of an anti-attack method based on RDP sandbox proposed in the first embodiment;

[0043] Figure 2 This is a schematic diagram of the RDP sandbox process proposed in this embodiment;

[0044] Figure 3 The figure is a schematic diagram of the existing RDP protocol flow. DETAILED DESCRIPTION

[0045] The present invention is further described in detail below in conjunction with embodiments. The following embodiments are for explanation of the present invention but the present invention is not limited to the following embodiments.

[0046] Embodiment 1

[0047] like Figure 1 As shown, an anti-attack method based on RDP sandbox includes the following steps: first, an RDP sandbox is made according to the RDP protocol, and an RDP session environment is created through the RDP sandbox according to the user's connection request. In this embodiment, an RDP sandbox is made to replace the website sandbox to prevent it from being identified by attackers. Since the RDP sandbox is obtained by one-to-one simulation according to the RDP protocol, and the RDP protocol is a remote desktop protocol, which is equivalent to remote login to the desktop, attackers cannot access it by installing a website sandbox identification plug-in through a browser like a website sandbox, nor can they identify whether the RDP sandbox is a sandbox, thereby achieving the purpose of intercepting attackers.

[0048] Among them, making an RDP sandbox according to the RDP protocol includes the following steps: simulating the connection startup link, basic setting exchange link, channel connection link, and security startup link of the RDP protocol based on the RDP protocol to obtain basic simulation data; simulating the security setting exchange link of the RDP protocol based on the RDP protocol, and modifying the authentication process of the security setting exchange link to obtain encrypted simulation data; encapsulating the basic simulation data and the encrypted simulation data to obtain the RDP sandbox.

[0049] Specifically, the RDP protocol includes connection startup, basic settings exchange, channel connection, security startup, security settings exchange, permission, function exchange and connection termination. Since the user's attack behavior can only be determined through the IP, connection port, and access behavior, when it comes to the RDP sandbox, to determine that the user has an attack behavior, it is necessary to log in to the RDP sandbox through the user, and then capture the user's account and password information when logging in. This behavior data can be used to prove whether the user is an attacker.

[0050] More specifically, the RDP sandbox needs to obtain IP and connection port information, and needs to completely simulate the RDP protocol's connection startup link, basic settings exchange link, channel connection link, and secure startup link. As for account and password information, since the RDP protocol's security settings exchange link will send the encrypted user name to the server for authentication, and no password authentication is performed before the security settings exchange link, it is necessary to simulate the security settings exchange link again to obtain the user's account and password information.

[0051] In the RDP protocol, the connection initiation phase refers to the RDP connection being initiated by the client using the X.224 connection request PDU, which includes some security protocols and connection flags supported by the client. On the other hand, the server will also confirm the connection through the X.224 connection PDU. This data packet contains the RDP negotiation response, which is used to inform the client that the selected security protocol (selected from the protocols supported by the client) will be used throughout the connection life cycle.

[0052] Therefore, the simulation connection startup link includes the following steps: obtaining the connection transmission protocol, connection security protocol and connection flag in the connection startup link of the RDP protocol, and constructing the connection startup link of the RDP sandbox based on the connection transmission protocol, connection security protocol and connection flag, wherein the connection transmission protocol refers to the X.224 protocol initiated by the client requesting a connection PDU (protocol data unit), and the connection security protocol refers to the standard RDP security and enhanced RDP security TLS related protocols. It should be noted that since the connection startup link of the simulated RDP protocol is a prior art, it will not be described in detail here.

[0053] For the basic exchange setting link of the RDP protocol, at this stage, the client and the server rely on the basic exchange setting of the connection between the MCS and the initial PDU and the response of the MCS connection to the PDU. The setting can be divided into core data, security data and network data. Therefore, the simulation of the basic setting exchange link includes the following steps: obtaining the core data, security data and network data in the simulated basic setting exchange link of the RDP protocol, and constructing the basic setting exchange link of the RDP sandbox based on the core data, security data and network data.

[0054] Among them, core data includes RDP version, desktop resolution, color depth, keyboard information, host name, client software information (product ID, version number), etc.; security data includes encryption method, session key size, server random number (to create session key) and server certificate (for standard RDP security); network data includes requesting information about virtual channels and allocating virtual channels, including the number of channels and a specific set of virtual channels.

[0055] For the channel connection link of the RDP protocol, this link is used to establish each separate channel connection when creating a virtual channel list used by the RDP session. It can be divided into the following stages in order: MCS vertical domain request, MCS additional user request, MCS additional user confirmation, MCS channel joining request and confirmation. Therefore, during simulation, the MCS vertical domain request, MCS additional user request, MCS additional user confirmation, MCS channel joining request and confirmation are directly obtained to establish each separate channel connection of the RDP sandbox.

[0056] For the secure startup phase of the RDP protocol, the client will send a secure exchange PDU containing a randomly encrypted server public key. Then, the client and server will create a session encryption key with a random number (security data and secure exchange PDU in the basic settings exchange). Subsequent RDP communications will be encrypted at this time. Therefore, when simulating the secure startup phase, you can directly simulate the above process.

[0057] For the security settings exchange link, after simulating the authentication process of the client information PDU in the RDP protocol, it is necessary to modify the authentication process of the security settings exchange link, including the following steps: obtain the authentication process of the client information PDU in the RDP protocol, and change the authentication process of the client information PDU from the client to the server for authentication to the authentication from the client to the RDP sandbox. After the modification, the user's login account and password entered in the remote desktop will be encrypted and sent to the RDP sandbox for authentication. When the RDP sandbox extracts the persistent key of the PDU for decryption, the user name and password after the credentials in the PDU are decrypted are saved in the RDP sandbox, thereby obtaining the user's login account and password through such modification of the authentication process.

[0058] Therefore, the data of the completed connection startup link, basic setting exchange link, channel connection link, and secure startup link simulation are collected to form basic simulation data. The data formed after the simulation and modification of the secure setting exchange link is used as encrypted simulation data. Finally, the basic simulation data and the encrypted simulation data are encapsulated through Docker technology, so that the produced RDP sandbox can be used out of the box.

[0059] like Figure 2 As shown in the figure, the RDP sandbox process is created. Figure 3 The figure shows the RDP protocol process. By comparison, we can see that the RDP sandbox is 1:1 simulated from the connection startup to the security settings exchange stage relative to the RDP protocol. Since the RDP sandbox has already obtained the password in the security settings exchange stage, the subsequent stages do not need to be simulated. This ensures that the RDP sandbox has high simulation and can make attackers unaware, while reducing the resource consumption of making the sandbox.

[0060] After the RDP sandbox is created, when there is user access, it can be determined whether the user is an attacker, and anti-attack processing can be performed on the user determined to be an attacker. Since the attacker will try to connect to the target system through RDP, the RDP sandbox creates an RDP session environment based on the detected user's connection request and starts monitoring the RDP session. The RDP session environment is an isolated environment created by the RDP sandbox for executing RDP sessions. This environment can be a virtual machine or container, which is isolated from the main operating system.

[0061] In the process of monitoring the RDP session, based on the connection request, the user's account information is obtained, and the user behavior data is obtained in the RDP session environment; malicious behavior detection is performed based on the user behavior data. If the detection result is malicious behavior, the user is determined to be an attacker, otherwise, the user is determined to be a non-attacker.

[0062] Specifically, during the RDP session, the RDP sandbox monitors all network traffic data, file operation data, registry access data and other behaviors. The RDP sandbox can also empty the activities in the memory, that is, the code execution data, which includes loaded DLLs, execution codes, etc., and then detect the network traffic data, file operation data, registry access data and code execution data in the user behavior data; when the detection result of any one of the network traffic data, file operation data, registry access data and code execution data is a malicious behavior, the detection result of the user behavior data is determined to be a malicious behavior.

[0063] Among them, detecting network traffic data, file operation data, registry access data and code execution data in user behavior data includes the following steps: based on the file operation data in the user behavior data, judging whether there is abnormal file operation in the file operation data, wherein the abnormal file operation includes creating, modifying or deleting any one of important system files; if so, the detection result is malicious behavior, otherwise, judging whether there is modification of registry keys in the registry access data; if so, the detection result is malicious behavior, otherwise, judging whether there is network connection attempt behavior in the network traffic data; if so, the detection result is malicious behavior, otherwise, judging whether there is abnormal code execution in the code execution data; if so, the detection result is malicious behavior, otherwise, the detection result is non-malicious behavior.

[0064] Specifically, the RDP sandbox analyzes the detected behavior to identify potential malicious behavior. The analysis includes checking abnormal file operations, suspicious network requests, unusual registry modifications, etc. If malicious behavior is detected, the RDP sandbox will take immediate action. Malicious behavior includes but is not limited to: abnormal file operations, such as creating, modifying, or deleting important system files; modification of registry keys, especially keys related to system startup; network connection attempts, especially connections to known malicious IP addresses or domain names; abnormal code execution in memory.

[0065] Finally, after detecting the attacker's malicious behavior, the attacker can be isolated in the RDP sandbox environment, and the attacker's corresponding account information can be reported to achieve the purpose of network security protection.

[0066] Embodiment 2

[0067] An RDP sandbox-based anti-attack system comprises a creation unit, a data acquisition unit, a detection unit and an anti-attack unit; the creation unit is used to create an RDP sandbox according to an RDP protocol, and to create an RDP session environment through the RDP sandbox according to a user's connection request; the data acquisition unit is used to obtain user account information based on the connection request, and to obtain user behavior data in the RDP session environment; the detection unit is used to perform malicious behavior detection based on the user behavior data, and if the detection result is malicious behavior, the user is determined to be an attacker, otherwise, the user is determined to be a non-attacker; the anti-attack unit is used to isolate the attacker in the RDP sandbox environment, and report the account information corresponding to the attacker.

[0068] A computer program product includes a computer program, which, when executed by a processor, implements the RDP sandbox-based attack prevention method described in Embodiment 1.

[0069] It should be noted that since the RDP sandbox-based anti-attack system is used to execute the RDP sandbox-based anti-attack method described in Example 1, it will not be repeated in this embodiment.

[0070] The above is only a preferred embodiment of the present invention, and is not any formal or substantial limitation of the present invention. It should be pointed out that ordinary technicians in this technical field can make several improvements and supplements without departing from the method of the present invention, and these improvements and supplements should also be regarded as the protection scope of the present invention. Any technician familiar with this profession, without departing from the spirit and scope of the present invention, can make some changes, modifications and evolutions of the technical content disclosed above, which are equivalent embodiments of the present invention; at the same time, any changes, modifications and evolutions of any equivalent changes made to the above embodiments based on the essential technology of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. An anti-attack method based on RDP sandbox, characterized in that: The following steps are involved: Create an RDP sandbox according to the RDP protocol, and create an RDP session environment through the RDP sandbox according to the user's connection request; Based on the connection request, obtaining user account information, and obtaining user behavior data in the RDP session environment; Perform malicious behavior detection based on the user behavior data, and if the detection result is malicious behavior, determine the user to be an attacker, otherwise, determine the user to be a non-attacker; The attacker is isolated in an RDP sandbox environment, and the account information corresponding to the attacker is reported.

2. The RDP sandbox-based anti-attack method according to claim 1, characterized in that: Creating an RDP sandbox based on the RDP protocol includes the following steps: Based on the RDP protocol, the connection startup link, basic setting exchange link, channel connection link, and security startup link of the RDP protocol are simulated to obtain basic simulation data; Simulating the security setting exchange link of the RDP protocol based on the RDP protocol, and modifying the authentication process of the security setting exchange link to obtain encrypted simulation data; The basic simulation data and the encrypted simulation data are encapsulated to obtain an RDP sandbox.

3. The RDP sandbox-based anti-attack method according to claim 1, characterized in that: Malicious behavior detection includes the following steps: Detect network traffic data, file operation data, registry access data, and code execution data in user behavior data; When the detection result of any one of the network traffic data, the file operation data, the registry access data and the code execution data is malicious behavior, it is determined that the detection result of the user behavior data is malicious behavior.

4. The RDP sandbox-based anti-attack method according to claim 3, characterized in that: Detecting network traffic data, file operation data, registry access data, and code execution data in user behavior data includes the following steps: Based on the file operation data in the user behavior data, determining whether there is an abnormal file operation in the file operation data, wherein the abnormal file operation includes any one of creating, modifying or deleting important system files; If yes, the detection result is malicious behavior, otherwise, it is determined whether there is any modification of the registry key in the registry access data; If yes, the detection result is malicious behavior, otherwise, it is determined whether there is a network connection attempt behavior in the network traffic data; If yes, the detection result is malicious behavior, otherwise it is determined whether there is abnormal code execution in the code execution data; If yes, the detection result is malicious behavior, otherwise the detection result is non-malicious behavior.

5. The RDP sandbox-based anti-attack method according to claim 2, characterized in that: Modifying the authentication process of the security setting exchange link includes the following steps: The authentication process of the client information PDU in the RDP protocol is obtained, and the authentication process of the client information PDU is sent from the client to the server for authentication, and is modified to be sent from the client to the RDP sandbox for authentication.

6. The RDP sandbox-based anti-attack method according to claim 2, characterized in that: The simulation connection startup process includes the following steps: The connection transmission protocol, connection security protocol and connection flag in the connection startup link of the RDP protocol are obtained, and the connection startup link of the RDP sandbox is constructed based on the connection transmission protocol, connection security protocol and connection flag.

7. The RDP sandbox-based anti-attack method according to claim 2, characterized in that: Simulate the basic setup exchange process, including the following steps: The core data, security data and network data in the simulated basic setting exchange link of the RDP protocol are obtained, and the basic setting exchange link of the RDP sandbox is constructed based on the core data, security data and network data.

8. The RDP sandbox-based anti-attack method according to any one of claims 5 to 7, characterized in that: The basic simulation data and the encrypted simulation data are packaged through Docker technology.

9. An anti-attack system based on RDP sandbox, characterized in that: The RDP sandbox-based anti-attack system is used to execute the RDP sandbox-based anti-attack method according to any one of claims 1 to 8, comprising a creation unit, a data acquisition unit, a detection unit and an anti-attack unit; The creation unit is used to create an RDP sandbox according to the RDP protocol, and create an RDP session environment through the RDP sandbox according to the user's connection request; The data acquisition unit is used to acquire the user's account information based on the connection request, and acquire the user behavior data in the RDP session environment; The detection unit is used to perform malicious behavior detection based on the user behavior data, and if the detection result is malicious behavior, the user is determined to be an attacker, otherwise, the user is determined to be a non-attacker; The anti-attack unit is used to isolate the attacker in an RDP sandbox environment and report the account information corresponding to the attacker.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the RDP sandbox-based anti-attack method according to any one of claims 1 to 8 is implemented.