CellularPrivacy / Android-IMSI-Catcher-Detector

AIMSICD • Fight IMSI-Catcher, StingRay and silent SMS!
https://cellularprivacy.github.io/Android-IMSI-Catcher-Detector/
GNU General Public License v3.0
4.73k stars 946 forks source link

SIM card File System Access #96

Open E3V3A opened 10 years ago

E3V3A commented 10 years ago

We need to be able to access the SIM card filesystem in order to work some magic while collecting relevant and necessary network data, not available from AOS API.

There may be many ways to read the file system on a SIM card. We have previously looked at the possibility of using the modem AT command interface, but we need other alternatives in those cases when baseband does not present an available and proper AT command interface. There are 3 other alternatives for reading the SIM EF / DF (Elemenary Files / Dedicated Files):

  1. Using the SIM Application Toolkit (STK aka CAT/SAT): https://android.googlesource.com/platform/packages/apps/Stk.git/+/master
  2. Similarly we should be able to open a RIL socket and use the RIL_REQUEST_SIM_IO to read/write to SIM EF.
  3. Using NFC ports: UrienNFC.PDF

The preferred way would probably be to incorporate (1) into our app, since it is already written in Java, but would need to circumvent the signatures in the same way as the ServiceMode "multiRIL-client" does its access. But (1) is risking to use non-available or OEM dependent STK.apks. Thus (2) might actually be a better choice, from simplicity point of view....

If you have any better or further insight, please let us know ASAP!

https://code.google.com/p/seek-for-android/wiki/SCAPI_modules_png scapi_modules 1


References: http://www.kandroid.org/online-pdk/guide/stk.html http://osxr.org/android/source/packages/apps/Stk/src/com/android/stk/StkAppService.java?!v=android-4.4.4_r1 http://simhacks.github.io/android-emulator/#introduction https://github.com/shadytel/sim-tools https://code.google.com/p/seek-for-android/wiki/EmulatorExtension https://code.google.com/p/seek-for-android/wiki/SecureFileManager https://groups.google.com/forum/#!forum/seek-for-android

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

rena2019 commented 9 years ago

@E3V3A can you please share the GlobalPlatformOrg.7z again?

SecUpwN commented 9 years ago

can you please share the GlobalPlatformOrg.7z again?

May I ask you if you're just interested in that .zip, or actually helping with this Issue, @rena2019? I've seen your Twitter account and noticed you're from a town near me. Herzlich Willkommen im Projekt! ;-)

E3V3A commented 9 years ago

can you please share the GlobalPlatformOrg.7z again?

@rena2019, we've already got SIM access, so we just need someone to do the code. So those doc's are not gonna help you and you can download them yourself at their website. (They've been updated.)

rena2019 commented 9 years ago

@SecUpwN I'm interested in all the mobile stuff. yesterday I read about Open Moblie API and found this site. @E3V3A Are all documents inside your zip also available free for download from GP site?

AhmedYasssen commented 7 years ago

WoW, I haven't understand anything up there, how can get a course to read this???

AhmedYasssen commented 7 years ago

What was that??

fzadib commented 6 years ago

hi i want to work with file systems of sim cards ,how i can access to som files like ef imsi that i need the adm access wich key is ralated to this ??please help me thanks

fzadib commented 6 years ago

do you have any resource to i read about keys in sim and usim

jayrmartinignaciojr commented 5 years ago

I try

beppe9000 commented 4 years ago

Is it possible to mount the sim card filesystem so that android can write to it as if it was an external card? I think this could be achieved with collaboration of a sim manufacturer.

Ankit1569 commented 4 years ago

Hello there, I didn't find any app ( Android IMSI-Catcher Detector)in f-droid or github or aptoid can you provide me?? Thanks

hayabaq commented 2 years ago

we were trying to extract the Kc from the SIM card on an Android A72 - A7 using minicom on ubuntu 20.04 connected with the charger cable.

andr3jx commented 2 years ago

@hayabaq Have you tried AT+CRSM=176,20256,0,0,9 ? I also found a table with an overview of AT commands here

hayabaq commented 2 years ago

@andr3jx yes we got the same error
here is the file structure that we were referring to. we tested multiple files with USIM file structure and all of them are working fine except for the GSM-ACCESS and its subs we still wondering what would be the cause of the failure

andr3jx commented 2 years ago

@hayabaq Maybe you can try an other command instead of READ BINARY. Read Binary requires "transparent" structure of file, not sure if this can be a problem here. Try READ RECORD / GET STATUS / GET RESPONSE to understand what is going on. Also check this reply.

Another possibility might be that the file has beed deactivated for whatever reason. In this case only the SELECT command will work and you should be able to use ACTIVATE / REHABILITATE command to activate the file.

You can also try to run the GSM algorithm which provides Kc as response.