strings flags & options

Basic usage

Print all printable strings (4+ characters by default) from a file.

strings /usr/bin/ls

-n, --bytes

Set the minimum string length.

strings -n 8 binary_file
strings -n 2 data.bin

-t, --radix

Print the offset of each string. d = decimal, o = octal, x = hex.

strings -t x firmware.bin
strings -t d binary_file

-a, --all

Scan the entire file, not just loadable sections.

strings -a core_dump

-e, --encoding

Set the character encoding. s = 7-bit, S = 8-bit, l = 16-bit little-endian, b = 16-bit big-endian.

strings -e l program.exe

Search for patterns

Combine with grep to find specific strings in binaries.

strings firmware.bin | grep -i "password"
strings app.exe | grep "http"

Extract URLs from a binary

strings binary | grep -oE 'https?://[^ ]+'