Skip to content

Commit a1b323d

Browse files
authored
chore: update README with usage and options for ntstrings
Added detailed usage instructions and examples for ntstrings.
1 parent f5ff3ff commit a1b323d

1 file changed

Lines changed: 85 additions & 1 deletion

File tree

README.md

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,85 @@
1-
# ntstrings
1+
# ntstrings
2+
3+
**ntstrings** is a string extraction tool for Windows. Designed as a high-performance alternative to standard tools like Sysinternals `strings`, `bstrings`, `xxstrings`, `strings2`, etc.
4+
5+
# Usage
6+
7+
```text
8+
ntstrings [options] <path>
9+
```
10+
11+
### Core Options
12+
13+
| Flag | Description |
14+
| :--- | :--- |
15+
| `-h` | Show the help menu. |
16+
| `-d <dir>` | **Recursive directory scan.** Instead of a single file, provide a directory path to scan all files inside it. |
17+
| `-o <file>` | **Output file.** Write the extracted strings to the specified file instead of printing them to the console (greatly improves performance for large outputs). |
18+
19+
### Search & Filtering
20+
21+
| Flag | Description |
22+
| :--- | :--- |
23+
| `-f <str>` | **Find needle.** Only output strings that contain this specific substring. Highly optimized. |
24+
| `-i` | **Case insensitive.** Makes the `-f` needle search case-insensitive. |
25+
| `-n <len>` | **Minimum length.** Minimum number of characters for a string to be considered valid. (Default: `4`) |
26+
| `-x <len>` | **Maximum length.** Maximum number of characters allowed. Strings longer than this are ignored. (Default: `0` / Unlimited) |
27+
| `-a <bool>` | **Scan ASCII.** Enable or disable scanning for standard 8-bit ASCII strings. (Default: `true`) |
28+
| `-u <bool>` | **Scan Unicode.** Enable or disable scanning for 16-bit UTF-16/Unicode strings. (Default: `true`) |
29+
| `-b <s[:e]>`| **Scan byte range.** Only scan a specific chunk of the file. Format: `start` or `start:end` (in bytes). |
30+
31+
### Regex & Bulk Filtering
32+
*(Note: If `-f` is used, Regex/List filters are ignored to prioritize the high-speed needle search).*
33+
34+
| Flag | Description |
35+
| :--- | :--- |
36+
| `-r <rgx>` | **Regex filter.** Only output strings that match the provided Regular Expression. |
37+
| `-fs <file>` | **File Strings.** Load a text file containing a list of fixed strings (one per line). Only extracts strings containing at least one of these patterns. |
38+
| `-fr <file>` | **File Regex.** Load a text file containing a list of regex patterns (one per line). Only extracts strings matching at least one of these patterns. |
39+
40+
### Sorting
41+
42+
| Flag | Description |
43+
| :--- | :--- |
44+
| `-sa` | **Sort Alphabetical.** Buffers the results and sorts them alphabetically before outputting. |
45+
| `-sl` | **Sort Length.** Buffers the results and sorts them by string length before outputting. |
46+
47+
---
48+
49+
## Examples
50+
51+
**1. Basic String Extraction**
52+
Extract all ASCII and Unicode strings (minimum 4 chars) from a file:
53+
```cmd
54+
ntstrings C:\path\to\memory.dmp
55+
```
56+
57+
**2. Needle Search**
58+
Search a file for a specific case-insensitive string, outputting the results to a text file:
59+
```cmd
60+
ntstrings -f "password" -i -o results.txt memory.dmp
61+
```
62+
63+
**3. Regex Filtering**
64+
Extract only strings that look like URLs:
65+
```cmd
66+
ntstrings -r "^https?://" target.bin
67+
```
68+
69+
**4. Recursive Directory Scanning**
70+
Find all strings in a specific directory (and its subdirectories), ignoring Unicode strings, with a minimum length of 10 characters:
71+
```cmd
72+
ntstrings -u false -n 10 -d C:\Windows\System32
73+
```
74+
75+
**5. Byte Range Scanning**
76+
Only scan the first 1 Megabyte of a file:
77+
```cmd
78+
ntstrings -b 0:1048576 target.bin
79+
```
80+
81+
**6. Bulk IOC Scanning**
82+
Load a list of malicious strings/indicators from a text file and check an executable for them:
83+
```cmd
84+
ntstrings -fs malicious_iocs.txt suspect.exe
85+
```

0 commit comments

Comments
 (0)