SlideShare uma empresa Scribd logo
1 de 42
XSS (Cross-Site Scripting) - An
application security vulnerability from
Developers point of view
Soumyasanto Sen, #sitMUC
@soumyasanto
Wikipedia says
"XSS enables attackers to inject client-side script into web pages viewed by other users".
OWASP(the free and open software security community) says
"Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected
into the otherwise benign and trusted web sites."
"An XSS attack occurs when a script from an untrusted source is executed in
rendering a page"
#sitMUC
Definition
#sitMUC
What is XSS?
 Client side vulnerability but can Server side one.
 Based on injection through
JavaScript, VBScript, Flash, HTML, JSON, ActiveX etc.
 Due to insufficient validation and sanitization.
 Attacker’s Paradise
 Stealing Credentials, Private Info.
 Execute commands (CSRF), malicious scripts
 Redirection to malicious site
 Port Scanning, Phishing, Keylogging etc.
#sitMUC
What is XSS?
#sitMUC
 According to latest White-hat Security report, 47% of web applications have XSS vulnerability
Why XSS?
#sitMUC
 According to Google Vulnerability Reward Program's Statistics, XSS is the most
reported issue
Why XSS?
#sitMUC
 According to "Open Sourced Vulnerability Database" XSS is at #1
Why XSS?
#sitMUC
 TrustWave Global Security Report says XSS is again the highest
Why XSS?
#sitMUC
 No Monkey Testing
Example: Based on Testing
Injection Points: Through which the Attacker can enter or injects scripts
 Insert /Edit Text
 Insert/Edit Image
 Insert/Edit URL
 Set Attributes
 Insert/Upload File
 Insert/Upload Video
What is Context? Context is an environment where user-supplied input or input from other
application(s) eventually ends-up or starts living.
“Context Is King for All Areas of IT Security”
#sitMUC
Example: Based on Testing
(Definitions)
#sitMUC
http://www.ea.com/search?q=“XYZ
Example: Based on Testing
(Contexts)
#sitMUC
http://www.ea.com/search?q=“JUNK
Example: Based on Testing
(Contexts)
#sitMUC
http://search.health.com/results.html?Ntt=xxxxxxxxxx
Single Quotes Case
Double Quotes Case
Example: Based on Testing
(Contexts)
#sitMUC
https://www.froala.com/wysiwyg-editor
Example: Based on Testing
(Contexts)
#sitMUC
Example: Based on Testing
(Contexts)
#sitMUC
Example: Based on Testing
(Summary of Contexts)
#sitMUC
ATTACK METHODOLOGY
• Systematic in nature
• Easy to understand
• Context-Specific
• Attack methodology is `complete` and one can guarantee that there is an XSS or no XSS in a
particular injection point.
• With the help of attack methodology, one can make a secure per-context XSS sanitizer
• Can be applied to other server-side languages
Example: Based on Testing
(Attack Methodology)
#sitMUC
SCRIPT CONTEXT
ATTACK METHODOLOGY
Example: Based on Testing
(Attack Methodology)
Demo
http://jsfiddle.net/4eqK4/5/
#sitMUC
ATTRIBUTE CONTEXT
ATTACK METHODOLOGY
Example: Based on Testing
(Attack Methodology)
Demo
http://www.drudgereportarc
hives.com/dsp/search.htm
http://jsfiddle.net/9t8UM/3/
#sitMUC
STYLE CONTEXT
ATTACK METHODOLOGY
Example: Based on Testing
(Attack Methodology)
#sitMUC
URL CONTEXT
ATTACK METHODOLOGY
Example: Based on Testing
(Attack Methodology)
#sitMUC
 <a href="url">link text</a>
 <a href=javascript:alert(1)>link text</a>

 <img src="pic_mountain.jpg">
 <img src=javascript:while(1){}>
Example: Based on Testing
(Attack Methodology)
#sitMUC
Encoding will not help
in breaking the script
context unless
developers are doing
some sort of explicit
decoding.
Example: Based on Testing
(Attack Methodology)
#sitMUC
Two arrays of black-listed keywords
Other names filterXSS and noXSS
Example: Based on Testing
(Customized XSS Solutions)
#sitMUC
Two arrays of black-listed keywords
Example: Based on Testing
(Customized XSS Solutions)
Bypass: <img src=x id=confirm(1) onerror=eval(id)
#sitMUC
The goal of this function is to stop
JavaScript execution via style.
Example: Based on Testing
(Customized XSS Solutions)
Bypass:
width:expression&#x28;al
ert&#x28;1&#x29;&#x29;
#sitMUC
Example: Based on Testing
(Customized XSS Solutions)
Another popular customized XSS protection solution
#sitMUC
Example: Based on Testing
(Summary of Bypasses)
#sitMUC
Example: Based on Testing
(Real Solutions)
#sitMUC
Example: Based on Testing
(Real Solutions)
Protection against JavaScript execution via `url` e.g., img'ssrc and/or anchor's
href attribute Implementation of `urlContextCleaner()`
#sitMUC
Example: Based on Testing
(Solutions -Make it Simple)
WYSIWYG
What You See Is What You Get
· Forum Post
· Private Messaging
· Wiki Post
· Support Ticket
· Signature Creation
· Comments
#sitMUC
Example: Based on Testing
(Solutions -Make it Simple)
WYSIWYG
What You See Is What You Get
#sitMUC
Example : Based on Real
(Bypassing)
 ABAP Case Study:
#sitMUC
Demo: Based on Games
(Bypassing)
https://xss-game.appspot.com/
http://xssplaygroundforfunandlearn.netai.net/series1.html
https://html5sec.org/innerhtml/ (Mario Heiderich's Utility)
#sitMUC
Tools & Testing
 XSS (Cross Site Scripting) Prevention Cheat Sheet from OWASP
 (HTML5 Security Clean Sheet)
 Validation on XSS Input. Use White-Listing, Escaping and sanitization method.
(Use Sanitizers)
“Do not trust anything ever, specially when it comes to user input”
 Understanding common browser behaviors that lead to XSS
 Learning the best practices for your technology
#sitMUC
Preventions
#sitMUC
Latest News
Salesforce plugs silly website XSS hole, hopes nobody spotted it (Mid August)
Critical PayPal XSS vulnerability left accounts open to attack (Late August)
eBay Fixes XSS Flaw in Subdomain (Early September)
Netflix Sleepy Puppy Awakens XSS Vulnerabilities in Secondary Applications (Early
September)
Attackers exploit vulnerabilities in two WordPress plugins (Early May)
#sitMUC
Latest News
0-day XSS vulnerability on SAP website put customers’ data at risk of theft by
hackers (Early May)
SAP HANA Databases Vulnerable to XSS and SQL Injections (Late June)
Overall:
Almost ALL websites have serious security vulnerabilities, study
shows
 Lack enough Pen. Test
( 92% of the respondents perform penetration testing. 21% perform it annually, 26%
perform it quarterly and 8% never perform penetration testing.)
 Taking responsibility from the Developers
 Unawareness of XSS vulnerability
 Not taking seriously
#sitMUC
Challenges
XSS is unavoidable at least nowadays !
Now its your job to raise the bar for attacker.
“XSS is Everywhere”
(Short and Simple)
Use Prevention, Go for Solutions in the forms of layers, Keep Updated
& Do regular Penetration Testing
#sitMUC
Conclusion
#sitMUC
Learning
Thank You
Soumyasanto Sen
@soumyasantoDr. Ashar Javed : http://slides.com/mscasharjaved/

Mais conteúdo relacionado

Mais procurados

Cross Site Request Forgery
Cross Site Request ForgeryCross Site Request Forgery
Cross Site Request ForgeryTony Bibbs
 
Cross Site Scripting(XSS)
Cross Site Scripting(XSS)Cross Site Scripting(XSS)
Cross Site Scripting(XSS)Nabin Dutta
 
Cross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert BoxCross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert BoxAaron Weaver
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)Manish Kumar
 
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
 
Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Amit Tyagi
 
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
 
Neat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionNeat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionMikhail Egorov
 
Secure Code Warrior - CRLF injection
Secure Code Warrior - CRLF injectionSecure Code Warrior - CRLF injection
Secure Code Warrior - CRLF injectionSecure Code Warrior
 
XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?Yurii Bilyk
 
Hacking web applications
Hacking web applicationsHacking web applications
Hacking web applicationsAdeel Javaid
 
Understanding Cross-site Request Forgery
Understanding Cross-site Request ForgeryUnderstanding Cross-site Request Forgery
Understanding Cross-site Request ForgeryDaniel Miessler
 
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
 
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 MVCSuvash Shah
 
Directory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksDirectory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksRaghav Bisht
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)Ritesh Gupta
 

Mais procurados (20)

Cross Site Request Forgery
Cross Site Request ForgeryCross Site Request Forgery
Cross Site Request Forgery
 
Cross Site Scripting(XSS)
Cross Site Scripting(XSS)Cross Site Scripting(XSS)
Cross Site Scripting(XSS)
 
Cross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert BoxCross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert Box
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)
 
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
 
Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)
 
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
 
Xss (cross site scripting)
Xss (cross site scripting)Xss (cross site scripting)
Xss (cross site scripting)
 
CSRF Basics
CSRF BasicsCSRF Basics
CSRF Basics
 
XSS
XSSXSS
XSS
 
Neat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionNeat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protection
 
Secure Code Warrior - CRLF injection
Secure Code Warrior - CRLF injectionSecure Code Warrior - CRLF injection
Secure Code Warrior - CRLF injection
 
XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?
 
Hacking web applications
Hacking web applicationsHacking web applications
Hacking web applications
 
Understanding Cross-site Request Forgery
Understanding Cross-site Request ForgeryUnderstanding Cross-site Request Forgery
Understanding Cross-site Request Forgery
 
XSS - Attacks & Defense
XSS - Attacks & DefenseXSS - Attacks & Defense
XSS - Attacks & Defense
 
Secure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scripting
 
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
 
Directory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksDirectory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion Attacks
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)
 

Semelhante a XSS- an application security vulnerability

Preventing In-Browser Malicious Code Execution
Preventing In-Browser Malicious Code ExecutionPreventing In-Browser Malicious Code Execution
Preventing In-Browser Malicious Code ExecutionStefano Di Paola
 
.NET Security Topics
.NET Security Topics.NET Security Topics
.NET Security TopicsShawn Gorrell
 
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 malwareOmer Meshar
 
Security testing for web developers
Security testing for web developersSecurity testing for web developers
Security testing for web developersmatthewhughes
 
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
 
4774.projectb.securitysquad
4774.projectb.securitysquad4774.projectb.securitysquad
4774.projectb.securitysquadJosh Howell
 
Security Testing - Zap It
Security Testing - Zap ItSecurity Testing - Zap It
Security Testing - Zap ItManjyot Singh
 
Security testing zap it
Security testing   zap itSecurity testing   zap it
Security testing zap itvodqancr
 
XSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolXSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolArjun Jain
 
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
 
Web security landscape Unit 3 part 2
Web security landscape Unit 3 part 2Web security landscape Unit 3 part 2
Web security landscape Unit 3 part 2SURBHI SAROHA
 
Top Tools Used in XSS Attacks.pdf
Top Tools Used in XSS Attacks.pdfTop Tools Used in XSS Attacks.pdf
Top Tools Used in XSS Attacks.pdfuzair
 
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
 
A Survey of Exploitation and Detection Methods of XSS Vulnerabilities.pptx
A Survey of Exploitation and Detection Methods of XSS Vulnerabilities.pptxA Survey of Exploitation and Detection Methods of XSS Vulnerabilities.pptx
A Survey of Exploitation and Detection Methods of XSS Vulnerabilities.pptxGitam Gadtaula
 
Understanding dom based xss
Understanding dom based xssUnderstanding dom based xss
Understanding dom based xssPotato
 

Semelhante a XSS- an application security vulnerability (20)

Web hack & attacks
Web hack & attacksWeb hack & attacks
Web hack & attacks
 
Preventing In-Browser Malicious Code Execution
Preventing In-Browser Malicious Code ExecutionPreventing In-Browser Malicious Code Execution
Preventing In-Browser Malicious Code Execution
 
.NET Security Topics
.NET Security Topics.NET Security Topics
.NET Security Topics
 
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
 
Security testing for web developers
Security testing for web developersSecurity testing for web developers
Security testing for web developers
 
XSS Injection Vulnerabilities
XSS Injection VulnerabilitiesXSS Injection Vulnerabilities
XSS Injection Vulnerabilities
 
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
 
4774.projectb.securitysquad
4774.projectb.securitysquad4774.projectb.securitysquad
4774.projectb.securitysquad
 
Security Testing - Zap It
Security Testing - Zap ItSecurity Testing - Zap It
Security Testing - Zap It
 
Security testing zap it
Security testing   zap itSecurity testing   zap it
Security testing zap it
 
XSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolXSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing tool
 
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...
 
Cross site scripting
Cross site scripting Cross site scripting
Cross site scripting
 
Web security landscape Unit 3 part 2
Web security landscape Unit 3 part 2Web security landscape Unit 3 part 2
Web security landscape Unit 3 part 2
 
Xss frame work
Xss frame workXss frame work
Xss frame work
 
Top Tools Used in XSS Attacks.pdf
Top Tools Used in XSS Attacks.pdfTop Tools Used in XSS Attacks.pdf
Top Tools Used in XSS Attacks.pdf
 
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)
 
A Survey of Exploitation and Detection Methods of XSS Vulnerabilities.pptx
A Survey of Exploitation and Detection Methods of XSS Vulnerabilities.pptxA Survey of Exploitation and Detection Methods of XSS Vulnerabilities.pptx
A Survey of Exploitation and Detection Methods of XSS Vulnerabilities.pptx
 
Understanding dom based xss
Understanding dom based xssUnderstanding dom based xss
Understanding dom based xss
 
Session7-XSS & CSRF
Session7-XSS & CSRFSession7-XSS & CSRF
Session7-XSS & CSRF
 

Último

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Último (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

XSS- an application security vulnerability

  • 1. XSS (Cross-Site Scripting) - An application security vulnerability from Developers point of view Soumyasanto Sen, #sitMUC @soumyasanto
  • 2. Wikipedia says "XSS enables attackers to inject client-side script into web pages viewed by other users". OWASP(the free and open software security community) says "Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected into the otherwise benign and trusted web sites." "An XSS attack occurs when a script from an untrusted source is executed in rendering a page" #sitMUC Definition
  • 3. #sitMUC What is XSS?  Client side vulnerability but can Server side one.  Based on injection through JavaScript, VBScript, Flash, HTML, JSON, ActiveX etc.  Due to insufficient validation and sanitization.  Attacker’s Paradise  Stealing Credentials, Private Info.  Execute commands (CSRF), malicious scripts  Redirection to malicious site  Port Scanning, Phishing, Keylogging etc.
  • 5. #sitMUC  According to latest White-hat Security report, 47% of web applications have XSS vulnerability Why XSS?
  • 6. #sitMUC  According to Google Vulnerability Reward Program's Statistics, XSS is the most reported issue Why XSS?
  • 7. #sitMUC  According to "Open Sourced Vulnerability Database" XSS is at #1 Why XSS?
  • 8. #sitMUC  TrustWave Global Security Report says XSS is again the highest Why XSS?
  • 9. #sitMUC  No Monkey Testing Example: Based on Testing
  • 10. Injection Points: Through which the Attacker can enter or injects scripts  Insert /Edit Text  Insert/Edit Image  Insert/Edit URL  Set Attributes  Insert/Upload File  Insert/Upload Video What is Context? Context is an environment where user-supplied input or input from other application(s) eventually ends-up or starts living. “Context Is King for All Areas of IT Security” #sitMUC Example: Based on Testing (Definitions)
  • 15. #sitMUC Example: Based on Testing (Contexts)
  • 16. #sitMUC Example: Based on Testing (Summary of Contexts)
  • 17. #sitMUC ATTACK METHODOLOGY • Systematic in nature • Easy to understand • Context-Specific • Attack methodology is `complete` and one can guarantee that there is an XSS or no XSS in a particular injection point. • With the help of attack methodology, one can make a secure per-context XSS sanitizer • Can be applied to other server-side languages Example: Based on Testing (Attack Methodology)
  • 18. #sitMUC SCRIPT CONTEXT ATTACK METHODOLOGY Example: Based on Testing (Attack Methodology) Demo http://jsfiddle.net/4eqK4/5/
  • 19. #sitMUC ATTRIBUTE CONTEXT ATTACK METHODOLOGY Example: Based on Testing (Attack Methodology) Demo http://www.drudgereportarc hives.com/dsp/search.htm http://jsfiddle.net/9t8UM/3/
  • 20. #sitMUC STYLE CONTEXT ATTACK METHODOLOGY Example: Based on Testing (Attack Methodology)
  • 21. #sitMUC URL CONTEXT ATTACK METHODOLOGY Example: Based on Testing (Attack Methodology)
  • 22. #sitMUC  <a href="url">link text</a>  <a href=javascript:alert(1)>link text</a>   <img src="pic_mountain.jpg">  <img src=javascript:while(1){}> Example: Based on Testing (Attack Methodology)
  • 23. #sitMUC Encoding will not help in breaking the script context unless developers are doing some sort of explicit decoding. Example: Based on Testing (Attack Methodology)
  • 24. #sitMUC Two arrays of black-listed keywords Other names filterXSS and noXSS Example: Based on Testing (Customized XSS Solutions)
  • 25. #sitMUC Two arrays of black-listed keywords Example: Based on Testing (Customized XSS Solutions) Bypass: <img src=x id=confirm(1) onerror=eval(id)
  • 26. #sitMUC The goal of this function is to stop JavaScript execution via style. Example: Based on Testing (Customized XSS Solutions) Bypass: width:expression&#x28;al ert&#x28;1&#x29;&#x29;
  • 27. #sitMUC Example: Based on Testing (Customized XSS Solutions) Another popular customized XSS protection solution
  • 28. #sitMUC Example: Based on Testing (Summary of Bypasses)
  • 29. #sitMUC Example: Based on Testing (Real Solutions)
  • 30. #sitMUC Example: Based on Testing (Real Solutions) Protection against JavaScript execution via `url` e.g., img'ssrc and/or anchor's href attribute Implementation of `urlContextCleaner()`
  • 31. #sitMUC Example: Based on Testing (Solutions -Make it Simple) WYSIWYG What You See Is What You Get · Forum Post · Private Messaging · Wiki Post · Support Ticket · Signature Creation · Comments
  • 32. #sitMUC Example: Based on Testing (Solutions -Make it Simple) WYSIWYG What You See Is What You Get
  • 33. #sitMUC Example : Based on Real (Bypassing)  ABAP Case Study:
  • 34. #sitMUC Demo: Based on Games (Bypassing) https://xss-game.appspot.com/ http://xssplaygroundforfunandlearn.netai.net/series1.html https://html5sec.org/innerhtml/ (Mario Heiderich's Utility)
  • 36.  XSS (Cross Site Scripting) Prevention Cheat Sheet from OWASP  (HTML5 Security Clean Sheet)  Validation on XSS Input. Use White-Listing, Escaping and sanitization method. (Use Sanitizers) “Do not trust anything ever, specially when it comes to user input”  Understanding common browser behaviors that lead to XSS  Learning the best practices for your technology #sitMUC Preventions
  • 37. #sitMUC Latest News Salesforce plugs silly website XSS hole, hopes nobody spotted it (Mid August) Critical PayPal XSS vulnerability left accounts open to attack (Late August) eBay Fixes XSS Flaw in Subdomain (Early September) Netflix Sleepy Puppy Awakens XSS Vulnerabilities in Secondary Applications (Early September) Attackers exploit vulnerabilities in two WordPress plugins (Early May)
  • 38. #sitMUC Latest News 0-day XSS vulnerability on SAP website put customers’ data at risk of theft by hackers (Early May) SAP HANA Databases Vulnerable to XSS and SQL Injections (Late June) Overall: Almost ALL websites have serious security vulnerabilities, study shows
  • 39.  Lack enough Pen. Test ( 92% of the respondents perform penetration testing. 21% perform it annually, 26% perform it quarterly and 8% never perform penetration testing.)  Taking responsibility from the Developers  Unawareness of XSS vulnerability  Not taking seriously #sitMUC Challenges
  • 40. XSS is unavoidable at least nowadays ! Now its your job to raise the bar for attacker. “XSS is Everywhere” (Short and Simple) Use Prevention, Go for Solutions in the forms of layers, Keep Updated & Do regular Penetration Testing #sitMUC Conclusion
  • 42. Thank You Soumyasanto Sen @soumyasantoDr. Ashar Javed : http://slides.com/mscasharjaved/

Notas do Editor

  1. Bypass: width: ex/**/pression(alert(1)) ja&Tab;vasc&NewLine:ript&colon;alert&lpar;1&rpar;
  2. Bypass: <img src=x id=confirm(1) onerror=eval(id)
  3. Bypass: width:expression&#x28;alert&#x28;1&#x29;&#x29;