> For the complete documentation index, see [llms.txt](https://docs.cooku222.kr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cooku222.kr/security/web-hacking/lord-of-sql-injection/lord-of-sqlinjection-zombie_assassin.md).

# \[Lord Of SQLInjection] zombie\_assassin

<figure><img src="https://blog.kakaocdn.net/dna/bK64RA/btsMBGOHkLa/AAAAAAAAAAAAAAAAAAAAAO3nS932hbDVJ1pmxuvIGg7JXBnFbadUCmn5PoZyfYn0/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=%2FzpXWf1ILqczxfNuTky9ITYd7QE%3D" alt="" height="361" width="767"><figcaption></figcaption></figure>

#### 코드 분석

```
$_GET['id'] = strrev(addslashes($_GET['id']));
$_GET['pw'] = strrev(addslashes($_GET['pw']));
```

* strrev = 문자열을 거꾸로 반환하는 함수
* addslashes = 싱글쿼터나 더블쿼터, NULL(%00)의 앞에 특수문자를 문자열로 만들어주는 \를 넣어서 문자열로 만듦

⇒ strrev(addslashes) = 특수문자가 문자열 처리 된 후에 순서가 뒤집힘

→ 입력값이 거꾸로 반전되는 것까지 고려해야하는 문제

#### 풀이

null 문자를 넣어서 문제를 해결하되 입력값이 거꾸로 삽입되는 점을 이용해서 처음부터 역순으로 넣어준다.

```
?id=%00&&pw=%23 eurt ro
```

<figure><img src="https://blog.kakaocdn.net/dna/bl8z6d/btsMBUlKeWd/AAAAAAAAAAAAAAAAAAAAALlhE9FBY-ApYVpTI3ReSUNQwJi90Sd1pm8PCbbZDjwc/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=X7nV7cnZpk4ffg8dp%2BUw%2BRspxgU%3D" alt="" height="407" width="712"><figcaption></figcaption></figure>


---

# 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://docs.cooku222.kr/security/web-hacking/lord-of-sql-injection/lord-of-sqlinjection-zombie_assassin.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.
