fbpx
Wikipedia

Obfuscation (software)

In software development, obfuscation is the act of creating source or machine code that is difficult for humans or computers to understand. Like obfuscation in natural language, it may use needlessly roundabout expressions to compose statements. Programmers may deliberately obfuscate code to conceal its purpose (security through obscurity) or its logic or implicit values embedded in it, primarily, in order to prevent tampering, deter reverse engineering, or even to create a puzzle or recreational challenge for someone reading the source code. This can be done manually or by using an automated tool, the latter being the preferred technique in industry.[1]

Overview edit

The architecture and characteristics of some languages may make them easier to obfuscate than others.[2][3] C,[4] C++,[5][6] and the Perl programming language[7] are some examples of languages easy to obfuscate. Haskell is also quite obfuscatable[8] despite being quite different in structure.

The properties that make a language obfuscatable are not immediately obvious.

Techniques edit

Types of obfuscations include simple keyword substitution, use or non-use of whitespace to create artistic effects, and self-generating or heavily compressed programs.

According to Nick Montfort, techniques may include:

  1. naming obfuscation, which includes naming variables in a meaningless or deceptive way;
  2. data/code/comment confusion, which includes making some actual code look like comments or confusing syntax with data;
  3. double coding, which can be displaying code in poetry form or interesting shapes.[9]

Automated tools edit

A variety of tools exist to perform or assist with code obfuscation. These include experimental research tools created by academics, hobbyist tools, commercial products written by professionals, and open-source software. Deobfuscation tools also exist that attempt to perform the reverse transformation.

Although the majority of commercial obfuscation solutions work by transforming either program source code, or platform-independent bytecode as used by Java and .NET, there are also some that work directly on compiled binaries.

Recreational edit

Writing and reading obfuscated source code can be a brain teaser. A number of programming contests reward the most creatively obfuscated code, such as the International Obfuscated C Code Contest and the Obfuscated Perl Contest.

Short obfuscated Perl programs may be used in signatures of Perl programmers. These are JAPHs ("Just another Perl hacker").[16]

Cryptographic edit

Cryptographers have explored the idea of obfuscating code so that reverse-engineering the code is cryptographically hard. This is formalized in the many proposals for indistinguishability obfuscation, a cryptographic primitive that, if possible to build securely, would allow one to construct many other kinds of cryptography, including completely novel types that no one knows how to make. (A stronger notion, black-box obfuscation, is known to be impossible in general.)[17][18]

Disadvantages of obfuscation edit

  • While obfuscation can make reading, writing, and reverse-engineering a program difficult and time-consuming, it will not necessarily make it impossible.[19]
  • It adds time and complexity to the build process for the developers.
  • It can make debugging issues after the software has been obfuscated extremely difficult.
  • Once code is no longer maintained, hobbyists may want to maintain the program, add mods, or understand it better. Obfuscation makes it hard for end users to do useful things with the code.
  • Certain kinds of obfuscation (i.e. code that isn't just a local binary and downloads mini binaries from a web server as needed) can degrade performance and/or require Internet.

Notifying users of obfuscated code edit

Some anti-virus softwares, such as AVG AntiVirus,[20] will also alert their users when they land on a website with code that is manually obfuscated, as one of the purposes of obfuscation can be to hide malicious code. However, some developers may employ code obfuscation for the purpose of reducing file size or increasing security. The average user may not expect their antivirus software to provide alerts about an otherwise harmless piece of code, especially from trusted corporations, so such a feature may actually deter users from using legitimate software.

Mozilla and Google disallow browser extensions containing obfuscated code in their add-ons store.[21][22]

Obfuscation and copyleft licenses edit

There has been debate on whether it is illegal to skirt copyleft software licenses by releasing source code in obfuscated form, such as in cases in which the author is less willing to make the source code available. The issue is addressed in the GNU General Public License by requiring the "preferred form for making modifications" to be made available.[23] The GNU website states "Obfuscated 'source code' is not real source code and does not count as source code."[24]

Decompilers edit

A decompiler can reverse-engineer source code from an executable or library. Decompilation is sometimes called a man-in-the-end (mite) attack, based on the traditional cryptographic attack known as "man-in-the-middle". It puts source code in the hands of the user, although this source code is often difficult to read. The source code is likely to have random function and variable names, incorrect variable types, and use different logic than the original source code (due to compiler optimizations).

Model obfuscation edit

Model obfuscation is a technique to hide the internal structure of a machine learning model.[25] Obfuscation turns a model into a black box. It is contrary to explainable AI. Obfuscation models can also be applied to training data before feeding it into the model to add random noise. This hides sensitive information about the properties of individual and groups of samples.[26]

See also edit

References edit

  1. ^ "What is obfuscation (obfu)? - Definition from WhatIs.com". SearchSoftwareQuality. Retrieved February 1, 2019.
  2. ^ Binstock, Andrew (March 6, 2003). . Archived from the original on April 20, 2008. Retrieved November 25, 2013.
  3. ^ Atwood, Jeff (May 15, 2005). "Jeff Atwood, May 15, 2005". Codinghorror.com. Retrieved November 25, 2013.
  4. ^ . Kenter.demon.nl. Archived from the original on March 4, 2016. Retrieved November 25, 2013.
  5. ^ "C++ Tutorials – Obfuscated Code – A Simple Introduction". DreamInCode.net. Retrieved November 25, 2013.
  6. ^ "C Tutorials – Obfuscated Code in C". July 7, 2011. Retrieved November 25, 2013.
  7. ^ As of 2013-11-25 18:22 GMT. "Pe(a)rls in line noise". Perlmonks.org. Retrieved November 25, 2013.{{cite web}}: CS1 maint: numeric names: authors list (link)
  8. ^ "Obfuscation – Haskell Wiki". February 16, 2006. from the original on August 30, 2017. Retrieved March 3, 2020.
  9. ^ Montfort, Nick. (PDF). Archived from the original (PDF) on April 24, 2019. Retrieved November 24, 2017.
  10. ^ Ben Kurtovic. "Obfuscating "Hello world!"". benkurtovic.com.
  11. ^ "Obfuscated Python". wiki.c2.com.
  12. ^ "The First Annual Obfuscated Python Content". code.activestate.com.
  13. ^ domas (November 3, 2022), xoreaxeaxeax/movfuscator, retrieved November 5, 2022
  14. ^ Break Me00 The MoVfuscator Turning mov into a soul crushing RE nightmare Christopher Domas, retrieved November 5, 2022
  15. ^ Williams, Al (March 21, 2021). "One Instruction To Rule Them All: C Compiler Emits Only MOV". Hackaday. Retrieved October 23, 2023.
  16. ^ . pm.org. Perl Mongers. Archived from the original on May 16, 2013. Retrieved February 27, 2015.
  17. ^ "Cryptography Breakthrough Could Make Software Unhackable". Wired. ISSN 1059-1028. Retrieved March 14, 2021.
  18. ^ Jain, Aayush; Lin, Huijia; Sahai, Amit (2020). "Indistinguishability Obfuscation from Well-Founded Assumptions". Cryptology ePrint Archive. arXiv:2008.09317.
  19. ^ . Math.ias.edu. Archived from the original on March 23, 2016. Retrieved November 25, 2013.
  20. ^ "Blocking website and only way to fix is disabling HTTPS s... | AVG". support.avg.com. July 21, 2020. Retrieved February 4, 2022.
  21. ^ at 05:01, Thomas Claburn in San Francisco 2 Oct 2018. "Google taking action against disguised code in Chrome Web Store". www.theregister.co.uk. Retrieved November 12, 2019.{{cite web}}: CS1 maint: numeric names: authors list (link)
  22. ^ Cimpanu, Catalin. "Mozilla announces ban on Firefox extensions containing obfuscated code". ZDNet. Retrieved November 12, 2019.
  23. ^ "Reasoning behind the "preferred form of the work for making modifications to it" language in the GPL". Lwn.net. Retrieved November 25, 2013.
  24. ^ "What is free software?". gnu.org. Retrieved December 18, 2014.
  25. ^ Zhou, Mingyi; Gao, Xiang; Wu, Jing; Grundy, John C.; Chen, Xiao; Chen, Chunyang; Li, Li (2023). "Model Obfuscation for Securing Deployed Neural Networks". {{cite journal}}: Cite journal requires |journal= (help)
  26. ^ Zhang, Tianwei; He, Zecheng; Lee, Ruby B. (July 12, 2018). "Privacy-preserving Machine Learning through Data Obfuscation". arXiv:1807.01860 [cs.CR].

Further reading edit

  • Seyyedhamzeh, Javad, ABCME: A Novel Metamorphic Engine, 17th National Computer Conference, Sharif University of Technology, Tehran, Iran, 2012.
  • B. Barak, O. Goldreich, R. Impagliazzo, S. Rudich, A. Sahai, S. Vadhan and K. Yang. . 21st Annual International Cryptology Conference, Santa Barbara, California, USA. Springer Verlag LNCS Volume 2139, 2001.
  • Mateas, Michael; Nick Montfort. "A Box, Darkly: Obfuscation, Weird Languages, and Code Aesthetics" (PDF). Proceedings of the 6th Digital Arts and Culture Conference, IT University of Copenhagen, 1–3 December 2005. pp. 144–153.

External links edit

  • The International Obfuscated C Code Contest
  • , ACM Crossroads, Spring 1998 issue
  • Yury Lifshits. Lecture Notes on Program Obfuscation (Spring'2005)
  • Java obfuscators at Curlie
  • c2:BlackBoxComputation

obfuscation, software, term, used, natural, language, obfuscation, software, development, obfuscation, creating, source, machine, code, that, difficult, humans, computers, understand, like, obfuscation, natural, language, needlessly, roundabout, expressions, c. For the term as used in natural language see obfuscation In software development obfuscation is the act of creating source or machine code that is difficult for humans or computers to understand Like obfuscation in natural language it may use needlessly roundabout expressions to compose statements Programmers may deliberately obfuscate code to conceal its purpose security through obscurity or its logic or implicit values embedded in it primarily in order to prevent tampering deter reverse engineering or even to create a puzzle or recreational challenge for someone reading the source code This can be done manually or by using an automated tool the latter being the preferred technique in industry 1 Contents 1 Overview 2 Techniques 2 1 Automated tools 2 2 Recreational 2 3 Cryptographic 3 Disadvantages of obfuscation 3 1 Notifying users of obfuscated code 3 2 Obfuscation and copyleft licenses 4 Decompilers 5 Model obfuscation 6 See also 7 References 8 Further reading 9 External linksOverview editThe architecture and characteristics of some languages may make them easier to obfuscate than others 2 3 C 4 C 5 6 and the Perl programming language 7 are some examples of languages easy to obfuscate Haskell is also quite obfuscatable 8 despite being quite different in structure The properties that make a language obfuscatable are not immediately obvious Techniques editThis section needs expansion with explaining more obfuscation techniques in general You can help by adding to it March 2023 Types of obfuscations include simple keyword substitution use or non use of whitespace to create artistic effects and self generating or heavily compressed programs According to Nick Montfort techniques may include naming obfuscation which includes naming variables in a meaningless or deceptive way data code comment confusion which includes making some actual code look like comments or confusing syntax with data double coding which can be displaying code in poetry form or interesting shapes 9 Automated tools edit A variety of tools exist to perform or assist with code obfuscation These include experimental research tools created by academics hobbyist tools commercial products written by professionals and open source software Deobfuscation tools also exist that attempt to perform the reverse transformation Although the majority of commercial obfuscation solutions work by transforming either program source code or platform independent bytecode as used by Java and NET there are also some that work directly on compiled binaries Some Python examples can be found in the official Python programming FAQ and elsewhere 10 11 12 The movfuscator C compiler for the x86 32 ISA uses only the mov instruction in order to obfuscate 13 14 15 Recreational edit Writing and reading obfuscated source code can be a brain teaser A number of programming contests reward the most creatively obfuscated code such as the International Obfuscated C Code Contest and the Obfuscated Perl Contest Short obfuscated Perl programs may be used in signatures of Perl programmers These are JAPHs Just another Perl hacker 16 Cryptographic edit Further information Indistinguishability obfuscation and Black box obfuscation Cryptographers have explored the idea of obfuscating code so that reverse engineering the code is cryptographically hard This is formalized in the many proposals for indistinguishability obfuscation a cryptographic primitive that if possible to build securely would allow one to construct many other kinds of cryptography including completely novel types that no one knows how to make A stronger notion black box obfuscation is known to be impossible in general 17 18 Disadvantages of obfuscation editWhile obfuscation can make reading writing and reverse engineering a program difficult and time consuming it will not necessarily make it impossible 19 It adds time and complexity to the build process for the developers It can make debugging issues after the software has been obfuscated extremely difficult Once code is no longer maintained hobbyists may want to maintain the program add mods or understand it better Obfuscation makes it hard for end users to do useful things with the code Certain kinds of obfuscation i e code that isn t just a local binary and downloads mini binaries from a web server as needed can degrade performance and or require Internet Notifying users of obfuscated code edit Some anti virus softwares such as AVG AntiVirus 20 will also alert their users when they land on a website with code that is manually obfuscated as one of the purposes of obfuscation can be to hide malicious code However some developers may employ code obfuscation for the purpose of reducing file size or increasing security The average user may not expect their antivirus software to provide alerts about an otherwise harmless piece of code especially from trusted corporations so such a feature may actually deter users from using legitimate software Mozilla and Google disallow browser extensions containing obfuscated code in their add ons store 21 22 Obfuscation and copyleft licenses edit There has been debate on whether it is illegal to skirt copyleft software licenses by releasing source code in obfuscated form such as in cases in which the author is less willing to make the source code available The issue is addressed in the GNU General Public License by requiring the preferred form for making modifications to be made available 23 The GNU website states Obfuscated source code is not real source code and does not count as source code 24 Decompilers editA decompiler can reverse engineer source code from an executable or library Decompilation is sometimes called a man in the end mite attack based on the traditional cryptographic attack known as man in the middle It puts source code in the hands of the user although this source code is often difficult to read The source code is likely to have random function and variable names incorrect variable types and use different logic than the original source code due to compiler optimizations Model obfuscation editModel obfuscation is a technique to hide the internal structure of a machine learning model 25 Obfuscation turns a model into a black box It is contrary to explainable AI Obfuscation models can also be applied to training data before feeding it into the model to add random noise This hides sensitive information about the properties of individual and groups of samples 26 See also editAARD code Spaghetti code Decompilation Esoteric programming language Quine Overlapping instructions Polymorphic code Hardware obfuscation Underhanded C Contest Source to source compiler ProGuard Java Obfuscator Dotfuscator Net Obfuscator Digital rights management Indistinguishability obfuscation Source code beautificationReferences edit What is obfuscation obfu Definition from WhatIs com SearchSoftwareQuality Retrieved February 1 2019 Binstock Andrew March 6 2003 Obfuscation Cloaking your Code from Prying Eyes Archived from the original on April 20 2008 Retrieved November 25 2013 Atwood Jeff May 15 2005 Jeff Atwood May 15 2005 Codinghorror com Retrieved November 25 2013 Obfuscation Kenter demon nl Archived from the original on March 4 2016 Retrieved November 25 2013 C Tutorials Obfuscated Code A Simple Introduction DreamInCode net Retrieved November 25 2013 C Tutorials Obfuscated Code in C July 7 2011 Retrieved November 25 2013 As of 2013 11 25 18 22 GMT Pe a rls in line noise Perlmonks org Retrieved November 25 2013 a href Template Cite web html title Template Cite web cite web a CS1 maint numeric names authors list link Obfuscation Haskell Wiki February 16 2006 Archived from the original on August 30 2017 Retrieved March 3 2020 Montfort Nick Obfuscated code PDF Archived from the original PDF on April 24 2019 Retrieved November 24 2017 Ben Kurtovic Obfuscating Hello world benkurtovic com Obfuscated Python wiki c2 com The First Annual Obfuscated Python Content code activestate com domas November 3 2022 xoreaxeaxeax movfuscator retrieved November 5 2022 Break Me00 The MoVfuscator Turning mov into a soul crushing RE nightmare Christopher Domas retrieved November 5 2022 Williams Al March 21 2021 One Instruction To Rule Them All C Compiler Emits Only MOV Hackaday Retrieved October 23 2023 JAPH Just Another Perl Hacker pm org Perl Mongers Archived from the original on May 16 2013 Retrieved February 27 2015 Cryptography Breakthrough Could Make Software Unhackable Wired ISSN 1059 1028 Retrieved March 14 2021 Jain Aayush Lin Huijia Sahai Amit 2020 Indistinguishability Obfuscation from Well Founded Assumptions Cryptology ePrint Archive arXiv 2008 09317 Can We Obfuscate Programs by Boaz Barak Math ias edu Archived from the original on March 23 2016 Retrieved November 25 2013 Blocking website and only way to fix is disabling HTTPS s AVG support avg com July 21 2020 Retrieved February 4 2022 at 05 01 Thomas Claburn in San Francisco 2 Oct 2018 Google taking action against disguised code in Chrome Web Store www theregister co uk Retrieved November 12 2019 a href Template Cite web html title Template Cite web cite web a CS1 maint numeric names authors list link Cimpanu Catalin Mozilla announces ban on Firefox extensions containing obfuscated code ZDNet Retrieved November 12 2019 Reasoning behind the preferred form of the work for making modifications to it language in the GPL Lwn net Retrieved November 25 2013 What is free software gnu org Retrieved December 18 2014 Zhou Mingyi Gao Xiang Wu Jing Grundy John C Chen Xiao Chen Chunyang Li Li 2023 Model Obfuscation for Securing Deployed Neural Networks a href Template Cite journal html title Template Cite journal cite journal a Cite journal requires journal help Zhang Tianwei He Zecheng Lee Ruby B July 12 2018 Privacy preserving Machine Learning through Data Obfuscation arXiv 1807 01860 cs CR Further reading editSeyyedhamzeh Javad ABCME A Novel Metamorphic Engine 17th National Computer Conference Sharif University of Technology Tehran Iran 2012 B Barak O Goldreich R Impagliazzo S Rudich A Sahai S Vadhan and K Yang On the Im possibility of Obfuscating Programs 21st Annual International Cryptology Conference Santa Barbara California USA Springer Verlag LNCS Volume 2139 2001 Mateas Michael Nick Montfort A Box Darkly Obfuscation Weird Languages and Code Aesthetics PDF Proceedings of the 6th Digital Arts and Culture Conference IT University of Copenhagen 1 3 December 2005 pp 144 153 External links editThe International Obfuscated C Code Contest Protecting Java Code Via Code Obfuscation ACM Crossroads Spring 1998 issue Can we obfuscate programs Yury Lifshits Lecture Notes on Program Obfuscation Spring 2005 Java obfuscators at Curlie c2 BlackBoxComputation Retrieved from https en wikipedia org w index php title Obfuscation software amp oldid 1215852384, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.