Thread: Is this possible?

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    361

    Is this possible?

    I got into a discussion on another forum, apparently people "hacked" Star Wars Galaxies(not like HL2...uncompiled type) and looked at the code to find out the Jedi skill tree, so here is how the person that said it was possible said they did it.
    Actually it is not unreasonable to grab the string tables for any particular program.
    Unless its encrypted and it usualy isn't.. the information like the skill tree will be stored in a nice little structure, which is then stored in a nice little array. So somewhere in the code is this stream of interesting data.

    Ok so how do you find it you ask, its just a big load o 1's and 0's right?

    Luckily, a lot of data that humans are interested in is string related, like the skill name. So all you need to do is find a string you are interested in, and start looking for that patterns ending in a 0. (most languages, except pascal notably, end strings with a null (0) character). Then its just a matter of decoding the structure arrangement of data surrounding that string.

    for example, the structure for a skill tree item might be something like this.

    Code:
    struct skillItemStruct {  
      char * skillName;
      enum experienceEnumType expType;
      unsigned long int experienceNeeded;
      unsigned short int sklllPointsNeeded;
    };
    Which in the datastream would look like.
    a null terminated string
    followed by
    a byte indicating which exp type (figure out the encoding mechanism by comparing known types)
    followed by
    a 32 bit number
    followed by
    a byte

    So, pulling out the DATA from a program generally isn't that difficulut.. as long as you have some idea of what might exist in the data you are looking for.

    So what do you look for if you want to find the skill trees? O.. thinks like
    Slicinng I
    Slicing II
    Slicing III
    Slicing IV
    And once you find those strings, start trying to match up other known data that you know (like how many skill points and exp it takes to get each of those skills) to the numbers between the strings.

    Easy? Maybe not. But certainly within the realm of possibility.
    Now I always thought it was pretty much impossible to get the original code of something like that, or is it possible to get small bits like that?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > or is it possible to get small bits like that?
    First off, you're not recovering the original code, you're determining an equivalent representation which has the same properties.

    And yes, this is an easy thing to do, especially easy when you have lots of printable strings in the file to guide your search for interesting snippets of information.

    Of course, "easy" is a matter of perspective
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    But how could they get the names of everything then?

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    What names?
    The structure member names are entirely made up by whoever is reverse engineering the file, to at least suggest what the fields are for.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    What they need is to find a struct with the names of what they are receiving for the jedi skill tree, so they need the names of what they are getting and the modifiers and at what level(Say something like lightsaber block +5 at novice level). So that is why I didn't think they could do that because you can't get the original name so you can't find out what it is your actually getting.

  6. #6
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    Well you can get the original names, if you use a program called SoftIce, you can run the program and reverse engineer at the same time, so while it's printing things to the screen, (like a players skill level) it's also using the string tables concerning the skill level. It's hard to explain, lets say a program comes up with a dialog box asking for a username, you enter the username and press enter. When you press enter you can watch the program in action, and for example, see where it looks to find usernames stored on the computer somewhere. That's how it all works so yes it is possible in a round-about way.
    PHP and XML
    Let's talk about SAX

  7. #7
    Registered User
    Join Date
    Oct 2003
    Posts
    13
    where is it exactly this program you refer to as "softice" attainable?
    Decode the coded.

  8. #8
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    nm too early in the morning

  9. #9
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    >>nm too early in the morning

    way to help out



    http://www.soft32.com/download_908.html
    PHP and XML
    Let's talk about SAX

  10. #10
    Man, I did that type of hacking when i was like 8

Popular pages Recent additions subscribe to a feed