coun wargame 풀이
예전에 coun 워게임을 풀면서 작성했던 문서. 현재는 워게임 주소가 열리지 않는다-0-
wargame address: http://coun.r0ar.net
writer: w0rm9 (http://badnom.com)
볼 사람만 열기
Problem :: act#1
============================================================
[::starting::]
http://coun.r0ar.net/one.circus/act1/image.gif
[::extra::]
오감도 中 <환자의 용태에 관한 문제>, 이상
============================================================
문제에서의 숫자들이 0과 1로된 2진수를 ascii문자로 변화하여
풀어야 된다는것은 알 수 있다.
하지만 추가힌트로 나온 http://taijikyo.hihome.com/이상작품/1.htm
오감도에 나오는 <환자의 용태에 관한 문제> 부분을 보면 일련의 숫자들이
서로 마주하고 있다는걸 알 수 있다.
이는 주어진 2진수를 거꾸로 두고 ascii문자로 변환하면 해결할 수 있다.
01101111 o
01110000 p
01110000 p
01101111 o
01110011 s
01101001 i
01110100 t
01101001 i
01101111 o
01101110 n
opposition
============================================================
Problem :: act#2
============================================================
[::starting::]
act2.cgi
조건
Browser : opera/7.5
"http://www.google.com" link page only
[::extra::]
read some RFCs
============================================================
문제의 조건을 보면 act2.cgi에 접속할 때 브라우저가 opera/7.5여야 하고,
링크주소가 http://www.google.com 이어야 한다.
추가 힌트로 RFC문서를 일어보라고 했다.
http://www.ietf.org/rfc/rfc1945.txt?number=1945
브라우저의 종류, 링크주소를 웹서버로 변조해서 보내야 하고, act2의 아파치 인증역시 보내주어야 한다.
브라우저의 종류는 User-Agent: opera/7.5
링크주소는 Referer: http://www.google.com
아파치 인증은 Authorization: Basic Y2lyY3VzYWN0MjpnbG9vbXlzdW5kYXk= (act1을 클리어 하면 나오는 act2의 아파치 인증을
base64로 인코딩한 문자열)
============================================================
[w0rm9@madnom w0rm9]$ telnet coun.r0ar.org 80
Trying 202.30.198.98...
Connected to coun.r0ar.org.
Escape character is '^]'.
GET /one.circus/actsharp2/act2.cgi HTTP/1.1
User-Agent: opera/7.5
Host: coun.r0ar.org
Connection: Keep-Alive
Referer: http://www.google.com
Authorization: Basic Y2lyY3VzYWN0MjpnbG9vbXlzdW5kYXk=
HTTP/1.1 200 OK
Date: Thu, 16 Oct 2003 06:45:32 GMT
Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2 mod_throttle/3.1.2
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
1f7
<META HTTP-EQUIV=refresh
CONTENT=0;URL=http://coun.r0ar.net/one.circus/actsharp2/writef0ract2.cgi>Content-type: text/html
<html>
<head>
<title>::: circus - act #2 :::</title>
</head>
<body>
<body bgcolor=black text=white link=white vlink=white>
<br>
<center>
<font size=2>-=:: act #2 :: =-</font><br><br>
<font size=2>header receiving...<br><br>
<font size=2>opera/7.5<br>
<font size=2>http://www.google.com</font><br><br>
<font size=2><b>match!! pass!</b><br><br>
</center>
</body>
</html>
============================================================
정상적으로 변조되었다.
============================================================
Problem :: act#3
============================================================
[::starting::]
somerset.zip
[::extra::]
IF visual basic Then Cracked At Once.(Reverse Engineer said)
============================================================
주어진 somerset.zip 파일을 다운받아서 압축을 풀어서 살펴보면
Id/Passwd 값을 입력받는 프로그램이 나온다. 예상해 볼 수 있는것이
프로그램 내부에 Id와 Passwd값을 미리 정해놓고, 입력받은 값과
매치시켜서 True/False를 결정하는것 같다.
메모장으로 열어서 Id/Passwd을 찾아보자. (역간의 노가다성 문제)
============================================================
Problem :: act#4
============================================================
[::starting::]
1 의 md5(hex value) 값을 구한다.
그 값을 8등분하고 각 값을 decimal 값으로 변환한다.
8개의 값을 모두 더한다.
이 과정을 1 부터 10000까지 행한다.
하나하나의 최종 결과물을 모두 더한다.
최종값을 SHA1(hex value)값으로 변환한다.
앞에서 10자리의 값을 취한다.
[::extra::]
enjoy programing!
============================================================
문제의
1 의 md5(hex value) 값을 구한다.
그 값을 8등분하고 각 값을 decimal 값으로 변환한다.
8개의 값을 모두 더한다.
이 과정을 1 부터 10000까지 행한다.
하나하나의 최종 결과물을 모두 더한다.
이 부분까지 프로그래밍해보자. php로..
<?
for($i=1;$i<=10000;$i++)
{
$hash = md5($i); // 1 ~ 10000까지 루프를 돌려 md5()값을 구한다.
$hash1 = substr($hash, 0, 4); //그 값들을 각각 8등분한다.
$hash2 = substr($hash, 4, 4);
$hash3 = substr($hash, 8, 4);
$hash4 = substr($hash, 12, 4);
$hash5 = substr($hash, 16, 4);
$hash6 = substr($hash, 20, 4);
$hash7 = substr($hash, 24, 4);
$hash8 = substr($hash, 28, 4);
$hash1_dec = hexdec($hash1); //8등분한 값들을 decimal값으로 변환한다.
$hash2_dec = hexdec($hash2);
$hash3_dec = hexdec($hash3);
$hash4_dec = hexdec($hash4);
$hash5_dec = hexdec($hash5);
$hash6_dec = hexdec($hash6);
$hash7_dec = hexdec($hash7);
$hash8_dec = hexdec($hash8);
$result = $hash1_dec + $hash2_dec + $hash3_dec + $hash4_dec + $hash5_dec + $hash6_dec + $hash7_dec + $hash8_dec; // 그 값들을 모두 더한다.
$final_result += $result; // 하나하나의 최종 결과물을 모두 더한다.
}
echo "$final_result";
?>
그럼 최종값이 2621017790 으로 나온다.
이제 최종값을 SHA1(hex value)값으로 변환하면 30df146f5f460349a3084456ddbd76dd44125c06 이 된다.
============================================================
Problem :: act#5
============================================================
[::starting::]
this
[::extra::]
think about this page
============================================================
이 페이지에서 잠시후
============================================================
-=:: incorrect ::=-
incorrect!
some more think...
EOF
============================================================
이 페이지로 이동하는걸로 봐서는 메타태그를 쓰고, 쿠키를 사용한다는 것을
생각해 볼 수 있다.
현재 쿠키값을 보기 위해 javascript:(document.cookie); 를 주소창에 입력하면
============================================================
acthint=YmVnaW4gNjQ0IGhpbnQudHh0DQpoUjRWWjY0TmRQYTNnNjQ3Wk1MRmRSNUpZTkctb080M282NUZtTUt0bk1xSmlONUFVUXJKYU5hSm1PS3RiDQpoOTAtZk1MN2hNR2tVTUt0WTY1QlZQTEJWUWEyVU1LdFk2NFpuNjVCalJLUmNSMC1aUXItWk1xWlZQNGx0DQpoNjRaaTYyN3BONEZjT0xCaDY1RmNRYXhwTnFVVVI0Vlo2NEpzUjRaaU1yRmRQcXNVUHFNVU40Sm5PTDdaDQpUNjQzaU4wLWRQYUZkUmFaWVJLM2c2NEJqUGJCWE9LeHBRcXRaUXJBQjBiQUINCisNCmVuZA%3D%3D
============================================================
다음과 같은 쿠키값을 볼 수 있다. 이를 Base64 디코딩하면
============================================================
begin 644 hint.txt
hR4VZ64NdPa3g647ZMLFdR5JYNG-oO43o65FmMKtnMqJiN5AUQrJaNaJmOKtb
h90-fML7hMGkUMKtY65BVPLBVQa2UMKtY64Zn65BjRKRcR0-ZQr-ZMqZVP4lt
h64Zi627pN4FcOLBh65FcQaxpNqUUR4VZ64JsR4ZiMrFdPqsUPqMUN4JnOL7Z
T643iN0-dPaFdRaZYRK3g64BjPbBXOKxpQqtZQrAB0bAB
+
end
============================================================
다음과 같이 나온다. 이는 UUDecoding을 통해 해결할 수 있다.
http://www.fpx.de/fp/Software/UUDeview/
에서 Wind0ws 툴을 써서 해결할 수 있다.
그 결과가
============================================================
he final beatitude that transcends suffering, karma, and samsara and is sought especially in Buddhism through the extinction of desire and individual consciousness
============================================================
이다. 이를 해석해보면, 열반 즉, nirvana 라는걸 알 수 있다.
이 값을 웹서버에 보내줘야 하니 역시 80번 포트로 cookie값을 변조해서 보내주면 된다.
============================================================
[w0rm9@madnom w0rm9]$ telnet coun.r0ar.net 80
Trying 202.30.198.98...
Connected to coun.r0ar.net.
Escape character is '^]'.
GET http://coun.r0ar.org/one.circus/actv5/ HTTP/1.0
Authorization: Basic YWN0NWFjdGlvbjpwaGlsX3BoYW50YXNtA
cookie: nirvana=he final beatitude that transcends suffering, karma, and samsara and is sought especially in Buddhism through the extinction of desire and individual consciousness
HTTP/1.1 200 OK
Date: Thu, 16 Oct 2003 15:46:18 GMT
Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2 mod_throttle/3.1.2
X-Powered-By: PHP/4.1.2
Connection: close
Content-Type: text/html
<META HTTP-EQUIV=Refresh CONTENT=5;URL=/one.circus/actv5/yrong/ghKdlXld/ogoogk.cgi><html>
<head>
<title>::: circus - act #5 :::</title>
</head>
<body bgcolor=black text=white link=white vlink=white>
<br>
<center>
<font size=2>-=:: act #5 ::=-</font>
<br><br>
<font size=2>[::starting::]</font>
<br><br>
<font size=2>this</font><br><br>
<font size=2>[::extra::]</font><br><br>
<font size=2>think about this page</font>
</center>
</body>
</html>
============================================================
Problem :: act#6
============================================================
[::starting::]
somerset.zip
[::extra::]
decoding..
============================================================
주어진 somerset.zip 파일의 압축을 풀면(압축비번: password)
============================================================
hkmot&<::iujk4z~zS1LcUAX^TAX_UA\cUAX^TAX_UA\cU1LbTA\b3(LbT1LbT1H^T1H^T1H_UAX_US1H^T1H_UAX_U)6NT1H^TA\bT1H^T1H^T1LbTAX^T1H^TAX^T1FZ0A\cU1H_US1LbTA\bTAX_UAX^TA\cU1LcUAX_UAX_UAX_UAX_UA\cU1H_U)6OU1H^TAX_US1LcU1LcUAX_U1H_U1H^T1LbT1H_UA\bTAX_UAX_UA\cUA\b3(LbT1H_U1LbTS1LcU1LbT1H_UAX^TA\cU1LbTA\cU1LbTAX^T1H^T1H_U1FZ0AX_U1LbT1H_US1LcU1LcU1H_UAX_U1LbTA\b3(H^TA\cU1H^T1H^T1LcU1LcU1H_UAX^TAX_UB)6OUA\bTAX_UAX^T1H_U1LcUAX^T1LcU1H_U1H^Tfktj
============================================================
다음과 같은 파일을 볼 수 있다.
이는 시저암호화라고 해서 문자열을 일정한 수만큼 더하거나 빼서 암호화 하는 방식이다.
시저값을 -6으로 두고 디코딩하면 다음과 같은 act5에서 봤던 암호화 방식을 만날 수 있다.
============================================================
begin 644 code.txt
M+F]O;RXN;RYO;V]O;RXN;RYO;V]O+F\N;V\-"F\N+F\N+BXN+BXN+BYO;RYO
M+BXN+BYO;RYO#0HN+BXN;V\N+BXN+BXN+F\N;RXN+BXN;RXN+@T*;V]O+BYO
M+F\N;V\N;RYO;RXN;V]O+F]O;RYO;RYO;RYO;RYO;V]O+BYO#0IO+BXN;RYO
M+F]O+F]O;RYO+BYO+BXN+F\N+BYO;V\N;RYO;RYO;V]O;V\-"F\N+BYO+F\N
M+F]O+F\N+BYO;RXN;V]O+F\N;V]O+F\N;RXN+BXN+BYO+@T*;RYO+F\N+BYO
M+F]O+F]O+BYO;RYO+F\N;V\-"BXN;V]O+BXN+BXN+F]O+F]O+BYO;RXN;RYO
<#0IO;V\N;RYO;RXN+BYO+F]O;RXN+F]O+BYO+BXN
`
end
============================================================
이를 다시 디코딩하면
============================================================
.ooo..o.ooooo..o.oooo.o.oo
o..o.........oo.o.....oo.o
....oo........o.o.....o...
ooo..o.o.oo.o.oo..ooo.ooo.oo.oo.oo.oooo..o
o...o.o.oo.ooo.o..o....o...ooo.o.oo.oooooo
o...o.o..oo.o...oo..ooo.o.ooo.o.o.......o.
o.o.o...o.oo.oo..oo.o.o.oo
..ooo.......oo.oo..oo..o.o
ooo.o.oo....o.ooo...oo..o.
============================================================
다음과 같은 코드를 만날 수 있다. 이는 점자표시로써
============================================================
a 는 ●○ b는 ●○ c는 ●● d는 ●● e는 ●○ f는 ●● g는 ●●
○○ ●○ ○○ ○● ○● ●○ ●●
○○ ○○ ○○ ○○ ○○ ○○ ○○
h 는 ●○ i는 ○● j는 ○● 이다.
●● ●○ ●●
○○ ○○ ○○
k 는 ●○ l은 ●○ m은 ●● n은 ●● o는 ●○
○○ ●○ ○○ ○● ○●
●○ ●○ ●○ ●○ ●○
p는 ●● q는 ●● r 은 ●○ s는 ○● t는 ○● 이다.
●○ ●● ●● ●○ ●●
●○ ●○ ●○ ●○ ●○
u 는 ●○ v는 ●○ w는 ○● x는 ●● y는 ●● z는 ●○ 이 된다.
○○ ●○ ●● ○○ ○● ○●
●● ●● ○● ●● ●● ●●
============================================================
이 표를 가지고 해결할 수 있다.
============================================================
Problem :: act#7
============================================================
[::starting::]
_seven7act_는 시간관념도 없고 무의식적이다.
때로는 저장물을 페탈라이트에서 발견한것으로 사용하기도 한다.
[::extra::]
nothing
============================================================
검색을 통해 libido 라는 것을 알 수 있다.
