Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6875853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:24:22+00:00 2026-05-27T04:24:22+00:00

If I have a C++ code containing strings, that can be password or anything,

  • 0

If I have a C++ code containing strings, that can be password or anything, what’s the best way to obfuscate them to make very difficult the reverse engineering?
I’ve found some tools online, but all are not opensource.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:24:22+00:00Added an answer on May 27, 2026 at 4:24 am

    Let’s say your application uses a web service “www.example.com” and authenticates with the password, “letmein”. Compile the program and examine it with strings, objdump, or whatever:

    $ make
    $ objdump -j .rodota -s program
    a.out:     file format elf64-x86-64
    
    Contents of section .rodata:
     4005f8 01000200 7777772e 6578616d 706c652e  ....www.example.
     400608 636f6d00 6c65746d 65696e00           com.letmein.  
    
    $ strings program
    /lib64/ld-linux-x86-64.so.2
    __gmon_start__
    ...
    www.example.com
    letmein
    

    This is pretty easy. If you obfuscate it, you still need to put the plain text somewhere in memory before you can use it, so instead the attacker does one of the following:

    • Intercepts network packets (easy, takes 5 minutes with basic knowledge Wireshark)
    • Uses a debugger (easy, takes 10 minutes with basic knowledge of GDB)
    • Reverse engineers your source code (hard, takes hours or days)

    Note that the obfuscation tools make it harder only for attackers that are already doing it the hard way. What’s the sense in that? All you’ve done is make it take 15 minutes instead of say, 5 minutes for an attacker to get the password from your executable. Since that’s pretty much the best you can do, don’t work too hard on it. Just XOR the password with some easy pattern and hope that the attackers are very lazy or stupid.

    C-3PO: Master Luke, sir. Pardon me for asking, but what should R2 and I do if we’re discovered here?
    Luke: Lock the door.
    Han Solo: And hope they don’t have blasters.
    C-3PO: That isn’t very reassuring.

    (You will probably end up spending more time on this than your attacker will.)

    On the other hand: If you are trying to prevent non-root users from accessing the password on a trusted system, you can do that with permissions & setuid binaries.

    Footnote: The purpose of obfuscators in general is to hide program code, not data. For example, if your application uses an algorithm that is a trade secret, that is when you would want to use an obfuscator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some JavaScript code that works in IE containing the following: myElement.innerText =
I have a normal asp.net page containing some code that I want to measure
If I have code like this: string s = MyClass.GetString(); // Returns string containing
I have seen a web page source code containing the following css declaration at
I have many small files containing code fragments, pseudo-code algorithms, classes, templates, SQL-samples, etc.,
I have a Prolog file (Hanoi.pl) containing the code for solving the Hanoi Towers
Am I allowed to have a directory named 'import' containing Python code? Or will
I have a list of objects, each containing an Id, Code and Description. I
I have code that references a web service, and I'd like the address of
When searching code for strings, I constantly run into the problem that I get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.