Go Back   Zune Boards > Zune Discussions > Zune Hacks & Mods > In Progress

In Progress Want to know what hacks & mods we are working on?

Reply
 
LinkBack Thread Tools
Old 07-01-2009, 05:29 PM   #1 (permalink)
Squirt
 
Join Date: Dec 2008
Posts: 10
Xqtftqx is on a distinguished road
Red face Hacking the zune. I need, you!

Okay, before this starts a freaking flame war, ive successfully reverse-engineered mp3 player firmware and found exploits which allow unsigned code before, and i know alot about this stuff. So if you dont want to help, or dont believe this is possible, please dont post

The zune has pissed us all off enough, so lets hack this thing.

People Ill Need:
1) Somebody(s) who can take apart there zune and do some dumps of the harddrive and can put it back into the zune.
2)Anybody who has advance technical knowledge, or experience in programming, and wants to help, or is willing to help.

What i need YOU to do:
1) Start messing with files, see if you can find a way to get the zune to crash. PM me if you find anyway. This is very open, anyway you can get the zune to crash, just tell me.

This is possible.



Xqtftqx is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old 07-01-2009, 07:20 PM   #2 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,800
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Dumps of the hard drive pretty much just have a system partition with the firmware's nk.bin, eboot.bin, and recovery.bin, as well as a few databases and configuration files. In addition, there is another partition for things such as media files and games.

The firmware itself can be dumped. If you have experience reverse-engineering firmware, you should know how to do it.

What do you expect to accomplish by getting the Zune to crash?
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html




Netrix is offline   Reply With Quote
Old 07-01-2009, 09:20 PM   #3 (permalink)
lost in paradise with rae
Support Team
Moderator
Expert Zuner
 
Red Sky's Avatar
 
Join Date: Nov 2007
Location: Pennsylvania
Posts: 2,632
Red Sky is just really niceRed Sky is just really niceRed Sky is just really nice
Send a message via MSN to Red Sky
Default

buffer overflow would be my guess. finding ways to do that allows for injection of unsigned code.
__________________
Runaway! thread|Beat Wave thread|
Rock Rain SD thread|
MY BLOG!


Thanks Charge!
Click Here to see more of Charge's work!





Red Sky is offline   Reply With Quote
Old 07-01-2009, 09:32 PM   #4 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,800
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Quote:
Originally Posted by Red Sky View Post
buffer overflow would be my guess. finding ways to do that allows for injection of unsigned code.
Right, I know that it is used for buffer overflowing, but the Zune closes anything that does a buffer overrun, so I do not see how that would really help.

What probability is there that the code would even be able to be executed via a buffer overflow, anyways?
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html




Netrix is offline   Reply With Quote
Old 07-01-2009, 11:10 PM   #5 (permalink)
lost in paradise with rae
Support Team
Moderator
Expert Zuner
 
Red Sky's Avatar
 
Join Date: Nov 2007
Location: Pennsylvania
Posts: 2,632
Red Sky is just really niceRed Sky is just really niceRed Sky is just really nice
Send a message via MSN to Red Sky
Default

Well, I don't know about the zune, but that's how the xbox was hacked and the ps3 was able to get homebrew, until firmware updates closed that down tight. I know the zune has that whole defensive level, but I'm pretty sure you can pretty much do whatever you want if you can get a device to overflow.
__________________
Runaway! thread|Beat Wave thread|
Rock Rain SD thread|
MY BLOG!


Thanks Charge!
Click Here to see more of Charge's work!





Red Sky is offline   Reply With Quote
Old 07-02-2009, 07:28 AM   #6 (permalink)
Squirt
 
Join Date: Dec 2008
Posts: 10
Xqtftqx is on a distinguished road
Default

Yes a buffer overflow, i wasnt aware the zune closes any bugger overfill. When a overflow occurs because of a file, such as an mp3 or a jpeg, you can run any code you want, and do whatever you want from there.

A harddrive dumped with dd helps because i can scan that file for any kind of code that can be modified, if there is any unsigned code anywhere on the zune, its a possible hole.

Last edited by Xqtftqx; 07-02-2009 at 07:33 AM.



Xqtftqx is offline   Reply With Quote
Old 07-02-2009, 12:56 PM   #7 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,800
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Quote:
Originally Posted by Red Sky View Post
Well, I don't know about the zune, but that's how the xbox was hacked and the ps3 was able to get homebrew, until firmware updates closed that down tight. I know the zune has that whole defensive level, but I'm pretty sure you can pretty much do whatever you want if you can get a device to overflow.
Sony allows people to install Linux on the PS3. They have an option that says "Install other OS". Sony even created a version of the Linux kernel specifically to work on the PS3. I have no clue where you get your information. PS3™ | Install Other OS

Quote:
Originally Posted by Xqtftqx View Post
Yes a buffer overflow, i wasnt aware the zune closes any bugger overfill. When a overflow occurs because of a file, such as an mp3 or a jpeg, you can run any code you want, and do whatever you want from there.

A harddrive dumped with dd helps because i can scan that file for any kind of code that can be modified, if there is any unsigned code anywhere on the zune, its a possible hole.
I suppose you can try, but I doubt it would work, since the security on the Zune makes sure that any "risk" is stopped immediately.

All executable code on the Zune is signed, but all of the Zune's modules are in the ROM, so even if they were not signed, they can not be replaced.

Here is a bit of information about the Zune's hard drive dump: ZuneFact - True Hard Disk Contents - 2 partitions
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html




Netrix is offline   Reply With Quote
Old 07-02-2009, 01:50 PM   #8 (permalink)
Squirt
 
Join Date: Dec 2008
Posts: 10
Xqtftqx is on a distinguished road
Default

Thanks for that link. Sadly on the partions there isnt much there. But one thing sorta interesting is, the playlist format:
HTML Code:
/store_00010001/Music/Green Day/21st Century Breakdown/01 Know Your Enemy.mp3
But the real harddrive isnt in that format. So there is a database that must look something like this (In Theory, this isnt what it looks like):
HTML Code:
Content1000b.mp3=Music/Green Day/21st Century Breakdown/01 Know Your Enemy.mp3
Just something im thinking about,



Xqtftqx is offline   Reply With Quote
Old 07-02-2009, 02:26 PM   #9 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,800
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Quote:
Originally Posted by Xqtftqx View Post
Thanks for that link. Sadly on the partions there isnt much there. But one thing sorta interesting is, the playlist format:
HTML Code:
/store_00010001/Music/Green Day/21st Century Breakdown/01 Know Your Enemy.mp3
But the real harddrive isnt in that format. So there is a database that must look something like this (In Theory, this isnt what it looks like):
HTML Code:
Content1000b.mp3=Music/Green Day/21st Century Breakdown/01 Know Your Enemy.mp3
Just something im thinking about,
Also, not even one byte of any of the .bin files can be changed, otherwise the Zune will require the (official) firmware to be reinstalled, so modifying the firmware itself is not a possibility.
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html




Netrix is offline   Reply With Quote
Old 07-02-2009, 03:34 PM   #10 (permalink)
Zune Freak
 
roebeet's Avatar
 
Join Date: Sep 2008
Location: Pennsylvania, USA
Posts: 1,015
roebeet is just really niceroebeet is just really niceroebeet is just really nice
Send a message via Yahoo to roebeet
Default

There was a recent thread on the board, about this. The Rockbox team has been trying to accomplish this, but no luck as of yet. Here's the thread, for your reference:

http://forums.rockbox.org/index.php?topic=6848.0

They did manage to alter the nk.bin firmware on the Gigabeat S (the Zune 30's predecessor).
__________________





roebeet is offline   Reply With Quote
Old 07-02-2009, 05:06 PM   #11 (permalink)
lost in paradise with rae
Support Team
Moderator
Expert Zuner
 
Red Sky's Avatar
 
Join Date: Nov 2007
Location: Pennsylvania
Posts: 2,632
Red Sky is just really niceRed Sky is just really niceRed Sky is just really nice
Send a message via MSN to Red Sky
Default

Quote:
Originally Posted by Netrix View Post
Sony allows people to install Linux on the PS3. They have an option that says "Install other OS". Sony even created a version of the Linux kernel specifically to work on the PS3. I have no clue where you get your information.
I'm not refering to linux. I'm refering to homebrew based games using blueray/java. You'd have to look it up, it got closed down months ago.
__________________
Runaway! thread|Beat Wave thread|
Rock Rain SD thread|
MY BLOG!


Thanks Charge!
Click Here to see more of Charge's work!





Red Sky is offline   Reply With Quote
Old 07-04-2009, 12:25 PM   #12 (permalink)
Squirt
 
Join Date: Dec 2008
Posts: 10
Xqtftqx is on a distinguished road
Default

Quote:
Originally Posted by roebeet View Post
There was a recent thread on the board, about this. The Rockbox team has been trying to accomplish this, but no luck as of yet. Here's the thread, for your reference:

Zune

They did manage to alter the nk.bin firmware on the Gigabeat S (the Zune 30's predecessor).

I was very involved with the gigabeat s port. The gigabeat was also signed, but a tool was developted to bypass the signature: http://svn.rockbox.org/viewvc.cgi/tr....c?view=markup

Also, can somebody verify this: But i looked threw recovery.bin and couldnt find a signature anywhere, and what is recovery.bin used for?

Last edited by Xqtftqx; 07-04-2009 at 12:34 PM.



Xqtftqx is offline   Reply With Quote
Old 07-04-2009, 02:08 PM   #13 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,800
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Quote:
Originally Posted by Xqtftqx View Post
I was very involved with the gigabeat s port. The gigabeat was also signed, but a tool was developted to bypass the signature: [rockbox] View of /trunk/tools/mknkboot.c

Also, can somebody verify this: But i looked threw recovery.bin and couldnt find a signature anywhere, and what is recovery.bin used for?
I am pretty sure the Zune internally makes sure that everything is signed. Any file that is replacable will fail the signature checking if it is replaced by a non-signed file, or modified. So that means if nk.bin or eboot.bin are modified, the Zune will probably prompt you to install the real Zune firmware.

Has anyone tried to use that method on the Zune?

recovery.bin contains bit of information (in case the Zune needs to be recovered, I suppose).

It contains these three files:
Quote:
ceconfig.h
default.fdf
initobj.dat
ceconfig.h contains a list of defines for the modules and features that the Zune supports.
default.fdf contains the default registry entries.
initobj.dat just contains useless copyright notices (Microsoft Corporation, and Freescale Semiconductor, Inc.)
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html

Last edited by Netrix; 07-04-2009 at 02:36 PM.




Netrix is offline   Reply With Quote
Old 07-04-2009, 06:06 PM   #14 (permalink)
Member
 
BroiledVictory's Avatar
 
Join Date: Dec 2008
Posts: 500
BroiledVictory will become famous soon enough
Send a message via Skype™ to BroiledVictory
Awards Showcase
Biggest Shouter 
Total Awards: 1
Default

Here's my solution: open the Zune, give it a new blank hard drive (The Toshiba ones), give it the new Firmware-BAM!Get it to be recognized as mass storage!

My serious opinion(The above was a joke, a bad one at best)
It seems like the only way is buffer overflow.
__________________
Formally SmileDog.
Note: I prefer to have conversations over Skype, not over PM.
You will be bottom priority if I happen to be talking to a friend/relative.

thx Jorvette!




BroiledVictory is offline   Reply With Quote
Old 07-05-2009, 07:02 PM   #15 (permalink)
Squirt
 
Join Date: Dec 2008
Posts: 10
Xqtftqx is on a distinguished road
Default

Okay, Ive Talked to some people and heres what i was able to figure out:

In the cab file, recovery.bin and eboot.bin are not needed! Not saying it wont update without this,

Nk.bin
Recovery.bin
Eboot.bin

those are all stored on the Second Partion of the harddrive, but if you would remove eboot.bin and recovery.bin, the zune would still work fine. Those two files are copied to the zunes flash rom when updated. Therefore, its near impossible to put these two files on the flash rom without faking the signature. And also, both of those files DO have a signature.

A small layout of what eboot.bin does is:
Check nk.bin > If Pass > Load nk.bin from harddrive
If Nk.bin cannot load > Load Recovery.bin from rom

It also does some other checks, but its irrelevant.

Inside eboot.bin, there is one file: nk.exe which is the bootloader. Ill run this file thru Ida Pro when i return home.

Our only other options are finding out that signature, or a exploit of somesort.

Also, the person i talked to, and he is a trusted source, said there is no such thing as the zune auto closing buffer overflows. It does NOT close buffer overflows.



Xqtftqx is offline   Reply With Quote
Old 07-05-2009, 07:48 PM   #16 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,800
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Quote:
Originally Posted by Xqtftqx View Post
Okay, Ive Talked to some people and heres what i was able to figure out:

In the cab file, recovery.bin and eboot.bin are not needed! Not saying it wont update without this,

Nk.bin
Recovery.bin
Eboot.bin

those are all stored on the Second Partion of the harddrive, but if you would remove eboot.bin and recovery.bin, the zune would still work fine. Those two files are copied to the zunes flash rom when updated. Therefore, its near impossible to put these two files on the flash rom without faking the signature. And also, both of those files DO have a signature.

A small layout of what eboot.bin does is:
Check nk.bin > If Pass > Load nk.bin from harddrive
If Nk.bin cannot load > Load Recovery.bin from rom

It also does some other checks, but its irrelevant.

Inside eboot.bin, there is one file: nk.exe which is the bootloader. Ill run this file thru Ida Pro when i return home.

Our only other options are finding out that signature, or a exploit of somesort.

Also, the person i talked to, and he is a trusted source, said there is no such thing as the zune auto closing buffer overflows. It does NOT close buffer overflows.
All three of those files are in the first partition, which is the system partition. None of those three files are put into the Zune's ROM, however the files inside nk.bin are put into the Zune's ROM.

As for the buffer overflows, it has at least some protection, but I suppose if it was that easy to stop all buffer overflows, buffer overflow exploits would be nearly nonexistent. See here: http://www.zuneboards.com/forums/h-m...ertection.html
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html

Last edited by Netrix; 07-05-2009 at 07:50 PM.




Netrix is offline   Reply With Quote
Old 07-05-2009, 08:13 PM   #17 (permalink)
Squirt
 
Join Date: Dec 2008
Posts: 10
Xqtftqx is on a distinguished road
Default

No, that is wrong. Recovery.bin and Eboot.bin are put onto the flash rom if they have a valid sig and and have a newer timestamp then the current ones. If Eboot.bin and recovery.bin were removed from the system partion, the device would continue to operate. No files from nk.bin are stored on the flash rom, they are to large.

Also, as for running the bootloader threw ida pro, turns out Ida Pro doesnt have freescale support, so sorry.

Last edited by Xqtftqx; 07-05-2009 at 08:15 PM.



Xqtftqx is offline   Reply With Quote
Old 07-05-2009, 09:06 PM   #18 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,800
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Quote:
Originally Posted by Xqtftqx View Post
No, that is wrong. Recovery.bin and Eboot.bin are put onto the flash rom if they have a valid sig and and have a newer timestamp then the current ones. If Eboot.bin and recovery.bin were removed from the system partion, the device would continue to operate. No files from nk.bin are stored on the flash rom, they are to large.

Also, as for running the bootloader threw ida pro, turns out Ida Pro doesnt have freescale support, so sorry.
Maybe whoever told you that Recovery.bin and Eboot.bin are put into the ROM meant a hidden part of the ROM or something. As with all other Windows CE based devices, the Zune puts the files that are in nk.bin into a folder called "Windows", which is in its ROM. How else would it be able to use its modules?
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html




Netrix is offline   Reply With Quote
Old 07-06-2009, 09:31 AM   #19 (permalink)
Squirt
 
Join Date: Dec 2008
Posts: 10
Xqtftqx is on a distinguished road
Default

Here is a exact quote from zunepet:

Quote:
RECOVERY.BIN is used for recovering the NK.BIN after the hard drive is wiped out.

The built in Flash ROM contains EBOOT.BIN and RECOVERY.BIN (the much larger NK.BIN won't fit and comes off the hard drive)

If you replace or wipe the hard drive (there are special buttons you can push), then the Zune goes into Recovery mode.
It loads EBOOT.BIN and RECOVERY.BIN from the flash ROM. RECOVERY.BIN lets you connect to your PC, and the NK.BIN file is copied to the Zune's hard drive.
When it boots normally, EBOOT.BIN ignores RECOVERY.BIN and instead loads NK.BIN from the hard drive.
Quote:
There is a spare copy of the EBOOT.BIN and RECOVERY.BIN on the Zune's hard drive, but that's for updating purposes.
The Zune runs perfectly without them (since it has copies in Flash ROM)

When doing a version update, all 3 .BINs will be copied to the Zune hard drive (from the CAB)
When Zune reboots, it checks the time stamp of the EBOOT.BIN and RECOVERY.BIN on the hard drive.
If they are newer (AND THEY HAVE A VALID SIGNATURE!!!), they will be copied to Flash ROM.

I've done this to revert to old versions of the firmware (including the original firmware version of EBOOT.BIN).
Even so, all parts are signed, and since the firmware that does the loading and updating requires any new firmware to also be signed, you are locked out.



Xqtftqx is offline   Reply With Quote
Old 07-06-2009, 11:30 AM   #20 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,800
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Quote:
Originally Posted by Xqtftqx View Post
Here is a exact quote from zunepet:
All right, then. A copy of Recovery.bin and Eboot.bin are put into a hidden part of the Zune's ROM as well. That still does not change anything, since everything still needs to be signed.
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html




Netrix is offline   Reply With Quote
Reply

Bookmarks

Tags
firmware, hacking, linux, rockbox, zune

Thread Tools