Pages

Tuesday, September 29, 2009

Strings replacement for windows

      Sometimes a simple utility like unix strings can be very helpful in forensics process. Strings is a tool for Windows OS, developed by Mark Russinovich, that scans executables or object files for ASCII or UNICODE strings. Strings can be called with wildcard parameters and can be used in conjunction with other tools like findstr. 


Ex:
      strings prog123.exe | findstr -i name > OUT


Another useful parameter is '-n' used for return only strings of a minimum length.  The flags -a and -u  can be used to scan for ASCII/UNICODE strings. It can scan files and folders too.


Using strings


Usage: strings.exe [-a] [-b bytes] [-n length] [-o] [-q] [-s] [-u]
Strings takes wild-card expressions for file names, and additional command line parameters are defined as follows:
-sRecurse subdirectories.
-oPrint offset in file string is located.
-aScan for ASCII only.
-uScan for UNICODE only.
-b bytesBytes of file to scan.
-n XStrings must be a minimum of X characters in length.
To search one or more files for the presence of a particular string using strings use a command like this:
strings * | findstr /i TextToSearchFor

References:


No comments:

Post a Comment