|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#16 |
Enthusiast
![]() ![]() Posts: 35
Karma: 102
Join Date: Jul 2016
Device: KOA4
|
Well, that still makes your skillset much larger than mine! Nonetheless, I have a few acquaintances who might have some specific experience in this field, so I'll keep asking around. Hopefully it results in a nice little jailbreak for all Kindles under 5.13.4
|
![]() |
![]() |
![]() |
#17 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Nov 2019
Device: Kindle Oasis 2
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Enthusiast
![]() ![]() Posts: 35
Karma: 102
Join Date: Jul 2016
Device: KOA4
|
I've also reached out to the guy who discovered the exploit. He won't be able to help, for a number of reasons, one of them being Amazon - they wouldn't be too happy if he started releasing jailbreaks left and right. So now I'm studying the JPEG-XR reference code, and will try to make a Python base implementation that can generate an image for us that will appropriately inject the certificate for further jailbreaking purposes.
|
![]() |
![]() |
![]() |
#19 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Nov 2019
Device: Kindle Oasis 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#20 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Nov 2019
Device: Kindle Oasis 2
|
Quote:
My current idea is looking at jxrlib's source code and patching the JPEG XR encode-part, so that it creates a JPEG XR-file with the necessary adjustments to exploit the Kindle. |
|
![]() |
![]() |
Advert | |
|
![]() |
#21 | |
Enthusiast
![]() ![]() Posts: 35
Karma: 102
Join Date: Jul 2016
Device: KOA4
|
Quote:
|
|
![]() |
![]() |
![]() |
#22 | |
Warm Lighting Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 91
Karma: 754136
Join Date: Dec 2020
Device: Kindle Oasis 3 (jailbroken)
|
Quote:
I think completely "reverse-engineering" the image file would take a considerably longer time than modifying the preexisting encode algorithm, which already has this done. I don't have any experience with exploits, but I know a fair amount about c/c++ and have a basic grasp over how memory management works. I tried doing it your way first and I managed to get an absolute-write primitive pretty quickly. Unfortunately if I understand it correctly, this exploit requires at least 2 (1 for GOT spraying and 1 for the actual shell code). Doing it once is easy because you only need understand how the header works, but in order to pull off this exploit and get your 2nd absolute-write primitive, you'd need to split the image into at least 2 tiles. (tiles_num controls the amount of times the buffer overflow happens.). In order to get to the 2nd tile's header which gives you the 2nd write primitive, you'd need the header and body of the first tile encoded correctly. This is a considerably larger task than only getting the header encoded (with 1 tile). After I realized this I was thinking about starting again from scratch with the method simonpacis suggested, but since I don't have a jailbroken kindle to debug the image, I decided to wait until somebody who has one (and is probably more experienced in stuff like this) can do it. |
|
![]() |
![]() |
![]() |
#23 | |||
Enthusiast
![]() ![]() Posts: 35
Karma: 102
Join Date: Jul 2016
Device: KOA4
|
Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#24 | |
Warm Lighting Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 91
Karma: 754136
Join Date: Dec 2020
Device: Kindle Oasis 3 (jailbroken)
|
Quote:
I've been thinking and theorethically this exploit is doable with just 1 tile (that means 1 absolute-write primitive). Unfortunately that would only give us 15*16 (240) bytes for the shellcode... I wonder if that's enough. If I did it with more than 1 tile, that would give us 240+(n-1)*256 bytes of space where n is the number of tiles. I don't have any experience with shellcode or kindle jailbreaking so it's hard to make a guess on how much space we need. I'd prefer if 240 bytes was enough because I'm not sure how hard it would be to make it work with multiple tiles. Does anybody have an idea? |
|
![]() |
![]() |
![]() |
#25 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Assuming that's post privilege escalation, the shellcode basically only needs to call `sh /mnt/us/jb.sh` (or something similar, c.f., @BranchDelay's JB).
|
![]() |
![]() |
![]() |
#26 | |
Member
![]() ![]() ![]() Posts: 19
Karma: 268
Join Date: Feb 2021
Device: Kindle 10th gen
|
Quote:
|
|
![]() |
![]() |
![]() |
#27 | |
Enthusiast
![]() ![]() Posts: 35
Karma: 102
Join Date: Jul 2016
Device: KOA4
|
Quote:
Also, quite funny that the exploitable payload is exactly the size of a tweet! That's actually a great idea. Originally I was thinking a more direct approach (injecting the developer certificate into the system partition, which in return would allow flashing the jailbreak), but this is actually more applicable via the existing jailbreak guides. |
|
![]() |
![]() |
![]() |
#28 |
Goodest E-Reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 64
Karma: 300094
Join Date: Jul 2007
Device: PRS 500 / Kindle 5th / Kindle PW4
|
I'll be monitoring this thread, I'd love for it to work out. I am a mere JS dev, but I started reading "Hacking: the art of exploitation". Maybe at some point I'll be able to help out.
|
![]() |
![]() |
![]() |
#29 |
Warm Lighting Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 91
Karma: 754136
Join Date: Dec 2020
Device: Kindle Oasis 3 (jailbroken)
|
First of all:
I'm pretty new here so I'm not sure how openly this stuff should be discussed. If I'm going too far, I'd like to ask one of the mods to delete this message! I managed to pull off the external code exection part of the exploit, and with that, (hopefully) the hard part of it is over. I won't be able to progress any further without a cracked kindle though, so I hope fonix232 can help me out with that. (PM'd you!) As for sharing the jailbreak - if I manage to make it work, no promises - I've thought about multiple ways that would make it hard for anybody to get access to the modified image. Unfortunately, this would require me hosting it on a website, meaning that people would have to risk getting an automatic update by turning on their wifi. Alternatively I could publish the image file so people could host their own web server locally to access it, but that'd make it really easy for bad actors to use it for scary things. I'm open to ideas. If anyone can think of a better way to share it, please let me know! Last edited by tryol; 02-21-2021 at 10:03 AM. |
![]() |
![]() |
![]() |
#30 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
|
@tryol
Great ![]() I have a jailbroken KT4 that I am willing to help develop a jailbreak on. The kindle has gdbserver so i can debug stackdumpd to figure what need to be passed to it. For distribution it might be a good idea to package it as a self contained webpage that the user can access from the browser via `file:///mnt/us/webpage.html` this is not any worse than some of the other jailbreaks that are also RCE. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Email address for Kindle | ayjay3 | Amazon Kindle | 2 | 07-05-2020 04:33 AM |
Adding a shortcut to [Send via email to my Kindle email address]? | jteodoro | Calibre | 7 | 04-30-2020 10:55 AM |
Have US address but no US issued credit card: Buy from Kindle Store? | khazaddum | Amazon Kindle | 6 | 12-23-2013 10:19 PM |
Sending to kindle email address | cagey1953 | Devices | 1 | 11-28-2012 03:11 AM |