|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7
Karma: 8816
Join Date: Oct 2012
Device: Kindle Paperwhite
|
![]()
Amazon needlessly limits the functionality of your unregistered Kindle Paperwhite, such as disabling the Collections and Wikipedia widget features.
To unlock all of your Kindle's functionality you either have to register (and grant them access to juicy analytics) or trick the Kindle into thinking it's registered. The following process is only for developers who are comfortable with SSH, SCP, and the possibility of bricking their devices. Someone better than myself can make this into a more streamlined process. I've only done this on my own Kindle Paperwhite Wi-Fi running 5.2.0 (1729740065). Overview: Like previous versions, the /var/local/java/prefs/reginfo file must be populated with your account credentials. This file can be created locally and sent to your Kindle via SSH/scp. Unlike previous versions Amazon will remotely unregister your Kindle whenever it phones home, which happens periodically and whenever you connect to Wi-Fi. To prevent this I've added iptables rules that run as soon as an interface is brought up. Note that I've created a blacklist of individual IPs...I currently believe that this list isn't comprehensive, and more work needs to be done by developers to add to it or create a more robust solution. Procedure: Update: Twobob and knc1 replied with some excellent comments on this procedure. Notably the individual IP addresses can be replaced with ranges of IPs, which will all but guarantee the device will never communicate with Amazon's update servers, and there's an existing iptables configuration file that can be used as the target for iptables-save. I've updated the relevant steps to include these better procedures. 0. Pray to your personal God that you don't create a foolish iptables rule that locks you out of USB networking. 1. Jailbreak 2. Enable USB networking and set your SSH password 3. Go into airplane mode 4. Plug in USB and connect. You'll have to set your IP address to something in the 192.168.15.x range (not 254) 5. Create a reginfo file on your local computer that fits the following template: Code:
#Tue Oct 09 08:30:44 GMT+12:56 2012
givenName=NAME
deviceName=NAME's Kindle
userName=RANDOM NAME
deviceEmailAddress=FAKE@EMAIL.com
Code:
scp reginfo root@192.168.15.254:/var/local/java/prefs/ In the SSH session, run: Code:
chmod 444 /var/local/java/prefs/reginfo chown root:root /var/local/java/prefs/reginfo chattr +i /var/local/java/prefs/reginfo 7. Reboot and verify that your Kindle thinks it's registered. Don't proceed if this step doesn't work. It's now necessary to prevent your Kindle from phoning home with Amazon's servers. Deprecated instructions: Spoiler:
8. Enable USB networking again and SSH into the device 9. Start adding iptables rules in the shell. If at this point you totally screw up, you can reboot and your changes won't be saved. iptables -I inserts a rule and iptables -D deletes one. Code:
iptables -I OUTPUT -m iprange --dst-range 23.0.0.0-23.15.255.255 -j DROP iptables -I OUTPUT -m iprange --dst-range 50.16.0.0-56.19.255.255 -j DROP iptables -I OUTPUT -m iprange --dst-range 72.21.192.0-72.21.223.255 -j DROP iptables -I OUTPUT -m iprange --dst-range 107.20.0.0-107.23.255.255 -j DROP iptables -I OUTPUT -m iprange --dst-range 184.72.0-184.75.255.255 -j DROP iptables -I OUTPUT -m iprange --dst-range 204.246.160.0-204.246.191.255 -j DROP iptables -I OUTPUT -m iprange --dst-range 205.251.192.0-205.251.255.255 -j DROP iptables -I OUTPUT -m iprange --dst-range 207.171.160.0-207.171.191.255 -j DROP Deprecated instructions: Spoiler:
These commands instruct your Kindle's firewall to silently drop all outbound requests to those destinations. Again, there may be other Amazon auth servers that will have to be discovered via trial and error. 10. Run iptables -L and verify that these entries exist. Run something like iptables -D OUTPUT -m iprange --dst-range 207.171.160.1-207.171.191.254 -j DROP Deprecated instructions: Spoiler:
if you want to remove a rule. 11. In the SSH session run iptables-save (first by itself to verify that it spits out a list of rules) then run: Code:
iptables-save > /etc/sysconfig/iptables Deprecated instructions: Spoiler:
16. Finally, turn airplane mode off and connect to a WiFi network. 17. Verify that your Kindle still appears to be registered. If step 7 worked but your Kindle has now de-registered, it's because it's chosen a new Amazon auth server. If you wish to help this hack you may now: a. Run Code:
netstat -n b. Block these IP addresses with iptables. If all is well (you didn't lock yourself out) update your saved firewall rules. c. Reboot. If it worked, please post the IP address(es) you added here! Your Kindle now believes it's registered, and it's prevented from discovering the truth thanks to the Kindle's firewall. Last edited by Panopticon; 10-08-2012 at 09:26 PM. |
![]() |
![]() |
![]() |
#2 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Yeah. I spotted this hack the other day.
Nicely documented. appreciate the effort gone into that. I would follow this up to step 8... and then maybe amend it. (notes later on this thread) you fixed it Re the overall vibe: Not sure I, personally, 100% support it, but I couldn't say exactly why. EDIT: Actually I can think why. Fairly certain this would only assist in the obfuscating of stolen devices. To that end I can't support it. also: That complete range will block most everything. including the shop. just so you all know. Well done for the hard work anyway. : ) Last edited by twobob; 10-09-2012 at 09:12 PM. Reason: more thoughts, vibe |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7
Karma: 8816
Join Date: Oct 2012
Device: Kindle Paperwhite
|
Damn, has someone already done this? I could've saved some time
![]() |
![]() |
![]() |
![]() |
#4 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
hmm yeah. I could go hunt it down. It wasn't as beautifully documented - nor did it have the iptables details IIRC. but in essence yes. (it might have even been via the wiki?)
But so what. nicely typed up. ![]() ASIDE: I generally use -A for my iptables stuff. Quote:
meh small point. ![]() Last edited by twobob; 10-08-2012 at 07:12 PM. Reason: horses for courses |
|
![]() |
![]() |
![]() |
#5 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
There is already a table for the saved rules: /etc/sysconfig/iptables. Put your saved rules in that table, no additional scripting required.
Search for one of my early threads about "Chatty Katie" - it includes the IP ranges you want to block. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7
Karma: 8816
Join Date: Oct 2012
Device: Kindle Paperwhite
|
Awesome, good tip, knc. I'll update my post as soon as I can look into that. I'm about to step out!
|
![]() |
![]() |
![]() |
#7 | ||
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
yeah - what he said.
https://www.mobileread.com/forums/sho...d.php?t=167675 is an example of handy data and for we noobs: Quote:
![]() EDIT: Note from Knc1 Quote:
The SSH rule really is a bit of a whore, IIRC Niluje has nailed has nailed it down on the device with IP -> IP rules in the config. But if you are allowing SSH access from everywhere. think about the implications of that. Usually "No implications that matter" but that doesn't mean it never applies. A public key is a good idea and that's what I use. Thanks Knc1 Last edited by twobob; 10-08-2012 at 07:12 PM. Reason: https://www.mobileread.com/forums/showthread.php?t=167675 |
||
![]() |
![]() |
![]() |
#8 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Someone else (cscat?) wrote the Kindle iptables version. Either of those threads has the IP address ranges to block. |
|
![]() |
![]() |
![]() |
#9 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
But the destination IP address ranges are the same to be blocked in the Kindle's file that saves iptable rules between boots. The path and name I posted above in **this thread** is for firmware 5.2.0 Faking out the registration file is still an addition to the old posted information. Last edited by knc1; 10-08-2012 at 06:04 PM. |
|
![]() |
![]() |
![]() |
#10 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
"not as beautifully documeted"
Yeah, I meant the registration hack thingy I saw ![]() This idea is a great conglomeration of TOS abusing and tin-hat ideas all-in-one though. In that way it intrigues me. However, TO BE CLEAR: I would register my device and be done with it. end of. : ) OP can do what they want. Last edited by twobob; 10-08-2012 at 06:04 PM. Reason: TO BE CLEAR: |
![]() |
![]() |
![]() |
#11 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
*Fixed*
Last edited by knc1; 10-08-2012 at 06:59 PM. |
![]() |
![]() |
![]() |
#12 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
err yeah. ACCEPT is your friend
![]() |
![]() |
![]() |
![]() |
#13 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Hmm...
Browsing that /etc/sysconfig/* set of files shows a few things that I will want to "personalize" if I should ever own a Kpw. Good ol' lab126 was nice enough to put comments on the things they changed to help "lock down" this firmware image. ?? You want to harden the firmware system from end-user alteration - then include comments on what was done in the file ?? Ah, come on now, that is <deleted - its a "family" site> |
![]() |
![]() |
![]() |
#14 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
well. I think that's very considerate of them
![]() |
![]() |
![]() |
![]() |
#15 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
I can almost channel down to the offices and hear that conversation's echos:
Manager, SysConfig: "I see that you have not met your quota this month." Jr Code Cutter: "But sir, I wrote 1,996 lines of scripting." Manager, SysConfig: "go write a few more lines of comments so we can bill this thing." Or a situation similar to that. |
![]() |
![]() |
![]() |
Tags |
collections, fake registration, hacks, paperwhite, registration |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Paperwhite: using collections without registration? | Panopticon | Amazon Kindle | 7 | 07-09-2019 10:20 AM |
Organizing books not in collections (Paperwhite) | needleinthehay | Amazon Kindle | 21 | 11-08-2017 08:07 AM |
Collections and paperwhite | Dragoro | Amazon Kindle | 3 | 09-19-2012 03:39 PM |