How to reverse compiled bash (obfucation)?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to reverse compiled bash (obfucation)?
# 1  
Old 10-10-2017
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:
Mod Comment edit by bakunin: added link for you.

Last edited by bakunin; 10-12-2017 at 01:27 AM..
# 2  
Old 10-11-2017
Do you remember which utility was used to obfuscate the code?
# 3  
Old 10-11-2017
# 4  
Old 10-12-2017
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.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Bash: menu-complete and reverse

Hi, In the archives I found this: And this works fine. $if mode=vi "\C-0-": digit-argument TAB: menu-complete "\e But what I want is to reverse this. So I want that tab does reverse menu completion and shift tab does normal menu completion. Can anyone help me with this? Thanks (0 Replies)
Discussion started by: ozkanb
0 Replies

2. Shell Programming and Scripting

How to Reverse a sentence in linux ? (bash/cshell)

hey all, If I have the given sentence. I like bobo. How could I reverse it to be : .bobo like I I am NOT talking about reversing words or characters by using rev. I am talking about reversing the whole sentence(placement of words in the given sentence). thank you. (5 Replies)
Discussion started by: eawedat
5 Replies

3. UNIX for Advanced & Expert Users

Viewing a compiled executable file

I've got a executable binary file (source code fortran77, compiled using gfortran). I'm not sure this is even possible but I remember someone I knew was able to view the source code that created this binary file, i.e. he used a program that enabled him to see what the source code was. Is this... (2 Replies)
Discussion started by: lost.identity
2 Replies

4. UNIX for Advanced & Expert Users

cannot run c compiled programs

iam in the way of making graphics using SDL.i copied from cd usign mount -a /cdrom cd /cdrom cp SDL-1.2.11.tar.gz /usr/test cd /usr/test gunzip SDL-1.2.11.tar.gz tar -xf SDL-1.2.11.tar cd SDL-1.2.11 ./configure ... ... it stops at checking whether the c compiler... (4 Replies)
Discussion started by: kumarangopi
4 Replies

5. Programming

Can C determine which OS it's being compiled on?

Hello all! I've searched the archives, google, documentation and I can't seem to find any answer regarding my question. Our code has to be lint free and due to the following lint warning ---> logical expression always true: op "||" <--- we are forced to #include <note.h > (which appears to be... (3 Replies)
Discussion started by: quattro20v
3 Replies

6. Programming

How to use a .exe with a compiled program.

I am confused about how to use a .exe file in unix along with a compiled C++ program. I've been using emacs and I compiled with g++, but I have no idea how that relates to use with a .exe. (1 Reply)
Discussion started by: adamsy
1 Replies

7. Programming

Why my code couldn't be compiled

#include <Xm/Xm.h> #include <Xm/PushB.h> Widget CreatePushbutton(Widget parent, char* name, XtCallbackProc callback, XtPointer client_data) { Widget push; Arg args; Cardinal n; n=0; push=XmCreatePushButton(parent, name, args, n); XtAddCallback(push,... (4 Replies)
Discussion started by: endeavour1985
4 Replies

8. UNIX for Dummies Questions & Answers

Compiled Compiler

I've got Solaris9 and it comes with no compiler. I've downloaded gcc from GNU, but you can't compile the files without the compiler (chicken before the egg situation). Some sites point to an ftp site of ftp.ai.prep.mit.edu where a compiled version of the GNU gcc exists, but when I have gone there... (3 Replies)
Discussion started by: AJA
3 Replies

9. UNIX for Advanced & Expert Users

Compiled Files

I am using SCO Unix with a Progress Database. There are files that 'pop up' and cause problems. I need to be able to read these files but they are compiled and I don't know how to un-compile them. Is there some kind of software / shareware that I can download to view these files? Is... (2 Replies)
Discussion started by: tripp4337
2 Replies

10. Programming

Running a compiled Program

Just getting into the Unix command line programming and am unable to run any program I write. I am using a Makefile and the source is compiling but when I enter the name of the output file I get back: bash: lab01exe.out: command not found I'm sure I am just dooing something simple... (2 Replies)
Discussion started by: Krebsbac
2 Replies
Login or Register to Ask a Question