> For the complete documentation index, see [llms.txt](https://nk0.gitbook.io/dfir/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nk0.gitbook.io/dfir/windows/misc/advanced-obfuscation.md).

# Advanced Obfuscation

{% embed url="<https://www.fireeye.com/content/dam/fireeye-www/blog/pdfs/dosfuscation-report.pdf>" %}
Cinderblock of Information
{% endembed %}

### Caret ^ Insertion

Use the caret (^) escape character to avoid static/pattern searching&#x20;

```
C:\WINDOWS\system32\cmd.exe /c
P^^o^^w^^e^^r^^S^^h^^e^^l^^l^^.^^e^^x^^e^^
-No^^Exit -Ex^^ec By^^pass -^^EC YwBhAG^^wAYwA=
```

### Commas & Semicolons&#x20;

The final obfuscation characters uncovered during this research are the comma and semicolon. The comma and semicolon are almost always interchangeable with one another and can be placed almost anywhere that whitespace is allowed in cmd.exe command line arguments. These characters can even serve as delimiters in places where whitespace delimiters are typically required (easily breaking the previous sample regular expression term echo\s):

```
,;,cmd.exe,;,/c,;,echo;Command 1&&echo,Command 2
```

### Environment Variables and Substrings

The COMSPEC environment variable contains a 27-character value which is the full path to cmd.exe.

```
%coMSPec:~ -0, +27% /b /c start /b /min netstat -ano | findstr LISTENING
```


---

# 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:

```
GET https://nk0.gitbook.io/dfir/windows/misc/advanced-obfuscation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
