For a "cheat engine" thing you guys want the "viewmem" binary. This will allow you to dump any memory location... Havn't tested it, but it should install the proper binaries into /system/bin.
Download CASUAL BHT Installer
This Cross-platform Adb Scripting Universal Android Loader package works on Windows, Linux and Mac.
I will be packing up my stuff and moving around the corner this weekend. I just want you guys to know I will be watching this thread and posting any relevant information. The best way to notify me of anything is a mention of +Adam Outler on G+ (please no questions). Obviously I will not have my computer or workbench set up this weekend and it might be a little bit until I'm able to get back into the swing.
Also, newswriters, any further articles on this topic MUST include names other than myself. I'm the recognizable face on this project and I'll take the blame if blame is needed.. But Ralekdev's post of a disassembled bootloader seriously trumps anything I've done and so far I've yet to see an article mention him and that offends me.
Samsung is running a campaign to fight rumors that they locked the bootloaders. They are telling customers that they send the devices to Verizon and Verizon locks the bootloaders. This is simply not true. That would be a redundant and inefficient step which would not make sense for business. These boards are specially made PER CARRIER. There is a different board for Sprint, Verizon and AT&T. Until one of these so-called "pre-Verizon" bootloaders shows up in Odin3 format, don't take it seriously, don't believe it, and dont repeat it. Rumors like that are designed to make people sit around and wait.
You can get your phone into Odin mode by using "adb reboot download" or "adb reboot bootloader" however there is another option. Using a 301kohm jig puts the device into Factory mode. I'm not sure on the differences.
When searching ABOOT partition for information, please inspect the difference between FACTORY MODE and ODIN MODE.
I ignore PMs with questions that could be answered by searching. If you PM me, I probly won't respond.
Check out my developer pages. Add me to your circles on Google Plus.
The Following 31 Users Say Thank You to AdamOutler For This Useful Post: [ Click to Expand ]
All I can see that putting it into factory mode does is allow the odin command handler to reset the ddi info (flash counter, binary type, etc). Normally odin is still blocked from doing that.
EDIT:
More specifically, if factory mode is on it automatically clears the ddi info when the odin packet type 0x67 (kControlTypeEndSession in heimdall) is sent with the next int 0 (kRequestEndSession)
The Following 15 Users Say Thank You to Ralekdev For This Useful Post: [ Click to Expand ]
Did anyone check, if during USB flash process, or other processes maybe a checksum like MD5 is being transfered onto the phone, which is being check right after the flash. If those two checksums are identical --> normal boot, if not --> error message... Just a thought, if this is useless, delete the post.
Normally, the OS puts a stop to you trying to use RAM you don't own (dereferencing unallocated RAM leads to a segmentation fault), but without RAM protection, you can theoretically dereference whatever you want whether or not it's been allocated to you. At this point, you'd be able to dump everything in RAM and analyze it. This wouldn't be of much use because 1) the kernel is the one thing we can't change to begin with, and 2) I'm not sure if the linux kernel even has such an option.
If I'm not mistaken, the Linux kernel has something like this in the form of ptrace scope, which controls whether or not processes are able to examine the memory of other processes. I've encountered this recently because most Blizzard games have an active memory monitor designed to prevent the kind of side-channel cheating attacks you guys are talking about, and without first temporarily setting "sysctl kernel.yama.ptrace_scope=0" on my Linux box, those games crash WINE with a segfault. Also I believe ptrace was used to take control of the init thread to accomplish 2nd-init on phones like the Droid X as well, so I think there has been some past work on this.
If this is incorrect, trivial knowledge, or not helpful, please feel free to remove this. Thanks.
The Following 2 Users Say Thank You to stiltzkin For This Useful Post: [ Click to Expand ]
Root owns all the memory and can access it through /dev/mem. I have never had a problem dumping memory with viewmem. The real question is where do we look for bootloaders
I ignore PMs with questions that could be answered by searching. If you PM me, I probly won't respond.
Check out my developer pages. Add me to your circles on Google Plus.
The Following 8 Users Say Thank You to AdamOutler For This Useful Post: [ Click to Expand ]
Did anyone check, if during USB flash process, or other processes maybe a checksum like MD5 is being transfered onto the phone, which is being check right after the flash. If those two checksums are identical --> normal boot, if not --> error message... Just a thought, if this is useless, delete the post.
It's about 50/50 whether it is HMAC or whether they are using some sort of asymmetric signature algorithm.
HMAC is closely related to hashes like MD5 and SHA (MD5 is very weak though.)
If HMAC is used, the signature is something like:
Code:
sig = SHA512(message | secret);
Where | stands for "append"
Then, for distribution, the "signed image" is
Code:
message | sig
Note that you can't generate a matching sig for a given message without that secret value. The good news is that HMAC is symmetric so that secret must be stored somewhere on the destination device. The bad news is that usually this secret is burned into protected eFuse memory of the CPU and can't be retrieved without sophisticated IC reverse engineering techniques (decap the chip and probe the die).
If it's an asymmetric algorithm - then the secret used to generate a signature is not the same one that verifies it.
The goal is to make it so that after all the calculations the 256 byte block located at img_sig_data+0x100 has the contents 0x00, 0x01, 0xFF * 236, and then the sha1 of our boot.img
I'm in the middle of moving at the moment, so I don't have as much time as I would like to look at this right now, but that should clear up in a few days.
Also, if there's any interest I can post a guide on how to get the bootloader files loaded into IDA for analysis. Some knowledge of ARM assembly would be required though.
EDIT:
In other news, I found what keeps resetting the 16 byte encrypted romtype in param.img. It's libcordon.so, which is from /system/app/SysScope.apk (it'll also be copied to /system/lib/libcordon.so). It's using quite a few checks to see if you've modified your system.
There's an adb scanner, checking to see if you've changed the ro.secure or ro.debuggable props.
The root process scanner checks running processes and returns true if any are found running as root that are not one of:
"debuggerd", "init", "installd", "servicemanager", "vold", "zygote", "netd", "ueventd", "dock_kbd_attach", "pppd", "pppd_runner", "mpdecision", "thermald", "hdmid", "sec_keyboard", "seccmmond", "mfsc", "mfdp"
There's also a partition check, kernel checker, su scanner, and a file scanning mechanism using data from a sqlite db
So to completely remove the Samsung custom screen on bootup and 5 second delay you'd need to disable the SysScope.apk, then encrypt and write the 16 bytes yourself using 0xFF000000 as the first int to mark yourself as official
The Following 81 Users Say Thank You to Ralekdev For This Useful Post: [ Click to Expand ]
Great work! Thanks to Lee and everyone for all the hard work!
Still looking at the code to try to get a better understanding of the algorithm but here's some food for thought:
1) The recovery partition is signed, but the signature is not enforced. Perhaps there is a link 'n' (i.e. partition) in the chain of trust whose signature is also not enforced (not very likely, or secure).
In this case, we could modify 'n' such that it does not enforce signature of latter links in the chain of trust (e.g. overwrite the signature checking function with a series of noops or trivial assembly instructions leading to a properly placed return value of 1 or "true" ).
We could then perform similar modifications to the latter links including aboot. Note: it is very likely that this isn't testable in a practical way. It was stated previously (in the 1st post) that aboot contains the daemon for odin. If we broke the boot chain earlier than aboot, we wouldn't be able to Odin over a mistake.
2) From the C, my understanding is that the contents of the signature are loaded into RAM prior to running the signature checking. Is it possible for us (with JTAG equipment to modify the contents of the memory utilized for the memcmp call (pointed to by img_ofs_0x100)? This would be more of a proof of concept as carrying around JTAG equipment to reboot the phone is a little impractical.
Sent from my SCH-I535 using xda premium
---------------------------------------------------------------------------
Sent from my VZW GS3 posing as a galaxy nexus.
The Following User Says Thank You to mybook4 For This Useful Post: [ Click to Expand ]
So to completely remove the Samsung custom screen on bootup and 5 second delay you'd need to disable the SysScope.apk, then encrypt and write the 16 bytes yourself using 0xFF000000 as the first int to mark yourself as official
Confirmed. I renamed the SysScope.apk file and wrote the encrypted block to signify a Samsung rom. Through multiple reboots, the pad lock icon was gone as well as the 5 second delay.
Thanks,
Enderblue
The Following 14 Users Say Thank You to enderblue For This Useful Post: [ Click to Expand ]
Given the amount of coverage that Android receives around here, you could almost be … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?