-
Notifications
You must be signed in to change notification settings - Fork 964
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
Passing OEM_HOOK_RAW requests #27
Comments
I am not a developer equipped with gsm and telecommunications details but I know these guys gathering low level gsm info extending android standard sdk http://www.ascom.com/nt/en/index-nt/tems-products-3/tems-pocket-5.htm#overview. How they can do ? Tems pocket may be an inspiring product for this project. |
@kamilcakir, I could be wrong, but it seems that they use an external radio scanner.
The authors of the AIMSICD may also include support for external modems and scanners (USB or Bluetooth, 3g or 4g). |
Test report
The service mode package on this device is Some useful secret codes:
Sys dump allows to make a dump of logcat, modem log, ram, kernel logs, and even run The other interesting internal service is Radio logs and traces are usually large and may contain private data. That is why I do not want to post them. |
@illarionov, thanks for posting this information. Here is the Info of my HTC ONE:
I recommend to use the Secret Codes-App to crawl your phone. Note: His App is fully Open Source and and on GitHub. Maybe developer @SimonMarquis can be of help for finding how to issue and read OEM_HOOK_RAW requests? @illarionov, do these CSC codes also exist for HTC? Do we need those? Secret codes on my HTC ONE:
|
@SecUpwN @illarionov Did you completely stop looking at the XDA thread!? I uploaded those tools, but they "probably" don't work as expected on the HTC, (There are 2 versions in that package.) EDIT: oops, wrong guy! |
@SecUpwN, CSC is not required. I post it to easily identify the firmware. @E3V3A, I have downloaded tools that you uploaded to the device (I9100G).
Looks like those tools looking for the debug service on port 7203. To my amazement, the ipcdump/ipcdump from
logcat -b radio:
The |
@SecUpwN @illarionov AND everyone else. Also it's getting annoying to have to navigate between all these "issues" threads. Thanks for understanding. |
@E3V3A, I do not like long threads in Github issues too and would have answer on the XDA, but "New members (those with fewer than 10 posts) are not permitted to post to development-related forums" :( (It is the last my finding there) BTW, I have succesfully send IMSI request from the java code. The format of the IPC message can be found in the Replicant external_libsamsung-ipc: # ipctool -d 07 00 02 ff 0a 02 02
format:
length: 07 00
mseq: 02
aseq: ff
group: 0a (IPC_GROUP_MISC)
index: 02 (IPC_MISC_ME_IMSI)
type: 02 (IPC_TYPE_GET) But before the IPC message it is necessary to send two additional requests which format I do not understand:
UP: To my fault, this socket is opened only on CM-11 night build. On official stock firmware it is not available and ipctool does not work. :(
|
@illarionov Thanks.
Paste output to convenient place.
|
1 Have tried both. On CM11-nightly works only 2 I have
The first write (according to radio log dump) is set DebugPort_mode to 3. 5,6 Here is the output on the official firmware: filan, ps, service list, unix sockets, and getprop. |
@xLaMbChOpSx , @SecUpwN , @illarionov :
If that is possible, I hope it could be a way to circumvent the signing issues, for ServiceMode app... PS. You wanna use the latest strace with:
|
@E3V3A, I can confirm that I can use normal binary programs from within an App on my HTC One. But I guess you already know that unfortunately none of my phones has ipctool and the other trivial binaries. Building our own built-in binaries will be inevitable to lead AIMSICD to success. |
@SecUpwN : If you're willing to risk messing with your phone, you can try the other binary (in my toolkit), but then you need to backup and replace the other ril.so libraries, if present as such in the ROM you're using. And if that doesn't work, I think the reason is that your're using a ROM and not the official HTC libraries. I need to know how AOSP ROMs selects these libraries for each phone/model they support. Can you find that out? |
I think I have found a way to execute I have prepared a test application here. It executes service mode functions and displays the results. Would be great if someone runs it on the Samsung phone and report if it works. The APK should be installed as a normal application. |
@illarionov So it's not dependent on CM? @xLaMbChOpSx @SecUpwN Did you see this!? If we can get away with just installing a library, then that would be uhhmm, Awesome!? I will test on my oldie tomorrow, but doubt it will work on it. I'm in the process of re-flashing a few different phones (not mine) to update API. Thanks Illy! |
@illarionov Couldn't resist trying. On old school junk device GB 2.3.4 I get: |
Thanks for testing, @E3V3A! There are no special requirements, it should work right after installing.
|
Whoa, awesome discovery, @illarionov! @E3V3A, as already mentioned on XDA, I have no access to my E-Mails at this very moment. This really sucks. Remember: Never change your passwords when enjoying a glas of whine. 😿 @illarionov, when running your linked Samsung RIL Multiclient test on my HTC ONE (AOKP), the output when clicking "Load" is: Is this the successful output we wanted to generate? If so, how can I further contribute? |
@illarionov This might sound weird but your test app code is absolutely beautiful I love it and to think all the trouble we have been through with platform key signing and system app installation and here you are doing it all in a standard user app! Awesome work!! I can confirm the test app works correctly on my i9100 providing output and the ciphering indicator details. Would you have any issues with me integrating this into AIMSICD if the others are happy for this to occur? |
@illarionov, you've just been awarded the gold medal by @xLaMbChOpSx! :) |
@illarionov This time I'm not going to mess you guys up with my old junk. What I mean is that we should primarily aim to support for API 16 and above. My oldie SGS2 GT-I9100 with stock GB 2.3.4. is not staying like that for long. But it is still interesting to know why it doesn't work on my device, but on yours. So I decided to try cryptobin.org just for heck of it. Here's the output you requested after doing "ipctool -r" and "cat proc/net/unix": https://cryptobin.org/n431c5b7 (All FD devices/sockets are shown in second paste.)
@xLaMbChOpSx I'm very happy with this, if @illarionov agree and if it works across more devices. |
@SecUpwN, This method will only work on Samsung devices. |
@illarionov Yes, that's what I thought, and that's why I am surprised it works on @xLaMbChOpSx device, which he said was a GT-I9100T which should also be a XMM6260 (AFAIK) modem, a non-QC device. It would be helpful if he could dump some of his getprop's also. Can you both find out what modem you have? In addition if it is a library from Replicant guys, I thought they only supported XMM modems. But perhaps since all QC leaks they've done some more progress? EDIT |
@illarionov @xLaMbChOpSx I can confirm it also doesn't work on MSM8930AB based Samsung Galaxy S4 mini (GT-I9195) running JB 4.2.2. Giving same error: EDIT! (Removed text) |
This is what I have on the GT-I9100 GB234... So it should work. Perhaps a socket change/problem?
@illarionov Do you think it would work using: _/dev/socket/rild-debug_ or _/dev/socket/rild_ ? |
I know I have been pretty slack with the stuff from here, I have posted the output of most items that have been requested so if it helps at all it is available here: Some relevant info from getprops:
|
Yes, I see you (obviously) have the PS. I don't like cryptobin because you cannot resize the text-box window... |
|
@E3V3A Yes I installed the modem as that gives me the best signal and data connection with my provider. I will hopefully have the new method integrated into AIMSICD in a day or two just been really busy but tonight I have been able to address some of the items you provided in other issues and will also try and get this done as well. |
I just read and uploaded the awesome Analysis on Mobile Phone Security, written by @MatejKovacic. In his cover-up he is mentioning that Sylvain Munaut (@smunaut), a member of the Osmocom-BB project, is developing an open source GSM baseband implementation. Furthermore, this guy has also shown how to transform an old mobile phone with Calypso chipset into a base station. I'm sure he'd be a cool addition to our project and maybe he can give some useful hints on our current challenge here? |
Hi,
Regards, Matej |
Hey @MatejKovacic, thanks for clarifying. Just paste the URL here and I'll update my upload. 👍 |
Hi,
Now it is published: If you want a PDF version, I can create it (or you can copy it to LibreOffice and save as PDF). Regards, M. |
@MatejKovacic, would be great if you create a good-looking PDF and paste the link here. |
Hi,
It is here: http://matthai.owca.info/On_Mobile_Phone_Security.pdf Regards, M. |
ipctool and ipcdump no found
and
[ https://defuse.ca/b/ChLX8wSSi9Iw79JhqNNi1X ] |
From THIS page we have one explanation for the SIM related OEM_HOOK_RAW like requests.
|
This is Issue will serve as an open discussion to collect important information in one place. We absolutely NEED to find out how to pass an OEM_HOOK_RAW request from command line and read the results. According to @E3V3A, every phone out there has this functionality, we just have to find it! When found, we'll then use it for AT commands / IPCs and all the other crazy stuff. @xLaMbChOpSx and @illarionov: Discussion is open, please collect all information here!
Note: If you're a follower of our project, PLEASE test these steps (probably Samsung specific) to find out if _ipctool_ and _ipcdump_ works on your phone. Post LOGCATS from "logcats -b radio"! If you have another phone, find out how to issue OEM_HOOK-RAW requests and report back here.
Now that this Issue exists: What are the hard facts that we already have, @E3V3A?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: