Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detection 2: Abnormal TMSI changes #93

Open
E3V3A opened this issue Jul 20, 2014 · 11 comments
Open

Detection 2: Abnormal TMSI changes #93

E3V3A opened this issue Jul 20, 2014 · 11 comments

Comments

@E3V3A
Copy link
Contributor

E3V3A commented Jul 20, 2014

Under normal circumstances, the TMSI is saved to the SIM card and only changes occasionally (upon request) and when modem is booted up in a different network environment. Most likely due to to the BTS ..blah blah not finding your last TMSI in the VLR. However, this also occurs when a fake BTS is trying to force a location update. Thus if your TMSI suddenly changes you're more likely to be tracked by an IMSI-Catcher.

How to find the TMSI?

We can find TMSI by using either:

  1. The SIM Apllication Toolkit (SAT) AOS API for reading SIM card files
  2. The AT command for looking at AT files
  3. Looking and using the modem debug output/interface.
  4. The ServiceMode app (if using a Samsung and some others)

Here's some code:
http://www.devlper.com/2009/07/reading-imsi-tmsi-iccid-mnc-mcc-and-lac-using-simreadrecord-api/

Difficulty: Some other parameters need to be monitored as well, to avoid false positives.

Relevant Documents:

  1. 3GPP ETSI 100-929

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@SecUpwN SecUpwN changed the title Detection: Abnormal TMSI changes Detection 2: Abnormal TMSI changes Jul 20, 2014
@andr3jx
Copy link
Contributor

andr3jx commented Jul 20, 2014

Here is described how to obtain TMSI and Kc using AT commands:
http://ferrancasanovas.wordpress.com/2014/01/28/get-kc-key-and-tmsi-number/
http://domonkos.tomcsanyi.net/?p=369

@E3V3A
Copy link
Contributor Author

E3V3A commented Jul 30, 2014

@andr3jx Those doesn't work on my device, see latest post on XDA.

@Ueland
Copy link
Contributor

Ueland commented Dec 20, 2014

We could do the same here as discussed about the neighboring cells issue, simply do a try/catch for each known method until we get a working result back.

@E3V3A
Copy link
Contributor Author

E3V3A commented Dec 20, 2014

Yes, I was thinking about this the other day. Since this is a more general problem we face, I suggest we build a Device Type Selector "module", to determine what device we are dealing with and selecting the most suitable (or available) mechanism. I've already produced a simple flow chart or this, and will hopefully upload this soon.

@ga900
Copy link

ga900 commented Aug 1, 2015

Forget detecting catcher by TMSI change. In my country TMSI is changed on one network at the begining of any phone activity (call, sms or even location update), on second network on the end of call. For other networks I will have to look at my notes... Suspicious behaviour is if network that uses TMSI asks for acccess authorization with IMSI and IMEI on LAC change (and gives you a reject eg. forbidden LAC after).

@E3V3A
Copy link
Contributor Author

E3V3A commented Aug 1, 2015

Hi @ga900 and welcome! Thanks for useful comment. What country is that? Would be nice to list how various operators change TMSI and the time between. Perhaps we should test for NOT changing TMSI then?

@ga900
Copy link

ga900 commented Aug 1, 2015

Thanks for welcome. For some personal reasons I would prefer not to name the country, but TMSI change interval is depending on phone activity. Test for IMSI/IMEI (authorization) request on location update.

@E3V3A
Copy link
Contributor Author

E3V3A commented Aug 1, 2015

Test for IMSI/IMEI (authorization) request on location update.

Unfortunately we don't have access to this info from API and we still don't have raw /dev/diag qmi data access.

@ga900
Copy link

ga900 commented Aug 1, 2015

That is a problem...as catcher does not have a connection to HLR, only way to identify phone/simcard is asking for IMSI/IMEI.

@Mahmoudshakra
Copy link

Hi E3V3A ,
can you help me to get my TMSI i tried to get it by " obtain TMSI and Kc using AT commands:
http://ferrancasanovas.wordpress.com/2014/01/28/get-kc-key-and-tmsi-number/
http://domonkos.tomcsanyi.net/?p=369 " with no gain

@SecUpwN
Copy link
Member

SecUpwN commented Jan 19, 2016

Good evening @Mahmoudshakra, E3V3A has left our project. Please do not contact him. Since our app is still in ALPHA development mode, you may not be able to Issue the correct AT command through the AT Command Interface, but feel invited to try your luck. Maybe @ga900 can help you a bit here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants