Assembly Language for Beginners

(Jeff_L) #1

5.4. STRINGS


diffie-hellman-group-exchange-sha256
digests
D$iPV
direct-streamlocal
[email protected]


FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A6...


There are options, error messages, file paths, imported dynamic modules and functions, some other
strange strings (keys?) There is also unreadable noise—x86 code sometimes has chunks consisting of
printable ASCII characters, up to 8 characters.


Of course, OpenSSH is open-source program. But looking at readable strings inside of some unknown
binary is often a first step of analysis.


grepcan be applied as well.


Hiew has the same capability (Alt-F6), as well as Sysinternals ProcessMonitor.


5.4.3 Error/debug messages.


Debugging messages are very helpful if present. In some sense, the debugging messages are reporting
what’s going on in the program right now. Often these areprintf()-like functions, which write to log-files,
or sometimes do not writing anything but the calls are still present since the build is not a debug one but
releaseone.


If local or global variables are dumped in debug messages, it might be helpful as well since it is possible
to get at least the variable names. For example, one of such function in Oracle RDBMS isksdwrt().


Meaningful text strings are often helpful. TheIDAdisassembler may show from which function and from
which point this specific string is used. Funny cases sometimes happen^13.


The error messages may help us as well. In Oracle RDBMS, errors are reported using a group of functions.
You can read more about them here:blog.yurichev.com.


It is possible to find quickly which functions report errors and in which conditions.


By the way, this is often the reason for copy-protection systems to inarticulate cryptic error messages
or just error numbers. No one is happy when the software cracker quickly understand why the copy-
protection is triggered just by the error message.


One example of encrypted error messages is here:8.5.2 on page 822.


5.4.4 Suspicious magic strings.


Some magic strings which are usually used in backdoors looks pretty suspicious.


For example, there was a backdoor in the TP-Link WR740 home router^14. The backdoor can activated
using the following URL:
http://192.168.0.1/userRpmNatDebugRpm26525557/start_art.html.


Indeed, the “userRpmNatDebugRpm26525557” string is present in the firmware.


This string was not googleable until the wide disclosure of information about the backdoor.


You would not find this in anyRFC^15.


You would not find any computer science algorithm which uses such strange byte sequences.


And it doesn’t look like an error or debugging message.


So it’s a good idea to inspect the usage of such weird strings.


(^13) blog.yurichev.com
(^14) http://sekurak.pl/tp-link-httptftp-backdoor/
(^15) Request for Comments

Free download pdf