hn-classics/_stories/2001/8856371.md

21 KiB
Raw Permalink Blame History

created_at title url author points story_text comment_text num_comments story_id story_title story_url parent_id created_at_i _tags objectID year
2015-01-08T14:06:26.000Z Keeping the Pirates at Bay Copy and Crack Protection (2001) http://www.gamasutra.com/view/feature/131439/keeping_the_pirates_at_bay.php Lrigikithumer 49 58 1420725986
story
author_Lrigikithumer
story_8856371
8856371 2001

Source

Gamasutra - Keeping the Pirates at Bay

Gamasutra: The Art & Business of Making Gamesspacer

SEARCH [GO][9]

[GAME JOBS][10]

[updates][11] [Blogs][12] [contractors][13] [newsletter][14] [store][15]

SEARCH [GO][9]

  • [ALL][16]
  • [CONSOLE/PC][17]
  • [SMARTPHONE/TABLET][18]
  • [INDEPENDENT][19]
  • [VR/AR][20]
  • [SOCIAL/ONLINE][21] ![][22]

| ----- | | |

  •  
  •  
  •  
  •  

![arrow][23][Contents][24]

Keeping the Pirates at Bay


  • Page 1
  • [Page 2][25]
  • [Page 3][26]

![arrow][27]

[PROGRAMMING][28]


![spacer][29]

[ART][30]


![spacer][31]

[AUDIO][32]


![arrow][33]

[DESIGN][34]


![arrow][35]

[PRODUCTION][36]


![arrow][37]

[BIZ/MARKETING][38]

![arrow][23][Latest Jobs][10]

[View All][10]     [RSS][39]


February 23, 2018


  • Backflip Studios
    [Technical Artist, Outsource][40]
    • Sanzaru Games Inc.
      [UI Artist][41]
    • Vicarious Visions / Activision
      [Environment Artist - Destiny (World Building)][42]
    • Vicarious Visions / Activision
      [Senior World Designer - Destiny][43]
    • Lone Wolf Development
      [Veteran C++ Developer][44]
    • Backflip Studios
      [UI Artist][45]
  • ![arrow][46][Latest Blogs][12]

[View All][12]     [Post][47]     [RSS][48]


February 23, 2018


  • [Cultist Simulator Pre-Sales: Why, What, and How Much][49] 1][50
    • [How I Started Programming (Part One of Two)][51]
    • [Episodic design 2.0 - Gameplay and storytelling at its best (Part 3)][52]
    • [Harvard Egyptologist discusses Assassin's Creed Origins][53]
    • [Video Game Deep Cuts: Florence & The Orange Monster Box][54]
  • ![arrow][46]Press Releases

February 23, 2018


[Games Press][55]


[View All][55]     [RSS][56]

![arrow][57][About][58]

  • **Editor-In-Chief: **
    [Kris Graft][59]

    • ** Editor: **
      [Alex Wawro][60]
    • **Assignment Editor: **
      [Chris Baker][61]
    • **Contributors: **
      Chris Kerr
      Alissa McAloon
      Emma Kidwell
      Bryant Francis
      Katherine Cross
  • **Advertising: **
    [Libby Kruse][62]


[Contact Gamasutra][58]


[Report a Problem][63]


[Submit News][64]


[Comment Guidelines][65]


[Blogging Guidelines][66]


[How We Work][67]

[ ![Sponsor][68] ][69]

![arrow][57][Gama Network][24]

If you enjoy reading this site, you might also want to check out these UBM Tech sites:


Game Career Guide


[Indie Games][70]

![arrow][46][Features][71]

 

Keeping the Pirates at Bay

by [Gavin Dodd][72] Business/Marketing][73], [Design][74

[2 comments][75] ![Share on Twitter][76] ![RSS][77]


October 17, 2001 ![Article Start][78] Page 1 of 3 [ ![Next][79] ][25]


 

So you've worked 10- to 12-hour days for the past two years, trying to make your latest game the best ever. You even added copy protection to try to stop the pirates, but within a few days of release there are already crack patches flying around the Internet. Now anyone can help themselves to your hard work, without so much as a "please" or "thank you."

This is what happened to Insomniac's 1999 Playstation release, Spyro 2: Ripto's Rage. Even though it had good copy protection, it was cracked in a little over a week. So when we moved on to Spyro: Year of the Dragon (YOTD), we decided that something more had to be done to try to reduce piracy. The effort was largely successful. Though a cracked version of YOTD has become available, it took over two months for the working patch to appear, after numerous false starts on the part of the pirates (the patch for the European version took another month on top of that). The release of patches that didn't work caused a great deal of confusion among casual pirates and plenty of wasted time and disks among the commercial ones.

Two months may not seem like a long time, but between 30 and 50 percent of most games' total sales occur in that time. Approximately 50 percent of the total sales of Spyro 2, up to December 2000, were in the first two months. Even games released in the middle of the year rather than the holiday season, such as Eidetic's Syphon Filter, make 30 percent of their total sales in the first two months. If YOTD follows the same trend, as it almost certainly will, those two to three months when pirated versions were unavailable must have reduced the overall level and impact of piracy. On top of this, since YOTD was released in Europe one month after the U.S., those two months protected early European sales from pirated copies of the U.S. version.

| ----- | |

![][80]

| ![][81] | ![][82] |
| ![][83] | | | | ![][84] |

** Though a cracked version of YOTD has become available, it took over two months for the working patch to appear, after numerous false starts on the part of the pirates. **

|

So why did it take so long to crack YOTD when a patch was available for Spyro 2 so quickly? The difference was that Spyro 2 only had copy protection, while YOTD added crack protection. The crack protection complemented the copy protection by checking for alterations to the game, rather than just making sure the game was run from an original disk. This extra layer of protection slowed down the crackers significantly, because removing the copy protection had to be done without triggering the crack protection. Basically, YOTD is booby-trapped — one wrong bit and it will blow up in your face. This article will explain the techniques that we used in YOTD, what we learned from using them, and some ideas about how to take our techniques even farther. However, I will not go into explicit detail, as most of the coding involved is relatively simple. Crack protection is more about out-thinking the crackers than out-coding them. A great advantage of any method of protection is novelty. Even a new implementation will give an advantage over simply reusing code, regardless of whether it was successful in previously delaying a crack.
Defining the Problem

From the very beginning we recognized that nothing is uncrackable. Many different software and hardware techniques have been used in an attempt to stop piracy; as far as I know every one of them has been bypassed or cracked. Our goal was to try to slow the pirates down for as long as possible.

First we looked at the copy protection: was there any way to reduce its vulnerability to cracking? We could call the copy protection multiple times throughout the game, making it harder to bypass. Unfortunately, the copy protection requires exclusive access to the CD for about 10 seconds, which is an eternity when you are waiting for a level to load. So that was out of the question.

Then we looked at how a typical crack is made. Most cracks for Playstation games replace the boot executable with an "intro" that proclaims the prowess of the crackers and allows cheats to be activated. This intro is concatenated with a copy of the patched executable and compressed so that the total file size is no larger than the original file. The new file bears little resemblance to the original boot program. This difference gives us the opportunity to reload the boot executable sometime after startup, causing severe corruption if it has been altered in this way. As with the previous option, this solution suffers from the problem of adding to the load time. It is also vulnerable to the pirates finding some other space on the disk to hide their crack, leaving the original boot file untouched. While this solution might have slowed the pirates down for a few more days, it didn't seem like it was the answer we were looking for.

We decided that we needed a thorough way of detecting at run time that the game had been cracked. When we could reliably determine whether the game had been modified, we could stop the game anytime we found a discrepancy. We also needed a method that didn't require access to the disk. It should just check the code in memory, unlike the standard copy protection or our option of reloading the boot program. This would allow us to place the check anywhere in the game, making it much harder to remove.

So now we had a definite goal, an approach that should significantly improve the protection for YOTD.

Checksumming

Finding out if a block of data has changed in any way is actually pretty easy. Techniques have been used for error detection for years and are well documented. Just search for "checksum" on the Internet. For YOTD, we decided to use a CRC checksum: it's robust, simple, and fast.

The checksum was calculated bitwise rather than using tables, as tables would be an easy point for a cracker to attack. We took care to hide and protect the checksum values as well. If these could be found and altered easily, a cracker would simply replace the checksum with a new value that matched the cracked data, which is far easier than removing the code. For the same reason we didn't use functions to calculate checksums, we inlined the code as much as possible. If the code was in a function, it would only have to be removed once. The inline code would have to be removed as often as it was used.

We used a few slightly different implementations to stop simple pattern searches from being used to find the checksum code. To what degree this survived compiler optimization we don't know. To make our lives easier we made macros. These could be sprinkled around the code and mixed in with other tasks, which would make it much more difficult to spot where the checksum was being calculated.

Unfortunately, because checksums are designed to detect errors and not modification, they cannot offer full protection against modification. The checksum value for any block of data can be made to add up to any value by modifying the same number of bits that are used for the checksum. In other words, if the checksum is 16 bits, altering 16 bits in the data can make the checksum match any value.

To deal with this, multiple checksums were applied to the same data. Each checksum used a different start offset into the data, and stepped through the data by different amounts. This meant that overlapping and interleaved sections of data were checksummed at different points, making it almost impossible to alter anything and still have all the checksums add up. I could have used different checksum algorithms for the same effect, but in this case I didn't have time to implement more than one method.

We used the fact that altering a small number of bits can give you any checksum value to our advantage. By inserting the correct value into the middle of the data, the checksum could be made to equal any predetermined value. This meant the checksum value could be hard-coded and therefore become part of the data being checksummed. This is bewildering to even think about, let alone try to crack.

Since the game used multiple code overlays (or DLLs), they cross-checked each other as much as possible. This further reduced the chance that any section could be altered without being spotted. If any overlay noticed a discrepancy, it altered data in the core such that no subsequent checksum would be valid. This meant that if an alteration was detected in one overlay, then other overlays loaded later would know about it. This made it difficult for the cracker to spot what actually triggered the protection, as I'll explain later.


![Article Start][78] Page 1 of 3 [ ![Next][79] ][25]


![Backflip Studios][85]

** Backflip Studios — Boulder, Colorado, United States
[02.22.18] **
[Technical Artist, Outsource][40]

![Sanzaru Games Inc.][86]

** Sanzaru Games Inc. — Foster City , California, United States
[02.22.18] **
[UI Artist][41]

![Vicarious Visions / Activision][87]

** Vicarious Visions / Activision — Albany, New York, United States
[02.22.18] **
[Environment Artist - Destiny (World Building)][42]

![Vicarious Visions / Activision][87]

** Vicarious Visions / Activision — Albany, New York, United States
[02.22.18] **
[Senior World Designer - Destiny][43]

[[View All Jobs][10]]


Top Stories

![][88]

[GDC 2018 Level Design Workshop: An expert roundtable Q&A;][89]

![][90]

[How Michael Brough's love of exploring a single game mechanic beget Cinco Paus][91]

![][92]

[The Legend of Zelda: Breath of the Wild big winner at DICE Awards][93]

![][94]

[Net Neutrality repeal effective starting on April 23][95]

131439 item_feature /view/feature/131439/keeping_the_pirates_at_bay.php Loading Comments


![loader image][96]

![UBM][97]

  • TECHNOLOGY GROUP
  • [Black Hat][98]
  • [Content Marketing Institute][99]
  • [Content Marketing World][100]
  • [Dark Reading][101]
  • [Enterprise Connect][102]
  • [GDC][103]
  • Gamasutra
  • [HDI][104]
  • [ICMI][105]
  • [InformationWeek][106]
  • [INsecurity][107]
  • [Interop ITX][108]
  • [Network Computing][109]
  • [No Jitter][110]
  • [Service Management World][111]
  • [VRDC][112]
  • COMMUNITIES SERVED
  • [Content Marketing][113]
  • [Enterprise IT][114]
  • [Enterprise Communications][115]
  • [Game Development][116]
  • [Information Security][117]
  • [IT Services & Support][118]
  • WORKING WITH US
  • [Advertising Contacts][119]
  • [Event Calendar][120]
  • [Tech Marketing][121]
  • [Solutions][121]
  • [Contact Us][122]
  • [Licensing][123]
  • [Terms of Service][124]
  • [Privacy Statement][125]
  • [Legal Entities][126]
  • Copyright © 2018 UBM, All rights reserved

![][127]

[9]: [10]: http://jobs.gamasutra.com/ [11]: https://www.gamasutra.com/updates/ [12]: https://www.gamasutra.com/blogs/ [13]: https://www.gamasutra.com/contractors/contractor_display.php [14]: https://www.gamasutra.com/newsletter-signup [15]: https://store.cmpgame.com/storefront.php?loc=&skin=gamasutra_redesign [16]: http://www.gamasutra.com [17]: https://www.gamasutra.com/topic/console-pc [18]: https://www.gamasutra.com/topic/smartphone-tablet [19]: https://www.gamasutra.com/topic/indie [20]: https://www.gamasutra.com/topic/vr [21]: https://www.gamasutra.com/topic/social-online [22]: https://twimgs.com/gamasutra/images/btn_gdmag0.png [23]: https://twimgs.com/gamasutra/images/icon_jobs.png [24]: https://www.gamasutra.com# [25]: https://www.gamasutra.com/view/feature/131439/keeping_the_pirates_at_bay.php?page=2 [26]: https://www.gamasutra.com/view/feature/131439/keeping_the_pirates_at_bay.php?page=3 [27]: https://twimgs.com/gamasutra/images/button_programming.gif [28]: https://www.gamasutra.com/category/programming/ [29]: https://twimgs.com/gamasutra/images/button_art.gif [30]: https://www.gamasutra.com/category/art/ [31]: https://twimgs.com/gamasutra/images/button_audio.gif [32]: https://www.gamasutra.com/category/audio/ [33]: https://twimgs.com/gamasutra/images/button_design.gif [34]: https://www.gamasutra.com/category/design/ [35]: https://twimgs.com/gamasutra/images/button_production.gif [36]: https://www.gamasutra.com/category/production/ [37]: https://twimgs.com/gamasutra/images/button_business.gif [38]: https://www.gamasutra.com/category/business-marketing/ [39]: http://feeds.feedburner.com/GamasutraJobs [40]: http://jobs.gamasutra.com/job/technical-artist-outsource-boulder-colorado-32722 [41]: http://jobs.gamasutra.com/job/ui-artist-foster-city-california-31913 [42]: http://jobs.gamasutra.com/job/environment-artist-destiny-world-building-albany-new-york-32648 [43]: http://jobs.gamasutra.com/job/senior-world-designer-destiny-albany-new-york-32647 [44]: http://jobs.gamasutra.com/job/veteran-c-developer-san-jose-california-32721 [45]: http://jobs.gamasutra.com/job/ui-artist-boulder-colorado-32720 [46]: https://twimgs.com/gamasutra/images/icon_blogs.png [47]: https://www.gamasutra.com/blogs/edit/ [48]: https://www.gamasutra.com/blogs/rss/ [49]: https://www.gamasutra.com/blogs/ALEXISKENNEDY/20180222/314859/Cultist_Simulator_PreSales_Why_What_and_How_Much.php [50]: https://www.gamasutra.com/blogs/ALEXISKENNEDY/20180222/314859/Cultist_Simulator_PreSales_Why_What_and_How_Much.php#comments "1 comments" [51]: https://www.gamasutra.com/blogs/TrentPolack/20180222/314929/How_I_Started_Programming_Part_One_of_Two.php [52]: https://www.gamasutra.com/blogs/PascalLuban/20180221/314688/Episodic_design_20__Gameplay_and_storytelling_at_its_best_Part_3.php [53]: https://www.gamasutra.com/blogs/BobWhitaker/20180220/314746/Harvard_Egyptologist_discusses_Assassins_Creed_Origins.php [54]: https://www.gamasutra.com/blogs/SimonCarless/20180218/314753/Video_Game_Deep_Cuts_Florence__The_Orange_Monster_Box.php [55]: https://www.gamasutra.com/pressreleases_index.php [56]: https://www.gamasutra.com/pressreleases/rss/ [57]: https://twimgs.com/gamasutra/images/icon_about.png [58]: https://www.gamasutra.com/contactus [59]: mailto:kgraft%40gamasutra.com [60]: mailto:alex.wawro%40ubm.com [61]: mailto:chris.baker%40ubm.com [62]: mailto:libby.kruse%40ubm.com [63]: mailto:support%40gamasutra.com [64]: mailto:news%40gamasutra.com [65]: https://www.gamasutra.com/static2/comment_guidelines.html [66]: https://www.gamasutra.com/static2/blogsubmissions.html [67]: https://www.gamasutra.com/static2/howwework.html [68]: https://twimgs.com/gamasutra/images/AdwGama_177x60_button_v1.jpg [69]: http://www.ubmgamenetwork.com/online/ [70]: http://www.indiegames.com/blog [71]: https://www.gamasutra.com/features/ [72]: https://www.gamasutra.com/view/authors/228490/Gavin_Dodd.php [73]: https://www.gamasutra.com/features/business-marketing/ [74]: https://www.gamasutra.com/features/design/ [75]: https://www.gamasutra.com#comments [76]: https://twimgs.com/gamasutra/images/twitter.gif [77]: https://twimgs.com/gamasutra/images/icon_rss.gif [78]: https://twimgs.com/gamasutra/images/btn_articlestart.gif [79]: https://twimgs.com/gamasutra/images/btn_next.gif [80]: https://www.gamasutra.com/redesign/images/corner_top_left.gif [81]: https://www.gamasutra.com/features/20011017/dodd_01.jpg [82]: https://www.gamasutra.com/redesign/images/corner_top_right.gif [83]: https://www.gamasutra.com/redesign/images/corner_bottom_right.gif [84]: https://www.gamasutra.com/redesign/images/corner_bottom_left.gif [85]: https://d1506sp6x4e9z7.cloudfront.net/gamasutra/uploads/rjdrag.jpg [86]: https://d1506sp6x4e9z7.cloudfront.net/gamasutra/uploads/944627.jpg [87]: https://d1506sp6x4e9z7.cloudfront.net/gamasutra/uploads/2766_1484003867.png [88]: https://www.gamasutra.com/images/news/314857_thumb.jpg [89]: https://www.gamasutra.com/view/news/314857/GDC_2018_Level_Design_Workshop_An_expert_roundtable_QA.php [90]: https://www.gamasutra.com/images/news/314837_thumb.jpg [91]: https://www.gamasutra.com/view/news/314837/How_Michael_Broughs_love_of_exploring_a_single_game_mechanic_beget_Cinco_Paus.php [92]: https://www.gamasutra.com/images/news/314942_thumb.jpg [93]: https://www.gamasutra.com/view/news/314942/The_Legend_of_Zelda_Breath_of_the_Wild_big_winner_at_DICE_Awards.php [94]: https://www.gamasutra.com/images/news/314936_thumb.jpg [95]: https://www.gamasutra.com/view/news/314936/Net_Neutrality_repeal_effective_starting_on_April_23.php [96]: https://www.gamasutra.com/ajax-loader.gif [97]: https://twimgs.com/nojitter/gama/UBM_Logo_White.png [98]: http://www.blackhat.com/ [99]: http://contentmarketinginstitute.com/ [100]: http://www.contentmarketingworld.com/ [101]: http://www.darkreading.com/ [102]: http://www.enterpriseconnect.com/ [103]: http://www.gdconf.com/ [104]: http://www.thinkhdi.com/ [105]: http://www.icmi.com/ [106]: http://www.informationweek.com/ [107]: http://insecurity.com/ [108]: http://www.interop.com [109]: http://www.networkcomputing.com/ [110]: http://www.nojitter.com/ [111]: http://www.smworld.com/ [112]: http://www.vrdconf.com/ [113]: http://tech.ubm.com/community-brands/content-marketing-2/ [114]: http://tech.ubm.com/community-brands/enterprise-it/ [115]: http://tech.ubm.com/community-brands/enterprise-communications/ [116]: http://tech.ubm.com/community-brands/game-and-app-developers/ [117]: http://tech.ubm.com/community-brands/information-security/ [118]: http://tech.ubm.com/community-brands/technical-service-and-support/ [119]: http://createyournextcustomer.techweb.com/contact-us/ [120]: http://events.ubm.com/?company=10 [121]: http://createyournextcustomer.techweb.com/ [122]: http://tech.ubm.com/contact-us/ [123]: http://wrightsmedia.com/sites/ubm/index.cfm [124]: http://legal.us.ubm.com/terms-of-service/ [125]: http://legal.us.ubm.com/privacy-policy/ [126]: http://reg.ubmamevents.com/UBMLegalEntities [127]: http://cmp.112.2o7.net/b/ss/cmpglobalvista/1/H.21--NS/0