Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
XBox (Games) Encryption Security Entertainment Games

Technical Analysis of XBox Save Game Hack 242

DJPenguin writes "There is an excellent article at the XBox Linux Project that describes exactly how the XBox savegame hack works. It details how the author went to great lengths to hide exactly what was going on. It turns out the exploit code is hidden within an image of Tux himself!" An enlightening read, to say the least.
This discussion has been archived. No new comments can be posted.

Technical Analysis of XBox Save Game Hack

Comments Filter:
  • Hidden code? (Score:2, Offtopic)

    by SharpFang ( 651121 )
    See IOCCC [ioccc.org] for true masters of making the code unreadable!
  • Geez (Score:4, Funny)

    by craigtay ( 638170 ) on Saturday July 12, 2003 @02:50PM (#6424770) Journal
    From the looks of this article, they could probably make an entire course at a univeristy devoted to modding the xbox.
  • Stego or not? (Score:5, Insightful)

    by robogun ( 466062 ) on Saturday July 12, 2003 @02:50PM (#6424771)
    The code was "hidden" in the jfif header, therefore does not qualify as steganography in my opinion. But I bet MS jumps all over this and gets stego banned.
    • Re:Stego or not? (Score:4, Informative)

      by AdEbh ( 468372 ) on Saturday July 12, 2003 @03:08PM (#6424838)
      <p>I think it could. Steganography means hidden/covered writing from it's Greek roots. The term is older than computers so I think the distinction between the body or header of an image file is a bit fine.

      <p>- Alex
      • I think I'd say I agree with the parent- the distiction isn't overly fine, IMHO. That is, that's like saying it's stenography to type out some "hidden text" in plaintext on the cover page of a document, leaving the rest of the document with no information encoded, and doing nothing to really hide the illicit data.

        Unless this data in the image header is really hidden, but if its in the header, it's probably in the comment...
    • But I bet MS jumps all over this and gets stego banned.

      What would be the point in that? If they know you're using stego, then it kind of defeats the whole purpose, doesn't it? Banning it would be meaningless, since the entire concept of stego is to hide the very fact that you're using it from the authorities.
    • IIRC, stego was invented by the ancient Persians, and consisted of shaving a slaves head, tatooing the message onto his scalp, waiting for his hair to grow back, and sending him to the recepient.

      So, using the header of a file is obviously very much in the spirit of the original concept.

  • by msh104 ( 620136 ) on Saturday July 12, 2003 @02:50PM (#6424773)
    continue praying... thank you holy tux, you defeated evil xbox with nothing more than a blink of your image. if possible reveal thy self in thy full glory and microsoft will treamble in your pressence.
  • I don't understand. (Score:5, Interesting)

    by Civil_Disobedient ( 261825 ) on Saturday July 12, 2003 @02:57PM (#6424799)
    Sorry for my ignorance, but why hide the code? If a true linux fanatic wants to spread the good word, so to speak, why bother with the whole encryption routine and fake JMP's? Why not just make the hack completely transparent so anyone can do it?
    • by kc8kgu ( 244956 ) on Saturday July 12, 2003 @03:36PM (#6424933)
      Not that I would ever waste my time trying to hack an X box, but I can imagine a couple of reasons why the hacker might what to hide how it worked.

      The big one is that the more cryptic and obfusicaed the hack is, the less likely the vulnerabitly will be fixed in a future version because its less likely to be found and understood the the engineers trying close it. From the article, it seems as if the game already has four versions that have this hole.

      But to contridict myself, the article seems to indicate the big hole is a simple buffer overflow. Easily noticed and fixed. If there are other relatively unknown hacks inside the encrypted payload, it may extend their availability and usefulness.

      On the other hand, the hacker my be simply trying to hide his identity, changing her code so it doesn't seem like its in her personal style. To explain, people who write software for long enough in any arbitrary language begin to develop their own consistant style. Don't get me wrong, they do use the language's idiom to a certain extent, but usually have their own bit of flair to add to them.

      Lets consider the c/c++ for loop. Here are a few ways to write it - all pretty standard.
      /* first example */
      int i;
      for (i=0; i < FOO_COUNT; i++)
      DoItTo(myfoos[i]);

      /* second example */
      for (int index=0; index < FOO_COUNT; index++)
      {
      DoItTo(myfoos[index]);
      }

      /* third example, assume ok to change myfoos */
      for (myfoos; myfoos != NULL; myfoos++)
      DoItTo(*myfoos);
      Given a large enough sample of a persons code (say the did it for a living and their employer used cvs or similar), its pretty easy to tell who wrote. After about 15-20 lines of code, I can pretty well tell which of my coworker are to blame for the latest bug. Its not a finger print, but you just need a glove size to narrow down the search.

      Or, I could be completely off base. Its happened before... Once ;-)

      Just my $0.02

      (ps, I realize that the guys fixing the hole wouldn't have the source to look at, but i would wager that enough flair gets through to the machine language)
      • by MikeCamel ( 6264 ) on Saturday July 12, 2003 @04:46PM (#6425163) Homepage
        A fair enough point, but (as I'm sure kc8kgu knew), once things are compiled, it becomes much less simple to identify a hacker's signature. A decent compiler will compile all the above examples to the same code. I don't buy "enough flair gets through to the machine language" for short code fragments, I'm afraid. A good optimising compiler is a good obfuscator, too. I wonder if anyone's done any studies on exactly how much personal style you need to exert in order for it to turn up at a) the assembler level or b) the machine code level?
        • by Anonymous Coward
          No compiler would produce the same code for all three examples. In particular, use of the postfix unary increment in the for loop guarantees that. If the C++ code was written with a prefix unary increment (i.e. I'm saying using ++myFoos instead of myFoos++) then maybe it would be the same. The compiler is forced to call the copy constructor for myFoos in the third example, and no amount of optimization can avoid that.
          However, I totally agree with you point -- the programming style of a higher-level lan
        • > A fair enough point, but (as I'm sure kc8kgu knew), once things are compiled, it becomes much less simple to identify a hacker's signature. A decent compiler will compile all the above examples to the same code. I don't buy "enough flair gets through to the machine language" for short code fragments, I'm afraid.

          You're assuming the code in question was compiled. Glancing at it, I'd lay good odds that it was handcrafted.

          Besides, with the risk of being DMCA'd into his or her component atoms (regar

      • Your first and second example would compile to the exact same machine language. With the thousands of people who could have done this hack, I doubt that the machine language would fingerprint them enough to catch them.
  • by henriksh ( 683138 ) <hsh@freecode.dk> on Saturday July 12, 2003 @02:58PM (#6424801) Homepage
    Why are you guys constantly trying to work against the hard-working software publishers at Microsoft?

    Come on, guys - you know it's not right. Don't copy that floppy!
  • by Martin Marvinski ( 581860 ) on Saturday July 12, 2003 @03:00PM (#6424814)
    If anyone knows it would be intresting to hear the reason why.
    • by rusty0101 ( 565565 ) on Saturday July 12, 2003 @03:09PM (#6424843) Homepage Journal
      My suspicion would be that the hacker involved works at a game company that created the game that he found a way to include the method of bypassing the security for.

      If that is the case, he would want to hide the fact that the exploit exists, as well as hiding the fact that he installed the exploit.

      He would then have to make sure that the exploit made it through QA, and the game made it to the market. Next he has to verify for himself that he can take advantage of the exploit in the wild, then he can make others aware that the exploit is possible, preferably without revealing his identity.

      But that's just one possibility. Maybe he did it just to see how obtuse he could make an exploit.

      Disclaimer, the above are mearly ideas, I don't work at a game company, or for any company that I know has production involvement with any computer games, or any Microsoft products related to gaming.

      -Rusty
      • Nah, this is still just a buffer overflow. I doubt he "put" it in there.

        I think that any programmer can appreciate why he went to such lengths to hide the code. It's a hell of a cool thing to do.

        In this world of script kiddies, it's very important to disguinish between kiddies and people who are true hackers. Mad props to him for showing that hacking is most certainly an art.

        The modification of the public key to make is divisible by 3 was just beautiful.
        • I think that any programmer can appreciate why he went to such lengths to hide the code. It's a hell of a cool thing to do.

          In this world of script kiddies, it's very important to disguinish between kiddies and people who are true hackers. Mad props to him for showing that hacking is most certainly an art.


          But isn't the whole philosophy behind linux to be open and clear?
        • by the gnat ( 153162 ) on Saturday July 12, 2003 @04:02PM (#6425000)
          In this world of script kiddies, it's very important to disguinish between kiddies and people who are true hackers. Mad props to him for showing that hacking is most certainly an art.

          Um, that's not a very good distinction: you need to be clear what meaning of "hacker" you're using. Someone who r00ts my box and types "rm -rf /*" is not an artist, he's a criminal who should have his nuts ripped off - no matter how 1337 his 5ki11z are. Although the legality of hacking the X-Box is questionable, it's in a different world entirely from the vandalism associated with computer break-ins, and the community is doing this to a product they paid for and own.

          By confusing the illicit modding and the website defacing, you're making it all the harder to defend against future DMCAs. Many of the big corporate lobbyists and lawyers we so love to bash on Slashdot would love for the public and politicians to view hobbyists and crackers as the same thing.
          • Hackers traditionaly hold to the ethic of do no harm. It's one thing to get into a box poke around get some evidence that you were there and not damamge anything besides covering your tracks (and thats a bit of a new thing due to the excessive laws against it) A script kiddie is just that a script kiddie lets try to not confuse the two. If they call themselves a hacker thats fine it dosent make it true. The hackers of the world know who they are and how to tell there own.
            • by miu ( 626917 ) on Saturday July 12, 2003 @05:46PM (#6425319) Homepage Journal
              Hackers traditionaly hold to the ethic of do no harm. It's one thing to get into a box poke around get some evidence that you were there and not damamge anything besides covering your tracks

              What you are describing is still a system cracker. The "do no harm" philosophy is pure ignorance. Someone breaking into a machine and covering his tracks can do a lot of unintentional harm.

              Those who hack the XBox don't have to worry about causing harm because they are working entirely on their own equipment.

              • What you are describing is still a system cracker. The "do no harm" philosophy is pure ignorance. Someone breaking into a machine and covering his tracks can do a lot of unintentional harm.

                Standard operating procedure for dealing with a break-in where I work: nuke the system and restore from backups. I guess we could avoid this, if we instead spent several days auditing the system. Unfortunately, one must always assume the worst- there's no way to tell how badly the system has been compromised, so all b
                • Your talking about 20 years of difference in society. Hackers breaking into computers was something that happened 20 years ago because they were there. I would hazard to say that those same people today arent breaking into other peoples systems without consent anymore. Remember its a term about 30 years from before the days of home computers when unless you worked for or went to school someplace that had proccessing power you didn't have any means of using a computer with any apreciable power legaly.

                  And
            • The hackers of the world know... how to tell there own.

              Yeah, and so do I: by their bad spelling and grammar.
          • by Anonymous Coward
            You said that

            By confusing the illicit modding and the website defacing, you're making it all the harder to defend against future DMCAs. Many of the big corporate lobbyists and lawyers we so love to bash on Slashdot would love for the public and politicians to view hobbyists and crackers as the same thing.

            Are you trying to say that this was illicit modding? Let's look at it, this is using the hardware they sold you for what you want to do. You don't have to sign an agreement with MS to buy x many gam

            • Are you trying to say that this was illicit modding?

              Illicit, not illegal. I think the project is actually quite cool. My point is that it's (necessarily) very of secretive, definitely not what the manufacturer intended, and possibly illegal under the current fucked-up technology laws we have. It's just enough of a gray area that Microsoft (or the MPAA, etc.) will take any chance they get to lump it in with breakins and piracy. But I don't think it's wrong: that was the point.
          • this is a "cracker" , this is willfull distruction of anothers property and is against "hacker" ethics. "hackers" are all about freedom of information and will gladly break into a system and take data, but not destroy it.
      • From what I've read, the buffer overflow is in an XDK call. In other words, it's Microsoft that blew it.

    • If anyone knows it would be intresting to hear the reason why.


      Isn't there a fair sum of money up for grabs for the person who creates a non-modded linux Xbox hack?

    • by S.Lemmon ( 147743 ) on Saturday July 12, 2003 @05:10PM (#6425238) Homepage
      I'm sure the reason was to make it harder for others to use the same hack to play copied games.

      Remember, they've already gone out of their way to stress it's use for a legitimate purpose (running Linux) and not for piracy. This is just one more example of that. It shows a good faith effort by the authors to insure the hack can't as easily be exploited for other purposes.
      • Excellent analysis...

        Such obfuscated code could only be the prodcut of
        A: a paranoid mind
        B: someone on a mission to prevent their code from being exploited
        C: both.

  • Brilliant! (Score:5, Insightful)

    by 1010011010 ( 53039 ) on Saturday July 12, 2003 @03:01PM (#6424819) Homepage
    The code is just brilliant. A lot of care was taken in the construction of this hack. No script kiddie is he.

    It looks like it retrives the private key. That's interesting.

    • Re:Brilliant! (Score:5, Interesting)

      by ignoramus ( 544216 ) on Saturday July 12, 2003 @03:21PM (#6424892) Homepage

      It looks like it retrives the private key. That's interesting.

      I agree that it's interesting but the exploit doesn't retrieve or recreate the private key - it does something I've been fretting about recently: it simply modifies the public key - thereby creating it's own (new and weak) key pair.

      From the article:Once you modify the public key this way, you end up with a public key that is easily factorable. It is now divisible by 3!

      Anyone here bright enough to suggest a good way to protect from this? My first thought was to sign the public key with another, use an X.509 certificate or something but the problem is that you can always patch the signature/certificate/checksum/whatever verification mechanism... So what is the solution?

      • Re:Brilliant! (Score:3, Insightful)

        by Dthoma ( 593797 )
        "My first thought was to sign the public key with another, use an X.509 certificate or something but the problem is that you can always patch the signature/certificate/checksum/whatever verification mechanism... So what is the solution?"

        There is no solution. If someone's got physical access to hardware, all bets are off and there's nothing you can do. The only solution to the problem would be a physical one, such as using superglue to hold the case shut.
      • Re:Brilliant! (Score:4, Informative)

        by 3.1415926535 ( 243140 ) on Saturday July 12, 2003 @03:33PM (#6424924)
        So what is the solution?

        I'll give you a hint: There isn't one!

        As somebody who's name escapes me at the moment said, "There ain't no such puppy as a trusted client [wikipedia.org]."
      • nyone here bright enough to suggest a good way to protect from this? My first thought was to sign the public key with another, use an X.509 certificate or something but the problem is that you can always patch the signature/certificate/checksum/whatever verification mechanism... So what is the solution?

        You'd have to put the key and the checking code into tamper-resistant hardware which then had the power to shut down the game and refuse to play it if the signature was bad. Ideally the hardware would be
      • by hbo ( 62590 ) *
        Don't publish no durn code with buffer overruns. 8)

        Even Palladium won't protect you if you have one of those, providing the vulnerability occurs after the application has authenticated to the hardware. Unless you do something like challenge the app periodically to prove it has an intact copy of the secret key. Does Palladium do that? I don't know. Anti-stack crashing kernels combined with a crypto enabled platform could help too. But the whole game is complex as hell. And it has some of the best minds on t
    • Re:Brilliant! (Score:3, Informative)

      by Anonymous Coward
      It does not retrieve the original private key. By modifying the public key in memory, the exploit effectively creates a new key pair. Read the complete article.
  • by Realistic_Dragon ( 655151 ) on Saturday July 12, 2003 @03:23PM (#6424896) Homepage
    ...when you can skim that article and not need to look anything up.
    • ... that I didn't understand.

      I didn't have to look anything up, though...

      I know Assembly, and 80x8n assembly, especially. So that was no problem. I could follow the basic plot; I didn't bother to try to read most of the code, but when I did, it wasn't hard to read. The article was pretty good that way.

      But it looks to me like the article really didn't tell how the 007 Save Game was hacked. Rather, the article says "yeah it was hacked, and here's the neat part." But that's where it stops.

      There isn't
      • The hack is essentially just an exploit of a buffer overflow in the game load code of the game 'Agent Under Fire' (AUF).

        Once the buffer overflow was found, it was a relatively simple matter of creating a doctored save game that caused the xbox to boot off the hard drive when you try and 'load' that saved game file.

        So to boot into linux, you have to buy AUF, obtain the doctored save game and get it onto the machine (I'm not sure how you go about that part.. perhaps the xbox has some removable media), then
    • ...when you can skim that article and not need to look anything up.

      You really know you're a geek when you can read the opcodes without referring to the assembly.

    • when you say "You know your a geek..."
  • XBOX is evil (Score:3, Interesting)

    by Anonymous Coward on Saturday July 12, 2003 @03:46PM (#6424960)
    microsoft takes the open PC standard, cripples it, makes it so that you can't upgrade it, you cant WRITE code for it without paying them royalties, you cant RUN code on it without paying them, and puts their logo on the front. If you even try to open this crippled PC, your warranty is void, if you open up and play around with this crippled PC that you payed for and you own ("hack") you are breaking the law. Dont even think about selling modifications to this crippled PC. You will be put in prison with all the rapists and murderers and other menaces to society.

    The scariest part? Is that in 10 years, we wont be talking about a console. This is the future of the PC.
    • Re:XBOX is evil (Score:4, Insightful)

      by bucky0 ( 229117 ) on Saturday July 12, 2003 @04:38PM (#6425141)
      I should'nt feed the troll, but here goes:

      1)Making it upgradable would increase cost, they wanted the cheapest box for the performance they could make (sockets cost money)

      2)If you don't like the idea of not being able to write your own code for it, then don't buy it.

      3)puts their logo on the front...in that case is Dell also evil?

      4)If you even try to open this crippled PC, your warranty is void....why does microsoft have to warranty actions on the XBOX that it's not designed for? That's like me saying that AMD should still warranty my processors even if I'm running them out of spec

      5)...you are breaking the law. Despite what the spindoctors say, as long as you aren't hacking your xbox to play copied games, they can't touch you if your putting your own software on there (that said, if a side effect of your little hack causes someone to be able to play burned games, then theyre gonna come after you (which sucks for fair use...).

      6)The scariest part? Is that in 10 years, we wont be talking about a console. This is the future of the PC.That is the scary part though. Even though 'the powers that be' keep claiming that people will be able to run unsigned content on TCPA hardware. I can't imagine that it would 'accidentally' cripple things like linux and BSD that hurt the bottom line

    • by Viewsonic ( 584922 ) on Saturday July 12, 2003 @05:38PM (#6425298)
      So don't worry about it. As far as consoles go, XBox is terrible. It has about 2-3 games worth buying that aren't on the PC, and pretty soon they'll be on the PC regardless.

      Conoles will stay consoles. They will be made to play purely games and nothing else. This is what people want to buy, and they're showing it with their pocketbooks right now. Look at how many dedicated gaming devices Sony and Nintendo have sold compared to Microsofts try-and-do-everything Box. The numbers speak for themselves.

  • ... Should go down in the hall of fame right next to the guy who figured out Whippits (sp?). To misquote Dennis Leary, these kids should be working for the Space Program!
  • by pair-a-noyd ( 594371 ) on Saturday July 12, 2003 @03:55PM (#6424988)
    for buffer overflows or what??

    Seems that's the number one way to whack an M$ system...

    • It's the number-one way to whack any system, Microsoft or not. And no, saying 'M$' instead of 'MS' doesn't make you look cool.
    • It's the #1 way to whack anysystem...
    • This is a 007: Agent Under Fire exploit, not an exploit inherent to the Xbox. Agent Under Fire was made by EA, not Microsoft. Blame the right company.

      If this was analyzing the MechAssault hack, then you might have a point.
      • My point is that Windows, which the Xbox runs, is so rife with security flaws that there is little wonder that a simple buffer overflow did it.

        Windows is the O$ with insecurity built in..
        • If the Xbox ran linux, the same exploit would work. It's a by product of the x86 architechture and the writers of the exploitable save programs, not Microsoft.
          • I simply don't believe that.
            If I took a copy of Xbox linux source code and built it from scratch on two boxes,one being an xbox and one being say a ppc based box then ran the same exploit on both boxes that are now running xbox Linux that is compiled for THAT cpu, that the xbox would crack and the ppc box would not, simply because of the CPU??
            • It depends on how the CPU handles the stack. When I said it was a fault of the x86 architechture, I didn't mean that only the x86 was vulnerable, there are other CPUs which are just as vulnerable to that attack. I was just saying that it's a hardware problem and not a software one

              Returning to your example..if you rewrote the exploit in PPC assembler(most exploits like that are hand coded) and PPC was vulnerable, it would work.
  • by Jim Hall ( 2985 ) on Saturday July 12, 2003 @05:47PM (#6425321) Homepage

    The article says:

    This explanation is for the sole purpose of writing interoperable software under Sect. 1201 (f) Reverse Engineering exception of the DMCA. So here is the explanation you have all been waiting for.

    But you may not know the actual section he's referring to. Here it is:

    (f) REVERSE ENGINEERING- (1) Notwithstanding the provisions of subsection (a)(1)(A), a person who has lawfully obtained the right to use a copy of a computer program may circumvent a technological measure that effectively controls access to a particular portion of that program for the sole purpose of identifying and analyzing those elements of the program that are necessary to achieve interoperability of an independently created computer program with other programs, and that have not previously been readily available to the person engaging in the circumvention, to the extent any such acts of identification and analysis do not constitute infringement under this title.

    And (a)(1)(A) is the bit that everyone calls to mind when they think of the DMCA:

    (a) VIOLATIONS REGARDING CIRCUMVENTION OF TECHNOLOGICAL MEASURES- (1)(A) No person shall circumvent a technological measure that effectively controls access to a work protected under this title. The prohibition contained in the preceding sentence shall take effect at the end of the 2-year period beginning on the date of the enactment of this chapter.

    (full text of DMCA) [eff.org]

    IANAL, but I think this means that if you crack the protection on something simply so you can understand (and document) the program so it will work with other programs and files, then that's not considered a violation of the DMCA.

    -jh

  • by mark_space2001 ( 570644 ) on Saturday July 12, 2003 @09:57PM (#6426046)
    For me the main issue is online play and cheating. The Xbox has a security key on only allow certain programs (i.e., licensed developers) run programs. This really reduces the chances of online cheating. Cheating online has all but ruined SOCOM's online play for the PS2, I don't want that to happen to Xbox games as well.

    Eventually, I think all game consoles will have security keys like the Xbox.

    Linux is cool, but not every computing device in the world needs to run it. Unlike servers and desktop PCs, game consoles are not mission critical for anything. These Linux hackers should leave the Xbox alone and devote some time to improving X performance on the desktop, or something else useful.

  • by grimani ( 215677 ) on Saturday July 12, 2003 @11:36PM (#6426401)
    The interesting bit should be how the dude discovered the overflow...not how it works.

    Discovering an overflow in a controlled environment such as a console is no easy task. Console games don't usually crash - what indicated an overflow was present for exploiting?

    After that, exploiting an overflow is really just a menial task. There really are only a few issues to differentiate each case - how long can the exploit string be before it overwrites something critical? Are certain characters not allowed in the string?

    Beyond that, exploiting it is simple...

    So, anybody know how that particular overflow was discovered?
    • I don't know the details of this particular case, but once you have access to the save data it's easy to tweak things that look like they could cause problems. (Put yourself in the developers' shoes, and ask yourself "if I was rushed to get this out the door, where would I be likely to cut corners?") Text strings are obvious things to play with; some games compress their saved data, so you could create a bogus compressed file that expanded to some huge number of bytes and see if it crashes the game; et ce

There is very little future in being right when your boss is wrong.

Working...