Re: c printf/variables content visible in compiled binary. How to hide that ?



Benoit Lefebvre wrote:
For this part I think I'll go with base64 or whatever because rot13
does not include others chars than [A-Za-z]+

base64 is going to make it MORE likely the data will show up in the
output of 'strings'. It will make it entirely into printable characters.

If you really want to make the data not show up in the output of
'strings', do some sort of transformation that converts it all into
non-printable characters, or that inserts a non-printable character
periodically (since 'strings' looks for sequences of consecutive
printable characters). One possible way to do this, if you are
already starting with a string of printable characters (probably
hexadecimal numbers) would be to add 128 to every other number.
Then store this as an array of unsigned characters. If you start
with all ASCII characters (which are by definition in the range
0-127), you will then have an output that has no two consecutive
ASCII characters. You can reverse this transformation by ANDing
with 0x7f. Of course, this assumes the top-most bit was meaningless
to start with for every character. If that's not true, it would
trash your data.

Anyone got a better idea?
At the beginning I was thinking maybe there is a compiler flag that
would do the job.. looks like no.. heh

There are object file obfuscators out there for various languages.
I know that they are avaialble for C# and for Java. I don't know
of any for C though. But in principle, it could happen.

- Logan
.



Relevant Pages

  • Re: Why R6RS is controversial
    ... the semantics of the language, ... behavior of grapheme-cluster characters under most linguistic ... as the strings grow longer. ... Normalization is hideously complicated, and may require many ...
    (comp.lang.scheme)
  • Re: Unicode LISP??
    ... I'm not experienced with Common Lisp library, ... terms of strings rather than characters. ... have their representation upgraded if they are updated in place. ...
    (comp.lang.lisp)
  • Re: not quite 1252
    ... The kill_gremlins function is intended to fix Unicode strings that have been obtained by decoding 8-bit strings using 'latin1' instead of 'cp1252'. ... In fact it wasn't, it was UTF-8 like Sergei wrote, but it was easy to convert it to cp1252, no problem. ... characters to documents marked up as ISO 8859-1 or other encodings. ...
    (comp.lang.python)
  • Re: How to check variables for uniqueness ?
    ... characters is the sequence SS. ... is simply capitalizing strings. ... The fact that case mapping in English /is/ simple is neither here not ... That is a fair criticism of the Unicode position. ...
    (comp.lang.java.programmer)
  • Re: How to check variables for uniqueness ?
    ... FI in English typography), so the correct uppercase version of those ... characters is the sequence SS. ... So you at least agree with me that it should be consistent with toUpperCase -- all strings should have a single canonical toUpperCase, a single canonical toLowerCase, both should define equivalence classes on the mixed-case input strings, these should be the SAME equivalence class, and equalsIgnoreCase should implement and embody the corresponding equivalence relation. ... The version that doesn't shouldn't surprise English speakers; the version that does shouldn't surprise anyone familiar with its locale-specific behavior for the locale actually used. ...
    (comp.lang.java.programmer)