Reverse-engineering a proprietary game server with Erlang

Erlang, the fear of game developers...

Loïc Hoguin - @lhoguin

Erlang Cowboy and Nine Nines Founder

Background

Why reverse-engineer?

Frowned upon

Anticheat technology

Windows

Phantasy Star Universe (PSU)

Packet logging

Undetected logging

Breaking through PSU's SSL

Tee

Proxy hint

Packet analysis

Protocol

Spreadsheet help

Aggregate the field values

Game mechanics

Extracting files

What files?

File extraction

Files analysis

Client files too

Start with a debugger

Step by step

Concurrent extraction

Continue with an hex editor

File parser

Concurrently check our assumptions

Prototype server

Validating protocol assumptions

PSU's protocols

First implementation

Trial and error

Trial and error

In-game

Responses

Shell testing

Warping is good

Feedback loop

Lengthy process

Reloading

Don't crash in the network layer

Still trial and error

Demo

Questions?