strings_h


"/home/yossef/notes/personal/hacking/strings_h.md"

path: personal/hacking/strings_h.md

- **fileName**: strings_h
- **Created on**: 2026-02-02 15:50:30

string

strings -t x main | less

Below is a clean Markdown doc explaining strings, most-used options, how to reverse, and common pipelines.

strings Command (Linux) – Reverse Engineering Cheat Sheet

The strings command extracts printable text strings from binary files
(ELF executables, object files, memory dumps, etc.).

Commonly used in reverse engineering, CTFs, and binary analysis.


Basic Usage

strings FILE

Example:

strings main

➡ Prints all printable ASCII strings found in main

Most Used Options

-t — Show string offset (address)

strings -t x main

Format options for -t:

Example output:

00001020 printf
0000102a /bin/sh

Useful for mapping strings to binary offsets.

-n — Minimum string length

strings -n 5 main

Only show strings with at least 5 characters.

(Default is usually 4)

-a — Scan entire file (default for most cases)

strings -a main

Forces scanning the full file, not just initialized sections.

-e — Character encoding

strings -e l main

Encodings:

Example:

strings -e l main

➡ Finds wide strings (Windows binaries, Unicode)

Paging Output (Very Common)

Pipe to less

strings -t x main | less

Navigation inside less:

Reverse Output Order (IMPORTANT)

Reverse line order (bottom → top)

strings -t x main | tac

or with paging:

strings -t x main | tac | less

📌 tac = reverse of cat

Reverse Characters in Each String

strings main | rev

Example:

olleH
dlroW

Reverse + Address (combined)

strings -t x main | rev | less

or (better readability):

strings -t x main | tac | less

Search for Specific Strings

Using grep

strings main | grep printf

Case-insensitive:

strings main | grep -i flag

With offsets:

strings -t x main | grep flag

Sort Strings

strings main | sort

Unique only:

strings main | sort -u

Practical Reverse Engineering Patterns

Find libc functions

strings main | grep -E "printf|scanf|system"

Find shell strings

strings main | grep "/bin"

Find flags / secrets

strings main | grep -i flag


## Most Common Pipelines (MEMORIZE THESE)
```bash
strings main | less
strings -t x main | less
strings main | grep flag
strings -t x main | grep printf
strings main | tac | less
strings main | rev

Quick Summary

Option Meaning
-t x Show hex offset
-n N Min string length
-a Scan whole file
-e l UTF-16LE strings
tac Reverse line order
rev Reverse characters
less Page output

TL;DR (Most Used)

strings -t x main | less
strings main | grep flag
strings -t x main | tac | less

continue:./objdump_using.md
before:./best_google_dork.md