SlideShare a Scribd company logo
OWASP Top 10 Project Presented by ISAM Staff Tyler Hargis [GSEC, GWAS,GCIH] - and - Michael Morrison [GSEC, GWAS, CPTS, NSA IAM]
Overview Disclaimer Common Misconceptions Open Web Application Security Project OWASP Top Vulnerabilities Conclusion Q&A
Disclaimer The information contained in this presentation is intended to be used to educate developers about security vulnerabilities commonly found in Web Applications. This presentation is not intended as training material for those with malicious intent against information systems. Exploitation of the vulnerabilities listed in this presentation on systems or applications not owned or developed by the viewer is illegal in jurisdictions worldwide. It is a violation of the University of Missouri Acceptable Use policy to transmit these exploits across the MU network without explicit permission of the system or application owner they are directed at. The presenters are trained professionals, don’t try this at home…
Common Misconceptions Aren’t I protected by firewalls or something? I thought you just needed to keep things patched? I’m not using Microsoft, so I must be secure. Isn’t keeping me secure your job?
Open Web Application Security Project The Open Web Application Security Project (OWASP) is an open community dedicated to enabling organizations to develop, purchase, and maintain applications that can be trusted.  All of the OWASP tools, documents, forums, and chapters are free and open to anyone interested in improving application security. http://www.owasp.org
OWASP TOP 10 #1 Cross Site Scripting (XSS) Flaws XSS flaws occur whenever an application takes user supplied data and sends it to a web browser without first validating or encoding that content.  XSS allows attackers to execute script in the victim's browser which can hijack user sessions, deface web sites, possibly introduce worms, etc.
OWASP TOP 10 Cross Site Scripting (XSS) Recommendations Input validation Strong output encoding Specify the output encoding Do not use "blacklist" validation Watch out for canonicalization errors
OWASP TOP 10 Cross Site Scripting (XSS) Recommendations Java:  Use Struts output mechanisms such as <bean:write … >, or use the default JSTL escapeXML=&quot;true&quot; attribute in <c:out … >. .NET:  Use the Microsoft Anti-XSS Library 1.5 freely available from MSDN. Understand which .NET controls automatically encode output data. PHP:  Ensure output is passed through htmlentities() or htmlspecialchars() or use the soon to be released OWASP PHP Anti-XSS library. Disable register_globals if it is not already disabled
OWASP TOP 10 #2 Injection Flaws Injection flaws, particularly SQL injection, are common in web applications. Injection occurs when user-supplied data is sent to an interpreter as part of a command or query. The attacker's hostile data tricks the interpreter into executing unintended commands or changing data.
OWASP TOP 10 Injection Flaw Recommendations Input validation.  Use strongly typed parameterized query APIs Enforce least privilege when connecting to databases  Avoid detailed error messages Show care when using stored procedures Do not use dynamic query interfaces Do not use simple escaping functions - simple escaping functions cannot escape table names! Watch out for canonicalization errors
OWASP TOP 10 Injection Flaw Recommendations Java EE  - use strongly typed PreparedStatement, or ORMs such as Hibernate or Spring  .NET  - use strongly typed parameterized queries, such as SqlCommand with SqlParameter or an ORM like Hibernate.  PHP  - use PDO with strongly typed parameterized queries (using bindParam())
OWASP TOP 10 #3 Malicious File Execution Code vulnerable to remote file inclusion (RFI) allows attackers to include hostile code and data, resulting in devastating attacks, such as total server compromise. Malicious file execution attacks affect PHP, XML and any framework which accepts filenames or files from users.
OWASP TOP 10 Malicious File Execution Recommendations Use an indirect object reference map (hash the reference) Use explicit taint checking mechanisms, if supported (see OWASP) Strongly validate user input Add firewall rules Check any user supplied files or filenames Consider implementing a chroot jail or virtualization (sand box mechanisms)
OWASP TOP 10 Malicious File Execution Recommendations PHP : Disable allow_url_fopen and allow_url_include in php.ini PHP : Disable register_globals and use E_STRICT to find uninitialized variables PHP : Ensure that all file and streams functions (stream_*) are carefully vetted. PHP : Be extremely cautious if data is passed to system() eval() passthru() or ` (the backtick operator) J2EE , ensure that the security manager is enabled and properly configured and that the application is demanding permissions appropriately ASP.NET , please refer to the documentation on partial trust, and design your applications to be segmented in trust, so that most of the application exists in the lowest possible trust state possible
OWASP TOP 10 #4 Insecure Direct Object Reference A direct object reference occurs when a developer exposes a reference to an internal implementation object, such as a file, directory, database record, or key, as a URL or form parameter. Attackers can manipulate those references to access other objects without authorization.
OWASP TOP 10 Insecure Direct Object Reference Recommendations Avoid exposing your private object references to users whenever possible, such as primary keys or filenames Validate any private object references  Verify authorization to all referenced objects
OWASP TOP 10 #5 Cross Site Request Forgery (CSRF) A CSRF attack forces a logged-on victim's browser to send a pre-authenticated request to a vulnerable web application, which then forces the victim's browser to perform a hostile action to the benefit of the attacker. CSRF can be as powerful as the web application that it attacks.
OWASP TOP 10 Cross Site Request Forgery (CSRF) Recommendations Ensure that there are no XSS vulnerabilities in your application Insert custom random tokens into every form and URL (For ASP.NET, set a ViewStateUserKey.) For sensitive data or value transactions, re-authenticate or use transaction signing Do not use GET requests (URLs) for sensitive data or to perform value transactions.  POST alone is insufficient a protection.
OWASP TOP 10 #6 Information Leakage and Improper Error Handling  Applications can unintentionally leak information about their configuration, internal workings, or violate privacy through a variety of application problems. Attackers use this weakness to steal sensitive data, or conduct more serious attacks.
OWASP TOP 10 #7 Broken Authentication and Session Management Account credentials and session tokens are often not properly protected. Attackers compromise passwords, keys, or authentication tokens to assume other users' identities.
OWASP TOP 10 #8 Insecure Cryptographic Storage Web applications rarely use cryptographic functions properly to protect data and credentials. Attackers use weakly protected data to conduct identity theft and other crimes, such as credit card fraud.
OWASP TOP 10 #9 Insecure Communications Applications frequently fail to encrypt network traffic when it is necessary to protect sensitive communications.
OWASP TOP 10 #10 Failure to Restrict URL Access Frequently, an application only protects sensitive functionality by preventing the display of links or URLs to unauthorized users. Attackers can use this weakness to access and perform unauthorized operations by accessing those URLs directly.
How Do I Protect My Applications? Take advantage of free sites like OWASP for details on remediating the vulnerabilities demonstrated today.  ( http://www.owasp.org/index.php/Top_10_2007-Where_to_Go_From_Here ) Fortify Source Code Analyzer is available at a reduced cost from DoIT. Security Training of any type (DoIT, SANS, etc.)
How Can DoIT Help? Inspections by ISAM will reveal many common vulnerabilities in applications as well as systems.  Our Tipping Point IPS blocks many attacks, but is not a good substitute for solid programming. MU Root SSL Certificates and Verisign Certificates are Available
Practice Sites WebGoat http://www.owasp.org/index.php/Category:OWASP_WebGoat_Project Requires a Java Virtual Machine be available on the local machine, and runs from the local machine. HACME Bank / HACME Books http://www.foundstone.com Note you will have to install these on a system you can run an appropriate web server on. Hack This Site! http://www.hackthissite.org/ Bright Shadows Challenges http://www.bright-shadows.net/
Practice Sites The Web Hacking Incidents Database http://packetstormsecurity.org/papers/attack/Web-Hacking-Incidents-Database-Annual-Report-2007.pdf UM System Database Hacked http://www.techshout.com/internet/2007/09/university-of-missouri-system-database-hacked-over-22000-social-security-numbers-stolen/ YGN Ethical Hacker Group (WebGoat Videos) http://yehg.net/lab/pr0js/training/webgoat.php

More Related Content

PPT
OWASP Serbia - A3 broken authentication and session management
PPTX
Owasp top 10 security threats
PDF
Penetration testing web application web application (in) security
PPT
Sergey Kochergan - OWASP Top 10 Web Application Vulnerabilities
PPT
OWASP Serbia - A5 cross-site request forgery
PDF
OWASP Top 10 - 2017
PPTX
Web application security
OWASP Serbia - A3 broken authentication and session management
Owasp top 10 security threats
Penetration testing web application web application (in) security
Sergey Kochergan - OWASP Top 10 Web Application Vulnerabilities
OWASP Serbia - A5 cross-site request forgery
OWASP Top 10 - 2017
Web application security

What's hot (20)

PPT
Top 10 Web Security Vulnerabilities (OWASP Top 10)
PPT
Owasp Top 10 And Security Flaw Root Causes
PPT
OWASP Serbia - A6 security misconfiguration
PDF
Oh, WASP! Security Essentials for Web Apps
PDF
Owasp Top 10
PDF
OWASP TOP TEN 2017 RC1
PPTX
Don't get stung - an introduction to the OWASP Top 10
PDF
Top 10 Web Application vulnerabilities
PPTX
Introduction to security testing
PPTX
Application Security Vulnerabilities: OWASP Top 10 -2007
PPTX
Web Application Firewall intro
PDF
OISC 2019 - The OWASP Top 10 & AppSec Primer
PPTX
Owasp 2017 oveview
PPTX
OWASP Top 10 2017 rc1 - The Ten Most Critical Web Application Security Risks
PDF
A5-Security misconfiguration-OWASP 2013
PPT
Owasp top 10
PDF
OWASP API Security TOP 10 - 2019
PPT
OWASPAppSecEU2006_CanTestingToolsReallyFindOWASPTop10
PPTX
Web Application Penetration Testing Introduction
PPTX
PCI security requirements secure coding and code review 2014
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Owasp Top 10 And Security Flaw Root Causes
OWASP Serbia - A6 security misconfiguration
Oh, WASP! Security Essentials for Web Apps
Owasp Top 10
OWASP TOP TEN 2017 RC1
Don't get stung - an introduction to the OWASP Top 10
Top 10 Web Application vulnerabilities
Introduction to security testing
Application Security Vulnerabilities: OWASP Top 10 -2007
Web Application Firewall intro
OISC 2019 - The OWASP Top 10 & AppSec Primer
Owasp 2017 oveview
OWASP Top 10 2017 rc1 - The Ten Most Critical Web Application Security Risks
A5-Security misconfiguration-OWASP 2013
Owasp top 10
OWASP API Security TOP 10 - 2019
OWASPAppSecEU2006_CanTestingToolsReallyFindOWASPTop10
Web Application Penetration Testing Introduction
PCI security requirements secure coding and code review 2014
Ad

Similar to OWASP Top10 2010 (20)

PDF
OWASP Portland - OWASP Top 10 For JavaScript Developers
PPTX
Cyber ppt
PDF
Web Application Security 101
PPT
OWASP_Top_10_Introduction_and_Remedies_2017.ppt
PPTX
Owasp top 10_-_2010 presentation
ODP
Break it while you make it: writing (more) secure software
PDF
Owasp top 10_openwest_2019
PDF
OWASP Top 10 Project
PPT
[Php Camp]Owasp Php Top5+Csrf
PDF
PPT
OWASP Top 10 And Insecure Software Root Causes
PPTX
OWASP zabezpieczenia aplikacji - Top 10 ASR
PPTX
OWASP -Top 5 Jagjit
PPTX
Security misconfiguration
PPTX
Owasp Top 10 2017
PPT
香港六合彩
PPTX
Owasp top 10 Vulnerabilities by cyberops infosec
PDF
Session10-PHP Misconfiguration
PPTX
Security testing zap it
PPTX
Security Testing - Zap It
OWASP Portland - OWASP Top 10 For JavaScript Developers
Cyber ppt
Web Application Security 101
OWASP_Top_10_Introduction_and_Remedies_2017.ppt
Owasp top 10_-_2010 presentation
Break it while you make it: writing (more) secure software
Owasp top 10_openwest_2019
OWASP Top 10 Project
[Php Camp]Owasp Php Top5+Csrf
OWASP Top 10 And Insecure Software Root Causes
OWASP zabezpieczenia aplikacji - Top 10 ASR
OWASP -Top 5 Jagjit
Security misconfiguration
Owasp Top 10 2017
香港六合彩
Owasp top 10 Vulnerabilities by cyberops infosec
Session10-PHP Misconfiguration
Security testing zap it
Security Testing - Zap It
Ad

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Getting Started with Data Integration: FME Form 101
PDF
August Patch Tuesday
PPTX
Machine Learning_overview_presentation.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
A Presentation on Artificial Intelligence
PPTX
1. Introduction to Computer Programming.pptx
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPTX
Spectroscopy.pptx food analysis technology
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Mushroom cultivation and it's methods.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Machine learning based COVID-19 study performance prediction
PPT
Teaching material agriculture food technology
Encapsulation_ Review paper, used for researhc scholars
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
cloud_computing_Infrastucture_as_cloud_p
Getting Started with Data Integration: FME Form 101
August Patch Tuesday
Machine Learning_overview_presentation.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
A Presentation on Artificial Intelligence
1. Introduction to Computer Programming.pptx
OMC Textile Division Presentation 2021.pptx
A comparative study of natural language inference in Swahili using monolingua...
Spectral efficient network and resource selection model in 5G networks
Heart disease approach using modified random forest and particle swarm optimi...
Spectroscopy.pptx food analysis technology
A comparative analysis of optical character recognition models for extracting...
Mushroom cultivation and it's methods.pdf
TLE Review Electricity (Electricity).pptx
SOPHOS-XG Firewall Administrator PPT.pptx
Machine learning based COVID-19 study performance prediction
Teaching material agriculture food technology

OWASP Top10 2010

  • 1. OWASP Top 10 Project Presented by ISAM Staff Tyler Hargis [GSEC, GWAS,GCIH] - and - Michael Morrison [GSEC, GWAS, CPTS, NSA IAM]
  • 2. Overview Disclaimer Common Misconceptions Open Web Application Security Project OWASP Top Vulnerabilities Conclusion Q&A
  • 3. Disclaimer The information contained in this presentation is intended to be used to educate developers about security vulnerabilities commonly found in Web Applications. This presentation is not intended as training material for those with malicious intent against information systems. Exploitation of the vulnerabilities listed in this presentation on systems or applications not owned or developed by the viewer is illegal in jurisdictions worldwide. It is a violation of the University of Missouri Acceptable Use policy to transmit these exploits across the MU network without explicit permission of the system or application owner they are directed at. The presenters are trained professionals, don’t try this at home…
  • 4. Common Misconceptions Aren’t I protected by firewalls or something? I thought you just needed to keep things patched? I’m not using Microsoft, so I must be secure. Isn’t keeping me secure your job?
  • 5. Open Web Application Security Project The Open Web Application Security Project (OWASP) is an open community dedicated to enabling organizations to develop, purchase, and maintain applications that can be trusted. All of the OWASP tools, documents, forums, and chapters are free and open to anyone interested in improving application security. http://www.owasp.org
  • 6. OWASP TOP 10 #1 Cross Site Scripting (XSS) Flaws XSS flaws occur whenever an application takes user supplied data and sends it to a web browser without first validating or encoding that content. XSS allows attackers to execute script in the victim's browser which can hijack user sessions, deface web sites, possibly introduce worms, etc.
  • 7. OWASP TOP 10 Cross Site Scripting (XSS) Recommendations Input validation Strong output encoding Specify the output encoding Do not use &quot;blacklist&quot; validation Watch out for canonicalization errors
  • 8. OWASP TOP 10 Cross Site Scripting (XSS) Recommendations Java: Use Struts output mechanisms such as <bean:write … >, or use the default JSTL escapeXML=&quot;true&quot; attribute in <c:out … >. .NET: Use the Microsoft Anti-XSS Library 1.5 freely available from MSDN. Understand which .NET controls automatically encode output data. PHP: Ensure output is passed through htmlentities() or htmlspecialchars() or use the soon to be released OWASP PHP Anti-XSS library. Disable register_globals if it is not already disabled
  • 9. OWASP TOP 10 #2 Injection Flaws Injection flaws, particularly SQL injection, are common in web applications. Injection occurs when user-supplied data is sent to an interpreter as part of a command or query. The attacker's hostile data tricks the interpreter into executing unintended commands or changing data.
  • 10. OWASP TOP 10 Injection Flaw Recommendations Input validation. Use strongly typed parameterized query APIs Enforce least privilege when connecting to databases Avoid detailed error messages Show care when using stored procedures Do not use dynamic query interfaces Do not use simple escaping functions - simple escaping functions cannot escape table names! Watch out for canonicalization errors
  • 11. OWASP TOP 10 Injection Flaw Recommendations Java EE - use strongly typed PreparedStatement, or ORMs such as Hibernate or Spring .NET - use strongly typed parameterized queries, such as SqlCommand with SqlParameter or an ORM like Hibernate. PHP - use PDO with strongly typed parameterized queries (using bindParam())
  • 12. OWASP TOP 10 #3 Malicious File Execution Code vulnerable to remote file inclusion (RFI) allows attackers to include hostile code and data, resulting in devastating attacks, such as total server compromise. Malicious file execution attacks affect PHP, XML and any framework which accepts filenames or files from users.
  • 13. OWASP TOP 10 Malicious File Execution Recommendations Use an indirect object reference map (hash the reference) Use explicit taint checking mechanisms, if supported (see OWASP) Strongly validate user input Add firewall rules Check any user supplied files or filenames Consider implementing a chroot jail or virtualization (sand box mechanisms)
  • 14. OWASP TOP 10 Malicious File Execution Recommendations PHP : Disable allow_url_fopen and allow_url_include in php.ini PHP : Disable register_globals and use E_STRICT to find uninitialized variables PHP : Ensure that all file and streams functions (stream_*) are carefully vetted. PHP : Be extremely cautious if data is passed to system() eval() passthru() or ` (the backtick operator) J2EE , ensure that the security manager is enabled and properly configured and that the application is demanding permissions appropriately ASP.NET , please refer to the documentation on partial trust, and design your applications to be segmented in trust, so that most of the application exists in the lowest possible trust state possible
  • 15. OWASP TOP 10 #4 Insecure Direct Object Reference A direct object reference occurs when a developer exposes a reference to an internal implementation object, such as a file, directory, database record, or key, as a URL or form parameter. Attackers can manipulate those references to access other objects without authorization.
  • 16. OWASP TOP 10 Insecure Direct Object Reference Recommendations Avoid exposing your private object references to users whenever possible, such as primary keys or filenames Validate any private object references Verify authorization to all referenced objects
  • 17. OWASP TOP 10 #5 Cross Site Request Forgery (CSRF) A CSRF attack forces a logged-on victim's browser to send a pre-authenticated request to a vulnerable web application, which then forces the victim's browser to perform a hostile action to the benefit of the attacker. CSRF can be as powerful as the web application that it attacks.
  • 18. OWASP TOP 10 Cross Site Request Forgery (CSRF) Recommendations Ensure that there are no XSS vulnerabilities in your application Insert custom random tokens into every form and URL (For ASP.NET, set a ViewStateUserKey.) For sensitive data or value transactions, re-authenticate or use transaction signing Do not use GET requests (URLs) for sensitive data or to perform value transactions. POST alone is insufficient a protection.
  • 19. OWASP TOP 10 #6 Information Leakage and Improper Error Handling Applications can unintentionally leak information about their configuration, internal workings, or violate privacy through a variety of application problems. Attackers use this weakness to steal sensitive data, or conduct more serious attacks.
  • 20. OWASP TOP 10 #7 Broken Authentication and Session Management Account credentials and session tokens are often not properly protected. Attackers compromise passwords, keys, or authentication tokens to assume other users' identities.
  • 21. OWASP TOP 10 #8 Insecure Cryptographic Storage Web applications rarely use cryptographic functions properly to protect data and credentials. Attackers use weakly protected data to conduct identity theft and other crimes, such as credit card fraud.
  • 22. OWASP TOP 10 #9 Insecure Communications Applications frequently fail to encrypt network traffic when it is necessary to protect sensitive communications.
  • 23. OWASP TOP 10 #10 Failure to Restrict URL Access Frequently, an application only protects sensitive functionality by preventing the display of links or URLs to unauthorized users. Attackers can use this weakness to access and perform unauthorized operations by accessing those URLs directly.
  • 24. How Do I Protect My Applications? Take advantage of free sites like OWASP for details on remediating the vulnerabilities demonstrated today. ( http://www.owasp.org/index.php/Top_10_2007-Where_to_Go_From_Here ) Fortify Source Code Analyzer is available at a reduced cost from DoIT. Security Training of any type (DoIT, SANS, etc.)
  • 25. How Can DoIT Help? Inspections by ISAM will reveal many common vulnerabilities in applications as well as systems. Our Tipping Point IPS blocks many attacks, but is not a good substitute for solid programming. MU Root SSL Certificates and Verisign Certificates are Available
  • 26. Practice Sites WebGoat http://www.owasp.org/index.php/Category:OWASP_WebGoat_Project Requires a Java Virtual Machine be available on the local machine, and runs from the local machine. HACME Bank / HACME Books http://www.foundstone.com Note you will have to install these on a system you can run an appropriate web server on. Hack This Site! http://www.hackthissite.org/ Bright Shadows Challenges http://www.bright-shadows.net/
  • 27. Practice Sites The Web Hacking Incidents Database http://packetstormsecurity.org/papers/attack/Web-Hacking-Incidents-Database-Annual-Report-2007.pdf UM System Database Hacked http://www.techshout.com/internet/2007/09/university-of-missouri-system-database-hacked-over-22000-social-security-numbers-stolen/ YGN Ethical Hacker Group (WebGoat Videos) http://yehg.net/lab/pr0js/training/webgoat.php

Editor's Notes

  • #8: Input validation. Use a standard input validation mechanism to validate all input data for length, type, syntax, and business rules before accepting the data to be displayed or stored. Use an &amp;quot;accept known good&amp;quot; validation strategy. Reject invalid input rather than attempting to sanitize potentially hostile data. Do not forget that error messages might also include invalid data. Strong output encoding. Ensure that all user-supplied data is appropriately entity encoded (either HTML or XML depending on the output mechanism) before rendering, taking the approach to encode all characters other than a very limited subset. This is the approach of the Microsoft Anti-XSS library, and the forthcoming OWASP PHP Anti-XSS library. Also, set the character encodings for each page you output, which will reduce exposure to some variants. Specify the output encoding (such as ISO 8859-1 or UTF 8). Do not allow the attacker to choose this for your users. Do not use &amp;quot;blacklist&amp;quot; validation to detect XSS in input or to encode output. Searching for and replacing just a few characters (&amp;quot;&lt;&amp;quot; &amp;quot;&gt;&amp;quot; and other similar characters or phrases such as “script”) is weak and has been attacked successfully. Even an unchecked “&lt;b&gt;” tag is unsafe in some contexts. XSS has a surprising number of variants that make it easy to bypass blacklist validation. Watch out for canonicalization errors. Inputs must be decoded and canonicalized to the application’s current internal representation before being validated. Make sure that your application does not decode the same input twice. Such errors could be used to bypass whitelist schemes by introducing dangerous inputs after they have been checked.
  • #11: Input validation. Use a standard input validation mechanism to validate all input data for length, type, syntax, and business rules before accepting the data to be displayed or stored. Use an &amp;quot;accept known good&amp;quot; validation strategy. Reject invalid input rather than attempting to sanitize potentially hostile data. Do not forget that error messages might also include invalid data Use strongly typed parameterized query APIs with placeholder substitution markers, even when calling stored procedures Enforce least privilege when connecting to databases and other backend systems Avoid detailed error messages that are useful to an attacker Show care when using stored procedures since they are generally safe from SQL Injection. However, be careful as they can be injectable (such as via the use of exec() or concatenating arguments within the stored procedure) Do not use dynamic query interfaces (such as mysql_query() or similar) Do not use simple escaping functions , such as PHP&apos;s addslashes() or character replacement functions like str_replace(&amp;quot;&apos;&amp;quot;, &amp;quot; &amp;quot;). These are weak and have been successfully exploited by attackers. . For PHP, use mysql_real_escape_string() if using MySQL, or preferably use PDO which does not require escaping When using simple escape mechanisms, note that simple escaping functions cannot escape table names ! Table names must be legal SQL, and thus are completely unsuitable for user supplied input Watch out for canonicalization errors. Inputs must be decoded and canonicalized to the application&apos;s current internal representation before being validated. Make sure that your application does not decode the same input twice. Such errors could be used to bypass whitelist schemes by introducing dangerous inputs after they have been checked