March 23, 2007

Anatomy of a Hack

So, I have that "New every 2" plan for my cell...which basically gives you a $100 credit for a new phone every 22 months. Well, Thursday was new phone day. I used the credit and another special rebate they had going to hook myself up with a shiny new phone.

Now, some of you will understand and some just won't, but for people like me the funnest thing about a new electronic device is to see how far you can push it. I'm the guy that explores all the features of a device just because they're there. And then I try to make some new features. So, this post is mostly for the Reidolphs and AArolphs out there who dig adventures in nerd land.

I got my phone on Thursday afternoon and by Friday at 6:00PM I successfully "hacked" it. It was fun and interesting so I will describe it here. Please note that trying any of the things I mention in this post may very well "brick" your nice phone or any other electronic device you are trying to hack or mod. I was well aware that I might ruin the thing but have you noticed that every time someone does something cool there is a "Don't try this at home" disclaimer? How do you think those people learned how to do it? That's right, trying it at home.

Chapter 1 - Proxy Servers:
Cell phone service providers (hereafter referred to as CellCo) charge too much for internet access on your phone. I already pay for internet service at my house. I also pay for every minute I'm on the cell. Why should I pay for Net again and pay for airtime? Phones access the internet by dialing (like a phone call) a server that translates the web into a format the phone can understand. These servers operate something called a Wireless Application Proxy server. When you access the internet, via the proxy, your cell provider makes a note of your phone number and begins to charge you for every little thing you do. But these WAP servers are nothing special, they are very similar to HTTP proxy servers and there are a variety of free HTTP proxy servers out there for Windows and Linux. I figured if it exists for computer browsers it probably exists for phone browsers. Turns out that I was correct, there are free solutions that let you provide an internet access point for your phone.

Chapter 2 - the Phone OS:
Most interactive electronics have an Operating System in some form. That OS often has a file structure, configuration files for programs and other things, just like a computer (usually because it has to interface with a computer at some point). If you can access these configuration files you can often alter the intended function of said device. I needed to change some of these files to redirect my phone to my own proxy because it's set by default to go through CellCo's servers. Unsurprisingly, these configuration files were locked. You can get to the settings on the phone via a hidden service menu but it won't allow you to change them. Surprise, surprise.

Chapter 3 - Access Roadblocks:
I got a data cable with my phone that allows me to transfer music to my phone. However, the CellCo intentionally crippled the functionality so I couldn't transfer ringtones, pictures, my contacts, etc. Why? Because they charge $0.50+ per ringtone (that you can download anywhere on the internet in many cases for free), they charge you $10 to transfer your contacts from your old phone, and they charge you for the airtime and Net time it takes to download the info. Is that evil or what? Plenty of files are legally and legitimately free on the internet, I paid for a data cable (extra) and my phone has the capability to transfer the data and even accept data from programs like Outlook, etc. But they turn it off because they want me to pay them for that too. Forget that. I found a tool that would allow me direct access to my phone's root file structure and I was in...

Chapter 4 - A Parting Blow:
The phone knows I'm inside. I can see all the data contained neatly within it's little circuits. I navigate the directory structure until I understand where and how ringtones, pictures and other info is stored. However, when I try to open, copy any of these files or move any additional info to my phone....DENIED. CellCo has installed a last little barricade to forward progress. But it can't be a complete roadblock. What if your phone needs service? What if a file gets corrupted and the OS stops working? CellCo doesn't want to replace the whole phone for a software error. So they build in a service mode that usually allows a little more "flexibility." I had been into the basic service menu (using a special combo code that you can find around the net if you know where to look) but that was the menu where they locked the proxy config so you can't change it. Time for advanced service mode. This got a little more complex but suffice it to say that I released the ties that bind and made some alterations to the way my phone was set up. I also am now relatively confident that I could restore my phone to factory defaults if things really went south.

Chapter 5 - Triumph:
Proxy server installed and running on a computer: check. Account created on proxy server for cell phone: check. Port access allowed for cell phones: check. Configuration files backed up, hacked and overwritten on phone: check. Phone rebooted: check. Time for the moment of truth. I turned my phone back on and logged on to the internet, meanwhile watching the logs on the proxy server:
[cellphone] is attempting access. Password accepted. User [id number] logged on.
And there it was: Google Mobile on my cell phone screen and the sweet taste of success.



Let me make a few things clear here: as far as I know I did not break any laws. I'm sure I voided some warranties, and I probably pushed the rules in my EULA a bit. But there are companies out there that offer legal, cheap alternatives to your CellCo's mobile internet service so it appears to be a legitimate industry. Also, I am not getting anything for free that I should be paying for. The CellCo charges you to access the internet through their servers. However, I am not using their servers. I'm accessing it through my own, which I provided using Internet service that I paid for and computers that I built. I still have to pay for the air time like a regular mobile customer (but nights and weekends are free). I'm sure that CellCo would be irritated that I'm not buying ringtones, etc from them but I wouldn't have done that anyway on principal. The phone manufacturer themselves shouldn't have any problem with me demonstrating that their product does more than advertised.

Hacking my phone has provided a few useful things, I can transfer pictures and data back and forth more easily and add unique ringtones. I can also back up my contacts, which I did. Mobile Internet actually is near-worthless on a tiny cellphone screen and I can't imagine what I'd use it for (try typing in a URL on a stupid cellphone keypad). Most of the things I hacked you can do in other ways...it's just slower and/or more expensive. I mostly did this because I thought it might be possible and challenging. Both were true and I learned a lot.

3 comments:

Anonymous said...

Dude you are my hero. I have read and am interested in the "backwardness" of Cell phone providers here in the US and I'm definitely pumped about what an average joe with a little tech savvy can pull off. I just can't wait for the day when folks like verizon or cingular start realizing that by opening up thier devices to the end user thier profits will increase. Just look at apple. As soon as they offered a supported way to use windows on thier machines (boot camp) sales of thier computers spiked. Anyways...good stuff as usual.

Anonymous said...

I'm not sure if I should be proud or scared of you! :) I guess I'd like to know how long all of this took you and can you put the songs you record yourselve (i.e. when you come back down) as your ring tone? Jos was here and busy so I read this out loud to her, we both chuckled most of the time as I kept saying, "I wonder if this is LEGAL!" So in your last paragraph I guess I found out! and would have to agree with your logic! :)

J said...

@aaron:
Yeah, one of the things that I want to do is program a game for my phone. I have created several little games in flash and done some experiments in Java and other langs. I found the forums and SDK for BREW 2.0, the system for developing phone apps. However, even if I programmed something I wouldn't be able to test it easily. All apps are digitally signed and controlled by big brother CellCo. Which is sad because there are loads of free mini apps for PDAs that could probably be easily ported to phones. I'm sure that's what they're afraid of.