1. Web Uygulama Sızma Testleri
Hakkımda
• Mehmet Dursun Ince
• Uygulama Güvenliği ve Sızma Testleri
alanında çalışmalar
gerçekleştirmekte.
• mehmet@prodaft.com
• twitter.com/mmetince
Proactive Defense Against Future Threats
2. Web Uygulama Sızma Testleri
Web Uygulama Güvenlik
Testleri Nasıl Yapılır ?
Black Box Pentest
White Box Pentest
Proactive Defense Against Future Threats
3. Web Uygulama Sızma Testleri
Güvenlik Açıkları Nasıl
Oluşur ?
1.Mühendislik Hataları ?
2.Programlama Diline
Hakimiyet ?
3.İşletim Sistemine Hakimiyet ?
4.Framework’e Güvenmek ?
5.Unutkanlık
Proactive Defense Against Future Threats
4. Web Uygulama Sızma Testleri
TOP #10 Vulnerability
A1-Injection
A2-Cross Site Scripting (XSS)
A3-Broken Authentication and Session Management
A4-Insecure Direct Object References
A5-Cross Site Request Forgery (CSRF)
A6-Security Misconfiguration
A7-Insecure Cryptographic Storage
A8-Failure to Restrict URL Access
A9-Insufficient Transport Layer Protection
A10-Unvalidated Redirects and Forwards
Proactive Defense Against Future Threats
5. Web Uygulama Sızma Testleri
Örnek Web Mimarisi - 1
DB-1
IIS /Apache
DB-2
Proactive Defense Against Future Threats
6. Web Uygulama Sızma Testleri
Örnek Web Mimarisi - 2
IIS
/Apache
DB-1
Load IIS
Balancer /Apache
DB-2
IIS
/Apache
Proactive Defense Against Future Threats
7. Web Uygulama Sızma Testleri
Web
Services
DB-1
IIS
/Apache
Load
Balancer IIS /Apache
DB-2
IIS /Apache
Proactive Defense Against Future Threats
8. Web Uygulama Sızma Testleri
HTTP Requestleri Nasıl
Değiştirilir ?
• Web uygulama güvenlik testleri, hedef
web sitesine giden HTTP taleplerinin
analizi/değiştirilmesi ile gerçekleştirilir.
• Firefox
– Live HTTP headers
– Tamper Data
– Hackbar
• Burp Suite
Proactive Defense Against Future Threats
9. Web Uygulama Sızma Testleri
INPUT
Proactive Defense Against Future Threats
10. Web Uygulama Sızma Testleri
Web Uygulamalarında SQL Injection
Proactive Defense Against Future Threats
11. Web Uygulama Sızma Testleri
Web Uygulamalarında SQL Injection
• Kullanıcı girdisi :
– Kisaad = ahmet
– Parola = 123456
• Hacker girdisi :
– Kisaad = hacker or 1=1
– Parola = hacker or 1=1
Proactive Defense Against Future Threats
12. Web Uygulama Sızma Testleri
Web Uygulamalarında
Output Encoding
DATABASE
Online T-Shirt Sipariş Takip
Sipariş Modülü
Kullanıcıdan gelen datalar veri tabanı sistemi üzerinde tutulmaktadır.
Bu datalar farklı modüllerde kullanılmaktadır.
Örnek Senaryo : Alış veriş sitesinden t-shirt siparişi veren kullanıcılar,
t-shirt’in üstüne yazılacak yazıya karar verebilmektedirler. Bu bilgi kullanıcıdan
alınarak veri tabanında tutulur. Ardından Sipariş Takip Modül’ü ile şirket
çalışanlarına iletilir.
Proactive Defense Against Future Threats
13. Web Uygulama Sızma Testleri
Web Uygulamalarında
İzinler
www.gsmsirketi.com/faturalar/fatura_liste
SELECT fatura_id,fatura_ay FROM Faturalar WHERE fatura_uid= 1
www.gsmsirketi.com/faturalar/fatura_id/18234
SELECT * FROM Fatura_detay WHERE fatura_id = 18234
Proactive Defense Against Future Threats
14. Web Uygulama Sızma Testleri
CSRF
Proactive Defense Against Future Threats
15. Web Uygulama Sızma Testleri
Web Uygulamalarında
Oturumlar
Proactive Defense Against Future Threats
16. Web Uygulama Sızma Testleri
Web Uygulamalarında
Oturumlar
Proactive Defense Against Future Threats
17. Web Uygulama Sızma Testleri
Web Uygulamalarında
Oturumlar
Proactive Defense Against Future Threats
18. Web Uygulama Sızma Testleri
Web Uygulamalarında
Oturumlar
Proactive Defense Against Future Threats
19. Web Uygulama Sızma Testleri
UYGULAMA
SQL Injection
Proactive Defense Against Future Threats
20. Web Uygulama Sızma Testleri
UYGULAMA
Stored XSS
Proactive Defense Against Future Threats
21. Web Uygulama Sızma Testleri
UYGULAMA
PHP Object Injection
Proactive Defense Against Future Threats