Yes, though a properly crafted binary has always been able to hide from strings with even a minimal amount of obfuscation or encryption. There's no way to know all the strings a program can output without running it.
Of course, a properly crafted program can always arbitrarily obfuscate strings.
But if you manage to trick libbfd into thinking it's looking at a particular format, you can hide plain text from a simple "strings" invocation even in files that are not executable. I've been using "strings" on all kinds of files, not only executables, and assumed that it will always display all sequences of printable characters present in the file.
Ah, I see. Fair enough, but I don't think it was ever a great assumption that "strings" would uncover all the text in a file. There are so many ways to screw with a file at the byte level that could confuse "strings" but still appear fine when read by an application.
Re:Don't run 'strings' on untrusted files
by revelation on Saturday October 25, 2014 @03:08PM
(#8509029)
If you solve the problem of determining all output strings of a given program with running it, please leave a message ;)
cough https://en.wikipedia.org/wiki/Halting_problem cough
Re:Don't run 'strings' on untrusted files
by repsilat on Saturday October 25, 2014 @03:40PM
(#8509151)
Sure, you can reduce it down to the Halting Problem, but it's much simpler just to invoke Rice's Theorem.
Re:Don't run 'strings' on untrusted files
by saurik on Saturday October 25, 2014 @08:56PM
(#8509947)
This tool has always, going way back to at least BSD 4.3 (if not earlier), been a tool for dumping the strings table of a binary object, which just so happened to also have a fallback mode for things it didn't know how to parse as an object file.
Based on the man page, I'm going to guess yes:
-a
--all
- Do not scan only the initialized and loaded sections of object files; scan the whole files.
Both the name and description imply that by default it won't scan the whole thing.
I thought "strings" was just a dumb scan over the file. Does this mean that with a properly crafted binary it is also possible to hide strings from a quick check with "strings"?