Beat Your Mom At Solitaire—Reverse Engineering of Computer Games
Post on 19-Jul-2015
Beat Your Mom At SolitaireReverse Engineering of Computer GamesChristoph Matthies, Lukas Pirl @chrisma0May 2014Beat your mom at Solitaireby cheating :(Beat your mom at SolitaireBeat your friends at MinesweeperHow its doneIn-flight memory patching(view game as bunch of memory, change important bits at runtime)Benefits: Generic (i.e. programming language, framework agnostic) Fast (usually faster results than binary analysis) Invisible (without checking for external programs) Good Tool support (Cheat Engine is popular) Elie BurszsteinDefcon 18 - Kartograph, Finding a Needle in a Haystack or How to Apply Reverse Engineering Techniques to Games www.cheatengine.orgIn-flight memory patching(view game as bunch of memory, change important bits at runtime)Drawbacks: Needle in a haystack (one 4-byte value in 50 MB memory) No control over the algorithm (need to trigger the algorithm to do something, not as reliable as patching binary) Elie BurszsteinDefcon 18 - Kartograph, Finding a Needle in a Haystack or How to Apply Reverse Engineering Techniques to GamesHow its done Money (market is huge, 2013, USA: $15.39 B spent on games) Build better bots to farm gold Sell bots / exploits / cheats Progress faster through the game (20 hours of fishing?) Curiosity, learning, research the game Port old, abandoned games to new platform Build your own server Because the official server is discontinuedReasons to reverse engineer games Entertainment Software Association, Essential facts 2014, http://www.theesa.com/facts/pdfs/ESA_EF_2014.pdf, 2014 Exploits for games protected by PunkBuster - http://pansemuckl.netcoders.cc/ OpenRALibre/Free Real Time Strategy game engine supporting early Westwood classics, http://openra.res0l.net/Some static approaches(interact with the binary file) Disassemble (but games are huge these days) Find vulnerabilities Understand data structures to pinpoint in memory Find a future Understand the pseudo-random algorithm (PRNG) Patch the binary Dll analysis, import own dll Patch render loop, run custom code firstMethods to RE gamesMethods to RE gamesSome dynamic approaches (1/2)(interact with the software at runtime) Using a debugger Set breakpoints on important events Get notified when something happens Manipulate variables Using a proxy (in networked games) Intercept & modify game data packets on-the-fly Reverse engineer protocol Fuzzing (send random data, see what happens)Some dynamic approaches (2/2)(interact with the software at runtime) Bots, macros (interact with the user interface) Rebind keys (ex. shoot w/ mouse wheel) Sample pixels / read memory locations(Error prone, screen must be configured) Inject / simulate keystrokes, mouse movement(dedicate computer to this task alone) Tool support (e.g. AutoHotkey) Manipulate memoryMethods to RE games AutohotkeyFast scriptable desktop automation with hotkeys, http://www.autohotkey.com/Example: Map Hack in a RTS game(i.e. remove the fog of war)gamememoryStep 0Acquire entire game memory.Example: Map Hack in a RTS game(i.e. remove the fog of war)Step 0Acquire entire game memory.Step 1Do everything, but discover map, keepmemory that didnt change.gamememoryExample: Map Hack in a RTS game(i.e. remove the fog of war)Step 0Acquire entire game memory.Step 1Do everything, but discover map, keepmemory that didnt change.Step 2Only discover map, keep only data that changed.gamememoryExample: Map Hack in a RTS game(i.e. remove the fog of war)Step 0Acquire entire game memory.Step 1Do everything, but discover map, keepmemory that didnt change.Step 2Only discover map, keep only data that changed.Step 3Repeat.gamememoryExample: Map Hack in a RTS game(i.e. remove the fog of war)Step 0Acquire entire game memory.Step 1Do everything, but discover map, keepmemory that didnt change.Step 2Only discover map, keep only data that changed.Step 3Repeat.Step 4 Find the data structure.gamememoryExample: Map Hack in a RTS game(i.e. remove the fog of war)Step 0Acquire entire game memory.Step 1Do everything, but discover map, keepmemory that didnt change.Step 2Only discover map, keep only data that changed.Step 3Repeat.Step 4 Find the data structure.Step 5 Understand and manipulate the structure.gamememoryHeat map analysis of memory regionStep 4: Find the map KartographElie Bursztein and Jocelyn Lagarenne, Stanford University, http://www.defcon.org/images/defcon-18/dc-18-presentations/Burszstein-Lagarenne/DEFCON-18-Bursztein-Lagarenne-Kartograph.pdfin game in memoryStep 5: Understanding & manipulating Understand structure, logic of data structure Many ways to represent structure (linked list, array, ...) Additive visibility vs. bitmap visibility Manipulate Once vs. continually Spawn a thread to continually rewrite memory Force game to redraw / read changed memory E.g. change resolution Networked games Client-Server model stops naive game modification Client: I have gathered 99999999 gold Server: Not according to my model! Disconnect! Efficiency vs. security Never trust the client Only send data that is needed (just-in-time, can lead to lag with slow connections) Send complete gamestate(fast, vulnerable to memory manipulation, scales well)CountermeasuresGame developers try to stop cheating / modifications Frustrates players, players leave (money is lost) Arms race between cheaters & devsExamples: Client data file checksums Compare checksums with server Keep files in open state (change kernel behavior to circumvent)CountermeasuresEmploy additional anti-cheat software (Spyware?!) PunkBuster (EA, Activision, Ubisoft,...) Memory scanning Status reports Screenshots of players screen Check players settings, search across all players Hardware bans (HD id is banned)  Additional attack surface Anticheat itself can be target of exploits Ban Stats for Battlefield 3 - http://www.pbbans.com/mbi-latest50-bf3-lfb41.html[...] the Warden pokes around into other processes, doing things like reading the window text in the title bar of every window and doing a scan of the code loaded for every process running on your computer (which it then compares against known cheat code). [...] nothing is really stopping the company from doing whatever it wants on a gamer's PC, and it has already crossed the invisible line by poking around outside the game's process area. We don't trust them. Countermeasures: The WardenBlizzards anti-cheat (WoW, SC2, DIablo III, etc.) G. Hoglund and G. McGraw. Exploiting online games:cheating massively distributed systems. 2007.Consent to Monitor.WHEN RUNNING, THE GAME MAY MONITOR YOUR COMPUTER'S RANDOM ACCESS MEMORY (RAM) FOR UNAUTHORIZED THIRD PARTY PROGRAMS RUNNING CONCURRENTLY WITH THE GAME. [...] IN THE EVENT THAT THE GAME DETECTS AN UNAUTHORIZED THIRD PARTY PROGRAM, THE GAME MAY (a) COMMUNICATE INFORMATION BACK TO BLIZZARD, INCLUDING WITHOUT LIMITATION YOUR ACCOUNT NAME, DETAILS ABOUT THE UNAUTHORIZED THIRD PARTY PROGRAM DETECTED, AND THE TIME AND DATE; AND/OR (b) EXERCISE ANY OR ALL OF ITS RIGHTS UNDER THIS AGREEMENT, WITH OR WITHOUT PRIOR NOTICE TO THE USER.Diablo III EULAYou have to agree to this (or not play) http://us.blizzard.com/en-us/company/legal/d3_eula.htmlCountermeasures: The WardenBlizzards Anticheat (WoW, SC2, DIablo III, etc.)DiscussionPunkBusterPrivacyHeat map visualizationThe WardenCheat EngineMemoryProxyCountermeasuresSolitaireBotsMacrosBinary PatchingCheatingMoralityArms race ChecksumsMaphackHardware bans Bursztein, E.; Hamburg, M.; Lagarenne, J.; Boneh, D., "OpenConflict: Preventing Real Time Map Hacks in Online Games" Security and Privacy (SP), 2011 IEEE Symposium on. Available at: http://crypto.stanford.edu/~dabo/pubs/papers/onlinegames.pdf G. Hoglund and G. McGraw. Exploiting online games: cheating massively distributed systems. 2007. Elie Bursztein, Jocelyn Lagarenne. Stanford University. Kartograph: Anatomy of a Maphack. Defcon 18. Retrieved from https://www.youtube.com/watch?v=mFprkIAeKgM. Slides available at: http://www.defcon.org/images/defcon-18/dc-18-presentations/Burszstein-Lagarenne/DEFCON-18-Bursztein-Lagarenne-Kartograph.pdf Bruce Potter, Logan Lodge. Living with Game Servers. DEFCON 17. 2009. Retrieved from https://www.youtube.com/watch?v=SooVvF9qO_k Loc Hoguin. Reverse-Engineering A Proprietary Game Server With Erlang. EUC 2012. Retrieved from http://ninenines.eu/talks/reverse-engineering/reverse-engineering.htmlReferences
View more >
A Metallurgist Looks at Reverse Engineering ?· A METALLURGIST LOOKS AT REVERSE ENGINEERING Terry Khaled,…
COMPUTER AIDED REVERSE ENGINEERING SYSTEM Gh.pdfcomputer aided reverse engineering system used for customized products ... configured computer aided reverse engineering system ... • geomagic studio
Accordion - SoliTaire! ??2018-01-05Accordion is one of over 70 Free Solitaire Games Online at SoliTaire Network. Be playing Accordion Solitaire in 10 Seconds!