Curiosity kills the cat, we always wants to know more. I discover a command that can actually extract and prints out the readable string from the binaries. Okay lets see what is the interesting readable string in the /bin/cat
The simplest way is doing this:
What I get ?
... Richard M. Stallman Torbjorn Granlund 5.96 GNU coreutils benstuvAET standard output ...
Haha, that is actually plain text to showing cat’s version when you type this
Oh, do you want to know more? By default, strings scan over the initialized and loaded sections of object files. To scan over entire files, -a.
strings -a /bin/cat
Of course you can’t get much information from cat, this command’s symbol should be already striped. But if you try on other program binaries, such as the one that you compile from source. You can obtain info such as variable names.
Where are the readable string located?
strings -t x /bin/cat
-t x prints the offset of the string in hex code, for decimal:
strings -t d /bin/cat
Just print the readable strings only if it is more than 40 characters.
strings -n 40 /bin/cat
Okay, pity cat, you may go. Huh still curious about what strings can do?