SlideShare a Scribd company logo
10 Adımda
Yazılım Güvenliği
OWASP-Turkey
Bünyamin Demir
Bünyamin Demir ( @bunyamindemir )
– Lisans Kocaeli Üni. Matematik Bölümü
– Yüksek Lisans Kocaeli Üni Fen-Bilimleri, Tez; Oracle Veritabanı
Güvenliği
– Uygulama Geliştirici
– OWASP Türkiye Bölüm Lideri
– Sızma Testleri Uzmanı
• Web, Mobil, Network, SCADA, Wireless,
Sosyal Mühendislik, ATM, DoS/DDoS ve Yük testi
• Kaynak kod analizi
– Eğitmen
• Web/Mobil Uygulama Güvenlik Denetimi
• Güvenli Kod Geliştirme
• Veritabanı Güvenliği
2
3
OWASP
4
Why is OWASP Special?
• OWASP Top 10
• OWASP Zed Attack Proxy (ZAP)
• OpenSAMM
• Cheat Sheets
• ESAPI
• ASVS
• Testing Guide
• Development Guide
5
OWASP Projects
6
Application Security Verification Standart
1 - Girdi Denetimi
7
public boolean validateUsername(String username) {
String usernamePattern = "^[a-zA-Z0-9]{6,12}$";
if (username == null) {
return false;
}
Pattern p = Pattern.compile(usernamePattern);
Matcher m = p.matcher(username);
if (!m.matches()) {
return false;
}
return true;
}
if (!validateUsername(username)) {
//uygun olmayan kullanıcı adı
}
ESAPI ile Girdi Denetimi
8
Validator.Username=^[a-zA-Z0-9]{6,12}$
String username = request.getParameter("username");
boolean booluser = ESAPI.validator().isValidInput("User name", username, "Username",
12, false);
if (!booluser) {
// uygun olmayan kullanıcı adı
}
2-Sanitization
9
String safeMarkup = ESAPI.validator().getValidSafeHTML( "Rich Text", richTextInput, 2500, true );
<%
String address = "Sumbul mah.,<script>alert(1);</script> kartal sk., manolya sitesi, bahar apart.,
D/Blok, No:5";
String safeAddressText = ESAPI.validator().getValidSafeHTML("Address Text", address, 200, true);
%>
<div><%= safeAddressText %></div>
<div>Sumbul mah., kartal sk., manolya sitesi, bahar apart., D/Blok, No:5</div>
3 – HttpOnly Cookie
10
Set-cookie: JSESSIONID=p9JtQGHSrTQTzfK8912y72VTv2y4Jyr5zTbV1h1Mc7Lmf4fMg1ly;
Domain=www.site.com; Path=/; Secure; HttpOnly
4 – Secure Cookie
11
Set-Cookie: JSESSIONID=p9JtQGHSrTQTzfK8912y7Mg1ly; Domain=www.site.com;
Path=/; Secure; HttpOnly
5 – Oturum Anahtarı
12
ESAPI.httpUtilities().changeSessionIdentifier();
Users user = new LoginDAO().login(username, password);
if (user.isAuthenticated()) {
currentSession = request.getSession(true);
currentSession.invalidate();
HttpSession newSession = request.getSession(true);
} else {
request.setAttribute("loginerr", "username or password is invalid");
request.getRequestDispatcher("login.jsp").forward(request, response);
}
6 – Güvenli Chaptcha
13
7 – getCanonicalPath()
14
getCanonicalPath()
http://www.site.com/getFile.jsp=file=/../../../../etc/passwd
getCanonicalPath(/www/data/site_com/files/../../../../etc/passwd)
/etc/passwd != /www/data/site_com/files/
8 – HTTPS
15
Kimlik doğrulama işlevi barındıran uygulamaların güvenli
kanallar ile iletişim sağlıyor olması gerekir.
9 – Form Token
16
<form name="comment" action="product_comment.jsp?pid=53" method="POST">
Comment: <input type="text" name="comment"/>
<input type="submit" value="Submit"/>
<input type="hidden" name="CSRFToken” value="30Dfd45645Ddssdf4567fdfdgAA...">
</form>
10 – Prepared Statement
17
...
String className = request.getParameter("class");
String query = "SELECT * FROM students WHERE class = '" + className + "'";
ResultSet rs = stmt.execute(query);
...
...
String className = request.getParameter("class");
PreparedStatement psmt = conn.prepareStatement("SELECT * FROM students WHERE
class=?");
psmt.setString(1, className);
ResultSet rs = psmt.executeQuery();
...
18

More Related Content

PDF
Bünyamin Demir - Secure YourApp
PPTX
Web Uygulama Güvenliği (Akademik Bilişim 2016)
PDF
IstSec'14 - Onur ALANBEL - ShellShock
PDF
Configuring SSL on NGNINX and less tricky servers
PDF
URL to HTML
PDF
Integrity protection for third-party JavaScript
PDF
Securing your EmberJS Application
PDF
Tecnologias Open Source para Alta Disponibilidade e Segurança de Aplicações Web
Bünyamin Demir - Secure YourApp
Web Uygulama Güvenliği (Akademik Bilişim 2016)
IstSec'14 - Onur ALANBEL - ShellShock
Configuring SSL on NGNINX and less tricky servers
URL to HTML
Integrity protection for third-party JavaScript
Securing your EmberJS Application
Tecnologias Open Source para Alta Disponibilidade e Segurança de Aplicações Web

What's hot (20)

PDF
Preventing XSS with Content Security Policy
PPTX
Content Security Policy - The application security Swiss Army Knife
PDF
Content Security Policy
PDF
Integrity protection for third-party JavaScript
PDF
Are you botching the security of your AngularJS applications? (DevFest 2016)
PPT
Securing Java EE Web Apps
PDF
JavaOne India 2011 - Running your Java EE 6 Apps in the Cloud
PDF
Web Security - CSP & Web Cryptography
PDF
CONFidence 2018: Defense-in-depth techniques for modern web applications and ...
PDF
Its just a flesh wound
PDF
Nginx - The webserver you might actually like
PDF
Jersey Aquarium Paris
PDF
Bypass SOP, Theft Your Data - XSS Allstars from Japan / OWASP AppSec APAC 2014
PDF
Memcache Injection (Hacktrick'15)
PDF
Defeating Cross-Site Scripting with Content Security Policy (updated)
PDF
10 Excellent Ways to Secure Your Spring Boot Application - The Secure Develop...
PPTX
Microsoft Ignite The Tour 2020 - BRK30173 - Identity is the new control plane
PPTX
Techorama 2019 - Azure Security Center Unleashed
PDF
W3C Content Security Policy
PDF
PLNOG23 - Grzegorz Siewruk - O tym jak (nie)łatwo dodać Sec do Dev(Sec)Ops w ...
Preventing XSS with Content Security Policy
Content Security Policy - The application security Swiss Army Knife
Content Security Policy
Integrity protection for third-party JavaScript
Are you botching the security of your AngularJS applications? (DevFest 2016)
Securing Java EE Web Apps
JavaOne India 2011 - Running your Java EE 6 Apps in the Cloud
Web Security - CSP & Web Cryptography
CONFidence 2018: Defense-in-depth techniques for modern web applications and ...
Its just a flesh wound
Nginx - The webserver you might actually like
Jersey Aquarium Paris
Bypass SOP, Theft Your Data - XSS Allstars from Japan / OWASP AppSec APAC 2014
Memcache Injection (Hacktrick'15)
Defeating Cross-Site Scripting with Content Security Policy (updated)
10 Excellent Ways to Secure Your Spring Boot Application - The Secure Develop...
Microsoft Ignite The Tour 2020 - BRK30173 - Identity is the new control plane
Techorama 2019 - Azure Security Center Unleashed
W3C Content Security Policy
PLNOG23 - Grzegorz Siewruk - O tym jak (nie)łatwo dodać Sec do Dev(Sec)Ops w ...
Ad

Viewers also liked (6)

PPTX
Emre Tınaztepe - FileLocker Zararlıları (Çalışma Mantıkları ve Analiz Yönteml...
PDF
GÜVENLİ YAZILIM GELİŞTİRME EĞİTİMİ İÇERİĞİ
PDF
Evren Yalçın - Fatmagül Ergani - Kurumsal firmalar için hata avcılığı
PDF
Bilgisayarda Güvenlik ve Tehlikeleri
PPT
Yazılım Güvenliği
PPTX
Beyaz Şapkalı Hacker CEH Eğitimi - Bölüm 1, 2, 3
Emre Tınaztepe - FileLocker Zararlıları (Çalışma Mantıkları ve Analiz Yönteml...
GÜVENLİ YAZILIM GELİŞTİRME EĞİTİMİ İÇERİĞİ
Evren Yalçın - Fatmagül Ergani - Kurumsal firmalar için hata avcılığı
Bilgisayarda Güvenlik ve Tehlikeleri
Yazılım Güvenliği
Beyaz Şapkalı Hacker CEH Eğitimi - Bölüm 1, 2, 3
Ad

Similar to Bünyamin Demir - 10 Adımda Yazılım Güvenliği (20)

PDF
OWASP Top 10 at International PHP Conference 2014 in Berlin
PDF
Application Security around OWASP Top 10
PDF
Whatever it takes - Fixing SQLIA and XSS in the process
PPTX
Connection String Parameter Pollution Attacks
PDF
Automate Your FME Server Installs, Take a Five Minute Break
PDF
UA Testing with Selenium and PHPUnit - ZendCon 2013
PDF
SOA with C, C++, PHP and more
PDF
Charla EHU Noviembre 2014 - Desarrollo Web
PDF
DevSecOps: Let's Write Security Unit Tests
PDF
Security in practice with Java EE 6 and GlassFish
PDF
Applications secure by default
PDF
Applications secure by default
PDF
UA testing with Selenium and PHPUnit - PFCongres 2013
PDF
My app is secure... I think
PPTX
Is your mobile app as secure as you think?
PDF
DDD17 - Web Applications Automated Security Testing in a Continuous Delivery...
PPTX
Cross Site Scripting (XSS) Defense with Java
PPSX
Attacking HTML5
PDF
Java EE 6 Security in practice with GlassFish
PPTX
Slides for the #JavaOne Session ID: CON11881
OWASP Top 10 at International PHP Conference 2014 in Berlin
Application Security around OWASP Top 10
Whatever it takes - Fixing SQLIA and XSS in the process
Connection String Parameter Pollution Attacks
Automate Your FME Server Installs, Take a Five Minute Break
UA Testing with Selenium and PHPUnit - ZendCon 2013
SOA with C, C++, PHP and more
Charla EHU Noviembre 2014 - Desarrollo Web
DevSecOps: Let's Write Security Unit Tests
Security in practice with Java EE 6 and GlassFish
Applications secure by default
Applications secure by default
UA testing with Selenium and PHPUnit - PFCongres 2013
My app is secure... I think
Is your mobile app as secure as you think?
DDD17 - Web Applications Automated Security Testing in a Continuous Delivery...
Cross Site Scripting (XSS) Defense with Java
Attacking HTML5
Java EE 6 Security in practice with GlassFish
Slides for the #JavaOne Session ID: CON11881

More from CypSec - Siber Güvenlik Konferansı (11)

PPTX
Minhaç Çelik - Ülkelerin Siber Güvenlik Stratejileri ve Siber Güvenlik Strate...
PDF
Adil Burak Sadıç - Siber Güvenlik mi, Bilgi Güvenliği mi, BT Güvenliği mi?
PDF
Onur Alanbel & Ozan Uçar - Ulusal Siber Güvenlikte Kitle Saldırıları
PPTX
İsmail Burak Tuğrul - Online Bankacılık Uygulamalarında Karlılaşılan Güvenlik...
PPT
Yrd. Doç. Dr. Yavuz Erdoğan
PDF
Suleyman Özarslan - 2014 Hackerların Yükselişi
PDF
Canberk Bolat & Barış Vidin - İzleniyorsunuz
PDF
Huzeyfe Önal - SSL, DPI Kavramları Eşliğinde Internet Trafiği İzleme ve Karşı...
PPTX
Can Deger - Ben Heykır Olcam
PDF
Canberk Bolat - Alice Android Diyarında
PPTX
Can Yıldızlı - Koryak Uzan - Fiziksel Sızma Testi (İntelRad)
Minhaç Çelik - Ülkelerin Siber Güvenlik Stratejileri ve Siber Güvenlik Strate...
Adil Burak Sadıç - Siber Güvenlik mi, Bilgi Güvenliği mi, BT Güvenliği mi?
Onur Alanbel & Ozan Uçar - Ulusal Siber Güvenlikte Kitle Saldırıları
İsmail Burak Tuğrul - Online Bankacılık Uygulamalarında Karlılaşılan Güvenlik...
Yrd. Doç. Dr. Yavuz Erdoğan
Suleyman Özarslan - 2014 Hackerların Yükselişi
Canberk Bolat & Barış Vidin - İzleniyorsunuz
Huzeyfe Önal - SSL, DPI Kavramları Eşliğinde Internet Trafiği İzleme ve Karşı...
Can Deger - Ben Heykır Olcam
Canberk Bolat - Alice Android Diyarında
Can Yıldızlı - Koryak Uzan - Fiziksel Sızma Testi (İntelRad)

Recently uploaded (20)

PDF
Zenith AI: Advanced Artificial Intelligence
PDF
August Patch Tuesday
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
Hybrid model detection and classification of lung cancer
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Architecture types and enterprise applications.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
Zenith AI: Advanced Artificial Intelligence
August Patch Tuesday
Univ-Connecticut-ChatGPT-Presentaion.pdf
Getting started with AI Agents and Multi-Agent Systems
Assigned Numbers - 2025 - Bluetooth® Document
TLE Review Electricity (Electricity).pptx
observCloud-Native Containerability and monitoring.pptx
DP Operators-handbook-extract for the Mautical Institute
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
OMC Textile Division Presentation 2021.pptx
A contest of sentiment analysis: k-nearest neighbor versus neural network
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
cloud_computing_Infrastucture_as_cloud_p
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Tartificialntelligence_presentation.pptx
Hybrid model detection and classification of lung cancer
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
1 - Historical Antecedents, Social Consideration.pdf
Architecture types and enterprise applications.pdf
NewMind AI Weekly Chronicles - August'25-Week II

Bünyamin Demir - 10 Adımda Yazılım Güvenliği

  • 2. Bünyamin Demir ( @bunyamindemir ) – Lisans Kocaeli Üni. Matematik Bölümü – Yüksek Lisans Kocaeli Üni Fen-Bilimleri, Tez; Oracle Veritabanı Güvenliği – Uygulama Geliştirici – OWASP Türkiye Bölüm Lideri – Sızma Testleri Uzmanı • Web, Mobil, Network, SCADA, Wireless, Sosyal Mühendislik, ATM, DoS/DDoS ve Yük testi • Kaynak kod analizi – Eğitmen • Web/Mobil Uygulama Güvenlik Denetimi • Güvenli Kod Geliştirme • Veritabanı Güvenliği 2
  • 4. 4 Why is OWASP Special?
  • 5. • OWASP Top 10 • OWASP Zed Attack Proxy (ZAP) • OpenSAMM • Cheat Sheets • ESAPI • ASVS • Testing Guide • Development Guide 5 OWASP Projects
  • 7. 1 - Girdi Denetimi 7 public boolean validateUsername(String username) { String usernamePattern = "^[a-zA-Z0-9]{6,12}$"; if (username == null) { return false; } Pattern p = Pattern.compile(usernamePattern); Matcher m = p.matcher(username); if (!m.matches()) { return false; } return true; } if (!validateUsername(username)) { //uygun olmayan kullanıcı adı }
  • 8. ESAPI ile Girdi Denetimi 8 Validator.Username=^[a-zA-Z0-9]{6,12}$ String username = request.getParameter("username"); boolean booluser = ESAPI.validator().isValidInput("User name", username, "Username", 12, false); if (!booluser) { // uygun olmayan kullanıcı adı }
  • 9. 2-Sanitization 9 String safeMarkup = ESAPI.validator().getValidSafeHTML( "Rich Text", richTextInput, 2500, true ); <% String address = "Sumbul mah.,<script>alert(1);</script> kartal sk., manolya sitesi, bahar apart., D/Blok, No:5"; String safeAddressText = ESAPI.validator().getValidSafeHTML("Address Text", address, 200, true); %> <div><%= safeAddressText %></div> <div>Sumbul mah., kartal sk., manolya sitesi, bahar apart., D/Blok, No:5</div>
  • 10. 3 – HttpOnly Cookie 10 Set-cookie: JSESSIONID=p9JtQGHSrTQTzfK8912y72VTv2y4Jyr5zTbV1h1Mc7Lmf4fMg1ly; Domain=www.site.com; Path=/; Secure; HttpOnly
  • 11. 4 – Secure Cookie 11 Set-Cookie: JSESSIONID=p9JtQGHSrTQTzfK8912y7Mg1ly; Domain=www.site.com; Path=/; Secure; HttpOnly
  • 12. 5 – Oturum Anahtarı 12 ESAPI.httpUtilities().changeSessionIdentifier(); Users user = new LoginDAO().login(username, password); if (user.isAuthenticated()) { currentSession = request.getSession(true); currentSession.invalidate(); HttpSession newSession = request.getSession(true); } else { request.setAttribute("loginerr", "username or password is invalid"); request.getRequestDispatcher("login.jsp").forward(request, response); }
  • 13. 6 – Güvenli Chaptcha 13
  • 15. 8 – HTTPS 15 Kimlik doğrulama işlevi barındıran uygulamaların güvenli kanallar ile iletişim sağlıyor olması gerekir.
  • 16. 9 – Form Token 16 <form name="comment" action="product_comment.jsp?pid=53" method="POST"> Comment: <input type="text" name="comment"/> <input type="submit" value="Submit"/> <input type="hidden" name="CSRFToken” value="30Dfd45645Ddssdf4567fdfdgAA..."> </form>
  • 17. 10 – Prepared Statement 17 ... String className = request.getParameter("class"); String query = "SELECT * FROM students WHERE class = '" + className + "'"; ResultSet rs = stmt.execute(query); ... ... String className = request.getParameter("class"); PreparedStatement psmt = conn.prepareStatement("SELECT * FROM students WHERE class=?"); psmt.setString(1, className); ResultSet rs = psmt.executeQuery(); ...
  • 18. 18

Editor's Notes

  • #5: Why is OWASP Special? Over 43,000 community members worldwide, in over 100 countries Rapid growth over the 12+ years since OWASP’s inception. Demonstrative of our growth as an organization is our revenue which is comes primarily from global conferences such as this as well as memberships. In the last year our revenue grew from just under a million dollars in 2012 to an estimated 1.8 million for the current year. Different from other organizations and conferences because The community Incubator for Ideas and OWASP Projects – Open Source Documentation, Tools, Code Libraries