Hashing Based Software Watermarking for Source Code Files 1 2 3 Shazia Saqib , Asad Raza Kazmi , Saleh Alrashed 1 Department of Computer Science, GCU, Lahore Pakistan, Lahore Garrison University, Pakistan, shaziasaqib@lgu.edu.pk 2 Department of Computer Science, GCU, Lahore, Pakistan, arkazmi@gcu.edu.pk 3 University of Dammam, Dammam, KSA, saalrashed@uod.edu.sa LGURJCSIT ISSN: 2519-7991 Saqib et al LGURJCSIT 2018 LGU Research Jounral for Computer Sciences & IT Vol. 2 Issue 4, October - December 2018 LGU Research Jounral for Computer Sciences & IT 2(4) LGURJCSIT 1. INTRODUCTION Software piracy has always been around as a big blow to the software industry. Disk or CD has long been used to deliver software to the place required. This controlled illegal software distribution to some extent. However, as high speed Internet is getting available to everyone, physical media based piracy has been reduced a lot. Delivering software in platform independent form makes its reverse engineering quite easy. Even if we detect that the software has been rated, its hard to detect the culprits. There are organizations like Business Software Alliance (BSA)[21]. These use audits to verify legality of software. Even audit cannot trace the person behind piracy. There are many techniques to discourage software piracy. These techniques have been implemented both in hardware and software. Softwarebased solutions that include code obfuscation, software tamper- proofing, and software watermarking are cheaper but the security provided by them is not that powerful[1]. Although hardware based solutions give more reliable security against piracy but they are more convenient to be used by the software vendor however end-user is not comfortable with hardware. There are Software-based Methods available as well [1]. Software pirates attack software in three ways. These attacks (additive, subtractive, distortive) are handled by technical defenses. One such solution is Code obfuscation. This approach prevents reverse engineering implementation. In this technique source code is changed to a very difficult form without changing its actual output. This makes the software very hard to reverse engineer[2-4] . Abstract: Software is developed and delivered to clients as a routine part of software engineering life cycle . Software is quite an expensive entity. However various attacks are possible on software to make its illegal use. Different solutions are there to prevent piracy. Software watermarking embeds a watermark in the source code so that it is undetectable yet it proves the ownership of the developer. The technique has been tested for C++ source code files, however, it can be applicable on any other language. The proposed techniques scans the code for all possible constants, forms a hash sequence using MD5 algorithm that calculates the watermark and stores in Date & Watermark Value Repository (DWVR). Key Words: Watermarks, Piracy, Attack, Embedding, Extraction Figure 1: Software Units by Category 1