Unix/Linux Go Back    

UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

How to reverse compiled bash (obfucation)?

UNIX for Advanced & Expert Users

Thread Tools Search this Thread Display Modes
Old Unix and Linux 10-10-2017   -   Original Discussion by mhsh0001
mhsh0001's Unix or Linux Image
mhsh0001 mhsh0001 is offline
Registered User
Join Date: Oct 2017
Last Activity: 2 November 2017, 7:28 PM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Wrench How to reverse compiled bash (obfucation)?

hi guys,
10 years a go I wrote an script in bash programming and I compiled (obfuscate) it, but after 10 years I need to change some lines and remove some lines, but i do not remember what I've done.
does anyone has any idea about decompile (deobfuscation) it?

here is some line of my code (u are not seeing any omitted):

Obfuscation sample - Free Image Hosting

BTW, I used ltrace and strace but I do not familiar with these commands and how to change it?

tnx in advance guys

Moderator's Comments:
How to reverse compiled bash (obfucation)? edit by bakunin: added link for you.

Last edited by bakunin; 10-12-2017 at 12:27 AM..
Sponsored Links
Old Unix and Linux 10-11-2017   -   Original Discussion by mhsh0001
Yoda's Unix or Linux Image
Yoda Yoda is offline Forum Advisor  
Jedi Master
Join Date: Jan 2012
Last Activity: 21 March 2018, 4:21 PM EDT
Location: Galactic Empire
Posts: 3,667
Thanks: 257
Thanked 1,330 Times in 1,246 Posts
Do you remember which utility was used to obfuscate the code?
Sponsored Links
Old Unix and Linux 10-11-2017   -   Original Discussion by mhsh0001
drl's Unix or Linux Image
drl drl is offline Forum Advisor  
Registered Voter
Join Date: Apr 2007
Last Activity: 20 March 2018, 12:42 PM EDT
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,220
Thanks: 257
Thanked 418 Times in 359 Posts

Also at how to reverse compiled bash (obfucation)

cheers, drl
Old Unix and Linux 10-12-2017   -   Original Discussion by mhsh0001
bakunin's Unix or Linux Image
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
Join Date: May 2005
Last Activity: 20 March 2018, 9:25 AM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 5,719
Thanks: 112
Thanked 1,656 Times in 1,217 Posts
Kindly note that compiling source code into an executable is not a revertable process. By compiling something into an executable information is stripped from the whole and one needs to provide this information to "decompile" it.

That means: you can "decompile" soemthing but it will always be a "best effort" and you will not get back the source code you started with.

The things you won't get back (because they are stripped away by the compiler - any compiler) are:
  • comments of any sorts (not necessary to run the code and therefore stripped)
  • "speaking" names for variables, functions, ....
  • "source code formatting of any kind

I hope this helps.

Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Bash: menu-complete and reverse ozkanb Red Hat 0 04-10-2013 09:03 AM
How to Reverse a sentence in linux ? (bash/cshell) eawedat Shell Programming and Scripting 5 09-02-2012 12:29 PM
GNU Tar with compression for AIX 4.2 already compiled ? Browser_ice AIX 1 06-05-2009 04:32 AM
Can C determine which OS it's being compiled on? quattro20v Programming 3 12-29-2008 05:41 AM
Compiled Files tripp4337 UNIX for Advanced & Expert Users 2 09-13-2003 02:23 PM

All times are GMT -4. The time now is 06:04 AM.