SlideShare a Scribd company logo
1 of 26
Download to read offline
dwangoAC
TASBot
the perfectionist
The amazing life & achievements of...The amazing life & achievements of...
Agenda
● Intro to Speedrunning video games, Tool-Assisted Speedruns, and Emulators
● TASBot: Playing back a TAS on real hardware
● TAS techniques, history, evolution
● Emulator tools - memory search, Lua scripting
● Beyond emulators - disassemblers and Binary Ninja
● Remaining limitations - emulator differences, inaccuracies
● Key point: TAS tools are like really fun penetration testing tools
● Interactive demo of Pokemon Red, Q&A
Speedrunning - playing games fast
● Inspired in part by in-game completion timers (Metroid)
● Many categories, ranging from "any%" to "low% no major glitches"
● SpeedDemosArchive.com and others track fastest completion times
● Strict rules and peer review ensure no cheats or macros are employed
● Highly entertaining, especially for a game you've played normally
Speedrunning
records verified
from video
captures or live
at GDQ events
Even beyond
standard limits:
blindfolded,
1-handed...
Tool-Assisted Speedruns: playing games even faster
● Also called Tool-Assisted Superplays, used as a noun or verb as TAS, TASing, TAS’ed, etc.
● Early TAS’s were usually made with tools built in to specific PC games (Doom, Quake)
● By the late 90’s, Doom Done Quick was well known, beating the game in 19:41
Tool-Assisted Speedruns (TAS)
● Tool-Assisted Speedruns push the limits of the hardware and game rather than the human
● Emulator tools include saving / loading game states, frame advance, and scripting
● Movie files deterministically record every button press for later playback
● Let's be honest, it's basically the Doped Olympics, with no rules
○ Bad idea when it comes to humans, but a lot of fun when beating games
○ A 2003 run of SMB3 by Morimoto was unlabeled, causing much controversy
● TASVideos.org formed by Bisqwit, now hosts runs for many platforms
by Morimoto
● Live demo: TASBot playing back a movie of SMB3 on real hardware
● Explanations forthcoming while TASBot happily mimics a real controller
What, a live demo already?
Rerecording enabled video game emulators and frameworks
● TAS techniques are enabled by emulators of video game consoles
○ FCEUX (NES), lsnes (SNES), VBA (Game Boy), BizHawk (multiple platforms)
● Some platforms, such as Windows, have rerecording frameworks
○ Hourglass, specialized projects like nethack-tas-tools
● Some emulators are very accurate, with scripting and memory search tools
Emulation accuracy has improved over time
● Early emulators were highly inaccurate, often unusably so
● Emulation accuracy was improved through clean room reverse engineering
○ OK, sometimes using not-so-clean techniques and stolen manuals
● Some took emulation accuracy to extreme levels (Byuu) at the cost of
usability
● This obsession allows movie files to match actual hardware, frame for frame
"Console verification", all without voiding any (long expired) warranties
● In 2009, true of TASVideos.org used a PIC microcontroller to press NES buttons
● By 2011, micro500 built his NESBot and demonstrated the first replay of SMB1
○ DarkKobold used an NESBot at SGDQ 2011 showing SMB2 and Wizards and Warriors 3
● Through 2012, devices for other consoles were added, such as Genesis and N64
● I (as dwangoAC) pitched TAS's for AGDQ 2014 resulting in true making a new device
○ I combined a board with a R.O.B. using Legos and others named him TASBot
Console verification devices over time
● 2011
○ NESBot from micro500 - original Instructable, breadboard design
○ Droid64bot from SoulCal - first 3D console verification
● 2012
○ N64 bot from micro500
● 2013
○ SNES and Genesis Arduino bot from GhostSonic
○ NES/SNES replay device from true - streaming capable and inexpensive but slow
○ Multireplay device from true - self-contained device, faster datatarates
● 2015
○ Game Boy Player Player from endrift - used for GBA games on a GameCube
● 2016
○ TASLink - FPGA based, expensive, but very flexible and fast
● Effectively like having total control; the game becomes a playground
Arbitrary Code Execution / Exploit
OK, what the heck did I just see?
● The tools that allow us to beat games quickly also allow us to glitch them
● Sometimes we can make games execute opcodes of our choosing
● Doing so requires delving deeper into TAS tools
Advanced emulator tools: Memory searching, Lua scripting, disassembly
● Search tools combined with frame advance and savestates can be very
powerful
● Find Mario's speed: Save a state, reset memory search, run forward
○ By eliminating values that don't increment you can find the correct address
● Disassembly of RAM or ROM can tell you what will happen if it is triggered
○ Dissassemblers range in ability and level of integration but are very helpful
Binary Ninja: Adding Reverse Engineering to the TASing toolbelt
● Recent tool focused on Reverse Engineering like IDA but more flexible
● Graph view visual representation with low level IL and annotation support
● Python scripting comes with NES support and ability to add new mappers
● Still in beta, future versions will add advanced searching and multi-module UI
From boot to ending in 16 frames by changing input
every other poll, eventually executing the controller
addresses as opcodes and jumping to the end credits
AGDQ 2016: Brain Age
SGDQ 2016
SMB1+2+3+Lost Levels simultaneously
Visual memory
editor
The tools and terminology in making a TAS translate to security research
● Vernacular differences abound, but the principles are the same
○ Savestate = VM snapshot
○ Frame advance = VM CPU tick
○ Glitch = Vulnerability
○ Total Control = Pwned / Arbitrary Control Exploit / root exploit (if consoles had such a concept)
● Learning how to make a TAS can be a fun and educational experience
Anatomy of a complex Arbitrary Code Execution
● Pokemon Red can be compromised in a very unique way
● Values in the controller register treated as opcodes allow taking over SGB
● Once full access to SNES is gained, anything is possible
References, thanks, and bibliography
- http://tasvideos.org/TASBot.html - history of TASBot / historical information on how I organized teams of people to participate at
Games Done Quick events, ultimately helping raise over $234k for charity and presenting in front of nearly 200,000 live viewers
- http://arstechnica.com/gaming/2014/01/how-an-emulator-fueled-robot-reprogrammed-super-mario-world-on-the-fly/ - This is the first
presentation I gave at a Games Done Quick event; this initial exploit caused TASBot to become a known name in the community
- http://arstechnica.com/gaming/2015/01/pokemon-plays-twitch-how-a-robot-got-irc-running-on-an-unmodified-snes/ - This was quite
possibly the most difficult (and arguably impressive) feat to date
- https://www.alchemistowl.org/pocorgtfo/pocorgtfo10.pdf page 6 - Pokemon Plays Twitch: This journal article written by myself as well
as the author of the lsnes emulator and the author of the chat payload
- http://arstechnica.com/gaming/2016/07/how-to-beat-super-mario-bros-3-in-less-than-a-second/ - Details on the 16-frame SMB3
completion
The antics described in this talk would not have been possible without the help of a very, very long list of talented TAS’ers and hackers
both from TASVideos.org and elsewhere, including: micro500 - co-presenter, Ilari - Emulator coder, p4plus2 - payload author,
Masterjun - TAS glitchfinder, true - hardware dev, TheAxeMan - Python script support, ais523 - Mathematician, pretty much everyone
in #tasvideos, and a long list of others I’m forgetting as I always seem to do whenever I’m thanking people. Thanks also goes to the
staff of Games Done Quick for organizing an awesome event and giving us a reason to do all the crazy things we do.
Questions?
Presented and written
by Allan Cecil (AKA
dwangoAC)

More Related Content

Similar to DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist

Supersize your production pipe enjmin 2013 v1.1 hd
Supersize your production pipe    enjmin 2013 v1.1 hdSupersize your production pipe    enjmin 2013 v1.1 hd
Supersize your production pipe enjmin 2013 v1.1 hd
slantsixgames
 
Chrome game programming_with_for_play
Chrome game programming_with_for_playChrome game programming_with_for_play
Chrome game programming_with_for_play
firenze-gtug
 
Chrome game programming_with_for_play
Chrome game programming_with_for_playChrome game programming_with_for_play
Chrome game programming_with_for_play
firenze-gtug
 

Similar to DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist (20)

Castle Game Engine and the joy of making and using a custom game engine
Castle Game Engine and the joy  of making and using a custom game engineCastle Game Engine and the joy  of making and using a custom game engine
Castle Game Engine and the joy of making and using a custom game engine
 
TASBot - the perfectionist
TASBot - the perfectionistTASBot - the perfectionist
TASBot - the perfectionist
 
Building Multiplayer Games (w/ Unity)
Building Multiplayer Games (w/ Unity)Building Multiplayer Games (w/ Unity)
Building Multiplayer Games (w/ Unity)
 
Supersize your production pipe enjmin 2013 v1.1 hd
Supersize your production pipe    enjmin 2013 v1.1 hdSupersize your production pipe    enjmin 2013 v1.1 hd
Supersize your production pipe enjmin 2013 v1.1 hd
 
Confrontation Pipeline and SCons
Confrontation Pipeline and SConsConfrontation Pipeline and SCons
Confrontation Pipeline and SCons
 
How hard can it be - Ui development at keen games
How hard can it be - Ui development at keen gamesHow hard can it be - Ui development at keen games
How hard can it be - Ui development at keen games
 
Improving iteration times through the reloading of code and data
Improving iteration times through the reloading of code and dataImproving iteration times through the reloading of code and data
Improving iteration times through the reloading of code and data
 
Making A Game Engine Is Easier Than You Think
Making A Game Engine Is Easier Than You ThinkMaking A Game Engine Is Easier Than You Think
Making A Game Engine Is Easier Than You Think
 
Supersize Your Production Pipe
Supersize Your Production PipeSupersize Your Production Pipe
Supersize Your Production Pipe
 
Html5 Game Development with Canvas
Html5 Game Development with CanvasHtml5 Game Development with Canvas
Html5 Game Development with Canvas
 
Hacking for salone: drone races
Hacking for salone: drone racesHacking for salone: drone races
Hacking for salone: drone races
 
Console development
Console developmentConsole development
Console development
 
The internet of $h1t
The internet of $h1tThe internet of $h1t
The internet of $h1t
 
Real Time Realitites
Real Time RealititesReal Time Realitites
Real Time Realitites
 
Chrome game programming_with_for_play
Chrome game programming_with_for_playChrome game programming_with_for_play
Chrome game programming_with_for_play
 
Chrome game programming_with_for_play
Chrome game programming_with_for_playChrome game programming_with_for_play
Chrome game programming_with_for_play
 
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016
 
Овчаренко Євген “Відеоігри це ефективність”
Овчаренко Євген “Відеоігри це ефективність”Овчаренко Євген “Відеоігри це ефективність”
Овчаренко Євген “Відеоігри це ефективність”
 
Using FireMonkey as a game engine
Using FireMonkey as a game engineUsing FireMonkey as a game engine
Using FireMonkey as a game engine
 
Introduction to Procedural Contents Generation
Introduction to Procedural Contents GenerationIntroduction to Procedural Contents Generation
Introduction to Procedural Contents Generation
 

More from Felipe Prado

More from Felipe Prado (20)

DEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directory
DEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directoryDEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directory
DEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directory
 
DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...
DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...
DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...
 
DEF CON 24 - Tamas Szakaly - help i got ants
DEF CON 24 - Tamas Szakaly - help i got antsDEF CON 24 - Tamas Szakaly - help i got ants
DEF CON 24 - Tamas Szakaly - help i got ants
 
DEF CON 24 - Ladar Levison - compelled decryption
DEF CON 24 - Ladar Levison - compelled decryptionDEF CON 24 - Ladar Levison - compelled decryption
DEF CON 24 - Ladar Levison - compelled decryption
 
DEF CON 24 - Clarence Chio - machine duping 101
DEF CON 24 - Clarence Chio - machine duping 101DEF CON 24 - Clarence Chio - machine duping 101
DEF CON 24 - Clarence Chio - machine duping 101
 
DEF CON 24 - Chris Rock - how to overthrow a government
DEF CON 24 - Chris Rock - how to overthrow a governmentDEF CON 24 - Chris Rock - how to overthrow a government
DEF CON 24 - Chris Rock - how to overthrow a government
 
DEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardware
DEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardwareDEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardware
DEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardware
 
DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...
DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...
DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...
 
DEF CON 24 - Jay Beale and Larry Pesce - phishing without frustration
DEF CON 24 - Jay Beale and Larry Pesce - phishing without frustrationDEF CON 24 - Jay Beale and Larry Pesce - phishing without frustration
DEF CON 24 - Jay Beale and Larry Pesce - phishing without frustration
 
DEF CON 24 - Gorenc Sands - hacker machine interface
DEF CON 24 - Gorenc Sands - hacker machine interfaceDEF CON 24 - Gorenc Sands - hacker machine interface
DEF CON 24 - Gorenc Sands - hacker machine interface
 
DEF CON 24 - Rose and Ramsey - picking bluetooth low energy locks
DEF CON 24 - Rose and Ramsey - picking bluetooth low energy locksDEF CON 24 - Rose and Ramsey - picking bluetooth low energy locks
DEF CON 24 - Rose and Ramsey - picking bluetooth low energy locks
 
DEF CON 24 - Rich Mogull - pragmatic cloud security
DEF CON 24 - Rich Mogull - pragmatic cloud securityDEF CON 24 - Rich Mogull - pragmatic cloud security
DEF CON 24 - Rich Mogull - pragmatic cloud security
 
DEF CON 24 - Grant Bugher - Bypassing captive portals
DEF CON 24 - Grant Bugher - Bypassing captive portalsDEF CON 24 - Grant Bugher - Bypassing captive portals
DEF CON 24 - Grant Bugher - Bypassing captive portals
 
DEF CON 24 - Patrick Wardle - 99 problems little snitch
DEF CON 24 - Patrick Wardle - 99 problems little snitchDEF CON 24 - Patrick Wardle - 99 problems little snitch
DEF CON 24 - Patrick Wardle - 99 problems little snitch
 
DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...
DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...
DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...
 
DEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucks
DEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucksDEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucks
DEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucks
 
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
DEF CON 24 - Dinesh and Shetty - practical android application exploitationDEF CON 24 - Dinesh and Shetty - practical android application exploitation
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
 
DEF CON 24 - Klijnsma and Tentler - stargate pivoting through vnc
DEF CON 24 - Klijnsma and Tentler - stargate pivoting through vncDEF CON 24 - Klijnsma and Tentler - stargate pivoting through vnc
DEF CON 24 - Klijnsma and Tentler - stargate pivoting through vnc
 
DEF CON 24 - Antonio Joseph - fuzzing android devices
DEF CON 24 - Antonio Joseph - fuzzing android devicesDEF CON 24 - Antonio Joseph - fuzzing android devices
DEF CON 24 - Antonio Joseph - fuzzing android devices
 
DEF CON 24 - workshop - Craig Young - brainwashing embedded systems
DEF CON 24 - workshop - Craig Young - brainwashing embedded systemsDEF CON 24 - workshop - Craig Young - brainwashing embedded systems
DEF CON 24 - workshop - Craig Young - brainwashing embedded systems
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist

  • 1. dwangoAC TASBot the perfectionist The amazing life & achievements of...The amazing life & achievements of...
  • 2. Agenda ● Intro to Speedrunning video games, Tool-Assisted Speedruns, and Emulators ● TASBot: Playing back a TAS on real hardware ● TAS techniques, history, evolution ● Emulator tools - memory search, Lua scripting ● Beyond emulators - disassemblers and Binary Ninja ● Remaining limitations - emulator differences, inaccuracies ● Key point: TAS tools are like really fun penetration testing tools ● Interactive demo of Pokemon Red, Q&A
  • 3. Speedrunning - playing games fast ● Inspired in part by in-game completion timers (Metroid) ● Many categories, ranging from "any%" to "low% no major glitches" ● SpeedDemosArchive.com and others track fastest completion times ● Strict rules and peer review ensure no cheats or macros are employed ● Highly entertaining, especially for a game you've played normally
  • 6. Tool-Assisted Speedruns: playing games even faster ● Also called Tool-Assisted Superplays, used as a noun or verb as TAS, TASing, TAS’ed, etc. ● Early TAS’s were usually made with tools built in to specific PC games (Doom, Quake) ● By the late 90’s, Doom Done Quick was well known, beating the game in 19:41
  • 7. Tool-Assisted Speedruns (TAS) ● Tool-Assisted Speedruns push the limits of the hardware and game rather than the human ● Emulator tools include saving / loading game states, frame advance, and scripting ● Movie files deterministically record every button press for later playback ● Let's be honest, it's basically the Doped Olympics, with no rules ○ Bad idea when it comes to humans, but a lot of fun when beating games ○ A 2003 run of SMB3 by Morimoto was unlabeled, causing much controversy ● TASVideos.org formed by Bisqwit, now hosts runs for many platforms
  • 9. ● Live demo: TASBot playing back a movie of SMB3 on real hardware ● Explanations forthcoming while TASBot happily mimics a real controller What, a live demo already?
  • 10. Rerecording enabled video game emulators and frameworks ● TAS techniques are enabled by emulators of video game consoles ○ FCEUX (NES), lsnes (SNES), VBA (Game Boy), BizHawk (multiple platforms) ● Some platforms, such as Windows, have rerecording frameworks ○ Hourglass, specialized projects like nethack-tas-tools ● Some emulators are very accurate, with scripting and memory search tools
  • 11. Emulation accuracy has improved over time ● Early emulators were highly inaccurate, often unusably so ● Emulation accuracy was improved through clean room reverse engineering ○ OK, sometimes using not-so-clean techniques and stolen manuals ● Some took emulation accuracy to extreme levels (Byuu) at the cost of usability ● This obsession allows movie files to match actual hardware, frame for frame
  • 12. "Console verification", all without voiding any (long expired) warranties ● In 2009, true of TASVideos.org used a PIC microcontroller to press NES buttons ● By 2011, micro500 built his NESBot and demonstrated the first replay of SMB1 ○ DarkKobold used an NESBot at SGDQ 2011 showing SMB2 and Wizards and Warriors 3 ● Through 2012, devices for other consoles were added, such as Genesis and N64 ● I (as dwangoAC) pitched TAS's for AGDQ 2014 resulting in true making a new device ○ I combined a board with a R.O.B. using Legos and others named him TASBot
  • 13. Console verification devices over time ● 2011 ○ NESBot from micro500 - original Instructable, breadboard design ○ Droid64bot from SoulCal - first 3D console verification ● 2012 ○ N64 bot from micro500 ● 2013 ○ SNES and Genesis Arduino bot from GhostSonic ○ NES/SNES replay device from true - streaming capable and inexpensive but slow ○ Multireplay device from true - self-contained device, faster datatarates ● 2015 ○ Game Boy Player Player from endrift - used for GBA games on a GameCube ● 2016 ○ TASLink - FPGA based, expensive, but very flexible and fast
  • 14.
  • 15. ● Effectively like having total control; the game becomes a playground Arbitrary Code Execution / Exploit
  • 16. OK, what the heck did I just see? ● The tools that allow us to beat games quickly also allow us to glitch them ● Sometimes we can make games execute opcodes of our choosing ● Doing so requires delving deeper into TAS tools
  • 17. Advanced emulator tools: Memory searching, Lua scripting, disassembly ● Search tools combined with frame advance and savestates can be very powerful ● Find Mario's speed: Save a state, reset memory search, run forward ○ By eliminating values that don't increment you can find the correct address ● Disassembly of RAM or ROM can tell you what will happen if it is triggered ○ Dissassemblers range in ability and level of integration but are very helpful
  • 18. Binary Ninja: Adding Reverse Engineering to the TASing toolbelt ● Recent tool focused on Reverse Engineering like IDA but more flexible ● Graph view visual representation with low level IL and annotation support ● Python scripting comes with NES support and ability to add new mappers ● Still in beta, future versions will add advanced searching and multi-module UI
  • 19. From boot to ending in 16 frames by changing input every other poll, eventually executing the controller addresses as opcodes and jumping to the end credits
  • 20. AGDQ 2016: Brain Age SGDQ 2016 SMB1+2+3+Lost Levels simultaneously Visual memory editor
  • 21. The tools and terminology in making a TAS translate to security research ● Vernacular differences abound, but the principles are the same ○ Savestate = VM snapshot ○ Frame advance = VM CPU tick ○ Glitch = Vulnerability ○ Total Control = Pwned / Arbitrary Control Exploit / root exploit (if consoles had such a concept) ● Learning how to make a TAS can be a fun and educational experience
  • 22. Anatomy of a complex Arbitrary Code Execution ● Pokemon Red can be compromised in a very unique way ● Values in the controller register treated as opcodes allow taking over SGB ● Once full access to SNES is gained, anything is possible
  • 23.
  • 24.
  • 25. References, thanks, and bibliography - http://tasvideos.org/TASBot.html - history of TASBot / historical information on how I organized teams of people to participate at Games Done Quick events, ultimately helping raise over $234k for charity and presenting in front of nearly 200,000 live viewers - http://arstechnica.com/gaming/2014/01/how-an-emulator-fueled-robot-reprogrammed-super-mario-world-on-the-fly/ - This is the first presentation I gave at a Games Done Quick event; this initial exploit caused TASBot to become a known name in the community - http://arstechnica.com/gaming/2015/01/pokemon-plays-twitch-how-a-robot-got-irc-running-on-an-unmodified-snes/ - This was quite possibly the most difficult (and arguably impressive) feat to date - https://www.alchemistowl.org/pocorgtfo/pocorgtfo10.pdf page 6 - Pokemon Plays Twitch: This journal article written by myself as well as the author of the lsnes emulator and the author of the chat payload - http://arstechnica.com/gaming/2016/07/how-to-beat-super-mario-bros-3-in-less-than-a-second/ - Details on the 16-frame SMB3 completion The antics described in this talk would not have been possible without the help of a very, very long list of talented TAS’ers and hackers both from TASVideos.org and elsewhere, including: micro500 - co-presenter, Ilari - Emulator coder, p4plus2 - payload author, Masterjun - TAS glitchfinder, true - hardware dev, TheAxeMan - Python script support, ais523 - Mathematician, pretty much everyone in #tasvideos, and a long list of others I’m forgetting as I always seem to do whenever I’m thanking people. Thanks also goes to the staff of Games Done Quick for organizing an awesome event and giving us a reason to do all the crazy things we do.
  • 26. Questions? Presented and written by Allan Cecil (AKA dwangoAC)