A method of defending against a replay-type fake base station and a counterfeit-type fake base station

CN121013082BActive Publication Date: 2026-09-18XINGTANG TELECOMM TECH CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410640398.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2026-09-18
Estimated Expiration
2044-05-22

AI Technical Summary

Technical Problem

[0004]鉴于上述的分析,本发明实施例旨在提供一种防御重放型伪基站和伪造型伪基站的方法,用以解决现有技术中5G网络中因伪基站攻击导致安全性降低的技术问题

Benefits of technology

[0038] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121013082B_ABST
    Figure CN121013082B_ABST
Patent Text Reader

Abstract

The present application relates to a method for defending against replay-type and fake-type pseudo base stations, belonging to the field of communication security, and solving the problem of reduced security of 5G network due to pseudo base station attack. The method comprises pre-setting symmetric keys Key for encryption and decryption in the 5G base station and the special terminal respectively; generating 5G cell broadcast information SIB1 on the 5G base station side, and encrypting the reserved field in SIB1 to obtain extended SIB1', and then periodically broadcasting SIB1'; wherein the reserved field is valued based on SIB1, cyclically changed serial number and sending timestamp to generate SIB1' with unique serial number identification and timestamp; decrypting and verifying the reserved field in the received SIB1' on the special terminal side; defending against fake-type pseudo base station based on the decryption and verification of the reserved field; and defending against replay-type pseudo base station based on the verification of the time difference between the serial number in the reserved field and the receiving and sending timestamps. The method improves the communication security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication security technology, and in particular to a method for defending against replay-type fake base stations and spoofing-type fake base stations. Background Technology

[0002] With the rapid development of wireless communication technology, the problem of fake base stations has become increasingly prominent, posing a major challenge to the field of communication security. The 3GPP (3rd Generation Partnership Project) details the risks of fake base stations in its technical report TR33.809 (Release 17, Radio Protection) and proposes a series of security enhancements to address these risks. In particular, it emphasizes security protection for user terminals during the initial access phase and measures to prevent them from being absorbed by fake base stations after a connection is established. Furthermore, to enhance data transmission security, 3GPP proposes security enhancements during initial access, utilizing CRC (Cyclic Redundancy Check) technology to detect and verify errors that may occur during data transmission or after data storage.

[0003] While the security enhancement proposals put forward by 3GPP have improved the security of wireless communications to some extent, existing technologies still have some shortcomings. First, the attack methods of fake base stations are constantly evolving, and traditional CRC checksum methods are unable to effectively cope with complex attack patterns, such as replay attacks and spoofing attacks. Second, with the improvement of computing power, attackers can more easily crack existing CRC algorithms, thereby bypassing security checks. Furthermore, the security of user terminals is also limited by the frequency of their hardware and software updates, which may lead to the existence of security vulnerabilities. Summary of the Invention

[0004] Based on the above analysis, the embodiments of the present invention aim to provide a method for defending against replay-type fake base stations and spoofing-type fake base stations, so as to solve the technical problem of reduced security in 5G networks due to fake base station attacks in the prior art.

[0005] This invention provides a method for defending against replay-type fake base stations and spoofing fake base stations, comprising the following steps:

[0006] Step S1: Pre-set symmetric keys Key for encryption and decryption in the 5G base station and dedicated terminal respectively;

[0007] Step S2: Generate 5G cell broadcast information SIB1 on the 5G base station side, and perform value assignment and encryption processing on the reserved fields in SIB1 to obtain the extended SIB1', and then broadcast SIB1' periodically; wherein, based on SIB1, the cyclically changing sequence number and the sending timestamp, the reserved fields are assigned values ​​to generate SIB1' with a unique sequence number identifier and timestamp.

[0008] Step S3: On the dedicated terminal side, the reserved field in the received SIB1' is decrypted and verified; based on the decryption verification of the reserved field, spoofing-type fake base stations are defended; based on the verification of the sequence number in the reserved field and the time difference between the received and sent timestamps, replay-type fake base stations are defended.

[0009] Further, step S2 includes:

[0010] Step S21: Initialize the sequence number i;

[0011] Step S22: Obtain the hash value Hash of SIB1 and obtain the current time point t1 as the sending timestamp; perform an XOR operation between Hash and t1 to obtain Hash'; concatenate the sequence number i and Hash' to obtain Res; encrypt Res to obtain Res';

[0012] Step S23: Assign Res' to the reserved field in SIB1 to generate SIB1' for periodic broadcasting; determine whether the sequence number i is equal to the preset loop threshold. If yes, return to step S21; otherwise, increment the sequence number i by 1 and return to step S22.

[0013] Further, step S22 includes:

[0014] The SM3 algorithm is used to perform a hash calculation on SIB1 to obtain a fixed-length hash value for SIB1.

[0015] Take the high 248 bits of the hash and XOR it with the extended 248-bit sending timestamp t1 to get Hash';

[0016] The 8-bit sequence number i is used as the high-order bit and the 248-bit hash' is used as the low-order bit to concatenate them to obtain Res;

[0017] Res' is obtained by SM4 encryption of Res based on the symmetric key Key pre-installed on the 5G base station side.

[0018] Further, step S3 includes:

[0019] Step S31: The dedicated terminal receives SIB1' and obtains the current time point t2 as the receiving timestamp;

[0020] Step S32: Determine whether the reserved field in the received SIB1' is an empty structure. If so, discard SIB1' and return to step S31. Otherwise, extract the reserved field from SIB1' as parameter res. Determine whether plaintext res' can be obtained by decrypting res. If not, it means that SIB1' is a fake base station broadcast. Otherwise, obtain the sequence number i' based on res', use the lower n bits as hash, and query the same 5G cell to see if SIB1' with the same sequence number i' is received within the first preset time threshold. If so, it means that SIB1' is a replay fake base station broadcast. Discard SIB1' and return to step S31. Otherwise, proceed to step S33.

[0021] Step S33: Obtain the hash value of the remaining part of SIB1' after excluding the reserved field, and take the high-order bits of the hash value as hash'; take the XOR value of hash and hash' as ​​t1'; if the difference between t2 and t1' is greater than the second preset time threshold, it means that SIB1' is a replay type fake base station broadcast, discard SIB1', otherwise proceed to step S34;

[0022] Step S34: If SIB1' of the same 5G base station is received continuously, and its sequence number i' is discontinuous or non-periodic, it indicates that SIB1' is a replay-type pseudo base station broadcast, and SIB1' is discarded; otherwise, SIB1' is successfully received.

[0023] Furthermore, the reserved field is the nonCriticalExtension field in the SIB1-v1740-IEs information field carried by SIB1; the length of the reserved field is not less than 256 bits.

[0024] Further, step S32 includes:

[0025] The dedicated terminal determines whether the nonCriticalExtension field in the received SIB1' is an empty structure. If not, the nonCriticalExtension field is truncated as the parameter res, and the length of res is 256 bits.

[0026] Based on the symmetric key Key pre-installed on the dedicated terminal, SM4 decryption is performed on res to obtain the plaintext res';

[0027] Take the high 8 bits of res' as the sequence number i' and the low 248 bits as the hash;

[0028] Within the first preset time threshold range, determine whether the same 5G cell receives SIB1' with the same sequence number i'. If so, it means that SIB1' was sent by a replay-type fake base station, and then discard the SIB1'.

[0029] Further, step S33 includes:

[0030] Perform SM3 hash calculation on the remaining information in SIB1' except for the nonCriticalExtension field, and take the high 248 bits of the resulting hash value as hash'.

[0031] XORing hash and hash' yields 248-bit t1';

[0032] If Δt = t2 - t1' is greater than the second preset time threshold, it means that SIB1' is a replay type sent by the base station, and then SIB1' is discarded.

[0033] Furthermore, the BeiDou satellite clock is used to provide real-time time synchronization for the time points t1 and t2;

[0034] The first preset time threshold range is in the second range, and the second preset time threshold range is in the millisecond range.

[0035] Furthermore, the preset cycle threshold is 255;

[0036] The initialization number i is 0, and it is incremented cyclically to 255 before returning to 0.

[0037] Furthermore, the symmetric key Key pre-installed in the 5G base station and the dedicated terminal is updated periodically.

[0038] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:

[0039] 1. Protection before the initial access process: Current methods for defending against replay of cell broadcast information can only provide protection after the initial access process is completed, and do not include protection during the initial access process of the terminal; this invention can protect the terminal before the initial access process is completed, providing earlier security protection.

[0040] 2. Two-factor authentication to defend against replay-type fake base stations: To defend against replay-type fake base stations, a two-factor authentication method using a cyclically changing sequence number and timestamp is adopted, which further increases the difficulty for replay-type fake base stations to carry out replay attacks and improves the security of 5G cell broadcast information.

[0041] 3. Encryption and decryption of the extended fields of SIB1 effectively defend against fake base stations. Successful decryption indicates a genuine 5G base station; otherwise, it indicates a fake base station.

[0042] 4. No impact on ordinary terminal communication: The fields used in this invention are located in the nonCriticalExtension field of the SIB1-v1740-IEs information carried by SIB1. Ordinary terminals do not interpret this part of the content, so it will not affect the access process and normal communication of ordinary terminals. Therefore, the SIB1 extension fields used in 5G cell broadcast information will not affect the access process of ordinary terminals; only dedicated terminals verify this content to ensure that the received 5G cell broadcast information originates from a real base station.

[0043] 5. Low-complexity implementation: By using reserved fields for expansion and combining them with existing SM3 and SM4 national cryptographic algorithms, the implementation cost is low and it is easy to integrate and implement.

[0044] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description

[0045] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.

[0046] Figure 1 A flowchart illustrating a method for defending against replay-based and spoofing fake base stations;

[0047] Figure 2 Flowchart for broadcasting SIB1 to the base station side;

[0048] Figure 3 The SIB1 flowchart is analyzed for the dedicated terminal side. Detailed Implementation

[0049] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0050] First, let me explain the concepts related to 5G communication in this invention. The 5G communication system message includes MIB and a series of SIBs; the minimum system message includes MIB and SIB1.

[0051] The MIB (Master Information Block) is the main information block in a 5G network, a crucial information element broadcast at the cell level. The MIB contains key system parameters such as cell identifiers and physical layer configuration information. When a terminal device connects to a new 5G cell, it first listens to the MIB to obtain this critical information for a correct connection to the 5G network. Because the MIB is transmitted in plaintext during broadcast, it can become a target for spoofing attacks. The pdcch-ConfigSSB1 message it carries schedules the SIB1, periodically broadcasting it.

[0052] SIB1 (System Information Block 1) is one of the system information blocks in a 5G network, used for broadcasting at the cell level. SIB1 contains information about important parameters such as cell configuration, frequency, and system information. Terminal devices receive SIB1 to obtain necessary network information in order to correctly connect to the network and perform subsequent communication processes. However, because the broadcast information of SIB1 is usually transmitted in plaintext, it may be vulnerable to attacks from fake base stations.

[0053] Radio Resource Control (RRC) is a key protocol in 5G networks. It is responsible for allocating and managing radio resources between terminal devices and base stations, including establishing, maintaining, and releasing connections, as well as controlling and optimizing radio links. RRC plays a crucial role in 5G networks, ensuring network reliability, efficiency, and security. However, because RRC messages are susceptible to attacks such as eavesdropping, tampering, or replay during transmission, protecting RRC messages is paramount.

[0054] To address the shortcomings of existing technologies, this invention proposes a method for defending against replay-based and spoofed fake base stations. This method aims to improve the security of wireless communication networks through innovative technical means, particularly during the initial access phase of user terminals and data transmission. This invention employs more advanced algorithms and security mechanisms, updates security keys in real-time or periodically, and enhances users' awareness of fake base station attacks. Through these measures, this invention aims to provide wireless communication users with a more secure and reliable communication environment.

[0055] like Figure 1 As shown, a method for defending against replay-type fake base stations and spoofing-type fake base stations according to the present invention includes the following steps:

[0056] Step S1: Pre-set symmetric keys Key for encryption and decryption in the 5G base station and dedicated terminal respectively;

[0057] Step S2: Generate 5G cell broadcast information SIB1 on the 5G base station side, and perform value assignment and encryption processing on the reserved fields in SIB1 to obtain the extended SIB1', and then broadcast SIB1' periodically; wherein, based on SIB1, the cyclically changing sequence number and the sending timestamp, the reserved fields are assigned values ​​to generate SIB1' with a unique sequence number identifier and timestamp.

[0058] Step S3: On the dedicated terminal side, the reserved field in the received SIB1' is decrypted and verified; based on the decryption verification of the reserved field, spoofing-type fake base stations are defended; based on the verification of the sequence number in the reserved field and the time difference between the received and sent timestamps, replay-type fake base stations are defended.

[0059] In this invention, the hash calculation is implemented using the SM3 algorithm. SM3 is a cryptographic hash function algorithm, a Chinese national cryptographic algorithm, used to replace some international cryptographic hash functions, such as MD5 and SHA-1;

[0060] The encryption and decryption algorithms are implemented using the SM4 encryption and decryption algorithm. The SM4 algorithm is a block cipher, a symmetric encryption algorithm, and a national standard cryptographic algorithm. Both the block size and key size are 128 bits.

[0061] The present invention aims to provide a method for defending against replay-type fake base stations and spoofing fake base stations for dedicated terminals within a limited or pre-defined area of ​​use.

[0062] For example, a dedicated terminal is a terminal device specifically designed for a private network. Device types include, but are not limited to, 5G modules / 5G mobile phones / 5G tablets / 5G IoT devices. The purpose is to provide higher security for dedicated terminals accessing the 5G private network. Any terminal that needs to defend against replay-based fake base stations / spoofing fake base stations (not limited to a specific industry or application scenario) can be customized and modified into a dedicated terminal using the method described in this invention.

[0063] Dedicated terminals are used in 5G private networks with high security requirements. They are customized and modified terminals with higher security requirements than ordinary terminals.

[0064] In existing 5G networks, fake base station attacks are a common security threat, potentially leading to terminals establishing RRC connections with fake base stations and posing a risk to network security. To address this issue, this invention proposes a comprehensive solution. By introducing cyclically changing sequence numbers, transmission timestamps, reception timestamps, and encryption / decryption techniques, the extended fields of the 5G cell broadcast information SIB1 are modified and verified to prevent replay-based and spoofing-based fake base station attacks. This ensures secure connections for dedicated terminals within limited or preset usage areas, improving network security and reliability.

[0065] For replay-based fake base stations, broadcast information from real 5G cells is recorded and replayed to mimic a real 5G base station, attracting terminal devices to establish RRC connections. Since the broadcast information (MIB and SIB1) is currently transmitted in plaintext over the air interface without authentication, terminal devices cannot distinguish whether the broadcast information originates from a real base station or a fake base station. Therefore, this replay attack may attract 5G terminals undergoing initial access and cell reselection to the fake base station, causing them to establish RRC connections and creating security risks. A 5G cell is a basic unit in a 5G network, providing coverage areas for wireless communication services. Typically, a 5G base station constitutes a cell. Each cell has its own spectrum resources and can provide communication services through the base station.

[0066] Each 5G cell has its own identifier and configuration information. Terminal devices obtain this information by receiving cell broadcast information and select the best cell to connect to. As 5G networks develop, cell design and deployment will become more flexible and intelligent to provide a better user experience and network performance.

[0067] The air interface refers to the wireless communication link channel between terminal devices (such as mobile phones, tablets, etc.) and 5G base stations, used to transmit data, voice, and control information.

[0068] To defend against spoofed base stations, the content of 5G cell broadcast information is public. Spoofed base stations imitate the broadcast information of real base stations to spoof, broadcasting with higher signal quality near the terminal. This attracts 5G terminals that are initially accessing the network or undergoing cell reselection to the spoofed base station, causing the terminal to establish an RRC connection with the spoofed base station, thus creating a security risk.

[0069] Step S1, specifically.

[0070] The symmetric key Key is generated by a secure random number generator to ensure its unpredictability. The symmetric key Key is used for SM4 encryption in step S2 and SM4 decryption in step S3.

[0071] Optionally, the symmetric key Key has a key length of 128 bits.

[0072] The symmetric key is securely distributed to every 5G base station and dedicated terminal that needs to be encrypted or decrypted.

[0073] To ensure security, the symmetric key Key pre-installed in the 5G base station and dedicated terminal is updated periodically.

[0074] Step S2 includes:

[0075] Step S21: Initialize the sequence number i;

[0076] Step S22: Obtain the hash value Hash of SIB1 and obtain the current time point t1 as the sending timestamp; perform an XOR operation between Hash and t1 to obtain Hash'; concatenate the sequence number i and Hash' to obtain Res; encrypt Res to obtain Res';

[0077] Step S23: Assign Res' to the reserved field in SIB1 to generate SIB1' for periodic broadcasting; determine whether the sequence number i is equal to the preset loop threshold. If yes, return to step S21; otherwise, increment the sequence number i by 1 and return to step S22.

[0078] Step S21: Initialize the sequence number i;

[0079] For example, the preset cycle threshold is 255;

[0080] The initialization sequence number i is 0, and it is cyclically incremented to 255 before looping back to 0. Specifically, the sequence number i is 8 bits long, and the initial value of i is 00000000, which is 8 bits in binary.

[0081] The use of a cyclically changing sequence number i for subsequent steps effectively defends against attacks from replay-based fake base stations.

[0082] Step S22 includes:

[0083] The SM3 algorithm is used to perform a hash calculation on SIB1 to obtain a fixed-length hash value for SIB1.

[0084] Take the high 248 bits of the hash and XOR it with the extended 248-bit sending timestamp t1 to get Hash';

[0085] The 8-bit sequence number i is used as the high-order bit and the 248-bit hash' is used as the low-order bit to concatenate them to obtain Res;

[0086] Res' is obtained by SM4 encryption of Res based on the symmetric key Key pre-installed on the 5G base station side.

[0087] Specifically as follows:

[0088] (1) 5G base station generates SIB1;

[0089] (2) Generate a fixed-length hash value for the unextended SIB1 using the SM3 algorithm, and truncate the high 248 bits of the resulting hash value as the hash, as shown below:

[0090] Hash = High 248 bits [SM3(SIB1)]

[0091] Among them, SM3 (SIB1) is 256 bits, 32 bytes;

[0092] SIB1 is hashed using the SM3 hash algorithm, and the high 248 bits are truncated as the hash value to ensure the integrity of the broadcast message. The hash value serves as a message digest, used to verify the authenticity and integrity of the data.

[0093] (3) XOR the current sending time t1 with Hash to obtain Hash', as shown below:

[0094] Hash'=Hash⊕t1

[0095] The transmission time point t1 is used as the transmission timestamp, which is obtained using the BeiDou satellite clock synchronization. t1 is extended to 248 bits. Extending t1 to 248 bits is used to satisfy the XOR condition.

[0096] For example, the extension method can be a copy extension.

[0097] The current sending timestamp t1 is XORed with the hash to generate Hash', which introduces the time factor into the authentication process, ensuring that the broadcast information is up-to-date and effectively preventing replay-type fake base station attacks.

[0098] (4) Use i as the high 8 bits of the extended information and Hash' as ​​the low 248 bits of the extended information, and concatenate them to generate Res, as shown below:

[0099] Res = i(high 8 bits)Hash'(low 248 bits)

[0100] i is the high 8 bits, and Hash' is the low 248 bits.

[0101] (5) Apply the SM4 encryption algorithm to Res to obtain the encrypted Res', as shown below:

[0102] Res' = SM4(Res, Key)

[0103] Here, Key is a symmetric key pre-installed in the 5G base station.

[0104] Res' is used as a parameter in the nonCriticalExtension field, and Res' is 256 bits;

[0105] The extended information Res is encrypted using the SM4 encryption algorithm. This encryption protects against attacks by spoofed base stations that forge broadcast information.

[0106] Step S23: Assign Res' to the reserved field in SIB1 to generate SIB1' for periodic broadcasting; determine whether the sequence number i is equal to the preset loop threshold. If yes, return to step S21; otherwise, increment the sequence number i by 1 and return to step S22.

[0107] The reserved field is the nonCriticalExtension field in the SIB1-v1740-IEs information field carried by SIB1; the length of the reserved field is not less than 256 bits.

[0108] Currently, the nonCriticalExtension field is a reserved field and does not contain any content. In C language, it is defined as an empty structure, with Res' serving as a parameter in this structure.

[0109] SIB1-v1740-IEs is an updated version of SIB1 in 3GPP Release 17, which includes new or modified information elements to adapt to the new features and requirements of 5G networks.

[0110] Since the `nonCriticalExtension` field is a reserved field in existing 5G communication systems and has no practical meaning, ordinary terminals will not interpret this field. This ensures that the application of the method in this invention will not affect the normal communication of ordinary terminals.

[0111] Modify the nonCriticalExtension field in the SIB1-v1740-IEs information field of the 5G cell broadcast information SIB1, and assign a value to this field with a length of 256 bits.

[0112] Specifically as follows:

[0113] (1) The extended Res' is assigned to the reserved field in SIB1, and the extended SIB1' replaces SIB1. The 5G base station broadcasts SIB1' periodically.

[0114] Determine if the sequence number i is equal to the preset loop threshold 255. If yes, return to step S21 and reinitialize i to 0; otherwise, increment the sequence number i by 1, i = i + 1, and return to step S22.

[0115] The cyclic index i changes sequentially from 0 to 255, generating one SIB1 and one SIB1' in each cycle.

[0116] By introducing the index i, each generated SIB1 and SIB1' has a unique identifier, avoiding the reuse of the same broadcast information. Each loop uses one i, starting from 0 and incrementing by 1 each time. After using up 255, the i for the next loop is 0.

[0117] Step S2 introduces two pieces of information, a sequence number and a sending timestamp, into the extended content of SIB1 for two-factor authentication, which is used to defend against attacks from replay-type fake base stations.

[0118] Each generated and broadcast SIB1' contains unique and encrypted authentication information, enabling terminal devices to effectively distinguish between real and fake base stations, thus preventing counterfeit base stations and improving the security of 5G networks.

[0119] Because replay-type fake base stations need to first receive and record the real broadcast information from the current air interface of a real 5G base station, and then use a radio frequency front-end to send this information back to the air interface to achieve replay, there will be a time difference between when the terminal receives the replay broadcast information and when it receives the broadcast information from the real base station. This invention introduces a cyclically changing sequence number and uses the time difference between the sending timestamp and the receiving timestamp to defend against replay-type fake base stations.

[0120] When a replay-type fake base station records and replays the real broadcast information of a real 5G base station, the following factors may lead to a time difference:

[0121] (1) Recording and replay delay: When recording real broadcast information from a real 5G base station using a replay-type fake base station and replaying it back to the fake base station, there is a certain processing delay. This delay can be caused by factors such as hardware equipment, processing algorithms, or signal transmission.

[0122] (2) Signal transmission delay: Broadcast information may be affected by signal transmission delay when it is transmitted from the real base station to the replay-type fake base station. This depends on factors such as the signal transmission distance, transmission medium, and network congestion;

[0123] (3) Terminal reception delay: There is also a certain reception delay between the terminal device receiving broadcast information from real base stations and fake base stations. This may depend on factors such as the terminal device's receiving capability, signal strength, and channel conditions.

[0124] Due to the factors mentioned above, there is a time difference between the replay of real broadcast information recorded by replay-type fake base stations and the actual broadcast information. This time difference between transmission and reception can be used to identify and defend against replay-type fake base stations, thereby improving the security of 5G networks.

[0125] Since the broadcast information of the fake base station and the broadcast information of the real base station are both transmitted in plaintext and there is no obvious difference in the air interface, this invention introduces encryption methods to encrypt the extended fields in SIB1, so that the fake base station without the corresponding key cannot forge the encrypted extended fields, thereby achieving defense against the fake base station.

[0126] Step S3 includes:

[0127] Step S31: The dedicated terminal receives SIB1' and obtains the current time point t2 as the receiving timestamp;

[0128] Step S32: Determine whether the reserved field in the received SIB1' is an empty structure. If so, discard SIB1' and return to step S31. Otherwise, extract the reserved field from SIB1' as parameter res. Determine whether plaintext res' can be obtained by decrypting res. If not, it means that SIB1' is a fake base station broadcast. Otherwise, obtain the sequence number i' based on res', use the lower n bits as hash, and query the same 5G cell to see if SIB1' with the same sequence number i' is received within the first preset time threshold. If so, it means that SIB1' is a replay fake base station broadcast. Discard SIB1' and return to step S31. Otherwise, proceed to step S33.

[0129] Step S33: Obtain the hash value of the remaining part of SIB1' after excluding the reserved field, and take the high-order bits of the hash value as hash'; take the XOR value of hash and hash' as ​​t1'; if the difference between t2 and t1' is greater than the second preset time threshold, it means that SIB1' is a replay type fake base station broadcast, discard SIB1', otherwise proceed to step S34;

[0130] Step S34: If SIB1' of the same 5G base station is received continuously, and its sequence number i' is discontinuous or non-periodic, it indicates that SIB1' is a replay-type pseudo base station broadcast, and SIB1' is discarded; otherwise, SIB1' is successfully received.

[0131] Step S31: When the 5G dedicated terminal receives SIB1 replaced by SIB1, it immediately stores the current reception time point t2.

[0132] t2 is used as the receiving timestamp, obtained by timing via the BeiDou satellite clock.

[0133] Step S32 includes:

[0134] The dedicated terminal determines whether the nonCriticalExtension field in the received SIB1' is an empty structure. If not, the nonCriticalExtension field is truncated as the parameter res, and the length of res is 256 bits.

[0135] Based on the symmetric key Key pre-installed on the dedicated terminal, SM4 decryption is performed on res to obtain the plaintext res';

[0136] Take the high 8 bits of res' as the sequence number i' and the low 248 bits as the hash;

[0137] Within the first preset time threshold range, determine whether the same 5G cell receives SIB1' with the same sequence number i'. If so, it means that SIB1' was sent by a replay-type fake base station, and then discard the SIB1'.

[0138] Specifically as follows:

[0139] (1) Determine whether the nonCriticalExtension field exists in the SIB1 replaced by the received SIB1'.

[0140] If it exists, extract the nonCriticalExtension field from the SIB1-v1740-IEs information, which is 256 bits long, and use it as the parameter res.

[0141] Otherwise, if the received broadcast message does not have the nonCriticalExtension field, the broadcast message SIB1' is discarded;

[0142] (2) For res, use the preset symmetric key Key to decrypt res based on the SM4 decryption algorithm, and determine whether res' can be plaintext. If not, it means that SIB1' is a fake base station broadcast. Otherwise, decrypt to get res'. Both res and res' are 256 bits.

[0143] SM4 is a symmetric encryption algorithm. The same key is used for both encryption and decryption; both are pre-defined symmetric keys. Encryption and decryption are performed by XORing the key with the symmetric key.

[0144] (3) Take the high 8 bits of res' and store them as i', and store the low 248 bits as hash. Query whether the same sequence number i' information SIB1' has been received within the first preset time threshold range for the same 5G cell. If it exists, discard the SIB1 and return to step S31; otherwise, proceed to step S33.

[0145] For example, the first preset time threshold range is 40 seconds.

[0146] Verify timestamp and sequence number: Obtain sequence number i' and timestamp t1' to ensure the uniqueness and timeliness of broadcast information and prevent attacks from replay-type fake base stations.

[0147] This step determines whether an attacker has launched a replay attack on SIB1. Since the sequence number of each received SIB1' should be consecutive and cyclical from 0 to 255, and the interval between SIB1' transmissions is generally fixed, if an SIB1' with any sequence number is received, then the receipt times of other SIB1's with sequence numbers should also be within a certain time range. If an SIB1' with the same sequence number is received before that time range, then it can be considered that this SIB1' was replayed by an attacker. Because the broadcast time period of SIB1' can be set by different base stations and is not necessarily the same; in special cases, SIB1's may occur earlier.

[0148] The first preset time threshold can be customized according to specific needs and actual conditions.

[0149] Step S33 includes:

[0150] Perform SM3 hash calculation on the remaining information in SIB1' except for the nonCriticalExtension field, and take the high 248 bits of the resulting hash value as hash'.

[0151] XORing hash and hash' yields 248-bit t1';

[0152] If Δt = t2 - t1' is greater than the second preset time threshold, it means that SIB1' is a replay type sent by the base station, and then SIB1' is discarded.

[0153] Specifically as follows:

[0154] (1) Take the remaining part of the received SIB1' after removing the nonCriticalExtension field in the SIB1-v1740-IEs information field, use the SM3 algorithm to generate a fixed-length hash value with a hash value length of 256 bits, and take the high 248 bits of the hash value result and store it as hash'; XOR hash' with hash to get the result t1';

[0155] (2) Use the SM3 hash algorithm to remove the received SIB1'

[0156] The part following the nonCriticalExtension field is hashed to verify the integrity of the broadcast message and ensure that it has not been tampered with.

[0157] (3) Calculate Δt = t2 - t1';

[0158] (4) If △t < the second preset time threshold, it is considered that the received broadcast information SIB1' comes from a real 5G base station, the SIB1' is successfully received, and the subsequent initial access process is completed.

[0159] If △t ≥ the second preset time threshold, it means that SIB1' is a replay-type fake base station broadcast. Discard SIB1' and continue to receive SIB1'.

[0160] The second preset time threshold can be defined. For example, the second preset time threshold is defined based on specific needs, environment and equipment through on-site measurement, and is roughly in the range of a few milliseconds to tens of milliseconds.

[0161] Calculate the time difference Δt between the received timestamp t2 and the broadcast time t1'. By comparing Δt with the second preset time threshold, determine whether the broadcast information SIB1' arrives within a reasonable time range.

[0162] If the time difference is within a reasonable range, the broadcast information SIB1' is considered to come from a real 5G base station; otherwise, the SIB1' information is discarded.

[0163] Step S34: If SIB1' of the same 5G base station is received continuously, and its sequence number i' is discontinuous or non-periodic, it indicates that SIB1' is a replay-type pseudo base station broadcast, and SIB1' is discarded; otherwise, SIB1' is successfully received.

[0164] If necessary, the dedicated terminal continuously receives SIB1' from the same base station and determines the authenticity or working status of the base station by monitoring whether i' is continuous.

[0165] For SIB1' transmitted from the same base station, the sequence number i' received by the dedicated terminal should be consecutive and periodic, ranging from 0 to 255. If the sequence number i' in the received SIB1' is not consecutive or aperiodic, it indicates that SIB1' is a replay-type fake base station broadcast, and SIB1' should be discarded. Under higher security requirements, step S34 can be enabled, and the selection can be made according to actual needs and security requirements.

[0166] If the sequence number i' in SIB1' received consecutively from the same base station is not consecutive.

[0167] ① If there is a gap in the middle, it can be considered that the base station is not in normal working condition and may be a replay-type fake base station;

[0168] ② If the same sequence number is received within a certain time range, or if the received sequence number is chaotic, it can be considered that there is a replay-type fake base station attacker, and it is not broadcast by a real base station. The real base station is a legitimate base station belonging to a private network.

[0169] Step S3 adds decryption and verification steps to the initial access process, improving the dedicated terminal's ability to identify replay-type and spoofed base stations, thus ensuring the security of the dedicated terminal during access. The dedicated terminal can effectively distinguish between real and fake base stations, improving network security and ensuring reliable access and communication for the terminal.

[0170] The specific requirements for the acquisition methods of the sending timestamp t1 and receiving timestamp t2 in this invention, as well as the first preset time threshold range and the second preset time threshold range, are as follows:

[0171] The BeiDou satellite clock is used to provide real-time time synchronization for the time points t1 and t2.

[0172] The first preset time threshold range is in the second range, and the second preset time threshold range is in the millisecond range.

[0173] The dedicated terminal in this invention refers to a terminal used to defend against replay-type and spoofing-type fake base stations. Compared with ordinary terminals, it has undergone the following modifications and improvements, mainly focusing on adding a security verification step for SIB1 information, thereby enhancing security and preventing replay-type and spoofing-type fake base station attacks. The modifications to the dedicated terminal are as follows:

[0174] (1) Time recording function: When SIB1' is received, the dedicated terminal can immediately store the current time point t2 as the receiving timestamp (obtained using Beidou satellite time synchronization), which provides a basis for subsequent time difference calculation;

[0175] (2) Field verification function: When receiving SIB1', the dedicated terminal checks whether the nonCriticalExtension field exists. If it exists, the content of the field is extracted, decrypted, and verified; if it does not exist, the broadcast information is discarded.

[0176] (3) Decryption and verification function: The dedicated terminal has a built-in SM4 decryption algorithm to decrypt the received nonCriticalExtension field, obtain plaintext res', and extract the sequence number i' and encrypted timestamp Hash' from it;

[0177] The decrypted sequence number i' is checked to ensure that the same sequence number SIB1' is not received repeatedly within a certain time range, in order to defend against replay attacks;

[0178] (4) Hash calculation function: The SM3 hash algorithm is used to perform hash calculation on the part of the received SIB1' after removing the nonCriticalExtension field, and generate a hash value Hash', which is used to verify the integrity and authenticity of SIB1'.

[0179] (5) Time difference calculation function: Calculate the time difference △t between the receiving time t2 and the decrypted timestamp t1', and judge the timeliness of the broadcast information by comparing △t with the preset threshold 2;

[0180] (6) Continuous reception monitoring function (optional): The terminal can choose to continuously receive SIB1' transmitted by the same base station, monitor the continuity of its sequence number i', and further determine the authenticity or working status of the base station. This part can be selected according to the specific security requirements.

[0181] The method in this invention is designed for dedicated terminals. This is also one of the key points of this invention. The modifications made to SIB1 by this invention will not affect ordinary terminals at all, because ordinary terminals will not interpret the added content.

[0182] In summary, the method for defending against replay-type and spoofing-type fake base stations according to embodiments of the present invention has the following beneficial effects:

[0183] 1. Protection before the initial access process: Current methods for defending against replay of cell broadcast information can only provide protection after the initial access process is completed, and do not include protection during the initial access process of the terminal; this invention can protect the terminal before the initial access process is completed, providing earlier security protection.

[0184] 2. Two-factor authentication to defend against replay-type fake base stations: To defend against replay-type fake base stations, a two-factor authentication method using a cyclically changing sequence number and timestamp is adopted, which further increases the difficulty for replay-type fake base stations to carry out replay attacks and improves the security of 5G cell broadcast information.

[0185] 3. Encryption and decryption of the extended fields of SIB1 effectively defend against fake base stations. Successful decryption indicates a genuine 5G base station; otherwise, it indicates a fake base station.

[0186] 4. No impact on ordinary terminal communication: The fields used in this invention are located in the nonCriticalExtension field of the SIB1-v1740-IEs information carried by SIB1. Ordinary terminals do not interpret this part of the content, so it will not affect the access process and normal communication of ordinary terminals. Therefore, the SIB1 extension fields used in 5G cell broadcast information will not affect the access process of ordinary terminals; only dedicated terminals verify this content to ensure that the received 5G cell broadcast information originates from a real base station.

[0187] 5. Low-complexity implementation: By using reserved fields for expansion and combining them with existing SM3 and SM4 national cryptographic algorithms, the implementation cost is low and it is easy to integrate and implement.

[0188] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for defending against replay-type fake base stations and spoofing-type fake base stations, characterized in that, Includes the following steps: Step S1: Pre-set symmetric keys Key for encryption and decryption in the 5G base station and dedicated terminal respectively; Step S2: Generate 5G cell broadcast information SIB1 on the 5G base station side, and perform value assignment and encryption processing on the reserved fields in SIB1 to obtain the extended SIB1', and then broadcast SIB1' periodically; wherein, based on SIB1, the cyclically changing sequence number and the sending timestamp, the reserved fields are assigned values ​​to generate SIB1' with a unique sequence number identifier and timestamp. Step S2 includes: Step S21: Initialize the sequence number i; Step S22: Obtain the hash value Hash of SIB1 and obtain the current time point t1 as the sending timestamp; perform an XOR operation between Hash and t1 to obtain Hash'; concatenate the sequence number i and Hash' to obtain Res; encrypt Res to obtain Res'; Step S23: Assign Res' to the reserved field in SIB1 to generate SIB1' for periodic broadcasting; determine whether the sequence number i is equal to the preset loop threshold. If yes, return to step S21; otherwise, increment the sequence number i by 1 and return to step S22. Step S3: On the dedicated terminal side, the reserved field in the received SIB1' is decrypted and verified; based on the decryption verification of the reserved field, spoofing-type fake base stations are defended; based on the verification of the sequence number in the reserved field and the time difference between the received and sent timestamps, replay-type fake base stations are defended. Step S3 includes: Step S31: The dedicated terminal receives SIB1' and obtains the current time point t2 as the receiving timestamp; Step S32: Determine whether the reserved field in the received SIB1' is an empty structure. If so, discard SIB1' and return to step S31. Otherwise, extract the reserved field from SIB1' as parameter res. Determine whether plaintext res' can be obtained by decrypting res. If not, it means that SIB1' is a fake base station broadcast. Otherwise, obtain the sequence number i' based on res', use the lower n bits as hash, and query the same 5G cell to see if SIB1' with the same sequence number i' is received within the first preset time threshold. If so, it means that SIB1' is a replay fake base station broadcast. Discard SIB1' and return to step S31. Otherwise, proceed to step S33. Step S33: Obtain the hash value of the remaining part of SIB1' after excluding the reserved field, and take the high-order bits of the hash value as hash'; take the XOR value of hash and hash' as ​​t1'; if the difference between t2 and t1' is greater than the second preset time threshold, it means that SIB1' is a replay type fake base station broadcast, discard SIB1', otherwise proceed to step S34; Step S34: If SIB1' of the same 5G base station is received continuously, and its sequence number i' is discontinuous or non-periodic, it indicates that SIB1' is a replay-type pseudo base station broadcast, and SIB1' is discarded; otherwise, SIB1' is successfully received.

2. The method according to claim 1, characterized in that, Step S22 includes: The SM3 algorithm is used to perform a hash calculation on SIB1 to obtain a fixed-length hash value for SIB1. Take the high 248 bits of the hash and XOR it with the extended 248-bit sending timestamp t1 to get Hash'; The 8-bit sequence number i is used as the high-order bit and the 248-bit hash' is used as the low-order bit to concatenate and obtain Res; Res' is obtained by SM4 encryption of Res based on the symmetric key Key pre-installed on the 5G base station side.

3. The method according to claim 1, characterized in that, The reserved field is the nonCriticalExtension field in the SIB1-v1740-IEs information field carried by SIB1; the length of the reserved field is not less than 256 bits.

4. The method according to claim 3, characterized in that, Step S32 includes: The dedicated terminal determines whether the nonCriticalExtension field in the received SIB1' is an empty structure. If not, the nonCriticalExtension field is truncated as the parameter res, and the length of res is 256 bits. Based on the symmetric key Key pre-installed on the dedicated terminal, SM4 decryption is performed on res to obtain the plaintext res'; Take the high 8 bits of res' as the sequence number i' and the low 248 bits as the hash; Within the first preset time threshold range, determine whether the same 5G cell receives SIB1' with the same sequence number i'. If so, it means that SIB1' was sent by a replay-type fake base station, and then discard the SIB1'.

5. The method according to claim 4, characterized in that, Step S33 includes: Perform SM3 hash calculation on the remaining information in SIB1' except for the nonCriticalExtension field, and take the high 248 bits of the resulting hash value as hash'. XORing hash and hash' yields 248-bit t1'; If Δt = t2 - t1' is greater than the second preset time threshold, it means that SIB1' is a replay type sent by the base station, and then SIB1' is discarded.

6. The method according to claim 5, characterized in that, The BeiDou satellite clock is used to provide real-time time synchronization for the time points t1 and t2. The first preset time threshold range is in the second range, and the second preset time threshold range is in the millisecond range.

7. The method according to claim 1, characterized in that, The preset cycle threshold is 255; The initialization number i is 0, and it is incremented cyclically to 255 before returning to 0.

8. The method according to claim 1, characterized in that, The symmetric key Key pre-installed in the 5G base station and the dedicated terminal is updated periodically.

Citation Information

Patent Citations

  • Communication method and device

    CN115884179A