Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: anyone can show me how to obfuscate c code manually  (Read 8873 times)

0 Members and 1 Guest are viewing this topic.

samuelbenbrahim

    Topic Starter


    Greenhorn

    • Experience: Beginner
    • OS: Windows 8
    anyone can show me how to obfuscate c code manually
    « on: September 04, 2018, 06:37:33 PM »
    anyone can show me how to obfuscate c code manually without any obfuscator software because i don't like being script kiddie

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: anyone can show me how to obfuscate c code manually
    « Reply #1 on: September 04, 2018, 08:50:25 PM »
    You want to do what?  :o

    verb
    verb: obfuscate; 3rd person present: obfuscates; past tense: obfuscated; past participle: obfuscated; gerund or present participle: obfuscating
        render obscure, unclear, or unintelligible.
        "the spelling changes will deform some familiar words and obfuscate their etymological origins"
        synonyms:   obscure, confuse, make unclear, blur, muddle, complicate,

    Most C code is already that way. Judging by your post, you already have the gift.  ::)

    samuelbenbrahim

      Topic Starter


      Greenhorn

      • Experience: Beginner
      • OS: Windows 8
      Re: anyone can show me how to obfuscate c code manually
      « Reply #2 on: September 04, 2018, 09:23:39 PM »
      yes !!

      samuelbenbrahim

        Topic Starter


        Greenhorn

        • Experience: Beginner
        • OS: Windows 8
        Re: anyone can show me how to obfuscate c code manually
        « Reply #3 on: September 05, 2018, 02:16:01 AM »
        i want to avoid reverse enginnering

        strollin



          Adviser
        • Thanked: 84
          • Yes
        • Certifications: List
        • Computer: Specs
        • Experience: Guru
        • OS: Windows 10
        Re: anyone can show me how to obfuscate c code manually
        « Reply #4 on: September 05, 2018, 03:15:00 AM »

        nil

        • Global Moderator


        • Intermediate
        • Thanked: 15
          • Experience: Experienced
          • OS: Linux variant
          Re: anyone can show me how to obfuscate c code manually
          « Reply #5 on: September 05, 2018, 06:23:40 AM »
          Check out the archives of the IOCCC. 25 years and still going strong. Some amazing code in here. If you can figure out how any of these programs work, you're on the right track. Many of the programs have comments from the authors where they explain some of their techniques.

          https://www.ioccc.org/
          Do not communicate by sharing memory; instead, share memory by communicating.

          --Effective Go

          DaveLembke



            Sage
          • Thanked: 662
          • Certifications: List
          • Computer: Specs
          • Experience: Expert
          • OS: Windows 10
          Re: anyone can show me how to obfuscate c code manually
          « Reply #6 on: September 05, 2018, 09:24:43 AM »
          Quote
          i want to avoid reverse enginnering

          One thing to mention on this is that if anyone has access to seeing how your code runs, they could basically write out a flow chart of what features or what it does and reconstruct their own based on observational reverse engineering. Their program they create can act like your program while coded differently.

          Curious how you can prevent someone seeing your software, what it does, and them making their own similar program that does the same thing?


          Salmon Trout

          • Guest
          Re: anyone can show me how to obfuscate c code manually
          « Reply #7 on: September 05, 2018, 10:19:01 AM »
          Since C is compiled, what is there to "obfuscate"?

          Geek-9pm


            Mastermind
          • Geek After Dark
          • Thanked: 1026
            • Gekk9pm bnlog
          • Certifications: List
          • Computer: Specs
          • Experience: Expert
          • OS: Windows 10
          Re: anyone can show me how to obfuscate c code manually
          « Reply #8 on: September 05, 2018, 11:12:15 AM »
          Since C is compiled, what is there to "obfuscate"?
          Good question.  :) Here is a quote from the Wikipedia article cited by Strollin.

          In software development, obfuscation is the deliberate act of creating source or machine code that is difficult for humans 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 as 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.

          The article went on to say:

          Disadvantages of obfuscation
          While obfuscation can make reading, writing, and reverse-engineering a program difficult and time-consuming, it will not necessarily make it impossible.[19] Some anti-virus software, such as AVG AntiVirus,[citation needed] will also alert their users when they land on a site 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.

          The GNU does not encourage obfuscation of source code.  :)

          Salmon Trout

          • Guest
          Re: anyone can show me how to obfuscate c code manually
          « Reply #9 on: September 05, 2018, 11:28:13 AM »
          You can use an encrypting executable packer so that the binary code cannot be e.g.  passed through a dissassembler, which might puzzle a beginner or amateur-level programmer, but the code has to go into memory, and more advanced level programmers or law enforcement personnel will know how to see the binary code being executed. Also most antivirus software will flag the packed executable.

          Think about why you don't want your code to be "reverse engineered". If your code is at all clever or original, you might do better to let people see it, since your reputation would grow as a result.
          « Last Edit: September 05, 2018, 11:48:16 AM by Salmon Trout »

          camerongray



            Expert
          • Thanked: 306
            • Yes
            • Cameron Gray - The Random Rambings of a Computer Geek
          • Certifications: List
          • Computer: Specs
          • Experience: Expert
          • OS: Mac OS
          Re: anyone can show me how to obfuscate c code manually
          « Reply #10 on: September 05, 2018, 05:53:59 PM »
          Definitely worth thinking about why you would want to obfuscate the code, sure it may protect against a beginner trying to reverse engineer it but you can never stop it completely.  Sure it may seem appealing to prevent anyone seeing how your code works but realistically it's not a huge deal, especially with an appropriate licence in place to prevent or manage the usage of the code.  If you're trying to obfuscate the code as some sort of security measure then I'd advise you to look at what the code is doing and why someone finding that out would be a problem.  Generally relying on security through obscurity isn't anywhere near sufficient, personally I always write code assuming that an attacker could have full access to the source code, if this would break security measures in the code, then I'd say the code isn't secure enough.  While there may be a genuine reason to obfuscate it that I haven't thought of, it's definitely worth thinking about whether it is actually the correct thing to be doing as it often doesn't provide the benefits that people think it does.

          BC_Programmer


            Mastermind
          • Typing is no substitute for thinking.
          • Thanked: 1140
            • Yes
            • Yes
            • BC-Programming.com
          • Certifications: List
          • Computer: Specs
          • Experience: Beginner
          • OS: Windows 11
          Re: anyone can show me how to obfuscate c code manually
          « Reply #11 on: September 05, 2018, 06:10:54 PM »
          We've had only two instances of our software being "pirated".

          The first case was when a disgruntled employee stole the source code and rebadged it and started trying to sell it to some of our existing customers. He apparently forgot to tell them he wasn't with us anymore so they phoned us to ask what was different with the "new product".

          Naturally the guy was on the wrong end of a losing lawsuit.

          The second case was one customer actually copy-pasting their install to another customers system. We found that one out when we got support calls from people who weren't customers. There was nothing malicious there though and the latter did sign up appropriately once they found out.

          You cannot stop the former case which is why there are employment contracts and stuff. The latter case can be dealt with by just blocking casual copying with some basic licensing implementation.

          There isn't really much need, IMO, to obfuscate source code, or even compiled code, as a form of "security"; Personally, I've found that it is mostly those who have nothing worth copying that seem obsessed with preventing it.

          I was trying to dereference Null Pointers before it was cool.