https://freemyipod.org/api.php?action=feedcontributions&user=95.208.87.219&feedformat=atomfreemyipod.org - User contributions [en]2024-03-29T07:15:29ZUser contributionsMediaWiki 1.31.0https://freemyipod.org/index.php?title=Address_bruteforcing&diff=2649Address bruteforcing2010-07-05T11:36:46Z<p>95.208.87.219: </p>
<hr />
<div><nowiki>��EE��A�� � ��� �����3��# ��� �����#����������������3��# �����EEEEEEEEE</nowiki>'''NOTICE: Do not do this if you have a 2G or 4G Nano or the 1G Classic (80GB and 160GB models): we already have execution on them.''' We might not even need this done on the 2G Classic (120GB) either, but feel free to try. The main iPod we still need execution on is the 3G Nano, but someone has already built an automated bruteforcer for this one.<br />
<br />
Done for 3G as well through an old iphone exploit on a bootrom vulnerbility<br />
<br />
The best way people can help us out right now is by helping find the correct address we need to jump to in order to execute code. This has already been done on the 2G Nano and the 1G Classic. But now we really need help with the other iPods. Regardless of technical experience, anyone can help us out and get Rockbox and iPodLinux ported to the Nano's quicker. If you find the correct return address, you can rightfully brag about being the first person to run non-Apple code on that iPod :-). I'd also like to point out that your iPod cannot be bricked by this process and the Linux4nano team will gladly help you out on IRC if you encounter any problems.<br />
<br />
== Setup ==<br />
OK, so here's how to help out: first of all download a copy of [http://l4n.clustur.com/data/sweep/sweepfreeze.7z sweepfreeze.7z]. You will also need [http://l4n.clustur.com/data/sweep/sweepcrash.7z sweepcrash.7z]. Don't be fooled by the small sizes, because uncompressed these archives are ~250MB. Each one contains every return address that can possibly be jumped to. The best way to get the files is to just extract the files you need one by one, rather than the whole thing. Also update your iPod to the latest firmware (except for the 4G Nano - update or [[Firmware_Downgrading|downgrade]] to 1.0.3) because we want everyone to have the same version. Once you have these things set up, you are ready to go.<br />
<br />
This process involves trying out various sweep files in the .7z archives. The files in sweepfreeze.7z will freeze if code has executed and the files in sweepcrash.7z will crash if code is executed. The files are .htm format. They are prefixed with either an 'a' or a 'b' and then the address they jump to. You should try only the A files for right now. As you can see, there are many sweep files, and only some of them will do anything interesting. If nobody has started on your iPod yet, start trying files starting at a080a2004.htm, otherwise continue where the others have left off.<br />
<br />
Be sure to reserve a range for yourself to test in the table below. (we don't wont anyone doing the same files at the same time) Reserve small amounts at a time.<br />
<br />
== Known problems ==<br />
Note: if you are using your iPod with a Mac, your note files will not do anything. You will need to reformat the iPod to FAT32, and restore using iTunes on a Windows machine.<br />
<br />
As stated above, this will not work with the 4G Nano with the 1.0.4 firmware or the 5G Nano. If you have 1.0.4, see [[Firmware_Downgrading|firmware downgrading]].<br />
<br />
== Steps ==<br />
# Connect your iPod to the computer if it isn't already and browse to it's Notes directory. Clear out any previous notes files and put a new one from the sweepfreeze.7z archive in there. Unmount your iPod and disconnect it.<br />
# Reboot your iPod by holding the menu and center buttons for a few seconds. The apple logo will show while it is booting, and when the iPod is done booting you will see 1 of 4 scenarios:<br />
## The iPod reboots automatically the instant the main menu is shown. This will lead to an endless reboot cycle until the note is taken off<br />
## The iPod works completely normally. You can navigate menus, play music, etc. without any problems.<br />
## The iPod seems to work normally ie. you can still navigate menus, but when you try to play a song it freezes or crashes<br />
## The iPod freezes up entirely.<br />
# The next step is to get into disk mode in order to remove the notes file. First, you need to reboot by holding menu+center. If your note causes a type #1 behavior, the iPod is always rebooting and you do not need to reboot manually. When the apple logo shows up, hold the play and center buttons until the disk mode screen comes up. Repeat these steps for the next file, but read the paragraph below first!<br />
<br />
Most sweep files will usually either crash(#1) or freeze(#4). If you have one/s that is not either of these, record it in the table. If you have one that crashes, you will need to test the same address again with the sweepcrash.7z archive. If the iPod crashes or does anything different this time, it is a good sign that we have execution. Definitely record any of these incidents in the table!<br />
<br />
== Table of reserved or tested files ==<br />
{| border="1"<br />
|-<br />
! Username<br />
! iPod generation<br />
! Firmware version<br />
! Windows/Mac<br />
! Starting filename<br />
! Ending filename<br />
! Status<br />
|-<br />
| Farthen<br />
| 4G Nano<br />
| 1.0.3<br />
| Windows<br />
| a080a2004.htm<br />
| a080a4e04.htm<br />
| Tested<br />
|-<br />
| watto<br />
| 4G Nano<br />
| 1.0.3<br />
| Windows<br />
| a080a4f04.htm<br />
| a080b3f04.htm<br />
| Tested<br />
|-<br />
| watto<br />
| 4G Nano<br />
| 1.0.3<br />
| Windows<br />
| a080b4004.htm<br />
| a080b7f04.htm<br />
| Reserved<br />
|-<br />
| kylemsguy<br />
| 4G Nano<br />
| 1.0.3<br />
| Windows<br />
| a080c0104.htm<br />
| a080c1004.htm<br />
| Tested<br />
|-<br />
| clueX<br />
| 4G Nano<br />
| 1.0.3<br />
| Windows<br />
| a080d0a04.htm<br />
| a080d0f04.htm<br />
| Tested (All #1)<br />
|-<br />
| clueX<br />
| 4G Nano<br />
| 1.0.3<br />
| Windows<br />
| a080d0104.htm<br />
| a080d1004.htm<br />
| Tested (All #1, except a080d0304 #4)<br />
|-<br />
| kylemsguy<br />
| 4G Nano<br />
| 1.0.3<br />
| Windows<br />
| a080d1104.htm<br />
| a080d2f04.htm<br />
| Reserved<br />
|-<br />
| tucenaber<br />
| 3G Nano<br />
| 1.1.3<br />
| Windows<br />
| a08010b04.htm<br />
| a08027f04.htm<br />
| Tested<br />
|-<br />
| tucenaber<br />
| 3G Nano<br />
| 1.1.3<br />
| Windows<br />
| a08050104.htm<br />
| a08057f04.htm<br />
| Tested<br />
|-<br />
| Eosphere46<br />
| 3G Nano<br />
| 1.1.3<br />
| Windows<br />
| a080a0a04<br />
| a080a1904<br />
| Tested Results Below<br />
|-<br />
| Eosphere46<br />
| 3G Nano<br />
| 1.1.3<br />
| Windows<br />
| a080a2004.htm<br />
| a080a5904.htm<br />
| Tested!<br />
|-<br />
| tucenaber<br />
| 3G Nano<br />
| 1.1.3<br />
| Windows<br />
| a080a6104.htm<br />
| a080c7f04.htm<br />
| Tested<br />
|-<br />
| tucenaber<br />
| 3G Nano<br />
| 1.1.3<br />
| Windows<br />
| a080d0104.htm<br />
| a080d7f04.htm<br />
| Tested<br />
|-<br />
| BlackLotus<br />
| 3G Nano<br />
| 1.1.3<br />
| Windows<br />
| a080e0104.htm<br />
| a080e7f04.htm<br />
| Reserved<br />
|-<br />
| tucenaber<br />
| 3G Nano<br />
| 1.1.3<br />
| Windows<br />
| a080f0104.htm<br />
| a080f7f04.htm<br />
| Tested<br />
|-<br />
| JoeWheeler <br />
| 3G Nano<br />
| 1.1.3<br />
| Windows<br />
| a08100104.htm<br />
| a08100904.htm<br />
| Reserved<br />
|}<br />
<br />
== Table of non-#1 (or non-#4) behaviors ==<br />
If you leave an entry in here and don't normally hang out on IRC, send your email address to me at (cwalker32 AT gmail DOT com). This will give us a way to contact you if necessary.<br />
{| border="1"<br />
|-<br />
! Username<br />
! iPod generation<br />
! Firmware version<br />
! Windows/Mac<br />
! Sweep filename<br />
! Behavior type<br />
! Notes<br />
|-<br />
| Sto<br />
| 2G Nano<br />
| 1.1.3<br />
| Windows<br />
| a08640568.htm<br />
| #4<br />
| Direct jump to buffer<br />
|-<br />
| 3mpty<br />
| 1G Classic<br />
| 1.0.3<br />
| Windows<br />
| a080a2004.htm<br />
| #4<br />
| Indirect - an ldmia instruction in firmware portion of ram jumps to the correct buffer location<br />
|-<br />
| PharaohsVizier<br />
| 2G Classic<br />
| 2.0.1<br />
| Windows<br />
| a09352f04.htm a09352a04.htm a09352b04.htm<br />
| #2<br />
| Unknown, definitely check this out<br />
|-<br />
| farthen, cmwslw, kylemsguy<br />
| 4G Nano<br />
| 1.0.4<br />
| Windows/Mac<br />
| All<br />
| #2<br />
| Not exploitable, as the bug is fixed in 1.0.4<br />
|-<br />
| farthen<br />
| 4G Nano<br />
| 1.0.3<br />
| Mac<br />
| All<br />
| #2<br />
| Not exploitable because it's a macpod<br />
|-<br />
| Superandy<br />
| 3G Nano<br />
| 1.1.3<br />
| Windows<br />
| a08010c04<br />
| Freezes when I play a song - Please try a08010c04 from http://tinyurl.com/sweepdelay and post behavior :)<br />
Ok, done that. It does the same thing, freezes. The 1st boot it froze stright away as soon as it loaded the album artwork for the menu. The second time it took about 10 seconds to freeze.<br />
| Pretty cool<br />
|-<br />
| Jwnordquist<br />
| 2G Nano<br />
| latest<br />
| Windows<br />
| a08010404.htm a08010504.htm a08010d04.htm a08010e04.htm a08010f04.htm a08011204.htm a08011304.htm a08011404.htm a08011904.htm<br />
| #4<br />
| <br />
|-<br />
| Farthen<br />
| 4G Nano<br />
| 1.0.3<br />
| Windows<br />
| a080a2104.htm, a080a3b04.htm, a080a3e04.htm, a080a4604.htm, a080a4d04.htm<br />
| #4<br />
| I don't know why I record this, *maybe* it can help. Should be of no interest but who knows... Crasher files have same result as freezer.<br />
|-<br />
| Farthen<br />
| 4G Nano<br />
| 1.0.3<br />
| Windows<br />
| a080a2f04.htm, a080a3a04.htm, <br />
| #2<br />
| I don't know why I record this, *maybe* it can help. Should be of no interest but who knows... Crasher files have same result as freezer.<br />
|-<br />
| watto<br />
| 4G Nano<br />
| 1.0.3<br />
| Windows<br />
| a080a4f04.htm, a080a6c04 to a080a7504 inc.<br />
| #4<br />
| Same result with crash and freeze files.<br />
|-<br />
| watto<br />
| 4G Nano<br />
| 1.0.3<br />
| Windows<br />
| a080a5c04.htm<br />
| #2<br />
| Same result with crash and freeze files.<br />
|-<br />
| kylemsguy<br />
| 4G Nano<br />
| 1.0.3<br />
| Windows<br />
| a080c0304.htm<br />
| #4<br />
| The results for the sweep files were the same<br />
|-<br />
| Eosphere46<br />
| 3G Nano<br />
| 1.1.3<br />
| Windows<br />
| a080a3504.htm a080a0104.htm a080a0204.htm a080a0304.htm a080a0404.htm a080a0504.htm a080a0604.htm a080a0704.htm a080a0804.htm a080a0904.htm<br />
| #4<br />
| Same result with crash and freeze files, they both froze.<br />
|-<br />
| tucenaber<br />
| 3G Nano<br />
| 1.1.3<br />
| Windows<br />
| a08012f04.htm a08013a04.htm a08015c04.htm a08022f04.htm a08023a04.htm a08025c04.htm<br />
| #2<br />
| Same result for both freeze & crash files<br />
|-<br />
| tucenaber<br />
| 3G Nano<br />
| 1.1.3<br />
| Windows<br />
| a08012b04.htm a08026104.htm<br />
| #4 for sweepfreeze #1 for sweepcrash!<br />
| Seems interesting to me but these are low addresses (below a080a2004)<br />
|-<br />
|Eosphere46<br />
|3G Nano<br />
|1.1.3<br />
|Windows<br />
|a080a2f04.htm a080a3a04.htm a080a5c04.htm<br />
|#2 for sweepfreeze #2 for sweepcrash<br />
|Probably nothing much, but check it out.<br />
|-<br />
|Eosphere46<br />
|3G Nano<br />
|1.1.3<br />
|Windows<br />
|a080a4b04.htm<br />
|VERY Strange..hard to describe <sup>1</sup> <br />
|Check this out.. Same for the sweepcrash..<br />
|-<br />
|Eosphere46<br />
|3G Nano<br />
|1.1.3<br />
|Windows<br />
|a080a1004.htm<br />
|#3<br />
|Freezes when I play a song. Sweepcrash is #3 too. Sweepdelay is #3...<br />
|-<br />
|KAB123<br />
|2G Classic<br />
|2.0.1<br />
|Windows<br />
|09196804.htm 08334d04.htm<br />
|#4 for sweepfreeze, #4 for sweepcrash.<br />
|<br />
|}<br />
<br />
<sup>1</sup> - I have added video demonstration, d00p3k: [http://www.youtube.com/watch?v=qPNLKXXpmMM]</div>95.208.87.219https://freemyipod.org/index.php?title=Nano2G_HW_analysis&diff=2648Nano2G HW analysis2010-07-05T11:36:36Z<p>95.208.87.219: </p>
<hr />
<div><nowiki>��EE��A�� � ��� �����3��# ��� �����#����������������3��# �����EEEEEEEEE</nowiki>[[File:Top_annote.jpg|200px|thumb|Top layer, including JTAG]]<br />
[[File:Bot_annote.jpg|200px|thumb|Bottom layer]]<br />
[[File:2G_frt_annotation.png|300px]]<br />
[[File:2G_bck_annotation.png|300px]]<br />
== previous work ==<br />
<br />
See [[Hardware#2G_Nano_2]].<br />
<br />
== SOC analysis ==<br />
<br />
[[S5L8701_analysis]]<br />
<br />
== Circuit analysis ==<br />
<br />
After desoldering all components, the circuit was analyzed with a continuity tester.<br />
<br />
Small test needles (nailbed needles are great) were used for contacting.<br />
<br />
For easing the search, a more coarse search was first performed by a novel method : soldering a coil wire to one end, and moving a iron wool pad over the rest of the PCB until the tester beeps. After finding a spot, the needle allows to find the exact pad.<br />
<br />
Not all connection were routed, mainly the connections to the S5L8701 SOC.<br />
<br />
Results are a [http://f4eru.free.fr/8701/ detailed pinout of the 8701]<br />
<br />
See also [[S5L8701_analysis]].<br />
<br />
== JTAG ==<br />
<br />
The jtag was found after searching with a jtag bruteforce scanner i wrote.(to be published later)<br />
There were a lot of problems, including the scanner not working properly, and a nTRST pin. (still cannot understand why).<br />
<br />
But now we have the locations of the pins : see picture [[Image:Top_annote.jpg|40px|thumb|pin locations]].<br />
<br />
The pins are basically available on the DOCK connector after putting in place some jumpers (2 for nTRST, 1 for other pins).<br />
<br />
After connecting a xilinx parallel cable, and installing openwince, we can try to connect to the JTAG :<br />
<br />
'''The screen freezes directly when we use the JTAG.''' This seems to be a protection against hackers, but it could also be an issue with openocd.<br />
In fact, the ARM 940T processor is still fully functionnal, but it gets disconnected from the main bus, all memories are not reachable any more. The only memory preserved are the Data and instruction caches.<br />
<br />
== JTAG cache dumps ==<br />
<br />
As the caches are mainly alive, we focused first on dumping whatever the cache contained. As the caches are mostly not activated through the boot cycle, we made a lot of cache dumps (Dcache only can be dumped, the Icache can only give the indexes).<br />
<br />
We used some [http://f4eru.free.fr/8701/openocd_config.zip openocd and bash scripts]. The command "dc" dumps the Dcache, "ic" shows the icache indexes. Be careful, these values can be corrupt due to the mem bus disconnection. We used statistics on many dumps to have helpful dumps (look at [http://f4eru.free.fr/8701/openocd_config.zip dumpsoorter.py]).<br />
<br />
<br />
<br />
Please note that the DLC5 cable was modified to include a nSRST pin, and openocd was recompiled for this. It is a desirable feature to have a reset. nTrst was simply tied to the 3.0V power supply, it is just not necessary.<br />
Also, one important thing is to cut the power supply during reset, with a MOSFET, for example. If this is not done, the ipod can often go to a "broken battery" state, where the processor thinks the successive resets are due to a defective battery.<br />
<br />
[http://f4eru.free.fr/8701/dump_example.txt Dump example]<br />
<br />
== getting code execution ? ==<br />
<br />
[[Nano2G getting exec]]</div>95.208.87.219