What is MGO? ●Metal Gear o A bipedal nuclear-equipped tank ●Online o Controlled by or connected to a network. ●Metal Gear Online o A bipedal nuclear tank.

Slides:



Advertisements
Similar presentations
Chapter 6 Server-side Programming: Java Servlets
Advertisements

Sockets and Services CS-480b Dick Steflik. Evaluating Socket Based Services How complex is the service? How might the service be abused? What information.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Dynamic DNS. 2 Module - Dynamic DNS ♦ Overview The domain names and IP addresses of hosts and the devices may change for many reasons. This module focuses.
PPPoE Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Reverse Engineering Dead Protocols
What is EAP EAP stands for Extensible Authentication Protocol. Offers a basic framework for authentication. Many different authentication protocols can.
1 MD5 Cracking One way hash. Used in online passwords and file verification.
An Engineering Approach to Computer Networking
CSCI 4550/8556 Computer Networks Comer, Chapter 3: Network Programming and Applications.
Georgy Melamed Eran Stiller
Chapter 23: ARP, ICMP, DHCP IS333 Spring 2015.
Ch. 31 Q and A CS332 Spring Network management more than just Ethernet Q: Comer mentions that network managers need to be able to account for different.
FIREWALL TECHNOLOGIES Tahani al jehani. Firewall benefits  A firewall functions as a choke point – all traffic in and out must pass through this single.
 It defines the format of the frame to be exchanged between devices.  It defines how two devices can negotiate the establishment of the link and the.
RFC6520 defines SSL Heartbeats - What are they? 1. SSL Heartbeats are used to keep a connection alive without the need to constantly renegotiate the SSL.
21.1 Chapter 21 Network Layer: Address Mapping, Error Reporting, and Multicasting Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 9 Internet Control Message.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
March 7, 2005MOBIKE WG, IETF 621 Mobility Protocol Options for IKEv2 (MOPO-IKE) Pasi Eronen.
Section 2.2 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
_______________________________________________________________________________________________________________ PHP Bible, 2 nd Edition1  Wiley and the.
Application Block Diagram III. SOFTWARE PLATFORM Figure above shows a network protocol stack for a computer that connects to an Ethernet network and.
Integrating and Troubleshooting Citrix Access Gateway.
Security, NATs and Firewalls Ingate Systems. Basics of SIP Security.
Lectu re 1 Recap: “Operational” view of Internet r Internet: “network of networks” m Requires sending, receiving of messages r protocols control sending,
COS 461 Recitation 7 Remote Procedure Calls. Let’s Look at Layers Again.
Presented by Rebecca Meinhold But How Does the Internet Work?
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 19 Domain Name System (DNS)
DNS Cache Poisoning. History 1993 – DNS protocol allowed attacker to inject false data which was then cached 1997 – BIND 16-bit transaction ids not randomized,
1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Dynamic Host Configuration Protocol (DHCP)
Security fundamentals Topic 10 Securing the network perimeter.
S O A P ‘the protocol formerly known as Simple Object Access Protocol’ Team Pluto Bonnie, Brandon, George, Hojun.
Firewalls Original slides prepared by Theo Benson.
ICM – API Server & Forms Gary Ratcliffe.
@packetjay Fun and games until someone uses IPv6 or TCP.
Updates made to latest draft since Herndon Sony Corporation Toshiaki Kojima.
Connection Technologies and IP Addressing CONNECTING TO THE INTERNET.
Network Layer: Address Mapping, Error Reporting, and Multicasting
An Analysis of Using Reflectors for Distributed Denial-of- Service Attacks Paper by Vern Paxson.
LSNDI RMRA 1 Design and troubleshooting M Clements.
Role of Router. The Router as a Perimeter Device  Usually the main function of a router is considered as the forwarding of packets between two network.
Role Of Network IDS in Network Perimeter Defense.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
Ben - Gurion University Department Of Communication Systems Engineering DNS For Cell Phones Yoav Peer, Eugene Volchek Instructor: Dr. Chen Avin.
Process-to-Process Delivery:
Monitoring Dynamic IOC Installations Using the alive Record Dohn Arms Beamline Controls & Data Acquisition Group Advanced Photon Source.
Chapter 7: Using Network Clients The Complete Guide To Linux System Administration.
Week-7 (Lecture-1) Internet Protocols: TCP/IP, Client Server: Protocol: Specification in networking and Communications It defines the procedures to be.
IST 201 Chapter 11 Lecture 2. Ports Used by TCP & UDP Keep track of different types of transmissions crossing the network simultaneously. Combination.
Security fundamentals
The Transport Layer Implementation Services Functions Protocols
Original slides prepared by Theo Benson
CITA 352 Chapter 5 Port Scanning.
z/Ware 2.0 Technical Overview
What is MGO? Metal Gear Online Metal Gear Online
Introduction to Networking
Internet Control Message Protocol (ICMP)
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
WEB API.
Internet Control Message Protocol (ICMP)
Chat Refs: RFC 1459 (IRC).
Internet Control Message Protocol Version 4 (ICMPv4)
Process-to-Process Delivery:
Firewalls Routers, Switches, Hubs VPNs
Unit 32 Every class minute counts! 2 assignments 3 tasks/assignment
Process-to-Process Delivery: UDP, TCP
Presentation transcript:

What is MGO? ●Metal Gear o A bipedal nuclear-equipped tank ●Online o Controlled by or connected to a network. ●Metal Gear Online o A bipedal nuclear tank controlled by the internet

Cyber Necromancy: Reverse Engineering Dead Protocols

●Matthew Halchyshak o Security Technician for Security Innovation

Warning ●Not development ●Not exploitation ●Just a cool project to revive a video game

Problems ●Servers are down o Minimal Packet Capture o No LAN Play ●PS2 (mips32) o No debugging interface o PCSX2 Memory Dumps ●PS3 (Cell BE) o Removed with official update o Requires a custom firmware

High-level Overview 1.Redirect traffic to our controlled server 2.Implement handlers for known protocols o HTTP o STUN o etc. 3.Implement unknown game protocol

Traffic Redirection ●Patching o Distribution? ●Buy the domains o Still owned ●Custom DNS

Dynamic Network Authentication ●Prevent cheating and piracy online o Bypass for piracy is old o Bypass for games no longer online is not ●Google is your friend o Sony SDK o DNAS Documentation

Dynamic Network Authentication ●Failure o Never managed to recreate DNAS ●“NewDNASConnect” o Found this string, lead to a function o What happens when you return 0 from it?

Dynamic Network Authentication ●Binary Patching o Reproduction and distribution? o Packed binaries ●Cheat Devices o Inject a small bit of code into a game  Code allows overwriting 4 bytes of memory at a time o Less than ideal but it works  Other games have not needed this

“Cheats” ●C ●2036b1e ●2036b1ec 03e00008 ●2036b1f

“Cheats” ●Format o First Character represented the type of cheat  Caaaaaaa bbbbbbbb ●if 0x8aaaaaaa == 0xbbbbbbbb  2aaaaaaa bbbbbbbb ●Overwrite 0x8aaaaaaa o Many types of codes

Reversing the Protocol

●Packets! Packets! Packets! ●Cannot get packets if the server is dead ●Examine and compare everything

Client Packets

Reversing the Protocol ●No NULL bytes ●..Zp comes up often

And it’s XOR…

Reversing the Protocol ●c022b8e51bd997c3baf6a587ba395d8f ●f252244cd1f91de6baffa2ad93f4a1f8 ●7eb97a d5685c0c100dfa3c7 ●f252244cd1f91de6baffa2ad93f4a1f8 ●Look familiar? o MD5 (Header + Payload)

Reversing the Protocol ●Header (8 bytes) o Command Identifier (2 bytes) o Payload Length (2 bytes) o Sequence (4 bytes) ●Hash (16 bytes) ●Payload?

Response Payloads

The Ideal Way ●Packet Captures o Replay and experiment o Matter of determining transformation

Experimentation ●Changed visible names ●Changed IPs and setup listeners ●Changed Unknown value to [A-E] o Hopefully its visible in some way

That was easy

The Harder Way ●No packet capture

Determining the Payloads ●Are there are commonalities that run through the payloads. o Is there are structure to the payloads?  XML? JSON? SOAP? Custom? o Cryptography  Automatic.Identification.of.Cryptographic.Primitiv es.in.Software.pdf Automatic.Identification.of.Cryptographic.Primitiv es.in.Software.pdf

Determining the Payloads ●Experimentation o First 4 bytes are a result code  0x = Success (normally)  Anything else is displayed back to user o Error only display IFF Command id is correct o Server’s response is usually +1 of request

Determining the Payloads ●Guess Work o Blank  User Settings o NULL (0x00)  Create Game - first half o ‘0’ (0x30)  HTTP API o Success (0x )  ‘Worked’ but doesn’t do what it should o Something else?

Exploring Items

Exploring Items

Exploring Items

Exploring Items

Exploring Items

Exploring Items

Exploring Items

●Slow and tedious but not too difficult

Complex Payloads ●Packets? Nope. ●Easily Guessable? Nope.

Friends List ●Exhausted simple cases ●Random payloads revealed nothing

Join Game ●Packets? No. Easily Guessable? Nope. ●Anything similar? Nope.

Join Game ●Step 1 o 0x Game Data o Same request is made for ‘Host Information’  Used Host Information to determine response

Join Game ●Step 2 o 0x Player Stats  Requests information about the host’s ingame stats

Join Game ●Static Analysis o ELF is packed o No official debugging functionality  Emulator memory dump

Join Game ●Finding the code path o Nearby strings  None o Magic Numbers  0x4103  XOR Code

Join Game

●Function has several calls of the form o jal -- function call o bne v branch if return not 0  Repeat about 15 times

Join Game ●Two Options o Follow code path and determine where it fails  NOP the check (Patch)  Determine what data would make it pass ●Complicated payloads o Expects data for 0x4104 and 0x4105 ●Ultimately patched

Join Game ●Past Requests o Game Information o Player Information o Host Stats -- patched o now 0x4320?

Join Game ●External Resources o Google is your friend o Other online games  Pro Evolution Soccer  Metal Gear Online 2 ● Had this particular packet

Join Game ●Client sends data over UDP to Host ●Unexpectedly host sends 0x4340

0x4340 ●No error message o Host stops responding to client UDP ●Request Payload o Joining Player Id

0x4340

●Found 4341 handler in memory dump ●Function makes a lot of calls but doesn’t check return values o Only reads 4 bytes from payload

0x4340

0x4341 ●Structure o Success Code - 4 bytes o Player Id - 4 bytes

Success!

What’s next?

Conclusion

Warnings ●A lot of work o Protocol and Server emulation took about 10 months o More than 80 commands. o Headaches and frustration o Not a lot of existing reference material ●People are crazy o Trolls and complaints about not being done yet ●Copyrights and DMCA o DMCA exception for interoperability o Terms of Service

Credits ●GhzGangster (Derrik Touve) ●Zak o ●Mohamed Saher o o ●Wtfareuthinking1 ●Jayveer

Useful tools ●Used public IDA scripts to parse PS3 ELF ○ ○Revealed SDK functions and references ○More analysis in general than PS2

Questions? ●Matthew Halchyshak o ●Joseph Tartaro o