• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Search | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

C code obfuscator

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More

View previous topic :: View next topic  
Author Message
capi
SF Senior Mod
SF Senior Mod


Joined: 21 Sep 2003
Posts: 16777097
Location: Portugal

Offline

PostPosted: Wed Oct 13, 2004 6:33 am    Post subject: C code obfuscator Reply with quote

Ok, I am releasing a little toy prog that I made for fun over the last couple of afternoons, for anyone interested. It is licensed under the GPL.

I make no claims as to it's usability (in fact, I make all claims to the contrary: it's useless, don't use it! Razz).

An extract from the README:
Quote:
The original idea [with obfs is] to implement something that strips all non-essential
sequences from a C language source code (meaning comments, whitespace),
while leaving it's functionality unchanged.

Of course this is of little use for most real world purposes, but well, who
cares Smile


Here is the source (you will need gcc, make and flex or equivalents): obfs-0.1.tar.gz

A compiled binary for Intel 586 Linux platforms, dynamically linked with glicb 2.3.3: obfs-0.1.i586.tar.gz
(./obfs --help for usage information)

As I said, nothing fancy, especially hard to make, or even useful. It probably has bugs, don't use it for production code. I just released it as a curiosity. I can make available a version of the source that does not require flex to compile if needed.
Back to top
View user's profile Send private message
tsh33p
Just Arrived
Just Arrived


Joined: 07 Oct 2004
Posts: 0


Offline

PostPosted: Wed Oct 13, 2004 4:29 pm    Post subject: Reply with quote

Nice little program there Smile. I usually always code with neatness, I always make sure there are no extra spaces, etc. Lol, I even make sure I have CR LF after the text in EVERY text file on my computer. I'm like a nerd at keeping my files neat. Otherwise I probably might affixiate all over my self Confused.
Back to top
View user's profile Send private message
capi
SF Senior Mod
SF Senior Mod


Joined: 21 Sep 2003
Posts: 16777097
Location: Portugal

Offline

PostPosted: Thu Oct 14, 2004 3:17 am    Post subject: Reply with quote

Hehe, thank you Smile

Well, actually the point ot the program above isn't really to make the code neat, rather to make it "un-neat" - i.e. turn something like:
Code:
for (i  = 0; i < 50; i += 5 * -k)
{
    /* this for is here to get the matter/anti-matter conversor
       initialized before the Gauss flux reverses on itself */
   blah (bla, ble);
   if (s[i] == '\0')
   {   /* avoid time paradox with the sequence transmogrifier */
      bleh (i);
      i = i - -bloh(k);
   }
}

into:
Code:
for(i=0;i<50;i+=5*-k){blah(bla,ble);if(s[i]=='\0'){bleh(i);i=i- -bloh(k);}}


Future versions (if I do get around to making them) should do neater things such as mangle variable names, replace common expressions and literals with weird "look at me for 15 minutes to figure out what this does" expressions that return the same value, and so on.

As I said, just something completely useless unless maybe if you're wanting to make a sig program or something Smile
Back to top
View user's profile Send private message
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Area

Log in | Register