Thread: some call it cheating...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    465

    some call it cheating...

    ive been playing a computer game for a good while now (years, in fact), and every so often i run into a small cheat/hack program that allows you to do various little things that you wouldnt normally be able to do. these programs seem to be written by average joes (you can tell that by reading their readme files), and they are usually fairly simple.

    ive always wondered, how do you go about writing one of those. i assume it has to send functions to the game itself, and ive ran emulators for the game and know a little of the scripting language used, but how would i go about writing a program that does something within the game. if i used game functions in my code, it wouldnt compile because the function wouldnt be recognized. also, i havent a clue how to send information into another program.

    anyone have any idea how this is done?
    I came up with a cool phrase to put down here, but i forgot it...

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273
    I believe most are made by studying the process memory of the game in question and noting how the things you do in the game affects values in memory. Then, you can write a cheat/hack/trainer that directly operates on these areas in the process's memory in order to do something you normally can't.

    It's usually quite easy to do it with simple games such as business simulators, but practically impossible on a FPS due to the anti-cheat mechanisms that have been designed specifically to deter this exploit.

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    465
    so i would have to get a memory editor and just watch the values in the game when i perform certain actions?

    there are so many values in the game, how would i know which affects what? what process should i use to find out what exactly does what?
    I came up with a cool phrase to put down here, but i forgot it...

  4. #4
    Me want cookie! Monster's Avatar
    Join Date
    Dec 2001
    Posts
    680
    Start easy, make an editor to change saved games. This is a lot easier than hacking in memory.

  5. #5
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,212
    Ultima Online?

  6. #6
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Check out the book "Programming Applications for Microsoft Windows" by Jeff Richter; it has lots of info on DLL injecting which you can use to alter another program.
    Also, check up on ReadProcessMemory and WriteProcessMemory @ MSDN. I wrote a small tutorial on how to use these two functions... it details how to change your score in 3D Pinball.

  7. #7
    Registered User
    Join Date
    Feb 2002
    Posts
    465
    >Ultima Online?

    was it that obvious? :P

    >Check out the book "Programming Applications for Microsoft Windows" by Jeff Richter

    ive been looking for a good windows programming book. for some reason no bookstore around here carrys any (or at least none of any value), and i will definitely check out those other things.

    thanks for the info.
    I came up with a cool phrase to put down here, but i forgot it...

  8. #8
    Registered User
    Join Date
    Sep 2002
    Posts
    272
    >Check out the book "Programming Applications for Microsoft Windows" by Jeff Richter; it has lots of info on DLL injecting which you can use to alter another program.
    Also, check up on ReadProcessMemory and WriteProcessMemory @ MSDN. I wrote a small tutorial on how to use these two functions... it details how to change your score in 3D Pinball.<

    You don't need (or want) DLL injecting to hack a game; just hex editor. Check out *ice (or any debugger of any worth). And practice patience.
    Joe

  9. #9
    Registered User
    Join Date
    Feb 2002
    Posts
    465
    well, hex and memory editors dont work well with UO. too many things are saved on the server side; i can change some things but they change right back.
    I came up with a cool phrase to put down here, but i forgot it...

  10. #10
    Yeah, any MMORPG is going to be pretty challenging to hack for a reason... They used to have products to hack nintendo games - they were called "Game Genie" and "Game Shark" its pretty hard to hack a DVD-rom tho or any type of rom now that's what games use.

    For the game shark they actually taught u how to hack the games - like in Duke Nukem for N64 u fire your gun and take note of the ammo value - look thru the hex editor to find that same value - their might be multiple instances of that same value in the hex editor but u go back to the game and fire off some more rounds and check back in hex... continue until u eliminate the other values by them not decreasing, find the hex value that holds the gun ammo and u can do whatever u want - give urself as much or as little ammo as u need or even prevent the ammo value from changing - ie. unlimited ammo.
    My Avatar says: "Stay in School"

    Rocco is the Boy!
    "SHUT YOUR LIPS..."

  11. #11
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Originally posted by JoeSixpack
    >Check out the book "Programming Applications for Microsoft Windows" by Jeff Richter; it has lots of info on DLL injecting which you can use to alter another program.
    Also, check up on ReadProcessMemory and WriteProcessMemory @ MSDN. I wrote a small tutorial on how to use these two functions... it details how to change your score in 3D Pinball.<

    You don't need (or want) DLL injecting to hack a game; just hex editor. Check out *ice (or any debugger of any worth). And practice patience.
    No? And what about games which run a checksum on their exe upon connection or execution?

  12. #12
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    You don't need (or want) DLL injecting to hack a game; just hex editor. Check out *ice (or any debugger of any worth). And practice patience.
    I fail to see how a hex editor would help you in FPS games and how a debugger would help in this case. Most small tools are either simulating the user by sending commands or keypresses, or directly manipulating memory ( Win9x only, or Device Driver Privileges required ). Most Cheats require DLL Injection, as most of them simply replace game DLLs with their own code or even graphic drivers so things can be painted that the game would not have allowed the user to see. Most cheats manipulate the game so that information that is available on the client is shown to the user in the most useful way, while the game itself would not have shown it ( i.e. wallhacks, smokehacks, unlimited sight ). Some Cheats manipulate the client to send commands that do not reflect reality ( Speedhacks ). No matter what, if it's a complicated cheat for a non-Win9x System, DLL-injection is the way to go. For this, you are well advised using a debugger, for example one of the *ices ( i.e. SoftIce ).

    Edit:
    I once wrote an UO training dummy tool in VC that let you center your mouse on a training dummy and would click it every 5 to 20 seconds. Pretty easy stuff, maybe 20 lines of normal windows code. Any good windows programming book will teach Windows Messages.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  13. #13
    Registered User
    Join Date
    Feb 2002
    Posts
    465
    >Any good windows programming book will teach Windows Messages.

    thats the problem. i cant find a good windows programming book. ive looked in the 'programming' section and in the 'windows' section of the bookstore. occasionally i will find something, but after looking at the code and information in the book is a little outdated (like yesterday i found one based on windows 95 ).

    im learning a little windows programming from game programming books that i have, so i could probably do something simple with what i know. maybe i should just start using my imagination...
    I came up with a cool phrase to put down here, but i forgot it...

  14. #14
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    798
    >>thats the problem. i cant find a good windows programming book.<<

    Programming Windows by Charles Petzold, it's ace. Quite expensive though. Try and pick it up 2nd hand, that's what I did.

  15. #15
    Registered User
    Join Date
    Sep 2002
    Posts
    68
    u all forget to point out cheating is for people who otherwise suck.
    cheats ruin #### ffs.
    "with a gun barrel between your teeth, you speak only in vowels."
    - tyler durden

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Error C2664 - Trying to call an external Dll
    By jamez05 in forum C++ Programming
    Replies: 3
    Last Post: 08-08-2006, 06:07 AM
  2. system call
    By fnoyan in forum Linux Programming
    Replies: 2
    Last Post: 06-07-2006, 10:53 AM
  3. Class won't call
    By Aalmaron in forum C++ Programming
    Replies: 3
    Last Post: 04-13-2006, 04:57 PM
  4. Iterative Tree Traversal using a stack
    By BigDaddyDrew in forum C++ Programming
    Replies: 7
    Last Post: 03-10-2003, 05:44 PM
  5. call by reference and a call by value
    By IceCold in forum C Programming
    Replies: 4
    Last Post: 09-08-2001, 05:06 PM