GO KALI FREE

strings

Reverse Engineering

Beginnerlow risk

strings prints the sequences of printable characters in files. Useful for finding hidden text, URLs, and clues in binaries.

Installation

sudo apt install binutils

Basic Syntax

strings [options] <file>

Quick Facts

Full Name
strings (GNU Binutils)
License
GPL
Language
C
Platforms
Linux, macOS, Unix
Category
Binary Analysis
Part Of
GNU Binutils

Tool Overview

strings is a command-line utility that prints sequences of printable characters found in files. It is one of the simplest yet most useful binary analysis tools.

The tool is commonly the first step in binary triage. It reveals hidden URLs, IP addresses, credentials, error messages, and other text embedded in compiled code.

strings works on any file type and requires no installation on Linux. It is indispensable for malware analysis, CTF challenges, and digital forensics.

Quick Reference Commands

Verified quick-reference commands for strings
CommandPurpose
strings -a <file>Scan all bytes explicitly.
strings -d <object-file>Scan initialized loaded data sections.
strings -n <minimum-length> <file>Set the minimum sequence length.
strings -t x <file>Prefix strings with hexadecimal file offsets.
GNU strings Manual

Common Commands

strings /path/to/filePrint printable character sequences (min length 4) from a file
strings -a /path/to/fileScan the entire file, not just initialized/loaded sections
strings -n 8 /path/to/fileOnly print strings at least 8 characters long
strings -t x /path/to/filePrefix each string with its file offset in hexadecimal
strings -t d /path/to/filePrefix each string with its file offset in decimal
strings -t o /path/to/filePrefix each string with its file offset in octal
strings -o /path/to/fileShorthand for -t o, printing octal offsets
strings -f /path/to/filePrint the file name before each detected string
strings -e s /path/to/fileSearch for single-byte (ASCII) encoded strings
strings -e l /path/to/fileSearch for 16-bit little-endian (UTF-16LE) strings
strings -e b /path/to/fileSearch for 16-bit big-endian encoded strings
strings -e L /path/to/fileSearch for 32-bit little-endian encoded strings
strings -e B /path/to/fileSearch for 32-bit big-endian encoded strings
strings -e S /path/to/fileSearch for single-8-bit-byte encoded strings
strings -w /path/to/fileInclude all whitespace characters as part of strings
strings -s ' | ' /path/to/fileUse a custom separator between output strings
strings -T elf32-i386 /path/to/fileTreat the file as the specified binary object format
strings -n 10 -t x /path/to/fileCombine minimum length and hex offsets for triage
strings /path/to/file | grep -i passExtract strings then filter for credential-like tokens
strings /path/to/file | grep -Eo 'https?://[^ ]+'Pull URLs out of extracted strings
strings -a -n 6 /path/to/file > out.txtDump long strings from the whole file to a text file
strings @args.txtRead command-line options and file names from a response file
strings --helpDisplay the usage summary and available options
strings --versionPrint the strings (GNU binutils) version information
strings -d /path/to/fileOnly scan data (loaded, initialized) sections of the object file

Step-by-Step Guide

  1. 1Execute the utility against your target file
  2. 2Use grep to filter the output for interesting terms
  3. 3Adjust the length parameters to hide short, meaningless characters
  4. 4Search the output for embedded IP addresses, web links, or credentials
  5. 5Document any significant discoveries for your report

Warnings

Use Cases

Credential Discovery

Find embedded passwords and API keys.

CTF Challenges

Find hidden flags and clues in binaries.

Malware Triage

Quickly extract IOCs from malware samples.

URL and IP Extraction

Find network indicators in binaries.

Key Features

Related Tools

objdump

Reverse Engineering

objdump displays information about object files. It can disassemble executables, show headers, symbols, and more.

Ghidra

Reverse Engineering

This hands-on guide shows how to use Ghidra to inspect a program you compile yourself. You'll compare decompiled code with the underlying assembly, follow cross-references, and document what the binary does without executing it.

Autopsy

Forensics

Learn how to use Autopsy, the free digital forensics software, in a hands-on practice case. Start with a verified disk image, run ingest modules, look for deleted files, and use keyword hits and timeline entries to build a report.

Frida

Reverse Engineering

Frida is a dynamic instrumentation toolkit for developers, reverse-engineers, and security researchers. It allows you to inject snippets of JavaScript or your own library into native apps on various platforms — making it the industry standard for runtime analysis and mobile app security testing.

GDB

Reverse Engineering

Learn how to use GDB, the GNU Debugger, by building a small C program with debug symbols and following it from the first breakpoint to a crash. Use the same steps to inspect variables, read a backtrace, and tell when a core dump or a look at the assembly would help.

Objection

Reverse Engineering

Objection is a runtime mobile exploration toolkit, powered by Frida, built to help you assess the security of your mobile applications without needing a jailbroken or rooted device.

Related Cybersecurity Guides

Ethical Hacking · Intermediate

Reverse Engineering for Beginners: Learn to Analyze Binaries with Ghidra & GDB

Learn reverse engineering from scratch: analyze binaries with Ghidra and GDB, read assembly, crack a practice binary, and build a starter toolkit.

Ethical Hacking · Intermediate

Malware Analysis: Beginner's Guide to Static & Dynamic Analysis in Kali Linux

Learn malware analysis from scratch: build a safe isolated lab, triage samples with static and dynamic analysis, write YARA rules, and report IOCs.

Linux · Beginner

Command Line Essentials: Mastering the Terminal for Security Work

Essential command line skills for cybersecurity professionals including navigation, text processing, scripting, and automation.

Tools · Beginner

How to Use Netcat: Beginner's Guide to the nc Command in Kali Linux

How to use Netcat (nc) in Kali Linux: test ports, run a listener, grab banners, transfer files, and catch a reverse shell — worked example and cheat sheet.

Frequently Asked Questions

What is strings used for?

strings extracts printable character sequences from files. It is used to find hidden text, URLs, passwords, and clues in binaries.

How do I use strings?

Run strings binary to extract strings, or strings -n 10 binary to filter for strings at least 10 characters long.

Can strings find passwords?

Yes, strings is often the first tool to find embedded credentials, API keys, and passwords in binaries.

What is strings -e for?

strings -e changes encoding. Use -e l for little-endian 16-bit, -e L for big-endian 16-bit, -e b for 8-bit.

Tags

#reverse-engineering#static-analysis#strings

Output Explanation

Simply prints out any consecutive sequence of human-readable characters found embedded within the compiled machine code.

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.