SlideShare a Scribd company logo
1 of 15
Download to read offline
GoogleCTF 2016 Write-Up
Wallowing Wallabies – Part One (Web 25points)
by Alchemic
(KoreaTech 이세한)
2
GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
다음과 같은 문제가 출제됩니다.
Wallowing Wallabies provides enterprise contract management – we’d like
to find out how easy it is to perform corporate espionage against them.
문제 사이트는 다음과 같습니다.
https://wallowing-wallabies.ctfcompetition.com/
3
GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
사이트에 접속하면 다음과 같은 페이지가 나타납니다.
먼저, robots.txt 파일을 확인해보도록 하겠습니다.
4
GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
다음과 같이 나타나 있습니다.
이 [Wallowing Wallabies] 문제는 총 3개의 문제로 구성되어 있으며,
[Part One]인 첫 번째 문제에서는 [/deep-blue-sea/team/vendors] 로 접근해서
문제를 풀어보도록 하겠습니다.
5
GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
다음과 같은 페이지가 존재합니다. XSS 취약점이 발생할 수 있는 형태로 되어있으며,
우선 XSS 공격이 이루어지는지 확인해보도록 하겠습니다.
6
GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
7
GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
XSS 공격이 성공적으로 이루어지는 것을 확인할 수 있습니다.
이를 통해 이 페이지에는 XSS 취약점이 존재한다는 것을 알게 되었습니다.
8
GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
본격적으로 공격을 시도합니다.
XSS 공격을 이용하여 페이지의 쿠키값을 가로챕니다.
XSS 공격을 위한 스크립트 코드는 다음과 같습니다.
9
GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
다음과 같이 코드를 작성하고 <Submit> 버튼을 눌러서 진행합니다.
위 코드에서 해당 url은 저의 개인적인 홈페이지를 이용하여 공격을 시도한 것입니다.
개인 홈페이지가 없는 분들은 간단하게 [APMSETUP]을 이용하여 서버를 구축한 뒤,
<img src=“http://localhost/test.php/?c= ...
이렇게 진행하시면 됩니다. [test.php]에 들어가는 코드는 다음과 같습니다.
10
GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
위 php 코드를 입력하고 파일을 생성한 뒤, 앞의 XSS 공격을 실행하게 되면
쿠키값을 가지고 와서 [cookies.txt]라는 곳에 쿠키값을 저장하게 됩니다.
이렇게 해서 해당 페이지의 쿠키값을 쉽게 가로챌 수 있습니다.
11
GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
<Submit> 버튼을 눌러서 메시지를 보내게 되면 다음과 같이 성공적으로 보내졌다고
나타납니다.
그리고 쿠키값이 저장되어있는 [cookies.txt] 파일의 내용을 확인해보면...
12
GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
성공적으로 쿠키값을 가로챘습니다.
green-mountains=eyJub25jZSI6ImQ4N2NmY2NmZDM2MzZjMmMiLCJhbGx
vd2VkIjoiXi9kZWVwLWJsdWUtc2VhL3RlYW0vdmVuZG9ycy4qJCIsImV4cGly
eSI6MTQ2MjM5MDIyOX0=|1462390226|d0979505438ad02539cbcd7e3e9e7af
a9c4112a2
이 쿠키값은 개개인마다 다르게 나타나게 됩니다.
13
GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
이 쿠키값을 다시 /deep-blue-sea/team/vendors 페이지에 넣고, 새로고침을 하면
다음과 같이 플래그(flag)를 얻을 수 있게 됩니다.
14
GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
The flag is...
CTF{feeling_robbed_of_your_cookies}
Thank You!
Contact
sehands@koreatech.ac.kr

More Related Content

More from Sehan Lee

Basic My SQL Problems(sqlzoo.net - select from world) & Basic SQL Injection(z...
Basic My SQL Problems(sqlzoo.net - select from world) & Basic SQL Injection(z...Basic My SQL Problems(sqlzoo.net - select from world) & Basic SQL Injection(z...
Basic My SQL Problems(sqlzoo.net - select from world) & Basic SQL Injection(z...Sehan Lee
 
GoogleCTF 2016 [No Big Deal] Write-Up (ver.korean)
GoogleCTF 2016 [No Big Deal] Write-Up (ver.korean)GoogleCTF 2016 [No Big Deal] Write-Up (ver.korean)
GoogleCTF 2016 [No Big Deal] Write-Up (ver.korean)Sehan Lee
 
GoogleCTF 2016 [In Recorded Conversation] Write-Up (ver.korean)
GoogleCTF 2016 [In Recorded Conversation] Write-Up (ver.korean)GoogleCTF 2016 [In Recorded Conversation] Write-Up (ver.korean)
GoogleCTF 2016 [In Recorded Conversation] Write-Up (ver.korean)Sehan Lee
 
PlaidCTF 2016 Write-Up [hevc (MISC 50pts)]
PlaidCTF 2016 Write-Up [hevc (MISC 50pts)]PlaidCTF 2016 Write-Up [hevc (MISC 50pts)]
PlaidCTF 2016 Write-Up [hevc (MISC 50pts)]Sehan Lee
 
Attacking Session Management
Attacking Session ManagementAttacking Session Management
Attacking Session ManagementSehan Lee
 
Web Application Technologies
Web Application TechnologiesWeb Application Technologies
Web Application TechnologiesSehan Lee
 
Packet Tracer를 이용한 OSPF 설정
Packet Tracer를 이용한 OSPF 설정Packet Tracer를 이용한 OSPF 설정
Packet Tracer를 이용한 OSPF 설정Sehan Lee
 
레이스 컨디션 기초(Basic Race Condition)
레이스 컨디션 기초(Basic Race Condition)레이스 컨디션 기초(Basic Race Condition)
레이스 컨디션 기초(Basic Race Condition)Sehan Lee
 
Packet tracer 설치 및 사용법
Packet tracer 설치 및 사용법Packet tracer 설치 및 사용법
Packet tracer 설치 및 사용법Sehan Lee
 

More from Sehan Lee (9)

Basic My SQL Problems(sqlzoo.net - select from world) & Basic SQL Injection(z...
Basic My SQL Problems(sqlzoo.net - select from world) & Basic SQL Injection(z...Basic My SQL Problems(sqlzoo.net - select from world) & Basic SQL Injection(z...
Basic My SQL Problems(sqlzoo.net - select from world) & Basic SQL Injection(z...
 
GoogleCTF 2016 [No Big Deal] Write-Up (ver.korean)
GoogleCTF 2016 [No Big Deal] Write-Up (ver.korean)GoogleCTF 2016 [No Big Deal] Write-Up (ver.korean)
GoogleCTF 2016 [No Big Deal] Write-Up (ver.korean)
 
GoogleCTF 2016 [In Recorded Conversation] Write-Up (ver.korean)
GoogleCTF 2016 [In Recorded Conversation] Write-Up (ver.korean)GoogleCTF 2016 [In Recorded Conversation] Write-Up (ver.korean)
GoogleCTF 2016 [In Recorded Conversation] Write-Up (ver.korean)
 
PlaidCTF 2016 Write-Up [hevc (MISC 50pts)]
PlaidCTF 2016 Write-Up [hevc (MISC 50pts)]PlaidCTF 2016 Write-Up [hevc (MISC 50pts)]
PlaidCTF 2016 Write-Up [hevc (MISC 50pts)]
 
Attacking Session Management
Attacking Session ManagementAttacking Session Management
Attacking Session Management
 
Web Application Technologies
Web Application TechnologiesWeb Application Technologies
Web Application Technologies
 
Packet Tracer를 이용한 OSPF 설정
Packet Tracer를 이용한 OSPF 설정Packet Tracer를 이용한 OSPF 설정
Packet Tracer를 이용한 OSPF 설정
 
레이스 컨디션 기초(Basic Race Condition)
레이스 컨디션 기초(Basic Race Condition)레이스 컨디션 기초(Basic Race Condition)
레이스 컨디션 기초(Basic Race Condition)
 
Packet tracer 설치 및 사용법
Packet tracer 설치 및 사용법Packet tracer 설치 및 사용법
Packet tracer 설치 및 사용법
 

GoogleCTF 2016 [Wallowing Wallabies - Part One] Write-Up (ver.korean)

  • 1. GoogleCTF 2016 Write-Up Wallowing Wallabies – Part One (Web 25points) by Alchemic (KoreaTech 이세한)
  • 2. 2 GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)] 다음과 같은 문제가 출제됩니다. Wallowing Wallabies provides enterprise contract management – we’d like to find out how easy it is to perform corporate espionage against them. 문제 사이트는 다음과 같습니다. https://wallowing-wallabies.ctfcompetition.com/
  • 3. 3 GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)] 사이트에 접속하면 다음과 같은 페이지가 나타납니다. 먼저, robots.txt 파일을 확인해보도록 하겠습니다.
  • 4. 4 GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)] 다음과 같이 나타나 있습니다. 이 [Wallowing Wallabies] 문제는 총 3개의 문제로 구성되어 있으며, [Part One]인 첫 번째 문제에서는 [/deep-blue-sea/team/vendors] 로 접근해서 문제를 풀어보도록 하겠습니다.
  • 5. 5 GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)] 다음과 같은 페이지가 존재합니다. XSS 취약점이 발생할 수 있는 형태로 되어있으며, 우선 XSS 공격이 이루어지는지 확인해보도록 하겠습니다.
  • 6. 6 GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)]
  • 7. 7 GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)] XSS 공격이 성공적으로 이루어지는 것을 확인할 수 있습니다. 이를 통해 이 페이지에는 XSS 취약점이 존재한다는 것을 알게 되었습니다.
  • 8. 8 GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)] 본격적으로 공격을 시도합니다. XSS 공격을 이용하여 페이지의 쿠키값을 가로챕니다. XSS 공격을 위한 스크립트 코드는 다음과 같습니다.
  • 9. 9 GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)] 다음과 같이 코드를 작성하고 <Submit> 버튼을 눌러서 진행합니다. 위 코드에서 해당 url은 저의 개인적인 홈페이지를 이용하여 공격을 시도한 것입니다. 개인 홈페이지가 없는 분들은 간단하게 [APMSETUP]을 이용하여 서버를 구축한 뒤, <img src=“http://localhost/test.php/?c= ... 이렇게 진행하시면 됩니다. [test.php]에 들어가는 코드는 다음과 같습니다.
  • 10. 10 GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)] 위 php 코드를 입력하고 파일을 생성한 뒤, 앞의 XSS 공격을 실행하게 되면 쿠키값을 가지고 와서 [cookies.txt]라는 곳에 쿠키값을 저장하게 됩니다. 이렇게 해서 해당 페이지의 쿠키값을 쉽게 가로챌 수 있습니다.
  • 11. 11 GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)] <Submit> 버튼을 눌러서 메시지를 보내게 되면 다음과 같이 성공적으로 보내졌다고 나타납니다. 그리고 쿠키값이 저장되어있는 [cookies.txt] 파일의 내용을 확인해보면...
  • 12. 12 GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)] 성공적으로 쿠키값을 가로챘습니다. green-mountains=eyJub25jZSI6ImQ4N2NmY2NmZDM2MzZjMmMiLCJhbGx vd2VkIjoiXi9kZWVwLWJsdWUtc2VhL3RlYW0vdmVuZG9ycy4qJCIsImV4cGly eSI6MTQ2MjM5MDIyOX0=|1462390226|d0979505438ad02539cbcd7e3e9e7af a9c4112a2 이 쿠키값은 개개인마다 다르게 나타나게 됩니다.
  • 13. 13 GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)] 이 쿠키값을 다시 /deep-blue-sea/team/vendors 페이지에 넣고, 새로고침을 하면 다음과 같이 플래그(flag)를 얻을 수 있게 됩니다.
  • 14. 14 GoogleCTF 2016 Write-Up [Wallowing Wallabies – Part One (Web 25points)] The flag is... CTF{feeling_robbed_of_your_cookies}