SlideShare ist ein Scribd-Unternehmen logo
1 von 24
No matter how well you code they will break it
     • Murphy’s Law (he was an optimist really!)
Programmers
95% of programmers are
• Smart
• Clever
• Trusting

The other 5% are devious or become management!
Programmers are not natively security conscious
The reason
• Its take a lot longer to write!!

Its not always about code
• Need to know your platform.
• Solid house, bad foundations.
Users
They are the known objective in programming
They are who you should code for
Advanced Users & Hackers
Are just smarter, more curious and sometimes malicious users
Attempt to open the unlocked door
They are what you secure your code for.
Programmers Again!
10: Programmers are the problem
20: You are a programmer
30: GOTO 10
Issue # 10 Leaving admin info
Mainly applies to web apps.
Leaving admin info systems on the server to be accessed
You can use Google to find this info
You can find password files, office data files (PST) etc
Old files are possible especially you rename in the same directory. Then possible to
download source code from your site.
Sample: intitle:index.of outlook pst
Also leaving trace output with <trace enabled=“true” and localOnly=“false”> ..
Allows access to trace.axd
Issue # 9 Passwords in plain text
Following issue #10
Usernames and passwords should be encrypted.
Sensitive data should be in encrypted
Dont write your own Crypto protocols.
Can also use google code to find these (especially if you leave personal ones there!!!)
http://google.com/codesearch?hl=en&lr=&q=sa+connectionstring+file%3Aweb.config&s
btn=Search
Issue # 8 Not patching
One of the easiest ways to get caught
Vulnerability is not in your code but on the system
Especially painful on web servers
Google can be used to find vulnerable web servers
Requires you most of the time to pester the local sys admin
Issue # 7 Client side validation
Shouldn’t be the only thing that sanitizes your input
Consider you have a javascript function to see if the number is valid
User views source page and sends you the variables
Do validation on both sides to be sure, but definately server side at least.
Validation best practices
Validate all inputs at the server even if client validated
Use a central validation source
Use white lists rather than blacklists
Escape special characters
Validate against RFC rules
Validate XML against the schema
Issue # 6 Error messages
You should never show a detailed error message on a production web site.
Use CustomErrors in the web.config
Either RemoteOnly or On
Again also turn off Trace and set Debug=“false”
Issue # 5 – Incorrect Permisssions
SQL connection using SA or SysAdm level permissions
Requiring Administrator permissions on the web server!!!!!
Requiring Admin privileges for a windows app
Issue # 4 – Directory Traversal
Consider default.aspx?download=filestore/file.exe using BinaryWrite
Change the download variable
Now default.aspx? download=web.config
Page will display the incorrect file and give ideas about what way the machine is
configured and possibly access to a lot more.
How to prevent it
Validate your input
• Checking for ../ usually wont work due to URLEncode
• Strong checking of input

Placing web apps on separate partitions to system files
Correct permissions
Web server fully patched
Using scanner tools to validate the web server
• IIS Lockdown
• URL Scan
Issue # 3 XSS – Cross Site Scripting
HTML & Script Injection
3 Main types
• DOM
• Non Persistant
• Persistant

Non persistant is the most common, and persistant is the most dangerous.
Certain CMS are vuln, as well as pages taking input and displaying that input back.
Other variations include HTTP response splitting, HTTP header injection, remote file
inclusion
Remote File Inclusion
Particularly nasty
More common with scripting languages such as ASP and PHP
Allows you to insert your own file to be run
Not as relevant to .NET but still can cause a problem
Example
http://server/file.aspx?redir=page.aspx
http://server/file.aspx?redir=http://badplace/haha.aspx?
Imagine that with a login and similar look of your own site
Mind your cookies!
Make cookies only accessible to server side code
<httpCookies httpOnlyCookies="true">
Use cookie based session state to stop session hijacking
<sessionState cookieless="UseCookies">
Where possible use SSL for authentication cookies
Use unique forms name when using multiple sites with forms auth.
How to avoid
Use HtmlEncode to disable special chars
Make sure on redirect its only going to where you expect it to be going
Sanitize your input
Mind your cookies and evaluate web.configs above the web app for vulns
Issue # 2 SQL Injection
Allowing straight input to your database
Consider
• SELECT * FROM tbl WHERE (Email=‘RequestData’) AND (PASSWORD=’OtherData’)

Now consider the inputs ” ‘ OR ‘1’=‘1’ ”
SELECT * FROM tbl WHERE (Email=‘’ OR ‘1’=‘1’) AND (PASSWORD=’’ OR ‘1’=‘1’)
Worse
• UPDATE tbl WHERE ID=RequestData
• RequestData = 1;DELETE FROM tbl;

Worst!
• RequestData = 1;DROP tbl;
How to avoid
Sanitize your input
Dont blindly allow access to the database from the front end
Use only the permissions required for the option
Consider two level database access
• Reader
• Writer

With SQL Server reduce your permissions to execute only if you are using stored
procs
Issue # 1 – Being Trusting!

Trusting your users!!!
Sanitize your input
If you don’t check it, be prepared to deal with the consequences. See issues 2 & 3!
Famous examples: Amazon & Komplett
Resources
 http://www.security.nnov.ru/
 http://www.devx.com/dotnet/Article/32493/1763/page/1
 http://cwe.mitre.org/top25/#Brief
 http://msdn.microsoft.com/en-us/library/ms998274.aspx
 http://msdn.microsoft.com/en-us/library/ms998271.aspx
 http://www.microsoft.com/downloadS/details.aspx?familyid=58A7C46E-
  A599-4FCB-9AB4-A4334146B6BA&displaylang=en
 http://msdn.microsoft.com/en-us/security/aa973814.aspx
Contact Information
Blog: http://www.certsandprogs.com
Twitter: @nmerrigan
Email: through the blog

Weitere ähnliche Inhalte

Was ist angesagt?

Amazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for KubernetesAmazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for KubernetesAmazon Web Services
 
AWS Application Migration Service-Hands-On Guide
AWS Application Migration Service-Hands-On GuideAWS Application Migration Service-Hands-On Guide
AWS Application Migration Service-Hands-On GuideManas Mondal
 
Authoring and Deploying Serverless Applications with AWS SAM
Authoring and Deploying Serverless Applications with AWS SAMAuthoring and Deploying Serverless Applications with AWS SAM
Authoring and Deploying Serverless Applications with AWS SAMAmazon Web Services
 
Laravel (8) php_framework_handbook__start_from_zer_18604872_(z-lib.org)
Laravel (8) php_framework_handbook__start_from_zer_18604872_(z-lib.org)Laravel (8) php_framework_handbook__start_from_zer_18604872_(z-lib.org)
Laravel (8) php_framework_handbook__start_from_zer_18604872_(z-lib.org)ssuser337865
 
AWS Cloud Computing Tutorial | Migrating on Premise VM to AWS Cloud | AWS Tra...
AWS Cloud Computing Tutorial | Migrating on Premise VM to AWS Cloud | AWS Tra...AWS Cloud Computing Tutorial | Migrating on Premise VM to AWS Cloud | AWS Tra...
AWS Cloud Computing Tutorial | Migrating on Premise VM to AWS Cloud | AWS Tra...Edureka!
 
Chef for DevOps - an Introduction
Chef for DevOps - an IntroductionChef for DevOps - an Introduction
Chef for DevOps - an IntroductionSanjeev Sharma
 
Building Secure Architectures on AWS
Building Secure Architectures on AWSBuilding Secure Architectures on AWS
Building Secure Architectures on AWSAmazon Web Services
 
Automating Security in your IaC Pipeline
Automating Security in your IaC PipelineAutomating Security in your IaC Pipeline
Automating Security in your IaC PipelineAmazon Web Services
 
VMware Cloud on AWS – Technical Deep Dive.pdf
VMware Cloud on AWS – Technical Deep Dive.pdfVMware Cloud on AWS – Technical Deep Dive.pdf
VMware Cloud on AWS – Technical Deep Dive.pdfAmazon Web Services
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsAmazon Web Services
 
Kubernetes Security
Kubernetes SecurityKubernetes Security
Kubernetes Securityinovex GmbH
 
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar SeriesGetting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar SeriesAmazon Web Services
 

Was ist angesagt? (20)

Amazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for KubernetesAmazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for Kubernetes
 
Introducing Amazon EKS
Introducing Amazon EKSIntroducing Amazon EKS
Introducing Amazon EKS
 
AWS Application Migration Service-Hands-On Guide
AWS Application Migration Service-Hands-On GuideAWS Application Migration Service-Hands-On Guide
AWS Application Migration Service-Hands-On Guide
 
Authoring and Deploying Serverless Applications with AWS SAM
Authoring and Deploying Serverless Applications with AWS SAMAuthoring and Deploying Serverless Applications with AWS SAM
Authoring and Deploying Serverless Applications with AWS SAM
 
Laravel (8) php_framework_handbook__start_from_zer_18604872_(z-lib.org)
Laravel (8) php_framework_handbook__start_from_zer_18604872_(z-lib.org)Laravel (8) php_framework_handbook__start_from_zer_18604872_(z-lib.org)
Laravel (8) php_framework_handbook__start_from_zer_18604872_(z-lib.org)
 
Deep dive into AWS IAM
Deep dive into AWS IAMDeep dive into AWS IAM
Deep dive into AWS IAM
 
Java Enterprise Edition
Java Enterprise EditionJava Enterprise Edition
Java Enterprise Edition
 
Security & Compliance in AWS
Security & Compliance in AWSSecurity & Compliance in AWS
Security & Compliance in AWS
 
Introduction to AWS Security
Introduction to AWS SecurityIntroduction to AWS Security
Introduction to AWS Security
 
AWS Cloud Computing Tutorial | Migrating on Premise VM to AWS Cloud | AWS Tra...
AWS Cloud Computing Tutorial | Migrating on Premise VM to AWS Cloud | AWS Tra...AWS Cloud Computing Tutorial | Migrating on Premise VM to AWS Cloud | AWS Tra...
AWS Cloud Computing Tutorial | Migrating on Premise VM to AWS Cloud | AWS Tra...
 
Chef for DevOps - an Introduction
Chef for DevOps - an IntroductionChef for DevOps - an Introduction
Chef for DevOps - an Introduction
 
Building Secure Architectures on AWS
Building Secure Architectures on AWSBuilding Secure Architectures on AWS
Building Secure Architectures on AWS
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Automating Security in your IaC Pipeline
Automating Security in your IaC PipelineAutomating Security in your IaC Pipeline
Automating Security in your IaC Pipeline
 
Error handling in ASP.NET
Error handling in ASP.NETError handling in ASP.NET
Error handling in ASP.NET
 
VMware Cloud on AWS – Technical Deep Dive.pdf
VMware Cloud on AWS – Technical Deep Dive.pdfVMware Cloud on AWS – Technical Deep Dive.pdf
VMware Cloud on AWS – Technical Deep Dive.pdf
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless Applications
 
Kubernetes Security
Kubernetes SecurityKubernetes Security
Kubernetes Security
 
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar SeriesGetting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
 
Container Security
Container SecurityContainer Security
Container Security
 

Ähnlich wie Defensive programing 101

OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFOWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFBrian Huff
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Brian Huff
 
Secure programming with php
Secure programming with phpSecure programming with php
Secure programming with phpMohmad Feroz
 
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Michael Pirnat
 
How to Destroy a Database
How to Destroy a DatabaseHow to Destroy a Database
How to Destroy a DatabaseJohn Ashmead
 
Defcon9 Presentation2001
Defcon9 Presentation2001Defcon9 Presentation2001
Defcon9 Presentation2001Miguel Ibarra
 
Web Application Security - "In theory and practice"
Web Application Security - "In theory and practice"Web Application Security - "In theory and practice"
Web Application Security - "In theory and practice"Jeremiah Grossman
 
Survey Presentation About Application Security
Survey Presentation About Application SecuritySurvey Presentation About Application Security
Survey Presentation About Application SecurityNicholas Davis
 
Web security for app developers
Web security for app developersWeb security for app developers
Web security for app developersPablo Gazmuri
 
Hacking sites for fun and profit
Hacking sites for fun and profitHacking sites for fun and profit
Hacking sites for fun and profitDavid Stockton
 
How to Secure Your WordPress Site
How to Secure Your WordPress SiteHow to Secure Your WordPress Site
How to Secure Your WordPress SiteQBurst
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfOrtus Solutions, Corp
 
Hacking sites for fun and profit
Hacking sites for fun and profitHacking sites for fun and profit
Hacking sites for fun and profitDavid Stockton
 
MySQL Security in a Cloudy World
MySQL Security in a Cloudy WorldMySQL Security in a Cloudy World
MySQL Security in a Cloudy WorldDave Stokes
 

Ähnlich wie Defensive programing 101 (20)

OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFOWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
 
Web Security
Web SecurityWeb Security
Web Security
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)
 
Secure programming with php
Secure programming with phpSecure programming with php
Secure programming with php
 
Secure pl-sql-coding
Secure pl-sql-codingSecure pl-sql-coding
Secure pl-sql-coding
 
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
 
How to Destroy a Database
How to Destroy a DatabaseHow to Destroy a Database
How to Destroy a Database
 
Defcon9 Presentation2001
Defcon9 Presentation2001Defcon9 Presentation2001
Defcon9 Presentation2001
 
Web Application Security - "In theory and practice"
Web Application Security - "In theory and practice"Web Application Security - "In theory and practice"
Web Application Security - "In theory and practice"
 
Survey Presentation About Application Security
Survey Presentation About Application SecuritySurvey Presentation About Application Security
Survey Presentation About Application Security
 
Web security
Web securityWeb security
Web security
 
Web security for app developers
Web security for app developersWeb security for app developers
Web security for app developers
 
Hacking sites for fun and profit
Hacking sites for fun and profitHacking sites for fun and profit
Hacking sites for fun and profit
 
Tietoturvallisuuden_kevatseminaari_2013_Jarno_Niemela
Tietoturvallisuuden_kevatseminaari_2013_Jarno_NiemelaTietoturvallisuuden_kevatseminaari_2013_Jarno_Niemela
Tietoturvallisuuden_kevatseminaari_2013_Jarno_Niemela
 
How to Secure Your WordPress Site
How to Secure Your WordPress SiteHow to Secure Your WordPress Site
How to Secure Your WordPress Site
 
Is Drupal Secure?
Is Drupal Secure?Is Drupal Secure?
Is Drupal Secure?
 
Is Drupal secure?
Is Drupal secure?Is Drupal secure?
Is Drupal secure?
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
 
Hacking sites for fun and profit
Hacking sites for fun and profitHacking sites for fun and profit
Hacking sites for fun and profit
 
MySQL Security in a Cloudy World
MySQL Security in a Cloudy WorldMySQL Security in a Cloudy World
MySQL Security in a Cloudy World
 

Mehr von Niall Merrigan

Defensive programming 101 1
Defensive programming 101 1Defensive programming 101 1
Defensive programming 101 1Niall Merrigan
 
Defensive programming 101 For Dataforening
Defensive programming 101 For DataforeningDefensive programming 101 For Dataforening
Defensive programming 101 For DataforeningNiall Merrigan
 
Nialls DDD Scot results
Nialls DDD Scot resultsNialls DDD Scot results
Nialls DDD Scot resultsNiall Merrigan
 
Defensive programming 101
Defensive programming 101Defensive programming 101
Defensive programming 101Niall Merrigan
 
NNUG Certification Presentation
NNUG Certification PresentationNNUG Certification Presentation
NNUG Certification PresentationNiall Merrigan
 

Mehr von Niall Merrigan (6)

Website Fuzziness
Website FuzzinessWebsite Fuzziness
Website Fuzziness
 
Defensive programming 101 1
Defensive programming 101 1Defensive programming 101 1
Defensive programming 101 1
 
Defensive programming 101 For Dataforening
Defensive programming 101 For DataforeningDefensive programming 101 For Dataforening
Defensive programming 101 For Dataforening
 
Nialls DDD Scot results
Nialls DDD Scot resultsNialls DDD Scot results
Nialls DDD Scot results
 
Defensive programming 101
Defensive programming 101Defensive programming 101
Defensive programming 101
 
NNUG Certification Presentation
NNUG Certification PresentationNNUG Certification Presentation
NNUG Certification Presentation
 

Defensive programing 101

  • 1.
  • 2. No matter how well you code they will break it • Murphy’s Law (he was an optimist really!)
  • 3. Programmers 95% of programmers are • Smart • Clever • Trusting The other 5% are devious or become management! Programmers are not natively security conscious The reason • Its take a lot longer to write!! Its not always about code • Need to know your platform. • Solid house, bad foundations.
  • 4. Users They are the known objective in programming They are who you should code for
  • 5. Advanced Users & Hackers Are just smarter, more curious and sometimes malicious users Attempt to open the unlocked door They are what you secure your code for.
  • 6. Programmers Again! 10: Programmers are the problem 20: You are a programmer 30: GOTO 10
  • 7. Issue # 10 Leaving admin info Mainly applies to web apps. Leaving admin info systems on the server to be accessed You can use Google to find this info You can find password files, office data files (PST) etc Old files are possible especially you rename in the same directory. Then possible to download source code from your site. Sample: intitle:index.of outlook pst Also leaving trace output with <trace enabled=“true” and localOnly=“false”> .. Allows access to trace.axd
  • 8. Issue # 9 Passwords in plain text Following issue #10 Usernames and passwords should be encrypted. Sensitive data should be in encrypted Dont write your own Crypto protocols. Can also use google code to find these (especially if you leave personal ones there!!!) http://google.com/codesearch?hl=en&lr=&q=sa+connectionstring+file%3Aweb.config&s btn=Search
  • 9. Issue # 8 Not patching One of the easiest ways to get caught Vulnerability is not in your code but on the system Especially painful on web servers Google can be used to find vulnerable web servers Requires you most of the time to pester the local sys admin
  • 10. Issue # 7 Client side validation Shouldn’t be the only thing that sanitizes your input Consider you have a javascript function to see if the number is valid User views source page and sends you the variables Do validation on both sides to be sure, but definately server side at least.
  • 11. Validation best practices Validate all inputs at the server even if client validated Use a central validation source Use white lists rather than blacklists Escape special characters Validate against RFC rules Validate XML against the schema
  • 12. Issue # 6 Error messages You should never show a detailed error message on a production web site. Use CustomErrors in the web.config Either RemoteOnly or On Again also turn off Trace and set Debug=“false”
  • 13. Issue # 5 – Incorrect Permisssions SQL connection using SA or SysAdm level permissions Requiring Administrator permissions on the web server!!!!! Requiring Admin privileges for a windows app
  • 14. Issue # 4 – Directory Traversal Consider default.aspx?download=filestore/file.exe using BinaryWrite Change the download variable Now default.aspx? download=web.config Page will display the incorrect file and give ideas about what way the machine is configured and possibly access to a lot more.
  • 15. How to prevent it Validate your input • Checking for ../ usually wont work due to URLEncode • Strong checking of input Placing web apps on separate partitions to system files Correct permissions Web server fully patched Using scanner tools to validate the web server • IIS Lockdown • URL Scan
  • 16. Issue # 3 XSS – Cross Site Scripting HTML & Script Injection 3 Main types • DOM • Non Persistant • Persistant Non persistant is the most common, and persistant is the most dangerous. Certain CMS are vuln, as well as pages taking input and displaying that input back. Other variations include HTTP response splitting, HTTP header injection, remote file inclusion
  • 17. Remote File Inclusion Particularly nasty More common with scripting languages such as ASP and PHP Allows you to insert your own file to be run Not as relevant to .NET but still can cause a problem Example http://server/file.aspx?redir=page.aspx http://server/file.aspx?redir=http://badplace/haha.aspx? Imagine that with a login and similar look of your own site
  • 18. Mind your cookies! Make cookies only accessible to server side code <httpCookies httpOnlyCookies="true"> Use cookie based session state to stop session hijacking <sessionState cookieless="UseCookies"> Where possible use SSL for authentication cookies Use unique forms name when using multiple sites with forms auth.
  • 19. How to avoid Use HtmlEncode to disable special chars Make sure on redirect its only going to where you expect it to be going Sanitize your input Mind your cookies and evaluate web.configs above the web app for vulns
  • 20. Issue # 2 SQL Injection Allowing straight input to your database Consider • SELECT * FROM tbl WHERE (Email=‘RequestData’) AND (PASSWORD=’OtherData’) Now consider the inputs ” ‘ OR ‘1’=‘1’ ” SELECT * FROM tbl WHERE (Email=‘’ OR ‘1’=‘1’) AND (PASSWORD=’’ OR ‘1’=‘1’) Worse • UPDATE tbl WHERE ID=RequestData • RequestData = 1;DELETE FROM tbl; Worst! • RequestData = 1;DROP tbl;
  • 21. How to avoid Sanitize your input Dont blindly allow access to the database from the front end Use only the permissions required for the option Consider two level database access • Reader • Writer With SQL Server reduce your permissions to execute only if you are using stored procs
  • 22. Issue # 1 – Being Trusting! Trusting your users!!! Sanitize your input If you don’t check it, be prepared to deal with the consequences. See issues 2 & 3! Famous examples: Amazon & Komplett
  • 23. Resources  http://www.security.nnov.ru/  http://www.devx.com/dotnet/Article/32493/1763/page/1  http://cwe.mitre.org/top25/#Brief  http://msdn.microsoft.com/en-us/library/ms998274.aspx  http://msdn.microsoft.com/en-us/library/ms998271.aspx  http://www.microsoft.com/downloadS/details.aspx?familyid=58A7C46E- A599-4FCB-9AB4-A4334146B6BA&displaylang=en  http://msdn.microsoft.com/en-us/security/aa973814.aspx