Internet Self Defense 101 Rex Booth.

Slides:



Advertisements
Similar presentations
Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems © 2002, Predictive Systems.
Advertisements

Nick Feamster CS 6262 Spring 2009
Cross-site Request Forgery (CSRF) Attacks
What is code injection? Code injection is the exploitation of a computer bug that is caused by processing invalid data. Code injection can be used by.
©2009 Justin C. Klein Keane PHP Code Auditing Session 5 XSS & XSRF Justin C. Klein Keane
Common Exploits Aaron Cure Cypress Data Defense. SQL Injection.
WebGoat & WebScarab “What is computer security for $1000 Alex?”
Cross Site Scripting a.k.a. XSS Szymon Siewior. Disclaimer Everything that will be shown, was created for strictly educational purposes. You may reuse.
Attacking Session Management Juliette Lessing
COMP 321 Week 12. Overview Web Application Security  Authentication  Authorization  Confidentiality Cross-Site Scripting Lab 12-1 Introduction.
IDAsec copyright - all rights reserved1 Web Vulnerabilities in the real world.
It’s always better live. MSDN Events Security Best Practices Part 2 of 2 Reducing Vulnerabilities using Visual Studio 2008.
It’s always better live. MSDN Events Securing Web Applications Part 1 of 2 Understanding Threats and Attacks.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
Introduction to Web Application Security
Lecture 16 Page 1 CS 236 Online Cross-Site Scripting XSS Many sites allow users to upload information –Blogs, photo sharing, Facebook, etc. –Which gets.
Injection Attacks by Example SQL Injection and XSS Adam Forsythe Thomas Hollingsworth.
WEB SECURITY WORKSHOP TEXSAW 2013 Presented by Joshua Hammond Prepared by Scott Hand.
Security and Risk Management. Who Am I Matthew Strahan from Content Security Principal Security Consultant I look young, but I’ve been doing this for.
Web Security Demystified Justin C. Klein Keane Sr. InfoSec Specialist University of Pennsylvania School of Arts and Sciences Information Security and Unix.
Cosc 4765 Server side Web security. Web security issues From Cenzic Vulnerability report
+ Websites Vulnerabilities. + Content Expand of The Internet Use of the Internet Examples Importance of the Internet How to find Security Vulnerabilities.
WEB SECURITY WEEK 3 Computer Security Group University of Texas at Dallas.
The OWASP Way Understanding the OWASP Vision and the Top Ten.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
Lecture 14 – Web Security SFDV3011 – Advanced Web Development 1.
1-Vulnerabilities 2-Hackers 3-Categories of attacks 4-What a malicious hacker do? 5-Security mechanisms 6-HTTP Web Servers 7-Web applications attacks.
© All rights reserved. Zend Technologies, Inc. PHP Security Kevin Schroeder Zend Technologies.
Feedback #2 (under assignments) Lecture Code:
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Web Security.
Web Applications Testing By Jamie Rougvie Supported by.
Building Secure Web Applications With ASP.Net MVC.
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.
Presented By: Chandra Kollipara. Cross-Site Scripting: Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 9 1COMP9321, 15s2, Week.
CS526Topic 12: Web Security (2)1 Information Security CS 526 Topic 9 Web Security Part 2.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Copyright © The OWASP Foundation This work is available under the Creative Commons SA 2.5 license The OWASP Foundation OWASP Denver February 2012.
CSRF Attacks Daniel Chen 11/18/15. What is CSRF?  Cross Site Request Forgery (Sea-Surf)  AKA XSRF/ One Click / Sidejacking / Session Riding  Exploits.
Page 1 Ethical Hacking by Douglas Williams. Page 2 Intro Attackers can potentially use many different paths through your application to do harm to your.
Javascript worms By Benjamin Mossé SecPro
Module: Software Engineering of Web Applications
Building Secure ColdFusion Applications
Web Application Vulnerabilities
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
TOPIC: Web Security (Part-4)
Security: Exploits & Countermeasures
Security: Exploits & Countermeasures
IT Security  .
World Wide Web policy.
Secure Software Confidentiality Integrity Data Security Authentication
Web Applications Security XSS
Cross-Site Request Forgeries: Exploitation and Prevention
Database Driven Websites
PHP: Security issues FdSc Module 109 Server side scripting and
Riding Someone Else’s Wave with CSRF
CSC 495/583 Topics of Software Security Intro to Web Security
Web Security Advanced Network Security Peter Reiher August, 2014
Lecture 2 - SQL Injection
WWW安全 國立暨南國際大學 資訊管理學系 陳彥錚.
Security: Exploits & Countermeasures
Security: Exploits & Countermeasures
Active Man in the Middle Attacks
Security: Exploits & Countermeasures
Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems
CSc 337 Lecture 24: Security.
Security: Attacks & Countermeasures
Exploring DOM-Based Cross Site Attacks
Presentation transcript:

Internet Self Defense 101 Rex Booth

Who here has been a victim of hacking? Question: Who here has been a victim of hacking?

Answer: Pretty much everybody.

What can you do about it? Welcome to internet self-defense 101. Understand the basics of how the internet works Understand common attacks Know how to avoid the fight

Who am I? Rex Booth 15 months as a fed! ~15 years in IT ~10 years in security What do I do here? Prep us to fight bad guys *not me

How does the internet work?

No, seriously. How does it work? web address page request data query user browse r serve r database <we’re pretty much talking web / email only today> <request> <server does stuff to generate a response> <response comes back to you> <browser puts it all together – static and dynamic> rendered page page code data results aka: client layer aka: application layer aka: data layer

How do bad guys attack us? Remember those four components? user browser server database They attack all four layers. Let’s look at some examples.

Injection Attacks SQL injection is the most common web attack An attacker inserts commands that are used to dynamically construct SQL queries Attacker may be able to view or modify any data in a database Attacks the database by exploiting the application Any action that takes input from the user and uses it in a query or function may be vulnerable

SQL Injection Scenario

Cross Site Scripting AKA XSS Affects the client web browser Scripting code from attacker is rendered in the page sent by the server 2 types of XSS Persistent / Stored: attack code gets stored in the website and affects all users who visit the page Non-Persistent / Reflected: attack code does not get stored and can only affect 1 user at a time XSS is the most common client-side vulnerability these days. Essentially, XSS is a scenario where dynamic client-side content is delivered to the victim's browser. Because the browser has no way to know that the script should not be trusted, it will execute the script. If you can get a browser to load javascript while visiting a site, you can use that javascript to change that site's behavior. There are two categories of XSS: persistent and non-persistent (or stored and reflected). In a persistent attack, the content has been uploaded to a website and affects everybody who views that site. Think of a social media site where you're able to upload content. If you were able to upload scripts to run on the client side, you could direct all viewers to execute those scripts upon loading the page. Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by your browser and used with that site. These scripts can even rewrite the content of the HTML page. A non-persistent attack has essentially the same effects, but it only targets a single individual at a time. In these cases, the payload is delivered by other means – usually by email.

XSS Scenario

XSS Scenario So what are some of the ways in which XSS can be used? One of the best resources regarding XSS (and all web application security) is OWASP. But they sum up some of the potential consequences as the following: The most severe XSS attacks involve disclosure of the user’s session cookie, allowing an attacker to hijack the user’s session and take over the account. Other damaging attacks include the disclosure of end user files, installation of Trojan horse programs, redirect the user to some other page or site, or modify presentation of content. An XSS vulnerability allowing an attacker to modify a press release or news item could affect a company’s stock price or lessen consumer confidence. An XSS vulnerability on a pharmaceutical site could allow an attacker to modify dosage information resulting in an overdose. the effects and use of XSS is limited only to the imagination.

Cross Site Request Forgery AKA CSRF Affects the client browser The vulnerability allows an attacker to force the browser to execute website functionality Leverages the user’s authenticated session on the target website So in XSS, the victim's browser trusts the site that is delivering the malicious payload. CSRF also depends on trust. However, in this case, it is the website that trusts the victim's browser – and that trust is exploited. CSRF is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated. By sending the victim a carefully constructed link (although POST requests can also be used in CSRF), an attacker may force the users of a web application to execute actions of the attacker's choosing. In this way, the attacker can make the victim perform actions that they didn't intend to, such as logout, purchase an item, change account information, retrieve account information, or any other function provided by the vulnerable website. In the case of a normal user, a successful CSRF exploit can compromise end user data and operations. If the targeted end user is the administrator, then this can compromise the entire web application. A good example of mitigations against this type of attack is Amazon.com. You are automatically asked to log into your Amazon.com account any time you need to place an order, access your account or make any changes. This helps prevent unintentional orders from being processed. Synonyms: CSRF attacks are also known by a number of other names, including XSRF, "Sea Surf", Session Riding, Cross-Site Reference Forgery, Hostile Linking. Microsoft refers to this type of attack as a One-Click attack in their threat modeling process

CSRF Scenario

Authentication and Authorization Lack of authentication / authorization Unauthorized data access Unauthorized system functionality access Predictable session identifiers Session Fixation Session Replay Brute forcing of credentials Data access – if you're compartmentalizing your data, you don't want everybody to see everything. Lower-level users shouldn't have access to all data on the application. Without proper A&A, maintaining this kind of separation isn't possible. The same is true for system functionality. You likely don't want to give all users administrator rights to your application. In order to prevent that, users must be properly authenticated and authorized. Predictable session identifiers: This attack focuses on predicting session ID values that permit an attacker to bypass the authentication schema of an application. By analyzing and understanding the session ID generation process, an attacker can predict a valid session ID value and get access to the application. In the first step, the attacker needs to collect some valid session ID values that are used to identify authenticated users. Then, he must understand the structure of session ID, the information that is used to create it, and the encryption or hash algorithm used by application to protect it. Some bad implementations use sessions IDs composed by username or other predictable information, like timestamp or client IP address. In the worst case, this information is used in clear text or coded using some weak algorithm. In addition, the attacker can implement a brute force technique to generate and test different values of session ID until he successfully gets access to the application. Session Fixation: This is where a user is authenticated without invalidating any existing session identifier - this gives an attacker the opportunity to steal authenticated sessions. Session fixation vulnerabilities occur when: A web application authenticates a user without first invalidating the existing session ID, thereby continuing to use the session ID already associated with the user. An attacker is able to force a known session ID on a user so that, once the user authenticates, the attacker has access to the authenticated session. In the generic exploit of session fixation vulnerabilities, an attacker creates a new session on a web application and records the associated session identifier. The attacker then causes the victim to authenticate against the server using the same session identifier, giving the attacker access to the user's account through the active session. Session Replay / session Hijack: The Session Hijacking attack compromises the session token by stealing or predicting a valid session token to gain unauthorized access to the Web Server. The session token could be compromised in different ways; the most common are: Predictable session token; Session Sniffing; Client-side attacks (XSS, malicious JavaScript Codes, Trojans, etc); Man-in-the-middle attack

Session Fixation Example

Session Fixation Example

Social Engineering Impersonation Lies Intimidation Blackmail etc… People are often the softest target

How can I defend myself? YES NO

Why can’t I hack back? The supreme art of war is to subdue the enemy without fighting. Sun Tzu, The Art of War Plus it’s really just a bad idea. You don’t know who’s on the other end and how far they’ll take things. SWATing, etc.

Principles of defense Reduce your exposure Trust no one Secure your tools Know your environment

Reduce your exposure What do you need to share? What do you need to keep? Where do you need to store data? Can you reduce the value of your data to others? “He who defends everything defends nothing.” – Frederick the Great

Trust no one The internet is built to be anonymous. Verifying identities online is very difficult. Don’t assume you know who’s on the other end. Extend trust as little as possible. Never share credentials. Ever. Ever.

Secure your tools Patch! Patch! Patch! Uninstall unnecessary tools Java Flash Toolbars Avoid public Wi-Fi Use a firewall, AV, password manager, ad blocker, script blocker

Know your environment Avoid the creepy, dark alleys

Wrap it up Nobody has to be a victim Bad guys are clever, but lazy – most of the time Take precautions just as you do in real life Careful where you surf Extend trust sparingly Patch! View email suspiciously Secure your browser Ask now or contact via email: <myemail>