Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to revert compiled shell code?

Tags:

bash

shell

macos

I have this shell script which runs correctly. However, the content of the file is...

3b33 8963 9a9d b0b2 98f7 8f3a cd9d 6067
b09d ae7b a351 639e 18f1 5c69 58ec 9343
512c c449 ebc0 cb64 7712 3335 2db2 b6f6
e4f7 65e6 48b1 a145 f270 1475 f062 f548
8d0e 14ec 1ca1 cd4e 6221 55fe c25b b7f8
8814 759b 11c3 3def 6b29 1fee 34fe 13fb
ee2c 3618 87af a6fc 3f5e 43b0 f885 6b6f
7aa2 9328 4f0b a2a2 f2ea cd9b 6039 b465

Is there anyway to reverse engineer this to normal shell code so that I can tweak the logic?

like image 603
TeaCupApp Avatar asked Jul 20 '26 22:07

TeaCupApp


1 Answers

Judging by the file size and hex dump, this is not a script anymore. It's been compiled into binary form by a tool such as this one, possibly encrypted, and probably bundled with all the binaries it depends on.

If this was simply an obfuscated script, it would have been much easier to reverse. As it stands, it's still doable, but requires a lot more qualified effort. Depending on the nature of your binary, it's probably wiser (read: cheaper) to rewrite it, have the original author modify it to your needs, or write middleware that sits between this binary and your data to do additional processing.

like image 68
Sir Athos Avatar answered Jul 22 '26 12:07

Sir Athos