INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

Slides:



Advertisements
Similar presentations
Web Security Never, ever, trust user inputs Supankar.
Advertisements

HI-TEC 2011 SQL Injection. Client’s Browser HTTP or HTTPS Web Server Apache or IIS HTML Forms CGI Scripts Database SQL Server or Oracle or MySQL ODBC.
PHP Hypertext Preprocessor Information Systems 337 Prof. Harry Plantinga.
WebGoat & WebScarab “What is computer security for $1000 Alex?”
EECS 354 Network Security Cross Site Scripting (XSS)
Cross Site Scripting a.k.a. XSS Szymon Siewior. Disclaimer Everything that will be shown, was created for strictly educational purposes. You may reuse.
Introduction The concept of “SQL Injection”
By Brian Vees.  SQL Injection  Username Enumeration  Cross Site Scripting (XSS)  Remote Code Execution  String Formatting Vulnerabilities.
It’s always better live. MSDN Events Security Best Practices Part 2 of 2 Reducing Vulnerabilities using Visual Studio 2008.
NAVY Research Group Department of Computer Science Faculty of Electrical Engineering and Computer Science VŠB-TUO 17. listopadu Ostrava-Poruba.
Web Audit Vulnerability cross-site scripting (XSS) concerns by Ron Widitz.
Sara SartoliAkbar Siami Namin NSF-SFS workshop July 14-18, 2014.
Introduction to the OWASP Top 10. Cross Site Scripting (XSS)  Comes in several flavors:  Stored  Reflective  DOM-Based.
CROSS SITE SCRIPTING..! (XSS). Overview What is XSS? Types of XSS Real world Example Impact of XSS How to protect against XSS?
Injection Attacks by Example SQL Injection and XSS Adam Forsythe Thomas Hollingsworth.
Lab 3 Cookie Stealing using XSS Kara James, Chelsea Collins, Trevor Norwood, David Johnson.
WEB SECURITY WORKSHOP TEXSAW 2013 Presented by Joshua Hammond Prepared by Scott Hand.
1 IS 2150 / TEL 2810 Introduction to Security James Joshi Associate Professor, SIS Lecture 12.1 Nov 20, 2012 SQL Injection Cross-Site Scripting.
Preventing SQL Injection ~example of SQL injection $user = $_POST[‘user’]; $pass = $_POST[‘pass’]; $query = DELETE FROM Users WHERE user = ‘$user’ AND.
Introduction to InfoSec – Recitation 8 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
Prevent Cross-Site Scripting (XSS) attack
+ Websites Vulnerabilities. + Content Expand of The Internet Use of the Internet Examples Importance of the Internet How to find Security Vulnerabilities.
Introduction to InfoSec – Recitation 7 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
CSCI 6962: Server-side Design and Programming Secure Web Programming.
Lecture 7 Interaction. Topics Implementing data flows An internet solution Transactions in MySQL 4-tier systems – business rule/presentation separation.
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Cross Site Scripting (XSS) Chaitanya Lakshmi
JavaScript – Quiz #9 Lecture Code:
Introduction To Web Application Security in PHP. Security is Big And Often Difficult PHP doesn’t make it any easier.
Accessing Your MySQL Database from the Web with PHP (Ch 11) 1.
Security Attacks CS 795. Buffer Overflow Problem Buffer overflows can be triggered by inputs that are designed to execute code, or alter the way the program.
Input Validation – common associated risks  ______________ user input controls SQL statements ultimately executed by a database server
Sumanth M Ganesh B CPSC 620.  SQL Injection attacks allow a malicious individual to execute arbitrary SQL code on your server  The attack could involve.
Web Applications Testing By Jamie Rougvie Supported by.
By Sean Rose and Erik Hazzard.  SQL Injection is a technique that exploits security weaknesses of the database layer of an application in order to gain.
Web Application Vulnerabilities ECE 4112 Internetwork Security, Spring 2005 Chris Kelly Chris Lewis April 28, 2005 ECE 4112 Internetwork Security, Spring.
Controlling Web Site Access Using Logins CS 320. Basic Approach HTML form a php page that collects the username and password  Sends them to second PHP.
WEB SECURITY WEEK 2 Computer Security Group University of Texas at Dallas.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Security Attacks CS 795. Buffer Overflow Problem Buffer overflow Analysis of Buffer Overflow Attacks.
Module: Software Engineering of Web Applications Chapter 3 (Cont.): user-input-validation testing of web applications 1.
INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.
Example – SQL Injection MySQL & PHP code: // The next instruction prompts the user is to supply an ID $personID = getIDstringFromUser(); $sqlQuery = "SELECT.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
By Collin Donaldson. Hacking is only legal under the following circumstances: 1.You hack (penetration test) a device/network you own. 2.You gain explicit,
SQL Injection By Wenonah Abadilla. Topics What is SQL What is SQL Injection Damn Vulnerable Web App SQLI Demo Prepared Statements.
SlideSet #20: Input Validation and Cross-site Scripting Attacks (XSS) SY306 Web and Databases for Cyber Operations.
How Angular Protects Us From XSS Attacks? XSS (Cross-Site Scripting) is one of the assaults that can influence your site. So as to adapt to the attack,
SQL Injection By Wenonah Abadilla.
Google’s Gruyere1 : An XSS Example Presented by: Terry Gregory
Group 18: Chris Hood Brett Poche
Web Application Security
Module: Software Engineering of Web Applications
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
Introduction to Information Security
Introduction to Dynamic Web Programming
Chapter 7: Identifying Advanced Attacks
TOPIC: Web Security (Part-4)
CS 371 Web Application Programming
Example – SQL Injection
SE604: Software Testing and QA Secure SW Development for QA Lecture#3
Web Systems Development (CSC-215)
PHP: Security issues FdSc Module 109 Server side scripting and
Cross-Site Request Forgery (CSRF) Attack Lab
Lecture 2 - SQL Injection
PHP Forms and Databases.
Protecting Against Common Web Application Vulnerabilities
Lecture 27 Security I April 4, 2018 Open news web sites.
INFO 344 Web Tools And Development
CSc 337 Lecture 24: Security.
Presentation transcript:

INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014

Announcements PA4 due Tonight! No late days. – Canvas shuts down at 11:00pm, please submit earlier!

Security

Firewall Software or Hardware Separate local area network from Internet Protocol/Port, inbound & outbound

SQL Injection Common security risk What is SQL Injection – Go to site, insert malicious SQL Before hacking: – Understanding “Union” mysql clause – MySQL versions, latest version has: INFORMATION_SCHEMA.TABLES Take a look locally to understand the columns/etc

SQL Injection Try hacking this! Strategy – Get it working normally – Find out how many columns in current table – Get database name via database() – Show all tables in current database – Identify table with sensitive info (and # rows it has) – Identify column names in sensitive table – Get sensitive info! What is my username & password? Groups of 2 Lab submission

SQL Injection Solution – Use PDO! – See PHP best practices slides – PDO, prepare, bind parameters, execute

Cross Site Scripting (XSS) Attack Common security risk What is XSS Attack? – Send victim compromised site url Try hacking this! (use Firefox) Strategy – Add JS to parameter, get it to show “compromised” alert box – Look at source code, understand how it works – Add JS to override the current onclick function and alert instead – Change override function to send 15x the payment entered Groups of 2 Lab submission Hint: Google jquery override onclick Hint: need to url encode the # tag

Cross Site Scripting (XSS) Attack A lot of browsers disable this But sanitize your inputs! Reject ones with script tags!

Validate Cookies Cookies are stored on client side User can actually go change them! So if you assume cookie data is valid = Dangerous!!! A lot of websites will store “ID=XXX” in the cookie and the next time assume it’s real/valid/authenticated => not true!

Encrypt Passwords Encrypt passwords stored in your database If your system gets hacked, the passwords aren’t leaked

Sanitize HTML Same reason to prevent XSS Sanitize with PHP functions – C# Sanitize –

Questions?