SlideShare a Scribd company logo
Cross-Site Scripting (XSS)
Attacks
Issues and Defense
by
Sandeep Kumbhar
M. Tech CSE, R N S I T
Bangalore
Contents
 Introduction
 Impact of XSS attacks
 Types of XSS attacks
 Detection of XSS attacks
 Prevention of XSS attacks
 At client side
 At Server side
 Conclusion
 References
Dept. of CSE, RNSIT 2012-13 1
XSS Issues and Defence
Introduction
 What is XSS attack?
 Why it is popular?
 Inputs for XSS attacks?
Dept. of CSE, RNSIT 2012-13 2
XSS Issues and Defence
Impact of XSS attack
 Access to authentication credentials for Web application
 Cookies, Username and Password
 XSS is not a harmless flaw
 Normal users
 Access to personal data (Credit card, Bank Account)
 Misuse account (order expensive goods)
 Denial-of-Service
 Crash User’s Browser, Pop-Up-Flooding, Redirection Access to
user’s machine
 Use ActiveX objects to control machine
 Upload local data to attacker's machine
 Spoil public image of company
 Load main frame content from other locations
Dept. of CSE, RNSIT 2012-13 4
XSS Issues and Defence
Types of XSS Attacks
Dept. of CSE, RNSIT 2012-13 3
 Non-persistent or Reflected Cross-Site
Scripting attacks
 Persistent or Stored Cross-Site Scripting
attacks
 DOM based Cross-Site Scripting attacks
XSS Issues and Defence
Reflected XSS Attacks
 Attacker provided script is embedded in the web page generated by
the server as an immediate response of an HTTP request.
Dept. of CSE, RNSIT 2012-13 5
http://myserver.com/test.jsp?name=Stefan
<HTML>
<Body>
Welcome Stefan
</Body>
</HTML>
XSS Issues and Defence
Dept. of CSE, RNSIT 2012-13 6
http://myserver.com/welcome.jsp?name=<script>alert("Attacked")</script>
<HTML>
<Body>
Welcome <script>alert("Attacked")</script>
</Body>
</HTML>
XSS Issues and Defence
Stored XSS Attacks
 Attacker provided script is stored to a database and later retrieved and
embedded in the web page generated by the server
Dept. of CSE, RNSIT 2012-13 7
XSS Issues and Defence
Dept. of CSE, RNSIT 2012-13 8
Unvalidated Input resulted in a Cross-Site Scripting Attack and the
theft of the Administrator’s Cookie
XSS Issues and Defence
Detection Of XSS
 Check if special characters are encoded
<XSS> vs. &ltXSS&gt
 Check if a double quote escape can be evaded
<script>alert(String.fromCharCode(88, 83, 83));<script>
 Check if script can be executed
<script>alert(“XSS”)</script>
Dept. of CSE, RNSIT 2012-13 9
XSS Issues and Defence
Detection Of XSS Cont..
 Check if input filtering can be evaded
<SCRIPT>alert("XSS");//</SCRIPT>
 Denial of service
<script>alert(document.cookie);</script>article.php?title=
<meta%20httpequiv="refresh"%20content="0;">
Dept. of CSE, RNSIT 2012-13 10
XSS Issues and Defence
Prevention of XSS Attacks
- At Client/Browser Side
Dept. of CSE, RNSIT 2012-13 11
XSS Issues and Defence
Figure: Architecture for Cross-Site Scripting in Browser side
Prevention of XSS Attacks
- At Server Side
Dept. of CSE, RNSIT 2012-13 12
XSS Issues and Defence
Figure: Architecture for Cross-Site Scripting in Server side
Conclusion
Dept. of CSE, RNSIT 2012-13 13
XSS Issues and Defence
 Always practice using testing tools during the design phase to eliminate
XSS holes in the application.
 Input validation and HTML escaping are essential, yet that must be
applied at all application points accepting data.
 There is a misconception sometimes applied to XSS holes in general
which leads to a disagreement in the security community as to the
importance of cross-site scripting vulnerabilities.
 XSS-Prevention Best Practices
 Implement XSS-Prevention in application
 Do not assume input values are always good
 Do not trust client side validation
 Check and validate all input before processing
 Do not echo any input value without validation
 Use one conceptual solution in all applications
References
[1] Client-side cross-site scripting protection byEngin Kirdaa,*, Nenad Jovanovicb,
Christopher Kruegelc, Giovanni Vignac (a)Institute Eurecom, France (b) Secure
Systems Lab, Technical University Vienna, Austria (c) University of California, Santa
Barbara, USA
[2] A Server Side Solution for Protection of Web Applications from Cross-Site Scripting
Attacks A. Duraisamy, M.Sathiyamoorthy, S.Chandrasekar International Journal of
Innovative Technology and Exploring Engineering (IJITEE) ISSN: 2278 - 3075,
Volume-2, Issue-4, March 2013
[3] Prevention Of Cross-Site Scripting Attacks (XSS) On Web Applications In The Client
Side S.SHALINI, S.USHA Engineering College, Chennai- 44, Tamilnadu,
IndiaDepartment of Computer and Communication, Sri Sairam IJCSI International
Journal of Computer Science Issues, Vol. 8, Issue 4, No 1, July 2011 ISSN (Online):
1694-0814 www.IJCSI.org
[4] A Server Side Solution for Protection of Web Applications from Cross-Site Scripting
Attacks A. Duraisamy, M.Sathiyamoorthy, S.Chandrasekar
[5] Protection of Web Applications from Cross-Site Scripting Attacks in Browser Side K.
Selvamani Department of Computer Science and Engineering Anna University,
Chennai, India
Dept. of CSE, RNSIT 2012-13 14
XSS Issues and Defence
Thank You.!
Ad

More Related Content

What's hot (20)

Cross-Site Scripting (XSS)
Cross-Site Scripting (XSS)Cross-Site Scripting (XSS)
Cross-Site Scripting (XSS)
Daniel Tumser
 
Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation
Ikhade Maro Igbape
 
Reflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site ScriptingReflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site Scripting
InMobi Technology
 
XSS- an application security vulnerability
XSS-   an application security vulnerabilityXSS-   an application security vulnerability
XSS- an application security vulnerability
Soumyasanto Sen
 
The Cross Site Scripting Guide
The Cross Site Scripting GuideThe Cross Site Scripting Guide
The Cross Site Scripting Guide
Daisuke_Dan
 
Xss (cross site scripting)
Xss (cross site scripting)Xss (cross site scripting)
Xss (cross site scripting)
vinayh.vaghamshi _
 
Owasp top 10 vulnerabilities
Owasp top 10 vulnerabilitiesOwasp top 10 vulnerabilities
Owasp top 10 vulnerabilities
OWASP Delhi
 
Cross Site Scripting: Prevention and Detection(XSS)
Cross Site Scripting: Prevention and Detection(XSS)Cross Site Scripting: Prevention and Detection(XSS)
Cross Site Scripting: Prevention and Detection(XSS)
Aman Singh
 
Xss attack
Xss attackXss attack
Xss attack
Manjushree Mashal
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
Moataz Kamel
 
Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)
Barrel Software
 
Web security
Web securityWeb security
Web security
Muhammad Usman
 
Xss ppt
Xss pptXss ppt
Xss ppt
penetration Tester
 
CSRF Attack and Its Prevention technique in ASP.NET MVC
CSRF Attack and Its Prevention technique in ASP.NET MVCCSRF Attack and Its Prevention technique in ASP.NET MVC
CSRF Attack and Its Prevention technique in ASP.NET MVC
Suvash Shah
 
Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )
Irfad Imtiaz
 
OWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesOWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application Vulnerabilities
Software Guru
 
VAPT PRESENTATION full.pptx
VAPT PRESENTATION full.pptxVAPT PRESENTATION full.pptx
VAPT PRESENTATION full.pptx
DARSHANBHAVSAR14
 
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
 
Web application security
Web application securityWeb application security
Web application security
Kapil Sharma
 
Directory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksDirectory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion Attacks
Raghav Bisht
 
Cross-Site Scripting (XSS)
Cross-Site Scripting (XSS)Cross-Site Scripting (XSS)
Cross-Site Scripting (XSS)
Daniel Tumser
 
Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation
Ikhade Maro Igbape
 
Reflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site ScriptingReflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site Scripting
InMobi Technology
 
XSS- an application security vulnerability
XSS-   an application security vulnerabilityXSS-   an application security vulnerability
XSS- an application security vulnerability
Soumyasanto Sen
 
The Cross Site Scripting Guide
The Cross Site Scripting GuideThe Cross Site Scripting Guide
The Cross Site Scripting Guide
Daisuke_Dan
 
Owasp top 10 vulnerabilities
Owasp top 10 vulnerabilitiesOwasp top 10 vulnerabilities
Owasp top 10 vulnerabilities
OWASP Delhi
 
Cross Site Scripting: Prevention and Detection(XSS)
Cross Site Scripting: Prevention and Detection(XSS)Cross Site Scripting: Prevention and Detection(XSS)
Cross Site Scripting: Prevention and Detection(XSS)
Aman Singh
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
Moataz Kamel
 
Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)
Barrel Software
 
CSRF Attack and Its Prevention technique in ASP.NET MVC
CSRF Attack and Its Prevention technique in ASP.NET MVCCSRF Attack and Its Prevention technique in ASP.NET MVC
CSRF Attack and Its Prevention technique in ASP.NET MVC
Suvash Shah
 
Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )
Irfad Imtiaz
 
OWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesOWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application Vulnerabilities
Software Guru
 
VAPT PRESENTATION full.pptx
VAPT PRESENTATION full.pptxVAPT PRESENTATION full.pptx
VAPT PRESENTATION full.pptx
DARSHANBHAVSAR14
 
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
 
Web application security
Web application securityWeb application security
Web application security
Kapil Sharma
 
Directory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksDirectory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion Attacks
Raghav Bisht
 

Similar to Cross site scripting (xss) attacks issues and defense - by sandeep kumbhar (20)

XSS: From alert(1) to crypto mining malware
XSS: From alert(1) to crypto mining malwareXSS: From alert(1) to crypto mining malware
XSS: From alert(1) to crypto mining malware
Omer Meshar
 
Tracing out Cross Site Scripting Vulnerabilities in Modern Scripts
Tracing out Cross Site Scripting Vulnerabilities in Modern ScriptsTracing out Cross Site Scripting Vulnerabilities in Modern Scripts
Tracing out Cross Site Scripting Vulnerabilities in Modern Scripts
Eswar Publications
 
Cross Site Scripting Attacks and Preventive Measures
Cross Site Scripting Attacks and Preventive MeasuresCross Site Scripting Attacks and Preventive Measures
Cross Site Scripting Attacks and Preventive Measures
IRJET Journal
 
tas-s6-software-engineering-slide-deck-secure-software-architecture.pptx
tas-s6-software-engineering-slide-deck-secure-software-architecture.pptxtas-s6-software-engineering-slide-deck-secure-software-architecture.pptx
tas-s6-software-engineering-slide-deck-secure-software-architecture.pptx
Mostafa Taghizade
 
Software Security Engineering
Software Security EngineeringSoftware Security Engineering
Software Security Engineering
Marco Morana
 
Analysis of XSS attack Mitigation techniques based on Platforms and Browsers
Analysis of XSS attack Mitigation techniques based on Platforms and BrowsersAnalysis of XSS attack Mitigation techniques based on Platforms and Browsers
Analysis of XSS attack Mitigation techniques based on Platforms and Browsers
cscpconf
 
XSS filter on Server side
XSS filter on Server sideXSS filter on Server side
XSS filter on Server side
cuteboysmith
 
Security in the cloud protecting your cloud apps
Security in the cloud   protecting your cloud appsSecurity in the cloud   protecting your cloud apps
Security in the cloud protecting your cloud apps
Cenzic
 
IRJET- A Survey on Various Cross-Site Scripting Attacks and Few Prevention Ap...
IRJET- A Survey on Various Cross-Site Scripting Attacks and Few Prevention Ap...IRJET- A Survey on Various Cross-Site Scripting Attacks and Few Prevention Ap...
IRJET- A Survey on Various Cross-Site Scripting Attacks and Few Prevention Ap...
IRJET Journal
 
Application Security Architecture and Threat Modelling
Application Security Architecture and Threat ModellingApplication Security Architecture and Threat Modelling
Application Security Architecture and Threat Modelling
Priyanka Aash
 
C01461422
C01461422C01461422
C01461422
IOSR Journals
 
Study of Cross-Site Scripting Attacks and Their Countermeasures
Study of Cross-Site Scripting Attacks and Their CountermeasuresStudy of Cross-Site Scripting Attacks and Their Countermeasures
Study of Cross-Site Scripting Attacks and Their Countermeasures
Editor IJCATR
 
Web security 2010
Web security 2010Web security 2010
Web security 2010
Alok Babu
 
ImageSubXSS: an image substitute technique to prevent Cross-Site Scripting at...
ImageSubXSS: an image substitute technique to prevent Cross-Site Scripting at...ImageSubXSS: an image substitute technique to prevent Cross-Site Scripting at...
ImageSubXSS: an image substitute technique to prevent Cross-Site Scripting at...
IJECEIAES
 
XSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolXSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing tool
Arjun Jain
 
Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Discovering the Value of Verifying Web Application Security Using IBM Rationa...Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Alan Kan
 
OWASP Top 10 And Insecure Software Root Causes
OWASP Top 10 And Insecure Software Root CausesOWASP Top 10 And Insecure Software Root Causes
OWASP Top 10 And Insecure Software Root Causes
Marco Morana
 
Web application security I
Web application security IWeb application security I
Web application security I
Md Syed Ahamad
 
Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)
Avi Aryan
 
Prevention of Cross-Site Scripting using Hash Technique
Prevention of Cross-Site Scripting using Hash TechniquePrevention of Cross-Site Scripting using Hash Technique
Prevention of Cross-Site Scripting using Hash Technique
IJCSIS Research Publications
 
XSS: From alert(1) to crypto mining malware
XSS: From alert(1) to crypto mining malwareXSS: From alert(1) to crypto mining malware
XSS: From alert(1) to crypto mining malware
Omer Meshar
 
Tracing out Cross Site Scripting Vulnerabilities in Modern Scripts
Tracing out Cross Site Scripting Vulnerabilities in Modern ScriptsTracing out Cross Site Scripting Vulnerabilities in Modern Scripts
Tracing out Cross Site Scripting Vulnerabilities in Modern Scripts
Eswar Publications
 
Cross Site Scripting Attacks and Preventive Measures
Cross Site Scripting Attacks and Preventive MeasuresCross Site Scripting Attacks and Preventive Measures
Cross Site Scripting Attacks and Preventive Measures
IRJET Journal
 
tas-s6-software-engineering-slide-deck-secure-software-architecture.pptx
tas-s6-software-engineering-slide-deck-secure-software-architecture.pptxtas-s6-software-engineering-slide-deck-secure-software-architecture.pptx
tas-s6-software-engineering-slide-deck-secure-software-architecture.pptx
Mostafa Taghizade
 
Software Security Engineering
Software Security EngineeringSoftware Security Engineering
Software Security Engineering
Marco Morana
 
Analysis of XSS attack Mitigation techniques based on Platforms and Browsers
Analysis of XSS attack Mitigation techniques based on Platforms and BrowsersAnalysis of XSS attack Mitigation techniques based on Platforms and Browsers
Analysis of XSS attack Mitigation techniques based on Platforms and Browsers
cscpconf
 
XSS filter on Server side
XSS filter on Server sideXSS filter on Server side
XSS filter on Server side
cuteboysmith
 
Security in the cloud protecting your cloud apps
Security in the cloud   protecting your cloud appsSecurity in the cloud   protecting your cloud apps
Security in the cloud protecting your cloud apps
Cenzic
 
IRJET- A Survey on Various Cross-Site Scripting Attacks and Few Prevention Ap...
IRJET- A Survey on Various Cross-Site Scripting Attacks and Few Prevention Ap...IRJET- A Survey on Various Cross-Site Scripting Attacks and Few Prevention Ap...
IRJET- A Survey on Various Cross-Site Scripting Attacks and Few Prevention Ap...
IRJET Journal
 
Application Security Architecture and Threat Modelling
Application Security Architecture and Threat ModellingApplication Security Architecture and Threat Modelling
Application Security Architecture and Threat Modelling
Priyanka Aash
 
Study of Cross-Site Scripting Attacks and Their Countermeasures
Study of Cross-Site Scripting Attacks and Their CountermeasuresStudy of Cross-Site Scripting Attacks and Their Countermeasures
Study of Cross-Site Scripting Attacks and Their Countermeasures
Editor IJCATR
 
Web security 2010
Web security 2010Web security 2010
Web security 2010
Alok Babu
 
ImageSubXSS: an image substitute technique to prevent Cross-Site Scripting at...
ImageSubXSS: an image substitute technique to prevent Cross-Site Scripting at...ImageSubXSS: an image substitute technique to prevent Cross-Site Scripting at...
ImageSubXSS: an image substitute technique to prevent Cross-Site Scripting at...
IJECEIAES
 
XSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolXSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing tool
Arjun Jain
 
Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Discovering the Value of Verifying Web Application Security Using IBM Rationa...Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Alan Kan
 
OWASP Top 10 And Insecure Software Root Causes
OWASP Top 10 And Insecure Software Root CausesOWASP Top 10 And Insecure Software Root Causes
OWASP Top 10 And Insecure Software Root Causes
Marco Morana
 
Web application security I
Web application security IWeb application security I
Web application security I
Md Syed Ahamad
 
Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)
Avi Aryan
 
Prevention of Cross-Site Scripting using Hash Technique
Prevention of Cross-Site Scripting using Hash TechniquePrevention of Cross-Site Scripting using Hash Technique
Prevention of Cross-Site Scripting using Hash Technique
IJCSIS Research Publications
 
Ad

Recently uploaded (19)

Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry SweetserAPNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)
APNIC
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry SweetserAPNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)
APNIC
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
Ad

Cross site scripting (xss) attacks issues and defense - by sandeep kumbhar

  • 1. Cross-Site Scripting (XSS) Attacks Issues and Defense by Sandeep Kumbhar M. Tech CSE, R N S I T Bangalore
  • 2. Contents  Introduction  Impact of XSS attacks  Types of XSS attacks  Detection of XSS attacks  Prevention of XSS attacks  At client side  At Server side  Conclusion  References Dept. of CSE, RNSIT 2012-13 1 XSS Issues and Defence
  • 3. Introduction  What is XSS attack?  Why it is popular?  Inputs for XSS attacks? Dept. of CSE, RNSIT 2012-13 2 XSS Issues and Defence
  • 4. Impact of XSS attack  Access to authentication credentials for Web application  Cookies, Username and Password  XSS is not a harmless flaw  Normal users  Access to personal data (Credit card, Bank Account)  Misuse account (order expensive goods)  Denial-of-Service  Crash User’s Browser, Pop-Up-Flooding, Redirection Access to user’s machine  Use ActiveX objects to control machine  Upload local data to attacker's machine  Spoil public image of company  Load main frame content from other locations Dept. of CSE, RNSIT 2012-13 4 XSS Issues and Defence
  • 5. Types of XSS Attacks Dept. of CSE, RNSIT 2012-13 3  Non-persistent or Reflected Cross-Site Scripting attacks  Persistent or Stored Cross-Site Scripting attacks  DOM based Cross-Site Scripting attacks XSS Issues and Defence
  • 6. Reflected XSS Attacks  Attacker provided script is embedded in the web page generated by the server as an immediate response of an HTTP request. Dept. of CSE, RNSIT 2012-13 5 http://myserver.com/test.jsp?name=Stefan <HTML> <Body> Welcome Stefan </Body> </HTML> XSS Issues and Defence
  • 7. Dept. of CSE, RNSIT 2012-13 6 http://myserver.com/welcome.jsp?name=<script>alert("Attacked")</script> <HTML> <Body> Welcome <script>alert("Attacked")</script> </Body> </HTML> XSS Issues and Defence
  • 8. Stored XSS Attacks  Attacker provided script is stored to a database and later retrieved and embedded in the web page generated by the server Dept. of CSE, RNSIT 2012-13 7 XSS Issues and Defence
  • 9. Dept. of CSE, RNSIT 2012-13 8 Unvalidated Input resulted in a Cross-Site Scripting Attack and the theft of the Administrator’s Cookie XSS Issues and Defence
  • 10. Detection Of XSS  Check if special characters are encoded <XSS> vs. &ltXSS&gt  Check if a double quote escape can be evaded <script>alert(String.fromCharCode(88, 83, 83));<script>  Check if script can be executed <script>alert(“XSS”)</script> Dept. of CSE, RNSIT 2012-13 9 XSS Issues and Defence
  • 11. Detection Of XSS Cont..  Check if input filtering can be evaded <SCRIPT>alert("XSS");//</SCRIPT>  Denial of service <script>alert(document.cookie);</script>article.php?title= <meta%20httpequiv="refresh"%20content="0;"> Dept. of CSE, RNSIT 2012-13 10 XSS Issues and Defence
  • 12. Prevention of XSS Attacks - At Client/Browser Side Dept. of CSE, RNSIT 2012-13 11 XSS Issues and Defence Figure: Architecture for Cross-Site Scripting in Browser side
  • 13. Prevention of XSS Attacks - At Server Side Dept. of CSE, RNSIT 2012-13 12 XSS Issues and Defence Figure: Architecture for Cross-Site Scripting in Server side
  • 14. Conclusion Dept. of CSE, RNSIT 2012-13 13 XSS Issues and Defence  Always practice using testing tools during the design phase to eliminate XSS holes in the application.  Input validation and HTML escaping are essential, yet that must be applied at all application points accepting data.  There is a misconception sometimes applied to XSS holes in general which leads to a disagreement in the security community as to the importance of cross-site scripting vulnerabilities.  XSS-Prevention Best Practices  Implement XSS-Prevention in application  Do not assume input values are always good  Do not trust client side validation  Check and validate all input before processing  Do not echo any input value without validation  Use one conceptual solution in all applications
  • 15. References [1] Client-side cross-site scripting protection byEngin Kirdaa,*, Nenad Jovanovicb, Christopher Kruegelc, Giovanni Vignac (a)Institute Eurecom, France (b) Secure Systems Lab, Technical University Vienna, Austria (c) University of California, Santa Barbara, USA [2] A Server Side Solution for Protection of Web Applications from Cross-Site Scripting Attacks A. Duraisamy, M.Sathiyamoorthy, S.Chandrasekar International Journal of Innovative Technology and Exploring Engineering (IJITEE) ISSN: 2278 - 3075, Volume-2, Issue-4, March 2013 [3] Prevention Of Cross-Site Scripting Attacks (XSS) On Web Applications In The Client Side S.SHALINI, S.USHA Engineering College, Chennai- 44, Tamilnadu, IndiaDepartment of Computer and Communication, Sri Sairam IJCSI International Journal of Computer Science Issues, Vol. 8, Issue 4, No 1, July 2011 ISSN (Online): 1694-0814 www.IJCSI.org [4] A Server Side Solution for Protection of Web Applications from Cross-Site Scripting Attacks A. Duraisamy, M.Sathiyamoorthy, S.Chandrasekar [5] Protection of Web Applications from Cross-Site Scripting Attacks in Browser Side K. Selvamani Department of Computer Science and Engineering Anna University, Chennai, India Dept. of CSE, RNSIT 2012-13 14 XSS Issues and Defence