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 1 Week Ago
mhsh0001 mhsh0001 is offline
Registered User
Join Date: Oct 2017
Last Activity: 18 October 2017, 3:52 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; 1 Week Ago at 12:27 AM..
Sponsored Links
Old Unix and Linux 1 Week Ago
Yoda's Unix or Linux Image
Yoda Yoda is offline Forum Advisor  
Jedi Master
Join Date: Jan 2012
Last Activity: 19 October 2017, 7:50 PM EDT
Location: Galactic Empire
Posts: 3,571
Thanks: 253
Thanked 1,300 Times in 1,219 Posts
Do you remember which utility was used to obfuscate the code?
Sponsored Links
Old Unix and Linux 1 Week Ago
drl's Unix or Linux Image
drl drl is offline Forum Advisor  
Registered Voter
Join Date: Apr 2007
Last Activity: 19 October 2017, 5:06 PM EDT
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,194
Thanks: 232
Thanked 408 Times in 352 Posts

Also at how to reverse compiled bash (obfucation)

cheers, drl
Old Unix and Linux 1 Week Ago
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
Join Date: May 2005
Last Activity: 20 October 2017, 2:24 AM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 5,611
Thanks: 106
Thanked 1,594 Times in 1,175 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:37 AM.