CN113301570B - Anti-theft method and device for SIM card - Google Patents

Anti-theft method and device for SIM card Download PDF

Info

Publication number
CN113301570B
CN113301570B CN202110727034.0A CN202110727034A CN113301570B CN 113301570 B CN113301570 B CN 113301570B CN 202110727034 A CN202110727034 A CN 202110727034A CN 113301570 B CN113301570 B CN 113301570B
Authority
CN
China
Prior art keywords
imei
sim card
card
card slot
terminal equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110727034.0A
Other languages
Chinese (zh)
Other versions
CN113301570A (en
Inventor
张咏霞
武海峰
张燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN202110727034.0A priority Critical patent/CN113301570B/en
Publication of CN113301570A publication Critical patent/CN113301570A/en
Priority to PCT/CN2022/070819 priority patent/WO2023273289A1/en
Application granted granted Critical
Publication of CN113301570B publication Critical patent/CN113301570B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/126Anti-theft arrangements, e.g. protection against subscriber identity module [SIM] cloning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/69Identity-dependent
    • H04W12/71Hardware identity

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides an anti-theft method and an anti-theft device for an SIM card, wherein the method comprises the following steps: acquiring a first International Mobile Equipment Identity (IMEI) of the terminal equipment, and comparing the first IMEI with a second IMEI stored in an SIM card, wherein the terminal equipment is provided with one or more first IMEIs, and when the terminal equipment is provided with a plurality of first IMEIs, the terminal equipment is provided with a plurality of card slots for loading the SIM card, and each card slot corresponds to one IMEI; and when the first IMEI is the same as the second IMEI, setting the state of the IMSI to be an effective state, and when the IMSI is in the effective state, normally networking the terminal equipment. The method of the invention improves the information security of the SIM card.

Description

Anti-theft method and device for SIM card
Technical Field
The present invention relates to SIM card anti-theft technologies, and in particular, to an anti-theft method and apparatus for an SIM card.
Background
With the rapid development of wireless communication technology, mobile phones have become necessities of people's life. The SIM (Subscriber Identity Module) card, as a Subscriber Identity Module in a mobile phone, assumes an extremely important security role, and may be a conventional SIM card or a USIM (Universal Subscriber Identity Module) card. Since many current smart phone applications bind an individual's phone number to an account number for use, it seems simple and secure, but once the phone is lost, privacy leakage and even property loss may result.
In the prior art, a Mobile phone compares an International Mobile Equipment Identity (IMEI) stored in an SIM card with its own IMEI, and if the International Mobile Equipment Identity (IMEI) is the same, the SIM card is used through anti-theft verification.
But the IMEI on the mobile phone can be forged, so that the anti-theft authentication can be passed, that is, the mobile phone can use any SIM card, and the security of the information in the SIM card is low.
Disclosure of Invention
The invention provides an anti-theft method and an anti-theft device for an SIM card, which are used for solving the problem of low information security in the SIM card.
In one aspect, the present invention provides an anti-theft method for a SIM card, including:
acquiring a first International Mobile Equipment Identity (IMEI) of the terminal equipment, and comparing the first IMEI with a second IMEI stored in the SIM card, wherein the terminal equipment is provided with one or more first IMEIs, and when the terminal equipment is provided with a plurality of first IMEIs, the terminal equipment is provided with a plurality of card slots for loading the SIM card, and each card slot corresponds to one IMEI;
and when the first IMEI is the same as the second IMEI, setting the state of an International Mobile Subscriber Identity (IMSI) stored in the SIM card to be in an effective state, and when the IMSI is in the effective state, normally networking the terminal equipment.
In one embodiment. When the terminal equipment has a plurality of first IMEIs, the step of acquiring a first International Mobile Equipment Identity (IMEI) of the terminal equipment and comparing the first IMEI with a second IMEI stored in the SIM card comprises the following steps:
acquiring a first IMEI corresponding to each card slot;
comparing each said first IMEI with a second IMEI stored in said SIM card;
when the first IMEI is the same as the second IMEI, setting the state of the state IMSI of the international mobile subscriber identity IMSI stored in the SIM card to a valid state, including:
setting the state of the IMSI in the SIM card to a valid state when each of the first IMEIs has the same second IMEI within the SIM card.
In an embodiment, the SIM card includes a second list, where the second list includes a plurality of second entries, and each second entry includes a second IMEI and a card slot identifier corresponding to one card slot; said comparing each said first IMEI with a second IMEI stored in said SIM card, comprising:
forming a first entry by the first IMEI corresponding to each card slot and the card slot identifier, and forming a first list by a plurality of first entries;
comparing each first entry with each second entry in the second list;
wherein each of the first IMEIs is determined to have the same second IMEI in the SIM card when each of the first entries has the same second entry in the second list; or, when part of said first entries all have the same second entry in said second list and each of said first IMEIs of the remaining part of said first entries all have the same second IMEIs in the remaining part of said second entries, determining that each of said first IMEIs has the same second IMEIs in said SIM card.
In an embodiment, the step of acquiring the first international mobile equipment identity IMEI of the terminal device includes:
sending a first obtaining instruction of the IMEI to the terminal equipment;
and receiving a response of the terminal equipment for feeding back the first acquisition instruction, wherein the response of the first acquisition instruction comprises each first IMEI.
In an embodiment, the response of the first obtaining instruction includes a plurality of first preset fields, each of the first preset fields corresponds to one card slot, and the first preset field is used to store a first IMEI corresponding to the card slot.
In an embodiment, the response of the first obtaining instruction includes a plurality of second preset fields, and each second preset field includes a card slot identifier and a first IMEI corresponding to the card slot.
In an embodiment, before the step of obtaining the first international mobile equipment identity IMEI of the terminal device, the method further includes:
and after the anti-theft function is started, setting the state of the international mobile subscriber identity IMSI stored in the SIM card of the subscriber identity authentication module to be an invalid state.
In one embodiment, the SIM card starts an anti-theft function when powering on the SIM card and/or detecting that the identity of the card slot in which the SIM card is currently located is different from the stored identity of the card slot.
In an embodiment, before the step of obtaining the first international mobile equipment identity IMEI of the terminal device, the method further includes:
when key information of a preset menu sent by the terminal equipment is received, sending a second IMEI acquisition instruction to the terminal equipment, wherein the preset menu is an opening menu of an anti-theft function of the SIM card;
and receiving a response of the terminal equipment for feeding back the second acquisition instruction, and storing each second IMEI in the response of the second acquisition instruction.
In another aspect, the present invention further provides a SIM card, including:
an obtaining module, configured to obtain a first international mobile equipment identity IMEI of the terminal device, and compare the first IMEI with a second IMEI stored in the SIM card, where the terminal device has one or more first IMEIs, and when the terminal device has multiple first IMEIs, the terminal device is provided with multiple card slots for loading the SIM card, and each card slot corresponds to one IMEI;
and the setting module is used for setting the state of the international mobile subscriber identity IMSI stored in the SIM card to be a valid state when the first IMEI is the same as the second IMEI, and the terminal equipment is normally networked when the IMSI is in the valid state.
In another aspect, the present invention further provides a SIM card, including: a memory and a processor;
the memory stores computer-executable instructions;
the processor executes the computer-executable instructions stored by the memory, so that the processor executes the anti-theft method of the SIM card.
In another aspect, the present invention further provides a readable storage medium, in which computer executable instructions are stored, and the computer executable instructions are executed by a processor to implement the above-mentioned anti-theft method for the SIM card.
In another aspect, the present invention also provides a computer program product comprising a computer program, which when executed by a processor, implements the anti-theft method for a SIM card as described above.
According to the anti-theft method and device for the SIM card, the IMEI corresponding to each card slot of the terminal equipment is obtained, and if the IMEI of the terminal equipment is the same as the IMEI stored in the SIM card, the state of the IMSI is set to be a normal state, so that the terminal equipment is normally networked. According to the invention, the anti-theft process of the SIM card is carried out through the SIM card, the terminal equipment cannot acquire the IMEI in the SIM card, so that the IMEI in the SIM card cannot be caused by the terminal equipment failing to falsely identify the IMEI of the terminal equipment, and if the current terminal equipment is different from the initial terminal equipment loaded with the SIM card, the SIM card cannot change the IMSI into a normal state, namely, the terminal equipment cannot be networked through the lost SIM card, the information leakage of the SIM card is avoided, and the information security of the SIM card is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a system architecture diagram of a terminal device loaded with a SIM card according to the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of an anti-theft method for an SIM card according to the present invention;
fig. 3 is a detailed flowchart of step S20 in a second embodiment of the anti-theft method for a SIM card according to the present invention;
fig. 4 is a detailed flowchart of step S20 in the third embodiment of the anti-theft method for a SIM card according to the present invention;
fig. 5 is a detailed flowchart of step S10 in the fourth embodiment of the anti-theft method for a SIM card according to the present invention;
FIG. 6 is a schematic flow chart illustrating an anti-theft method for an SIM card according to the present invention;
FIG. 7 is a functional block diagram of a SIM card according to the present invention;
fig. 8 is a schematic diagram of a hardware structure of the SIM card of the present invention.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The invention provides an anti-theft method for an SIM card, which can be realized by a terminal device shown in figure 1, wherein the terminal device can be a device loaded with the SIM card, such as a mobile phone. Fig. 1 is a system architecture diagram of a terminal device. As shown in fig. 1, the terminal device 100 is provided with a card slot 101, and a SIM card 102 is loaded on the card slot 101. The terminal device may also include a plurality of card slots 101, and each card slot 101 is correspondingly provided with an International Mobile Equipment Identity (IMEI). The SIM card may be a conventional SIM card or a USIM card, and the USIM card may be a SIM card supporting a 4G network, and of course, the SIM card may also be another card supporting a 5G network, even supporting a 5G network later.
The following describes the technical solutions of the present invention and how to solve the above technical problems with specific embodiments. These several specific embodiments may be combined with each other below, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a first embodiment of the anti-theft method for the SIM card of the present invention, and the anti-theft method includes the following steps:
step S10, obtaining a first international mobile equipment identification code IMEI of the terminal equipment, comparing the first IMEI with a second IMEI stored in the SIM card, wherein the terminal equipment is provided with one or more first IMEIs, when the terminal equipment is provided with a plurality of first IMEIs, the terminal equipment is provided with a plurality of card slots for loading the SIM card, and each card slot corresponds to one IMEI.
In this embodiment, the execution body is a SIM card. The SIM card may be a USIM card or a conventional SIM card. When the SIM card is installed in the terminal device, the state of the International Subscriber Identity (IMSI) stored in the SIM card is set as an invalid state. When the IMSI state is an invalid state, the terminal device cannot register a network through the SIM card, that is, the terminal device cannot be networked. An IMSI is a string of alphanumeric characters, and the meaning of the alphanumeric representation varies from location to location. For example, the IMSI is formed by sequentially connecting a Mobile Country Code (MCC), a Mobile Network Code (MNC), and a Mobile Subscriber Identification Number (MSIN). The MCC is 3 digits in length, the MNC length is determined by the value of the MCC and can be 2 digits or 3 digits, and the value of the MSIN is self-allocated by an operator. MCC, MNC, and MSIN have corresponding formats and corresponding numbers or letters have corresponding meanings, e.g., MCC 310, for united states; MCC 460, which indicates China. In this regard, the SIM card may change the format or the number of words so that at least one of the MCC, MNC and MSIN has no corresponding meaning in terms of format error or number, thereby setting the status of the IMSI to an invalid status.
One or more card slots are arranged in the terminal equipment, an IMEI is correspondingly arranged in each card slot, and the IMEI of the terminal equipment is defined as a first IMEI. One or more IMEIs are stored in the SIM card, the IMEI stored in the SIM card is defined as a second IMEI, the second IMEI is the IMEI of the terminal equipment stored in the SIM card in advance, and the terminal equipment is bound with the SIM card. It can be understood that, when a user obtains a new SIM card, the SIM card may be bound with the terminal device, and after the binding, the SIM card may obtain the IMEI of the terminal device for storage.
Step S20, when the first IMEI is the same as the second IMEI, the state of the international mobile subscriber identity IMSI stored in the SIM card is set to be a valid state, and when the IMSI is in the valid state, the terminal equipment is normally networked.
After the SIM card sets the state of the IMSI to an invalid state, the terminal device is not capable of networking, and at this time, the SIM card may require the terminal device to provide its own IMEI for verification, that is, the SIM card obtains the first international mobile equipment identity IMEI of the terminal device. When the terminal equipment only has one card slot, the terminal equipment has a unique IMEI. The SIM card compares the first IMEI with a second IMEI stored by itself. If the first IMEI has the same second IMEI in the SIM card, the terminal equipment can be considered as the terminal bound by the SIM, the SIM card initiates an IMSI refreshing process, so that the SIM card sets the state of the IMSI to be an effective state, and the SIM sends the information that the IMSI is set to be the effective state to the terminal equipment, so that the terminal equipment can be connected to a network through network registration of the SIM card, and the SIM card can be normally used. It should be noted that, when the state of the IMSI is set to the invalid state, the SIM card backs up the IMSI in the valid state, and when the invalid state needs to be switched to the valid state, the SIM card overwrites the IMSI in the invalid state with the backed-up IMSI. The IMSI refresh process can be implemented by a recovery process of an STK (SIM Tool, subscriber identity module, STK for short).
It should be noted that when the IMEI is not stored in the SIM card, it may be determined that the SIM card is not bound to the terminal device, and at this time, the SIM sends a second obtaining instruction of the IMEI to the terminal device; and the SIM card receives the response of the terminal equipment feeding back the second acquisition instruction and describes each second IMEI in the response of the second acquisition instruction, so that the terminal equipment and the SIM card are bound. After the binding is completed, the steps S10 to S30 can be performed to perform the networking verification of the terminal device. In addition, the anti-theft function of the SIM can be started through an STK menu in the terminal equipment, and if the anti-theft function is started, the SIM needs the terminal equipment to provide IMEI for storage. That is, when the SIM card receives the key information of the preset menu sent by the terminal device, the SIM card sends a second obtaining instruction of the IMEI to the terminal device, the preset menu is an open menu of the anti-theft function of the SIM card, that is, the preset menu may be an STK menu. And the SIM card receives a response of the second instruction fed back by the terminal equipment, thereby storing the IMEI in the response as the second IMEI.
In the technical scheme provided by this embodiment, the IMEI corresponding to each card slot of the terminal device is obtained, and if the IMEI of the terminal device is the same as the IMEI stored in the SIM card, the state of the IMSI is set to a normal state, so that the terminal device is normally networked. According to the invention, the anti-theft process of the SIM card is carried out through the SIM card, the terminal equipment cannot acquire the IMEI in the SIM card, so that the IMEI in the SIM card cannot be caused by the fact that the IMEI of the terminal equipment is fake, and if the current terminal equipment is different from the initial terminal equipment loaded with the SIM card, the IMSI cannot be changed into a normal state by the SIM card, so that the terminal equipment cannot be networked through the lost SIM card, the information leakage of the SIM card is avoided, and the information security of the SIM card is improved.
Referring to fig. 3, fig. 3 is a second embodiment of the anti-theft method for a SIM card according to the present invention, and based on the first embodiment, step S20 includes:
step S21, acquiring a first IMEI corresponding to each card slot.
Step S22, comparing each first IMEI with the second IMEI stored in the SIM card.
When the terminal equipment is a mobile phone supporting multiple SIM cards such as a double card and a triple card, the terminal equipment is provided with a plurality of card slots, and each card slot has a corresponding IMEI. At this time, the SIM card requires the terminal equipment to provide all IMEIs. If the terminal equipment bound by the SIM card is a multi-card mobile phone, all IMEIs of the terminal equipment are stored in the SIM card.
In consideration of the usage habits of users, when a user inserts a SIM card into the terminal device, the position of the insertion card slot should not be fixed. Taking a dual-card terminal as an example, assuming that the position where the user inserts the SIM card is the card slot 1, the first IMEI provided by the terminal device for the SIM card is the IMEI corresponding to the card slot 1, when the terminal device is subsequently started, the user inserts the SIM card into the card slot 2, the first IMEI provided by the terminal device for the SIM card is the IMEI corresponding to the card slot 2, if the SIM performs the IMEI comparison process, the IMEI is found not to be matched, and the terminal device is not considered to be the terminal device permitted to be used by the SIM card. However, in practice, although the IMEIs of the card slot 1 and the IMEIs of the card slot 2 are different, they both belong to the same terminal equipment, so it should be considered that the user has not replaced the terminal, and the UE should continue to be used normally at this time.
And if each first IMEI has the same second IMEI in the SIM, the current terminal equipment is considered to be the terminal equipment bound by the SIM, and the state of the IMSI is set to be an effective state, so that the terminal equipment can be registered in a network through the SIM so as to access the network, and the SIM is normally used. If the first IMEI exists and the SIM card does not have the same second IMEI, the terminal equipment which loads the SIM card at present can be considered not to be the terminal equipment bound by the SIM card, and the SIM maintains the state of the IMSI in an invalid state, so that the terminal equipment can not use the SIM card for networking, and the information leakage of the SIM card is avoided.
Certainly, the SIM card may compare the acquired number of the first IMEI with the number of the second IMEI stored in the SIM card, and if the acquired number of the first IMEI is inconsistent with the stored number of the second IMEI, the SIM card maintains the invalid state of the IMSI; if the number is consistent, the first IMEI is compared with the second IMEI.
In the technical scheme provided by this embodiment, when the terminal device is a multi-card terminal, the SIM card compares whether each first IMEI has the same second IMEI in the SIM card, and if so, sets the state of the IMSI in the SIM card to an active state, so that the terminal device is networked.
Referring to fig. 4, fig. 4 is a third embodiment of the anti-theft method for a SIM card according to the present invention, and based on the second embodiment, step S22 includes:
step S221, a first IMEI and a card slot identifier corresponding to each card slot form a first entry, and a plurality of first entries form a first list.
Step S222, comparing each first entry with each second entry in the second list, wherein when each first entry has the same second entry in the second list, it is determined that each first IMEI has the same second IMEI in the SIM card; or, when part of the first entries all have the same second entry in the second list and each first IMEI of the remaining part of the first entries all have the same second IMEI in the remaining part of the second entries, determining that each first IMEI has the same second IMEI in the SIM card.
In this embodiment, the terminal device is a multi-card terminal. The terminal device provides a first list to the SIM card, the first list including a plurality of first entries, each first entry identified by a first IMEI and a card slot corresponding to the first IMEI. And a second list is stored in the SIM card, the second list is composed of a plurality of second entries, and each second entry is composed of a second IMEI and a card slot identifier corresponding to the second IMEI.
After obtaining the first list, the SIM card compares each first entry in the first list with a second entry of a second list stored in the SIM card. When the card slot identifier in the first item is the same as the card slot identifier in the second item, and the first IMEI of the single first item is different from the second IMEI of the single first item, the terminal device may load the SIM card in another card slot, at this time, the SIM card obtains the first IMEI of each card slot to compare the first IMEI with the second IMEI, if each first IMEI has the same second IMEI in the SIM card, it can be accurately determined that the terminal device loads the SIM card in another card slot, that is, the terminal device is a practical terminal device permitted by the SIM card, and at this time, the SIM card sets the state of the IMSI to be a valid state.
And if each first entry has the same second entry in the second list, determining that each first IMEI has the same second IMEI in the SIM card, wherein the situation is that the terminal equipment does not replace the card slot loading the SIM card. Furthermore, determining that each first IMEI has the same second IMEI in the SIM card when part of the first entries all have the same second entry in the second list and the first IMEI of the remaining part of the first entries all have the same second IMEI in the remaining part of the second entries; this is the case when the terminal equipment transmits the IMEI, a transmission error occurs. For example, the terminal device has three card slots, the first list originally transmitted by the terminal device is (IMEI 1, IMEI2, IMEI 3), and due to a certain error, the first list received by the SIM card is (IMEI 1, IMEI3, IMEI 2), and the position sequence of the IMEI in the list is characterized as the card slot identifier, so that part of the first entries all have the same second entry in the second list, and when the first IMEI of the first entries of the remaining part all have the same second IMEI in the second entries of the remaining part, it is determined that each first IMEI has the same second IMEI in the SIM card.
It should be noted that the card slot identifier may be a simple numeric value or a letter, such as card slot 1. In addition, the card slot identifier may be determined by a queue position of the first IMEI in the first list, for example, the card slot identifier corresponding to the first IMEI in the first position of the first list is the card slot 1, and the card slot identifier corresponding to the first IMEI in the second position of the first list is the card slot 2. Similarly, the card slot identifier corresponding to the second IMEI in the SIM card is also determined by the queue position of the second IMEI in the second list.
In the technical scheme provided in this embodiment, the SIM card obtains a first list provided by the terminal device, compares first entries in the first list with second entries of a second list stored in the SIM card, and determines that each first IMEI has the same second IMEI in the SIM card when each first entry has the same second entry in the second list, or determines that each first IMEI has the same second IMEI in the SIM card when some first entries have the same second entries in the second list and each first IMEI of the remaining first entries has the same second IMEI in the remaining second entries, thereby avoiding that the terminal device cannot use the SIM card due to a replacement loading position of the SIM card.
Referring to fig. 5, fig. 5 is a fourth embodiment of the anti-theft method for a SIM card according to the present invention, and based on any one of the first to third embodiments, step S10 includes:
step S11, a first IMEI acquisition instruction is sent to the terminal equipment.
And step S12, receiving a response of the terminal equipment for feeding back the first acquisition instruction, wherein the response of the first acquisition instruction comprises each first IMEI.
In this embodiment, the SIM card may send a first obtaining instruction of the IMEI to the terminal device. Specifically, the SIM card sends an active command (first acquisition instruction) of the PROVIDE LOCAL INFORMATION to the terminal device, where the command type is 01: the IMEI of the terminal. After receiving the first obtaining instruction, the terminal device analyzes the first obtaining instruction to obtain the command type, and if the command type is 01, the terminal device needs to provide the self IMEI to the SIM card. At this time, the mobile TERMINAL sends a TERMINAL RESPONSE to the USIM card, where the TERMINAL RESPONSE carries the first IMEI corresponding to all the card slots of the TERMINAL device. That is, the SIM receives the RESPONSE of the first obtaining instruction, and the RESPONSE of the first obtaining instruction is TERMINAL RESPONSE.
It should be noted that the response of the first obtaining instruction includes a plurality of first preset fields, each first preset field corresponds to one card slot, and the first preset field is used for storing a first IMEI corresponding to the card slot.
Or, the response of the first obtaining instruction includes a plurality of second preset fields, and each second preset field includes a card slot identifier and a first IMEI corresponding to the card slot.
In the technical solution provided in this embodiment, the SIM card sends the first obtaining instruction of the IMEI to the terminal device, so as to receive a response of the first obtaining instruction fed back by the terminal device, and further obtain each first IMEI from the response.
In one embodiment, the SIM card performs data interaction with the terminal device through a communication protocol. The communication protocol may be TS 31.111. In this embodiment, the communication protocol is modified based on the IMEI corresponding to each card slot of the terminal device. Specifically, taking the terminal device as a dual-card terminal as an example, the structure of the communication protocol is as follows-1:
TABLE-1
Figure BDA0003137890600000101
Figure BDA0003137890600000111
/>
As can be seen from the above table, an optional IMEI (last line) field is added based on the original protocol, and if the terminal is a single-card terminal, the field does not need to be filled in. If the terminal is a dual-card terminal, the field can be filled in
IMEI of other card slot locations. If the terminal is a three-card terminal, an IMEI field needs to be added, and so on, the N-card terminal can provide N IMEIs. And the IMEI corresponding to the current card slot position is filled in the IMEI field defined by the original protocol and arranged at the top of all IMEI fields.
Note1 (Note 1 is the third preset field of the communication protocol, second last row of table-1):
when the command is PROVIDE LOCAL INFORMATION (IMEI of the terminal), the field is filled with the IMEI corresponding to the current card slot position;
note2 (Note 2 is the third preset field of the communication protocol, the last but one row of Table-1):
when the command is PROVIDE LOCAL INFORMATION (IMEI of the terminal), this field is filled with IMEIs corresponding to other card slot positions.
The IMEIs corresponding to other card slot positions are not in order, for example, when the card slot position into which the card is inserted is card slot 1, the IMEI order provided may be (IMEI 1, IMEI2, IMEI 3), and the term RESPONSE structure may be as follows in table-2:
TABLE-2
Description Clause M/O/C Min Length
Command details 8.6 M Y A
Device identities 8.7 M N B
Result 8.12 M Y C
IMEI1 8.20 C N G
IMEI2 8.20 O N XX
IMEI3 8.20 O N XX
The IMEI order provided by the terminal equipment may also be (IMEI 1, IMEI3, IMEI 2), as shown in table-3:
TABLE-3
Figure BDA0003137890600000112
Figure BDA0003137890600000121
In the technical scheme provided by this embodiment, the SIM card obtains the first IMEI of the terminal device quickly through a communication protocol between the terminal device and the SIM card, thereby shortening the verification time of the SIM card.
In one embodiment, an anti-theft function is provided in the SIM. That is, before the SIM card obtains the first IMEI of the terminal device, if the anti-theft function of the SIM card is started, the SIM card sets the state of the international mobile subscriber identity IMSI stored in the SIM card of the subscriber identity module to an invalid state, so as to perform the anti-theft detection procedure of the SIM. And the SIM card is electrified, and the anti-theft function of the SIM card is started when the fact that the identification of the card slot where the SIM card is currently located is different from the stored identification of the card slot is detected, or the SIM card is electrified and the identification of the card slot where the SIM card is currently located is different from the stored identification of the card slot. Specifically, when the SIM is powered on, the SIM card detects whether the identifier represented by the anti-theft function of the SIM card is an open identifier, and if so, the SIM starts the anti-theft function. The anti-theft function of the SIM card can be started by a user. When the SIM card is positioned in the bound terminal equipment, a user can open the STK menu through the terminal equipment, the SIK menu comprises an anti-theft function, the user can select to open the anti-theft function, the terminal equipment informs the SIM card, the identity of the anti-theft function is changed into an open identity through the SIM card, and the anti-theft function is started through the SIM card.
It should be noted that, when the state of the IMSI in the SIM card is an effective state, the SIM card may record the identifier of the card slot where the SIM card is located, so that when the subsequent anti-theft verification is required, whether the identifier of the current card slot where the SIM card is located is the same as the stored identifier of the card slot is compared, and if the identifier of the current card slot where the SIM card is located is different from the stored identifier of the card slot, it may be determined that the card slot position of the SIM card is replaced in the mobile phone.
Referring to fig. 6, the following description briefly describes an anti-theft method for a SIM card after a User replaces the SIM card from a card slot 1 to a card slot 2, taking a terminal device (User Equipment, abbreviated as UE) as a dual-card terminal and a SIM card as a USIM card as an example.
1. The user switches the card from card slot 1 to card slot 2 and starts the card. The UE starts up and resets the SIM card, and executes the initialization process of the SIM card; after the USIM card is powered on and reset, judging that the USIM card anti-theft function is started currently, setting the IMSI in the card to be an invalid value, wherein the invalid value indicates that the state of the IMSI is an invalid state;
2. the USIM card sends a PROVIDE LOCAL INFORMATION active command to the UE, wherein the command type is 01: IMEI of the terminal;
3. the UE end sends TERMINAL RESPONSE to the USIM card, and IMEIs corresponding to all card slots of the UE are carried in the USIM card, wherein IMEI2 of the current card slot and IMEI1 corresponding to the positions of other card slots are adopted in the embodiment;
4. the USIM card compares the IMEI list stored in the card with the IMEI list provided by the UE this time;
5. the USIM card checks an IMEI list provided by the UE, and finds that the IMEI2 and the IMEI1 in the IMEI list provided by the UE are both in the IMEI list stored by the USIM card, then the USIM card considers that the UE passes the USIM card anti-theft detection process, the USIM card initiates an IMSI refreshing process, namely the IMSI state is set to be an effective state, and the UE can normally execute the subsequent network registration process.
The present invention also provides a SIM card 800, and referring to fig. 7, the SIM card 800 includes:
an obtaining module 801, configured to obtain a first international mobile equipment identity IMEI of a terminal device, compare the first IMEI with a second IMEI stored in an SIM card, and when the terminal device has multiple first IMEIs, the terminal device is provided with multiple card slots for loading the SIM card, where each card slot corresponds to one IMEI;
the setting module 802 is configured to set the state of the international mobile subscriber identity IMSI stored in the SIM card to an active state when the first IMEI is the same as the second IMEI, and when the IMSI is in the active state, the terminal device is normally networked.
In one embodiment, the SIM card 800 includes:
an obtaining module 801, configured to obtain a first IMEI corresponding to each card slot;
a comparing module, configured to compare each first IMEI with a second IMEI stored in the SIM card;
and the setting module is used for setting the state of the IMSI in the SIM card to be a valid state when each first IMEI has the same second IMEI in the SIM card.
In one embodiment, the SIM card 800 includes:
the card slot identification module is used for identifying the card slot and the IMEI corresponding to each card slot;
a comparing module, configured to compare each first entry with each second entry in the second list, where when each first entry has the same second entry in the second list, it is determined that each first IMEI has the same second IMEI in the SIM card; or, when part of the first entries all have the same second entry in the second list and each first IMEI of the remaining part of the first entries all have the same second IMEI in the remaining part of the second entries, determining that each first IMEI has the same second IMEI in the SIM card.
In one embodiment, the SIM card 800 includes:
the sending module is used for sending a first obtaining instruction of the IMEI to the terminal equipment;
and the receiving module is used for receiving a response of the terminal equipment for feeding back the first acquisition instruction, wherein the response of the first acquisition instruction comprises each first IMEI.
In one embodiment, the SIM card 800 includes:
the setting module 802 is further configured to set the state of the international mobile subscriber identity IMSI stored in the SIM card of the subscriber identity module as an invalid state after the anti-theft function is started.
In one embodiment, the SIM card 800 includes:
the sending module is used for sending a second IMEI obtaining instruction to the terminal equipment when receiving the key information of a preset menu sent by the terminal equipment, wherein the preset menu is an opening menu of an anti-theft function of the SIM card;
and the receiving module is used for receiving a response of the terminal equipment for feeding back the second acquisition instruction and storing each second IMEI in the response of the second acquisition instruction.
Figure 8 is a block diagram illustrating a SIM card in accordance with one exemplary embodiment.
The SIM card may include: a processor 91, such as a CPU, a memory 92, and a transceiver 93. Those skilled in the art will appreciate that the configuration shown in figure 8 does not constitute a limitation of a SIM card and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. The memory 92 may be implemented by any type or combination of volatile and non-volatile storage devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The processor 91 may call a computer program stored in the memory 92 to perform all or part of the steps of the software defect prediction method described above.
The transceiver 93 is used for receiving information transmitted from the terminal device and transmitting information to the terminal device.
A non-transitory computer readable storage medium, instructions in which, when executed by a processor of a terminal device, enable the terminal device to perform the above-mentioned anti-theft method for a SIM card.
A computer program product comprising a computer program enabling a terminal device to carry out the above anti-theft method for a SIM card, when the computer program is executed by a processor of the terminal device.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. The invention is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. An anti-theft method for a SIM card, comprising:
acquiring a first International Mobile Equipment Identity (IMEI) of terminal equipment, and comparing the first IMEI with a second IMEI stored in an SIM card, wherein the terminal equipment is provided with a plurality of first IMEIs, the terminal equipment is provided with a plurality of card slots for loading the SIM card, and each card slot corresponds to one IMEI; the SIM card comprises a second list, the second list comprises a plurality of second entries, and each second entry comprises a second IMEI and a card slot identifier corresponding to one card slot;
when each first IMEI has the same second IMEI in the SIM card, setting the state of an International Mobile Subscriber Identity (IMSI) stored in the SIM card to be in an effective state, and when the IMSI is in the effective state, normally networking the terminal equipment;
the step of obtaining a first international mobile equipment identity, IMEI, of the terminal equipment and comparing the first IMEI with a second IMEI stored in the SIM card comprises:
acquiring a first IMEI corresponding to each card slot;
forming a first item by the first IMEI corresponding to each card slot and the card slot identification, and forming a first list by a plurality of first items;
comparing each first entry with each second entry in the second list;
wherein each of the first IMEIs is determined to have the same second IMEI in the SIM card when each of the first entries has the same second entry in the second list; or, when part of said first entries all have the same second entry in said second list and each of said first IMEIs of the remaining part of said first entries all have the same second IMEIs in the remaining part of said second entries, determining that each of said first IMEIs has the same second IMEIs in said SIM card.
2. The SIM card anti-theft method according to claim 1, wherein the step of obtaining the first international mobile equipment identity IMEI of the terminal device comprises:
sending a first obtaining instruction of the IMEI to the terminal equipment;
and receiving a response of the terminal equipment for feeding back the first acquisition instruction, wherein the response of the first acquisition instruction comprises each first IMEI.
3. The method according to claim 2, wherein the response of the first obtaining instruction includes a plurality of first predetermined fields, each of the first predetermined fields corresponds to one card slot, and the first predetermined fields are used to store a first IMEI corresponding to the card slot.
4. The method according to claim 2, wherein the response of the first obtaining instruction includes a plurality of second predetermined fields, and each of the second predetermined fields includes a card slot identifier and a first IMEI corresponding to the card slot.
5. The anti-theft method according to any one of claims 1 to 4, wherein said step of obtaining the first international mobile equipment identity, IMEI, of said terminal device is preceded by the steps of:
and after the anti-theft function is started, setting the state of the international mobile subscriber identity IMSI stored in the SIM card of the subscriber identity authentication module to be an invalid state.
6. Anti-theft method according to claim 5, characterized in that the SIM card activates an anti-theft function when it is electrically powered on and/or detects that the identity of the card slot in which the SIM card is currently located is different from the identity of the saved card slot.
7. The anti-theft method according to any one of claims 1 to 4, characterized in that said step of obtaining the first international mobile equipment identity, IMEI, of said terminal device is preceded by the further steps of:
when key information of a preset menu sent by the terminal equipment is received, sending a second IMEI acquisition instruction to the terminal equipment, wherein the preset menu is an opening menu of an anti-theft function of the SIM card;
and receiving a response of the terminal equipment for feeding back the second acquisition instruction, and storing each second IMEI in the response of the second acquisition instruction.
8. A SIM card, comprising:
the terminal equipment is provided with a plurality of first IMEIs, and is provided with a plurality of card slots for loading the SIM cards, wherein each card slot corresponds to one IMEI; the SIM card comprises a second list, the second list comprises a plurality of second entries, and each second entry comprises a second IMEI and a card slot identifier corresponding to one card slot;
the terminal equipment comprises a setting module, a switching module and a switching module, wherein the setting module is used for setting the state of an International Mobile Subscriber Identity (IMSI) stored in an SIM card to be an effective state when each first IMEI has the same second IMEI in the SIM card, and the terminal equipment is normally networked when the IMSI is in the effective state;
the obtaining module is specifically configured to obtain a first IMEI corresponding to each card slot;
the card slot identification module is used for identifying the card slot and the IMEI corresponding to each card slot;
a comparing module, configured to compare each first entry with each second entry in the second list, where when each first entry has the same second entry in the second list, it is determined that each first IMEI has the same second IMEI in the SIM card; or, when part of the first entries all have the same second entry in the second list and each first IMEI of the remaining part of the first entries all have the same second IMEI in the remaining part of the second entries, determining that each first IMEI has the same second IMEI in the SIM card.
9. A SIM card, comprising: a memory and a processor;
the memory stores computer-executable instructions;
the processor executes the computer-executable instructions stored by the memory, so that the processor performs the anti-theft method of the SIM card according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which computer-executable instructions are stored, and when executed by a processor, the computer-executable instructions are configured to implement the method for preventing theft of a SIM card according to any one of claims 1 to 7.
CN202110727034.0A 2021-06-29 2021-06-29 Anti-theft method and device for SIM card Active CN113301570B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110727034.0A CN113301570B (en) 2021-06-29 2021-06-29 Anti-theft method and device for SIM card
PCT/CN2022/070819 WO2023273289A1 (en) 2021-06-29 2022-01-07 Anti-theft method and apparatus for sim card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110727034.0A CN113301570B (en) 2021-06-29 2021-06-29 Anti-theft method and device for SIM card

Publications (2)

Publication Number Publication Date
CN113301570A CN113301570A (en) 2021-08-24
CN113301570B true CN113301570B (en) 2023-04-07

Family

ID=77329893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110727034.0A Active CN113301570B (en) 2021-06-29 2021-06-29 Anti-theft method and device for SIM card

Country Status (2)

Country Link
CN (1) CN113301570B (en)
WO (1) WO2023273289A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113301570B (en) * 2021-06-29 2023-04-07 展讯通信(上海)有限公司 Anti-theft method and device for SIM card

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107819950A (en) * 2017-11-02 2018-03-20 平安科技(深圳)有限公司 Anti-theft method for mobile terminal, device, equipment and computer-readable recording medium
CN110291802A (en) * 2019-05-14 2019-09-27 北京小米移动软件有限公司 Network registering method, device, system and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2769933C (en) * 2011-03-01 2018-11-27 Tracfone Wireless, Inc. System, method and apparatus for pairing sim or uicc cards with authorized wireless devices
CN103702331A (en) * 2013-12-13 2014-04-02 北京奇虎科技有限公司 Mobile terminal antitheft method and client
WO2016054606A1 (en) * 2014-10-03 2016-04-07 Device Cloud Networks Methods and systems for inventory control
CN106304033A (en) * 2016-08-31 2017-01-04 北京握奇数据系统有限公司 A kind of cellphone information defence method based on binding machine and card and system
CN107872786B (en) * 2016-09-23 2021-06-25 中国移动通信有限公司研究院 Control method and smart card
CN112929881A (en) * 2019-12-05 2021-06-08 华为技术有限公司 Machine card verification method applied to extremely simple network and related equipment
CN111182536A (en) * 2019-12-30 2020-05-19 中移(杭州)信息技术有限公司 SIM card state detection method, device, network equipment and storage medium
CN113301570B (en) * 2021-06-29 2023-04-07 展讯通信(上海)有限公司 Anti-theft method and device for SIM card

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107819950A (en) * 2017-11-02 2018-03-20 平安科技(深圳)有限公司 Anti-theft method for mobile terminal, device, equipment and computer-readable recording medium
CN110291802A (en) * 2019-05-14 2019-09-27 北京小米移动软件有限公司 Network registering method, device, system and storage medium

Also Published As

Publication number Publication date
CN113301570A (en) 2021-08-24
WO2023273289A1 (en) 2023-01-05

Similar Documents

Publication Publication Date Title
US10356602B2 (en) Method, device, and system for dynamically binding a smart card
CN106162517B (en) Virtual SIM card management method and system
US20060116169A1 (en) Apparatus and method for initialization of mobile communication terminal
CN100484315C (en) Double-mode derminal network selecting log-on method
US9924349B2 (en) Method, device, and system for dynamically binding a machine card
EP2515565B1 (en) Terminal and method for binding sim card
CN106028305A (en) Method and system for implementing virtual SIM (Subscriber Identity Module) card and intelligent terminal
CN101170823B (en) Authentication method between user recognition module and terminal
CN107371234B (en) Registration method, device and terminal
CN101552988A (en) Terminal protecting methdo and system
EP2141887A2 (en) Method and apparatus for determining validity of mobile subscriber identifier in mobile communication terminal
CN101330387A (en) Method for authentication of machine card, communication apparatus and authentication system
WO2005069660A1 (en) Updating of preferred roaming list (prl) in a sim (subscriber identity module) / ruim (removable user identity module) card.
CN113301570B (en) Anti-theft method and device for SIM card
EP2608606A1 (en) Establishing a connection between a mobile terminal and a network
CN103079203A (en) Terminal authentication method and smart card
JP5653714B2 (en) Mobile communication terminal
CN101321351B (en) Method for dynamically implementing one-card multi-number of mobile terminal
CN106793019B (en) Method and device for attaching APN (Access Point name) and mobile terminal
CN105682217B (en) Network registration method, network registration device and terminal
CN110267255B (en) Network registration method and device, electronic equipment and computer readable storage medium
EP1909514B1 (en) Mobile communication terminal and terminal control method
CN101925049A (en) Air interface business processing method and terminal
US10117091B2 (en) Method for administering life cycles of communication profiles
KR101339472B1 (en) Method for reading a phonebook data in subscriber identity module card, and terminal thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant