LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-07-2013, 01:11 PM   #1
grob115
Member
 
Registered: Oct 2005
Posts: 542

Rep: Reputation: 32
Decompiling a compiled C program


Hi, thought once a C / C++ program has been compiled, it's difficult to reverse compile it to source like in Java or C#. However, this article appears to point to the contrary.
http://www.thegeekstuff.com/2012/05/...-shell-script/

Any ideas? It appears the program "shc" just converts bash functions to C code, and use gcc to compile it into executable. So how easy is it to reverse compile this?
 
Old 07-07-2013, 01:14 PM   #2
grob115
Member
 
Registered: Oct 2005
Posts: 542

Original Poster
Rep: Reputation: 32
Okay just read here....
Quote:
shc itself is not a compiler such as cc, it rather encodes
and encrypts a shell script and generates C source code with
the added expiration capability. It then uses the system
compiler to compile a stripped binary which behaves exactly
like the original script. Upon execution, the compiled
binary will decrypt and execute the code with the shell -c
option. Unfortunatelly, it will not give you any speed
improvement as a real C program would.
 
Old 07-09-2013, 04:29 PM   #3
Lantzvillian
Member
 
Registered: Oct 2007
Location: BC, Canada
Distribution: Fedora, Debian
Posts: 210

Rep: Reputation: 41
A compiled C program isn't all that difficult to reverse for those that work in the industry of reverse engineering... and some very talented people can also look at asm and see whats going on for the most part without debuggers or tools.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] A compiled C program copied using a self-written program, failed to work trainee Programming 8 06-27-2013 07:53 PM
the source program after compiled ust Linux - Software 6 02-12-2009 03:20 PM
looking for help with decompiling an app bgriesi Programming 4 06-27-2004 11:22 AM
Using objdump for decompiling JIV Programming 0 06-13-2004 08:33 AM
decompiling... lordslayor Programming 9 03-27-2003 10:58 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration