> 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/webhacking.kr/webhacking.kr-old-5.md).

# \[webhacking.kr] old-5

<figure><img src="https://blog.kakaocdn.net/dna/cB8l5v/btsOv3UjSXU/AAAAAAAAAAAAAAAAAAAAAPTVtI9kjyMcpY1eFCPzZrn8NPGqi4wtVZ5nj4jNPbbj/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=T%2BYlkYXMQAkjRbpxxbsE92L%2B%2FxI%3D" alt="" height="486" width="1555"><figcaption></figcaption></figure>

<figure><img src="https://blog.kakaocdn.net/dna/dF5TIZ/btsOuPP5bjX/AAAAAAAAAAAAAAAAAAAAAEa-FYDZ_gjcvjV5GaLSKwlcAJxhYkrAXiG-XoQpT4GP/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=T%2F%2FBov1xE6%2FxI1L9dkntd3CAPOg%3D" alt="" height="632" width="701"><figcaption></figcaption></figure>

-> 소스코드를 확인해본다.

<figure><img src="https://blog.kakaocdn.net/dna/PogyT/btsOuIwBsL1/AAAAAAAAAAAAAAAAAAAAALvPRGitepI0B35R0SYodkLKJfBmoSKqYeZv5KZahqbA/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=iupbTtEjV2oqaEmdB9pitna35mY%3D" alt="" height="472" width="750"><figcaption></figcaption></figure>

<figure><img src="https://blog.kakaocdn.net/dna/PNsvm/btsOvV90UPM/AAAAAAAAAAAAAAAAAAAAAL2e6mjPZtWn7CJA4HoMj88zmX9ZNJhROBSaGgWDwHUP/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=julGwZ7UyTA1RdRxrXptdFjXqPI%3D" alt="" height="715" width="1283"><figcaption></figcaption></figure>

<figure><img src="https://blog.kakaocdn.net/dna/cWHZ3x/btsOuLmCeGv/AAAAAAAAAAAAAAAAAAAAAFc52Ire35bapoMulZCfPGhyjV5Ur4mGhXX77GS0KYAS/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=yi1yL7EoYnImQXHP%2FA9Kl6p1uLI%3D" alt="" height="546" width="1645"><figcaption></figcaption></figure>

해당 페이지의 소스코드가 난잡하다

<figure><img src="https://blog.kakaocdn.net/dna/cxMvyu/btsOt6Sz52e/AAAAAAAAAAAAAAAAAAAAAPKbqDMmGMJncEV81QhFK7zsDdmhcArqiXysMDYB8UWy/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=udYTamuTWRY5zT8js6Fyw0jVjUE%3D" alt="" height="210" width="816"><figcaption></figcaption></figure>

```
l='a';
ll='b';
lll='c';
llll='d';
lllll='e';
llllll='f';
lllllll='g';
llllllll='h';
lllllllll='i';
llllllllll='j';
lllllllllll='k';
llllllllllll='l';
lllllllllllll='m';
llllllllllllll='n';
lllllllllllllll='o';
llllllllllllllll='p';
lllllllllllllllll='q';
llllllllllllllllll='r';
lllllllllllllllllll='s';
llllllllllllllllllll='t';
lllllllllllllllllllll='u';
llllllllllllllllllllll='v';
lllllllllllllllllllllll='w';
llllllllllllllllllllllll='x';
lllllllllllllllllllllllll='y';
llllllllllllllllllllllllll='z';
I='1';
II='2';
III='3';
IIII='4';
IIIII='5';
IIIIII='6';
IIIIIII='7';
IIIIIIII='8';
IIIIIIIII='9';
IIIIIIIIII='0';
li='.';
ii='<';
iii='>';
lIllIllIllIllIllIllIllIllIllIl=lllllllllllllll+llllllllllll+llll+llllllllllllllllllllllllll+lllllllllllllll+lllllllllllll+ll+lllllllll+lllll;
lIIIIIIIIIIIIIIIIIIl=llll+lllllllllllllll+lll+lllllllllllllllllllll+lllllllllllll+lllll+llllllllllllll+llllllllllllllllllll+li+lll+lllllllllllllll+lllllllllllllll+lllllllllll+lllllllll+lllll;
if(eval(lIIIIIIIIIIIIIIIIIIl).indexOf(lIllIllIllIllIllIllIllIllIllIl)==-1) 
	{alert('bye');throw "stop";}if(eval(llll+lllllllllllllll+lll+lllllllllllllllllllll+lllllllllllll+lllll+llllllllllllll+llllllllllllllllllll+li+'U'+'R'+'L').indexOf(lllllllllllll+lllllllllllllll+llll+lllll+'='+I)==-1)
    {alert('access_denied');
    	throw "stop";}
    else{document.write('<font size=2 color=white>Join</font><p>');
    document.write('.<p>.<p>.<p>.<p>.<p>');
    document.write('<form method=post action='+llllllllll+lllllllllllllll+lllllllll+llllllllllllll+li+llllllllllllllll+llllllll+llllllllllllllll+'>');
    document.write('<table border=1><tr><td><font color=gray>id</font></td><td><input type=text name='+lllllllll+llll+' maxlength=20></td></tr>');
    document.write('<tr><td><font color=gray>pass</font></td><td><input type=text name='+llllllllllllllll+lllllllllllllllllllllll+'></td></tr>');
    document.write('<tr align=center><td colspan=2><input type=submit></td></tr></form></table>');}
```

eval('document.cookie').indexOf('oldzombie') 는 실제로 document.cookie.indexOf('oldzombie')의 효과를 발휘함(타 롸업) 참고

-> WAF(Web Application Firewall)나 필터링 시스템이 document.cookie 직접 호출을 막을 경우에 쓰이는 방법이란다.. 알아두자.

-> 그리고 난독화 코드에 cookie 값에 oldzombie 라는 문자열이 존재하고 URL에 mode = 1이라는 문자열이 존재해야한다는 조건이 붙는다. -> oldzombie라는 쿠키 값을 생성 후 url에 mode = 1을 붙여준다.

<figure><img src="https://blog.kakaocdn.net/dna/cc35nD/btsOuFs8PzI/AAAAAAAAAAAAAAAAAAAAAPGy3rgSg-By7YecZHcZ5JfidQ56fpQT4OLAhHj93xE-/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=BJWaaajh4NmCwPGpkSqKZmj5QWM%3D" alt="" height="690" width="1402"><figcaption></figcaption></figure>

<figure><img src="https://blog.kakaocdn.net/dna/cSDkL3/btsOt7D4WfJ/AAAAAAAAAAAAAAAAAAAAAOd_guRE1JiDlzM5oVXJw-xd8cQcUoL5cKyts7MWn7kF/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=5XRCNUdgOnZbus%2FRVp5eD8yATBU%3D" alt="" height="370" width="628"><figcaption></figcaption></figure>

-> 목표로 한 join 사이트가 뜬다.

-> admin 계정으로 가입 시도하니까 아이디가 이미 존재한다고 뜸.

<figure><img src="https://blog.kakaocdn.net/dna/CbWaC/btsOu4Ggzom/AAAAAAAAAAAAAAAAAAAAAGp__V0H_rcCLXuvjuPCBEPelg6TMdMfCuwW-ITXBpnJ/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=5GI%2FPvqTIWwM%2FjJK9zgSndnMPzs%3D" alt="" height="310" width="757"><figcaption></figcaption></figure>

<figure><img src="https://blog.kakaocdn.net/dna/bq6f3I/btsOv8uAuey/AAAAAAAAAAAAAAAAAAAAABDb-VpqgUrAckUrxAZt_6Wkr2Cv2DqhYuGGi56Ojl7v/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=icJp9zaudpPzXZ1RpVwnv6%2BESTQ%3D" alt="" height="157" width="643"><figcaption></figcaption></figure>

admin 양 옆에 공백 추가함

-> 그냥 admin과 공백이 앞에 존재하는 admin은 SQL에서 다른 값으로 카운트가 되기 때문에 우회가 될 거라고 예상함.

-> 우회 성공

<figure><img src="https://blog.kakaocdn.net/dna/bjouFf/btsOt6E5BPD/AAAAAAAAAAAAAAAAAAAAAHl94f4BXdqz616y7fJKM29EU1JPXnQUsb_JmDJOmuli/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=UOPw70wXUwzdqKX9rOXI6sguYKc%3D" alt="" height="222" width="375"><figcaption></figcaption></figure>

<figure><img src="https://blog.kakaocdn.net/dna/bj2gU4/btsOwbY7Aur/AAAAAAAAAAAAAAAAAAAAAKeFJcU4NmgS76D-rA930VamCK-C-xLDbwDIy_k0RqM6/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=NI0hstnvD7KY%2F28I%2FC8SGegHfVU%3D" alt="" height="275" width="782"><figcaption></figcaption></figure>

&#x20;


---

# 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/webhacking.kr/webhacking.kr-old-5.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.
