> For the complete documentation index, see [llms.txt](https://wiki.zacheller.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.zacheller.dev/exploit-dev-analysis/static-analysis/file-strings.md).

# File strings

## Strings

* Any sequence of printable characters is a **string**
* We can use strings to get hints about the functionality of a program.
  * Accesses a URL
  * Opens another program

### Technical Details

* Strings are terminated by a null byte (0x00)
* [ASCII](http://www.asciitable.com) characters are 8 bits long
  * Now called ANSI

![](/files/-MF81gONo6_sLfTA1svv)

* Unicode characters are 16 bits long
  * Microsoft calls them "wide characters"

![](/files/-MF81jcNYYR_DJ59qxPW)

### The strings command

* Native in Linux, also available for Windows
* Ignores context and formatting
  * can analyze any file type and detect strings across an entire file
    * Can result in false positive (instructions, addresses, etc.)
* Finds all strings in a file 3 or more characters long

#### For Windows

* Bold items can be ignored
* GetLayout and SetLayout are Windows functions
* GDI32.DLL is a Dynamic Link Library

![](/files/-MF81jcOrInqc-9jHE0u)

### Can we always rely on strings?

* Legitimate programs usually include many strings.
* Malware that is packed or obfuscated contains very few strings.
* If upon searching a program with Strings, you find that it has only a few strings, it is probably either obfuscated or packed, suggesting that it may be malicious.
* You’ll likely need to throw more than static analysis at it in order to investigate further


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://wiki.zacheller.dev/exploit-dev-analysis/static-analysis/file-strings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
