SlideShare a Scribd company logo
Securing Applications A Practical Primer for Developers Burak Dayıoğlu Your security, your future
About the presenter
Application Security Today BJ's Settles Case with FTC over Customer Data JUNE 17, 2005 -- After credit card data for thousands of customers was used to make fraudulent purchases in other stores, BJ's Wholesale Club Inc. has agreed FTC alleges weak security at wholesale club led to fraudulent sales valued in the millions July 19, 2005 -- Visa USA Inc. and American Express Co. are cutting ties with the payment-processing company that left 40 million credit and debit card accounts vulnerable to hackers in one of the biggest breaches of  consumer data Visa, Amex Cut Ties with CardSystems Jan 18, 2007 Massive Security Breach Reveals Credit Card Data The TJX Companies, a large retailer that operates more than 2,000 retail stores under brands such as Bob’s Stores, HomeGoods, Marshalls, T.J. Maxx and A.J. Wright, said on Wednesday that it suffered a massive computer breach on a portion of its network that handles credit card, debit card, check and merchandise transactions in the United States and abroad. CNBC's Easy Money BusinessWeek  uncovers that the cable channel's own design flaw may be behind the investigation into its million-dollar stock-picking contest  USDA admits data breach, thousands of social security numbers revealed Thursday, 17 April 2007  (AXcess News) Washington - The US Department of Agriculture (USDA) admitted that a security breach allowed social security and other personal information of over 63,000 recipients of federal farm loans be made available on a public website in violation of Federal privacy laws.
Holistic Approach to Security Port blocking Filtering Encryption Updates IIS hardening ACLs CAS Logging Least privilege Account mgmt. Validation Hashing Encryption Secrets mgmt. Cookie mgmt. Session mgmt. Error handling Spoofed packets, etc. Buffer overflows, illicit paths, etc.  SQL injection, XSS, input tampering, etc. Network Host Application Defend the network Defend the host Defend the application
Hacking with Google
Security in the Development Lifecycle Requirements Assessment Design Complete Test Plans Complete Code Complete Ship Post Ship Applying Security Patterns External Review Development Team Training Security Testing Secure Programming Techniques Source Code Reviews Static Analysis Tools Review Check-Ins Penetration Test Learn and Improve External Review and/or Test Threat Modeling Support and Incident Response Assessing Security Requirements Use of Design Principles Inspecting Previous Vulnerabilities
Guiding Design Principles Secure the weakest link Practice defense in depth Fail securely Follow the principle   of least privilege Compartmentalize Keep it simple Remember that hiding secrets is hard Be reluctant to trust
Attack Surface Reduction (ASR) A system's  attack surface  is the set of ways in which an attacker can enter and potentially cause damage to the system T he measure of a system's attack surface  is  an indication of the system's security T he larger the attack surface, the more insecure the system
Reducing the Attack Surface Reduce the amount of running code 80 %  of your users  actually   use the functionality? If not,  turn it off Reduce entry points If you can do the same with less ports, sockets, service entry points etc., then just do it Reduce  a ccess to  e ntry  p oints by  u ntrusted  u sers Restrict access to network endpoints used by your application to the local subnet or IP range
Input Validation All data coming from  untrusted  sources should be validated before being processed It might be possible to tamper application flow and/or behaviour with invalid data What you can trust depends on the application context Users Applications on same host Shared libraries (.so, .dll etc.) OS interfaces Other modules in the same app.
Blacklisting is “Bad” Endless security issues with PHF (mid 1990’s) Command injection (improper input validation) Fix through blacklisting Command injection, round 2 (in just two days) Fix through blacklisting Command injection, round 2 (in just another day) Fix through whitelisting (Problem solved) Command injection, SQL injection, LDAP injection etc.
Sample SQL Injection Sample vulnerable code fragment When  criteria  is SECURITY When criteria is “’; DELETE FROM news--” $query = “SELECT title FROM news WHERE body LIKE ‘%” . $criteria . ”%’”; SELECT title FROM news  WHERE body LIKE ‘%SECURITY%’ SELECT title FROM news  WHERE body LIKE ‘% ’; DELETE FROM  news -- %’
What would be the Query? Select * from users where username  = “ _1_ ” and  password  = “ _2_ ”;
Cross-Site Scripting (XSS) /location=<script>document.images[4].src= &quot;http://www.badsite.com/news.jpg&quot;</script>
Web is just a messaging protocol
HTML Form Tampering <FORM METHOD=POST ACTION=&quot;/ pb/phonebook . php &quot;> < INPUT  type=&quot;hidden&quot; name=&quot;sessionID&quot; value=” ad757gj02m357 ”> < INPUT  type=&quot;hidden&quot; name=“ username &quot; value=” pinguin ”> < INPUT  type=&quot;submit&quot; name=“ Retrieve Entries &quot;> </ FORM >  1 <INPUT TYPE=text NAME=phonenumber MAXLENGTH=30> 2 <INPUT TYPE=“radio” NAME=“agegroup” VALUE=“young”> <INPUT TYPE=“radio” NAME=“agegroup” VALUE=“middle”> <INPUT TYPE=“radio” NAME=“agegroup” VALUE=“old”> 3 <SELECT NAME=“langs”> <OPTION VALUE=PHP>Personal Home Page</OPTION> <OPTION VALUE=ASP>Active Server Pages</OPTION> </SELECT> 4
Validating Form Data in Browser Client side validations can be bypassed or tampered <HTML> <HEAD><TITLE> Client Side  Val idation Example </TITLE> <SCRIPT LANG=&quot;Javascript1.2&quot;> <!-- function  checkmail () { regexp mail  = /^[a-z0-9_\-\.]+\@([a-z0-9_\-]+\.)+[a-z0-9_\-]+$/ ; stre mail  = document. my form.e mail .value; result  = stre mail . match (regexp mail ); if ( !result ) { alert (“ Address information not valid, pls try again &quot;); return false; } return true; } //--> </SCRIPT></HEAD><BODY> <FORM NAME= my form ONSUBMIT=&quot;return  checkmail ()&quot;> <INPUT TYPE=text NAME=e mail  MAZLENGTH=50><INPUT TYPE=submit VALUE=“ Submit &quot;> </FORM> </BODY></HTML>
Error Messages Error messages might reveal sensitive information to a potential attacker Portions of an SQL statement Error message that includes brand/version of database or directory server Error message for a file that doesn’t open up … Handle all failure cases that you can foresee, configure the environment to log (and not display) verbose error messages
Filesystem Operations and Security Any component that operates on files is of high risk If input validation is broken somehow Arbitrary files might be read Arbitrary files might be overwritten Arbitrary files might be uploaded & executed Beware critical symbols for filesystem objects and the OS shell .  ..  &&  ||  >  <  * ;  null  (%00)
Easy to Guess Files and Directories There are things to discover by just educated guessing /CVS /admin /test README INSTALL backup.zip
Backup Files Would one of them be left somewhere? mycode.jsp~ mycode.jsp.OLD mycode.jsp.ORIG mycode.jsp.BACK mycode.jsp.BAK
Directory Listings Directory listings should be turned-off for all servers/sites
Thank you! [email_address] Twitter: dayioglu  FriendFeed: dayioglu http://www.burakdayioglu.net Your security, your future
Ad

More Related Content

What's hot (20)

A security note for web developers
A security note for web developersA security note for web developers
A security note for web developers
John Ombagi
 
How AppTrana helps Protect Against OWASP Top 10 Vulnerabilities
How AppTrana helps Protect Against OWASP Top 10 VulnerabilitiesHow AppTrana helps Protect Against OWASP Top 10 Vulnerabilities
How AppTrana helps Protect Against OWASP Top 10 Vulnerabilities
Ishan Mathur
 
Security 101
Security 101Security 101
Security 101
George V. Reilly
 
Owasp top 10 & Web vulnerabilities
Owasp top 10 & Web vulnerabilitiesOwasp top 10 & Web vulnerabilities
Owasp top 10 & Web vulnerabilities
RIZWAN HASAN
 
Step by step guide for web application security testing
Step by step guide for web application security testingStep by step guide for web application security testing
Step by step guide for web application security testing
Avyaan, Web Security Company in India
 
Get Ready for Web Application Security Testing
Get Ready for Web Application Security TestingGet Ready for Web Application Security Testing
Get Ready for Web Application Security Testing
Alan Kan
 
Introduction to Web Application Penetration Testing
Introduction to Web Application Penetration TestingIntroduction to Web Application Penetration Testing
Introduction to Web Application Penetration Testing
Anurag Srivastava
 
Session4-Authentication
Session4-AuthenticationSession4-Authentication
Session4-Authentication
zakieh alizadeh
 
Sql injection
Sql injectionSql injection
Sql injection
Dilan Warnakulasooriya
 
Session3 data-validation-sql injection
Session3 data-validation-sql injectionSession3 data-validation-sql injection
Session3 data-validation-sql injection
zakieh alizadeh
 
OWASP Top 10 Mobile Risks
OWASP Top 10 Mobile RisksOWASP Top 10 Mobile Risks
OWASP Top 10 Mobile Risks
Beau Woods
 
Session2-Application Threat Modeling
Session2-Application Threat ModelingSession2-Application Threat Modeling
Session2-Application Threat Modeling
zakieh alizadeh
 
SQL injection
SQL injectionSQL injection
SQL injection
Raj Parmar
 
OWASP Top 10
OWASP Top 10OWASP Top 10
OWASP Top 10
Arthur Shvetsov
 
C01461422
C01461422C01461422
C01461422
IOSR Journals
 
S5-Authorization
S5-AuthorizationS5-Authorization
S5-Authorization
zakieh alizadeh
 
Web Server Web Site Security
Web Server Web Site SecurityWeb Server Web Site Security
Web Server Web Site Security
Steven Cahill
 
Why Two-Factor Isn't Enough
Why Two-Factor Isn't EnoughWhy Two-Factor Isn't Enough
Why Two-Factor Isn't Enough
SecureAuth
 
S8-Session Managment
S8-Session ManagmentS8-Session Managment
S8-Session Managment
zakieh alizadeh
 
OWASP Top 10 (2010 release candidate 1)
OWASP Top 10 (2010 release candidate 1)OWASP Top 10 (2010 release candidate 1)
OWASP Top 10 (2010 release candidate 1)
Jeremiah Grossman
 
A security note for web developers
A security note for web developersA security note for web developers
A security note for web developers
John Ombagi
 
How AppTrana helps Protect Against OWASP Top 10 Vulnerabilities
How AppTrana helps Protect Against OWASP Top 10 VulnerabilitiesHow AppTrana helps Protect Against OWASP Top 10 Vulnerabilities
How AppTrana helps Protect Against OWASP Top 10 Vulnerabilities
Ishan Mathur
 
Owasp top 10 & Web vulnerabilities
Owasp top 10 & Web vulnerabilitiesOwasp top 10 & Web vulnerabilities
Owasp top 10 & Web vulnerabilities
RIZWAN HASAN
 
Get Ready for Web Application Security Testing
Get Ready for Web Application Security TestingGet Ready for Web Application Security Testing
Get Ready for Web Application Security Testing
Alan Kan
 
Introduction to Web Application Penetration Testing
Introduction to Web Application Penetration TestingIntroduction to Web Application Penetration Testing
Introduction to Web Application Penetration Testing
Anurag Srivastava
 
Session3 data-validation-sql injection
Session3 data-validation-sql injectionSession3 data-validation-sql injection
Session3 data-validation-sql injection
zakieh alizadeh
 
OWASP Top 10 Mobile Risks
OWASP Top 10 Mobile RisksOWASP Top 10 Mobile Risks
OWASP Top 10 Mobile Risks
Beau Woods
 
Session2-Application Threat Modeling
Session2-Application Threat ModelingSession2-Application Threat Modeling
Session2-Application Threat Modeling
zakieh alizadeh
 
Web Server Web Site Security
Web Server Web Site SecurityWeb Server Web Site Security
Web Server Web Site Security
Steven Cahill
 
Why Two-Factor Isn't Enough
Why Two-Factor Isn't EnoughWhy Two-Factor Isn't Enough
Why Two-Factor Isn't Enough
SecureAuth
 
OWASP Top 10 (2010 release candidate 1)
OWASP Top 10 (2010 release candidate 1)OWASP Top 10 (2010 release candidate 1)
OWASP Top 10 (2010 release candidate 1)
Jeremiah Grossman
 

Similar to Securing Applications (20)

Defcon9 Presentation2001
Defcon9 Presentation2001Defcon9 Presentation2001
Defcon9 Presentation2001
Miguel Ibarra
 
Application Security
Application SecurityApplication Security
Application Security
nirola
 
Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008
abhijitapatil
 
Writing Secure Code – Threat Defense
Writing Secure Code – Threat DefenseWriting Secure Code – Threat Defense
Writing Secure Code – Threat Defense
amiable_indian
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
Abdul Wahid
 
Threat Modeling - Writing Secure Code
Threat Modeling - Writing Secure CodeThreat Modeling - Writing Secure Code
Threat Modeling - Writing Secure Code
Caleb Jenkins
 
Web Application Security and Release of "WhiteHat Arsenal"
Web Application Security and Release of "WhiteHat Arsenal"Web Application Security and Release of "WhiteHat Arsenal"
Web Application Security and Release of "WhiteHat Arsenal"
Jeremiah Grossman
 
Easy security presentation 1
Easy security presentation 1Easy security presentation 1
Easy security presentation 1
Michael Buschmann
 
Intro to Web Application Security
Intro to Web Application SecurityIntro to Web Application Security
Intro to Web Application Security
Rob Ragan
 
Developing Secure Applications and Defending Against Common Attacks
Developing Secure Applications and Defending Against Common AttacksDeveloping Secure Applications and Defending Against Common Attacks
Developing Secure Applications and Defending Against Common Attacks
PayPalX Developer Network
 
Web Application Penetration Testing Introduction
Web Application Penetration Testing IntroductionWeb Application Penetration Testing Introduction
Web Application Penetration Testing Introduction
gbud7
 
Application Security
Application SecurityApplication Security
Application Security
florinc
 
Based on the below and using the 12 categories of threats identify 3 .pdf
Based on the below and using the 12 categories of threats identify 3 .pdfBased on the below and using the 12 categories of threats identify 3 .pdf
Based on the below and using the 12 categories of threats identify 3 .pdf
arri2009av
 
Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Discovering the Value of Verifying Web Application Security Using IBM Rationa...Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Alan Kan
 
Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009
mirahman
 
Network security
Network security Network security
Network security
MD. IFTEKARUL ALAM
 
Application and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionApplication and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental Edition
Daniel Owens
 
Jan 2008 Allup
Jan 2008 AllupJan 2008 Allup
Jan 2008 Allup
llangit
 
StartPad Countdown 2 - Startup Security: Hacking and Compliance in a Web 2.0 ...
StartPad Countdown 2 - Startup Security: Hacking and Compliance in a Web 2.0 ...StartPad Countdown 2 - Startup Security: Hacking and Compliance in a Web 2.0 ...
StartPad Countdown 2 - Startup Security: Hacking and Compliance in a Web 2.0 ...
Start Pad
 
OWASP Secure Coding
OWASP Secure CodingOWASP Secure Coding
OWASP Secure Coding
bilcorry
 
Defcon9 Presentation2001
Defcon9 Presentation2001Defcon9 Presentation2001
Defcon9 Presentation2001
Miguel Ibarra
 
Application Security
Application SecurityApplication Security
Application Security
nirola
 
Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008
abhijitapatil
 
Writing Secure Code – Threat Defense
Writing Secure Code – Threat DefenseWriting Secure Code – Threat Defense
Writing Secure Code – Threat Defense
amiable_indian
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
Abdul Wahid
 
Threat Modeling - Writing Secure Code
Threat Modeling - Writing Secure CodeThreat Modeling - Writing Secure Code
Threat Modeling - Writing Secure Code
Caleb Jenkins
 
Web Application Security and Release of "WhiteHat Arsenal"
Web Application Security and Release of "WhiteHat Arsenal"Web Application Security and Release of "WhiteHat Arsenal"
Web Application Security and Release of "WhiteHat Arsenal"
Jeremiah Grossman
 
Easy security presentation 1
Easy security presentation 1Easy security presentation 1
Easy security presentation 1
Michael Buschmann
 
Intro to Web Application Security
Intro to Web Application SecurityIntro to Web Application Security
Intro to Web Application Security
Rob Ragan
 
Developing Secure Applications and Defending Against Common Attacks
Developing Secure Applications and Defending Against Common AttacksDeveloping Secure Applications and Defending Against Common Attacks
Developing Secure Applications and Defending Against Common Attacks
PayPalX Developer Network
 
Web Application Penetration Testing Introduction
Web Application Penetration Testing IntroductionWeb Application Penetration Testing Introduction
Web Application Penetration Testing Introduction
gbud7
 
Application Security
Application SecurityApplication Security
Application Security
florinc
 
Based on the below and using the 12 categories of threats identify 3 .pdf
Based on the below and using the 12 categories of threats identify 3 .pdfBased on the below and using the 12 categories of threats identify 3 .pdf
Based on the below and using the 12 categories of threats identify 3 .pdf
arri2009av
 
Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Discovering the Value of Verifying Web Application Security Using IBM Rationa...Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Alan Kan
 
Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009
mirahman
 
Application and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionApplication and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental Edition
Daniel Owens
 
Jan 2008 Allup
Jan 2008 AllupJan 2008 Allup
Jan 2008 Allup
llangit
 
StartPad Countdown 2 - Startup Security: Hacking and Compliance in a Web 2.0 ...
StartPad Countdown 2 - Startup Security: Hacking and Compliance in a Web 2.0 ...StartPad Countdown 2 - Startup Security: Hacking and Compliance in a Web 2.0 ...
StartPad Countdown 2 - Startup Security: Hacking and Compliance in a Web 2.0 ...
Start Pad
 
OWASP Secure Coding
OWASP Secure CodingOWASP Secure Coding
OWASP Secure Coding
bilcorry
 
Ad

More from Burak DAYIOGLU (6)

Log Yönetiminin Artan Önemi
Log Yönetiminin Artan ÖnemiLog Yönetiminin Artan Önemi
Log Yönetiminin Artan Önemi
Burak DAYIOGLU
 
Windows Masaüstü Güvenliği
Windows Masaüstü GüvenliğiWindows Masaüstü Güvenliği
Windows Masaüstü Güvenliği
Burak DAYIOGLU
 
Açık Kaynak Kodu ve Güvenlik
Açık Kaynak Kodu ve GüvenlikAçık Kaynak Kodu ve Güvenlik
Açık Kaynak Kodu ve Güvenlik
Burak DAYIOGLU
 
Linux Guvenligi V1.0
Linux Guvenligi V1.0Linux Guvenligi V1.0
Linux Guvenligi V1.0
Burak DAYIOGLU
 
Yeni Kuşak Güvenlik Tehditleri
Yeni Kuşak Güvenlik TehditleriYeni Kuşak Güvenlik Tehditleri
Yeni Kuşak Güvenlik Tehditleri
Burak DAYIOGLU
 
Redefining Endpoint Security
Redefining Endpoint SecurityRedefining Endpoint Security
Redefining Endpoint Security
Burak DAYIOGLU
 
Log Yönetiminin Artan Önemi
Log Yönetiminin Artan ÖnemiLog Yönetiminin Artan Önemi
Log Yönetiminin Artan Önemi
Burak DAYIOGLU
 
Windows Masaüstü Güvenliği
Windows Masaüstü GüvenliğiWindows Masaüstü Güvenliği
Windows Masaüstü Güvenliği
Burak DAYIOGLU
 
Açık Kaynak Kodu ve Güvenlik
Açık Kaynak Kodu ve GüvenlikAçık Kaynak Kodu ve Güvenlik
Açık Kaynak Kodu ve Güvenlik
Burak DAYIOGLU
 
Yeni Kuşak Güvenlik Tehditleri
Yeni Kuşak Güvenlik TehditleriYeni Kuşak Güvenlik Tehditleri
Yeni Kuşak Güvenlik Tehditleri
Burak DAYIOGLU
 
Redefining Endpoint Security
Redefining Endpoint SecurityRedefining Endpoint Security
Redefining Endpoint Security
Burak DAYIOGLU
 
Ad

Recently uploaded (20)

Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 

Securing Applications

  • 1. Securing Applications A Practical Primer for Developers Burak Dayıoğlu Your security, your future
  • 3. Application Security Today BJ's Settles Case with FTC over Customer Data JUNE 17, 2005 -- After credit card data for thousands of customers was used to make fraudulent purchases in other stores, BJ's Wholesale Club Inc. has agreed FTC alleges weak security at wholesale club led to fraudulent sales valued in the millions July 19, 2005 -- Visa USA Inc. and American Express Co. are cutting ties with the payment-processing company that left 40 million credit and debit card accounts vulnerable to hackers in one of the biggest breaches of consumer data Visa, Amex Cut Ties with CardSystems Jan 18, 2007 Massive Security Breach Reveals Credit Card Data The TJX Companies, a large retailer that operates more than 2,000 retail stores under brands such as Bob’s Stores, HomeGoods, Marshalls, T.J. Maxx and A.J. Wright, said on Wednesday that it suffered a massive computer breach on a portion of its network that handles credit card, debit card, check and merchandise transactions in the United States and abroad. CNBC's Easy Money BusinessWeek uncovers that the cable channel's own design flaw may be behind the investigation into its million-dollar stock-picking contest USDA admits data breach, thousands of social security numbers revealed Thursday, 17 April 2007 (AXcess News) Washington - The US Department of Agriculture (USDA) admitted that a security breach allowed social security and other personal information of over 63,000 recipients of federal farm loans be made available on a public website in violation of Federal privacy laws.
  • 4. Holistic Approach to Security Port blocking Filtering Encryption Updates IIS hardening ACLs CAS Logging Least privilege Account mgmt. Validation Hashing Encryption Secrets mgmt. Cookie mgmt. Session mgmt. Error handling Spoofed packets, etc. Buffer overflows, illicit paths, etc. SQL injection, XSS, input tampering, etc. Network Host Application Defend the network Defend the host Defend the application
  • 6. Security in the Development Lifecycle Requirements Assessment Design Complete Test Plans Complete Code Complete Ship Post Ship Applying Security Patterns External Review Development Team Training Security Testing Secure Programming Techniques Source Code Reviews Static Analysis Tools Review Check-Ins Penetration Test Learn and Improve External Review and/or Test Threat Modeling Support and Incident Response Assessing Security Requirements Use of Design Principles Inspecting Previous Vulnerabilities
  • 7. Guiding Design Principles Secure the weakest link Practice defense in depth Fail securely Follow the principle of least privilege Compartmentalize Keep it simple Remember that hiding secrets is hard Be reluctant to trust
  • 8. Attack Surface Reduction (ASR) A system's attack surface is the set of ways in which an attacker can enter and potentially cause damage to the system T he measure of a system's attack surface is an indication of the system's security T he larger the attack surface, the more insecure the system
  • 9. Reducing the Attack Surface Reduce the amount of running code 80 % of your users actually use the functionality? If not, turn it off Reduce entry points If you can do the same with less ports, sockets, service entry points etc., then just do it Reduce a ccess to e ntry p oints by u ntrusted u sers Restrict access to network endpoints used by your application to the local subnet or IP range
  • 10. Input Validation All data coming from untrusted sources should be validated before being processed It might be possible to tamper application flow and/or behaviour with invalid data What you can trust depends on the application context Users Applications on same host Shared libraries (.so, .dll etc.) OS interfaces Other modules in the same app.
  • 11. Blacklisting is “Bad” Endless security issues with PHF (mid 1990’s) Command injection (improper input validation) Fix through blacklisting Command injection, round 2 (in just two days) Fix through blacklisting Command injection, round 2 (in just another day) Fix through whitelisting (Problem solved) Command injection, SQL injection, LDAP injection etc.
  • 12. Sample SQL Injection Sample vulnerable code fragment When criteria is SECURITY When criteria is “’; DELETE FROM news--” $query = “SELECT title FROM news WHERE body LIKE ‘%” . $criteria . ”%’”; SELECT title FROM news WHERE body LIKE ‘%SECURITY%’ SELECT title FROM news WHERE body LIKE ‘% ’; DELETE FROM news -- %’
  • 13. What would be the Query? Select * from users where username = “ _1_ ” and password = “ _2_ ”;
  • 14. Cross-Site Scripting (XSS) /location=<script>document.images[4].src= &quot;http://www.badsite.com/news.jpg&quot;</script>
  • 15. Web is just a messaging protocol
  • 16. HTML Form Tampering <FORM METHOD=POST ACTION=&quot;/ pb/phonebook . php &quot;> < INPUT type=&quot;hidden&quot; name=&quot;sessionID&quot; value=” ad757gj02m357 ”> < INPUT type=&quot;hidden&quot; name=“ username &quot; value=” pinguin ”> < INPUT type=&quot;submit&quot; name=“ Retrieve Entries &quot;> </ FORM > 1 <INPUT TYPE=text NAME=phonenumber MAXLENGTH=30> 2 <INPUT TYPE=“radio” NAME=“agegroup” VALUE=“young”> <INPUT TYPE=“radio” NAME=“agegroup” VALUE=“middle”> <INPUT TYPE=“radio” NAME=“agegroup” VALUE=“old”> 3 <SELECT NAME=“langs”> <OPTION VALUE=PHP>Personal Home Page</OPTION> <OPTION VALUE=ASP>Active Server Pages</OPTION> </SELECT> 4
  • 17. Validating Form Data in Browser Client side validations can be bypassed or tampered <HTML> <HEAD><TITLE> Client Side Val idation Example </TITLE> <SCRIPT LANG=&quot;Javascript1.2&quot;> <!-- function checkmail () { regexp mail = /^[a-z0-9_\-\.]+\@([a-z0-9_\-]+\.)+[a-z0-9_\-]+$/ ; stre mail = document. my form.e mail .value; result = stre mail . match (regexp mail ); if ( !result ) { alert (“ Address information not valid, pls try again &quot;); return false; } return true; } //--> </SCRIPT></HEAD><BODY> <FORM NAME= my form ONSUBMIT=&quot;return checkmail ()&quot;> <INPUT TYPE=text NAME=e mail MAZLENGTH=50><INPUT TYPE=submit VALUE=“ Submit &quot;> </FORM> </BODY></HTML>
  • 18. Error Messages Error messages might reveal sensitive information to a potential attacker Portions of an SQL statement Error message that includes brand/version of database or directory server Error message for a file that doesn’t open up … Handle all failure cases that you can foresee, configure the environment to log (and not display) verbose error messages
  • 19. Filesystem Operations and Security Any component that operates on files is of high risk If input validation is broken somehow Arbitrary files might be read Arbitrary files might be overwritten Arbitrary files might be uploaded & executed Beware critical symbols for filesystem objects and the OS shell . .. && || > < * ; null (%00)
  • 20. Easy to Guess Files and Directories There are things to discover by just educated guessing /CVS /admin /test README INSTALL backup.zip
  • 21. Backup Files Would one of them be left somewhere? mycode.jsp~ mycode.jsp.OLD mycode.jsp.ORIG mycode.jsp.BACK mycode.jsp.BAK
  • 22. Directory Listings Directory listings should be turned-off for all servers/sites
  • 23. Thank you! [email_address] Twitter: dayioglu FriendFeed: dayioglu http://www.burakdayioglu.net Your security, your future