Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Piracy & Security

Piracy & Security

This is a talk I gave as part of the Chartboost University program, on the fundamentals of security and piracy prevention. The audience was mainly game developers.

Kenneth Ballenegger

March 18, 2013
Tweet

More Decks by Kenneth Ballenegger

Other Decks in Programming

Transcript

  1. obfuscate #define checkRegistration _cRfn - (void)awakeFromNib { [self checkRegistration]; }

    - (BOOL)checkRegistration { // important registration code goes here... } // the compiler sees: - (void)awakeFromNib { [self _cRfn]; } - (BOOL)_cRfn { // important registration code goes here... }
  2. obfuscate char secret_key_obfuscated[] = “): qyebj byyru”; size_t key_size =

    sizeof(secret_key_obfuscated) - 1; char secret_key[key_size]; for (size_t i = 0; i < key_size; i++) { char c = secret_key_obfuscated[key_size - 1 - i]; if ((c>=‘a’ && c<=‘m’) || (c>=‘A’ && c<=‘M’)) c += 13; if ((c>=‘a’ && c<=‘m’) || (c>=‘A’ && c<=‘M’)) c -= 13; secret_key[i] = c; } //=> secret_key is now “hello world :)”
  3. Q&A