SlideShare ist ein Scribd-Unternehmen logo
1 von 2
Downloaden Sie, um offline zu lesen
23/02/2011




                                                                                                                                           Cross Site Scripting (XSS)

                                                                                                                               • Is a type of computer security vulnerability
                                                                                                                                 typically found in web applications that enables
                                                                                                                                 malicious attackers to inject client-side script into
            Cross Site Scripting (XSS)
                                                                                                                                 web pages viewed by other users
                                                                                                                               • The attack steals access credentials, executes
                                                                                                                                 denial-of-service and modifies web pages in
                                                                                                                                 order to execute any command at the client
                                                                                                                                 machine




                                                                                                                                                          The players
                     Input Vulnerabilities
                                                                                                                                  – An Attacker
1. A Web application that accepts user input                                                                                         • Anonymous Internet User
                                                                                                                                     • Malicious Internal User
                                                                                                                                  – A company’s Web server (i.e. Web application)
2. The input is used to create dynamic content
                                                                                                                                     • External (e.g.: Shop, Information, CRM,
                                                                                                                                       Supplier)
3. The input is insufficiently validated                                                                                             • Internal (e.g.: Employees Self Service Portal)
                                                                                                                                  – A Client
                                                                                                                                     • Any type of customer
                                                                                                                                     • Anonymous user accessing the Web-Server




                                   XSS Steps                                                                                                      Example: XSS (jsp)

   Attacker                                               Web Server
                     Post Forum Message:                                              Did you know this?
                     Subject: GET Money for FREE !!!                                  .....
                                                                                                                                http://myserver.com/test.jsp?name=Stefan
                                                                                        GET Money for FREE !!!
                     Body:
                                                                                        <script> attack code </script>
                     <script> attack code </script>                                                                                                                         <HTML>
                                                                                         Re: Error message on startup
                                                                                         .....
                                                                                           I found a solution!
                                                                                                                                                                            <Body>
                                                                                           .....
                                                                                              Can anybody help?                                                             Welcome Stefan
                                                                                              .....
                                          Get /forum.jsp?fid=122&mid=2241
                                                                                                Error message on startup                                                    </Body>
                                                                                                .....
                                                                                                                                                                            </HTML>
    1. Attacker sends malicious code
                                                                                                                                http://myserver.com/welcome.jsp?name=<script>alert("Attacked")</script>
    2. Server stores message                                          GET Money for FREE !!!
                                                                      <script> attack code </script>
                                                                                                                                                                                   <HTML>
    3. User requests message                                                                                                                                                       <Body>
    4. Message is delivered by server                                          Client                                                                                              Welcome
                                                                                                                                                                                   <script>alert("Attacked")</
    5. Browser executes script in message                                         !!! attack code !!!                                                                              script>
                                                                                                                                               (c) 2005, EUROSEC GmbH Chiffriertechnik & Sicherheit
                                                                                                                                                                                   </Body>                       6

                  (c) 2005, EUROSEC GmbH Chiffriertechnik & Sicherheit                                                     5                                                       </HTML>




                                                                                                                                                                                                                     1
23/02/2011




                        Mitigation                                                   Mitigation

• Input Validation                                            • Implement Cookie Options
  – Check if the input is what you expect                       – "httpOnly" Cookies
                                                                   • Prevent disclosure of cookie via DOM access
     • Do not try to check for "bad input"
                                                                       – use with care, browser compatibility problems may occur
  – Whitelist testing is better                                    • But: cookies are sent in each HTTP requests
                                                                       – E.G. Trace-Method can be used to disclose cookie
     • Only what you expect will pass
                                                                   • Passwords still may be stolen via XSS
     • (correct) Regular expressions                            – "secure" Cookies
  * Blacklist testing is no solution because blacklists are        • Cookies are only sent over SSL

    never complete.




                        Mitigation                                                   Mitigation

• Use Web Application Firewalls                               • XSS-Prevention Best Practices
  – Check for malicous input values                             – Implement the mentioned XSS-Mitigation in
  – Check for modification of read-only parameters                applications
  – Block requests or filter out parameters                     – Do not assume input values are benign
                                                                – 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




                                                                                                                                    2

Weitere ähnliche Inhalte

Ähnlich wie Api xss

Web Application Vulnerabilities
Web Application VulnerabilitiesWeb Application Vulnerabilities
Web Application VulnerabilitiesPreetish Panda
 
Cyber Security By Preetish Panda
Cyber Security By Preetish PandaCyber Security By Preetish Panda
Cyber Security By Preetish PandaPreetish Panda
 
Web application security
Web application securityWeb application security
Web application securityAkhil Raj
 
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)Sam Bowne
 
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
CNIT 129S: Ch 12: Attacking Users: Cross-Site ScriptingCNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
CNIT 129S: Ch 12: Attacking Users: Cross-Site ScriptingSam Bowne
 
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
CNIT 129S: Ch 12: Attacking Users: Cross-Site ScriptingCNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
CNIT 129S: Ch 12: Attacking Users: Cross-Site ScriptingSam Bowne
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applicationsNiyas Nazar
 
Ch 12 Attacking Users - XSS
Ch 12 Attacking Users - XSSCh 12 Attacking Users - XSS
Ch 12 Attacking Users - XSSSam Bowne
 
웹 개발을 위해 꼭 알아야하는 보안 공격
웹 개발을 위해 꼭 알아야하는 보안 공격웹 개발을 위해 꼭 알아야하는 보안 공격
웹 개발을 위해 꼭 알아야하는 보안 공격선협 이
 
www.webre24h.com - Ajax security
www.webre24h.com - Ajax securitywww.webre24h.com - Ajax security
www.webre24h.com - Ajax securitywebre24h
 
Cross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning CenterCross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning CenterMichael Coates
 
Computer Network Case Study - bajju.pptx
Computer Network Case Study - bajju.pptxComputer Network Case Study - bajju.pptx
Computer Network Case Study - bajju.pptxShivamBajaj36
 
Web application security part 01
Web application security part 01Web application security part 01
Web application security part 01G Prachi
 
Chapter 13 web security
Chapter 13 web securityChapter 13 web security
Chapter 13 web securitynewbie2019
 

Ähnlich wie Api xss (20)

Web Application Vulnerabilities
Web Application VulnerabilitiesWeb Application Vulnerabilities
Web Application Vulnerabilities
 
Isys20261 lecture 09
Isys20261 lecture 09Isys20261 lecture 09
Isys20261 lecture 09
 
Cyber Security By Preetish Panda
Cyber Security By Preetish PandaCyber Security By Preetish Panda
Cyber Security By Preetish Panda
 
Web application security
Web application securityWeb application security
Web application security
 
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)
 
a
aa
a
 
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
CNIT 129S: Ch 12: Attacking Users: Cross-Site ScriptingCNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
 
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
CNIT 129S: Ch 12: Attacking Users: Cross-Site ScriptingCNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applications
 
Ch 12 Attacking Users - XSS
Ch 12 Attacking Users - XSSCh 12 Attacking Users - XSS
Ch 12 Attacking Users - XSS
 
웹 개발을 위해 꼭 알아야하는 보안 공격
웹 개발을 위해 꼭 알아야하는 보안 공격웹 개발을 위해 꼭 알아야하는 보안 공격
웹 개발을 위해 꼭 알아야하는 보안 공격
 
Web Security
Web SecurityWeb Security
Web Security
 
www.webre24h.com - Ajax security
www.webre24h.com - Ajax securitywww.webre24h.com - Ajax security
www.webre24h.com - Ajax security
 
Cross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning CenterCross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning Center
 
Vulnerabilities in Web Applications
Vulnerabilities in Web ApplicationsVulnerabilities in Web Applications
Vulnerabilities in Web Applications
 
Cross site scripting
Cross site scripting Cross site scripting
Cross site scripting
 
XSS Remediation
XSS RemediationXSS Remediation
XSS Remediation
 
Computer Network Case Study - bajju.pptx
Computer Network Case Study - bajju.pptxComputer Network Case Study - bajju.pptx
Computer Network Case Study - bajju.pptx
 
Web application security part 01
Web application security part 01Web application security part 01
Web application security part 01
 
Chapter 13 web security
Chapter 13 web securityChapter 13 web security
Chapter 13 web security
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 

Kürzlich hochgeladen (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

Api xss

  • 1. 23/02/2011 Cross Site Scripting (XSS) • Is a type of computer security vulnerability typically found in web applications that enables malicious attackers to inject client-side script into Cross Site Scripting (XSS) web pages viewed by other users • The attack steals access credentials, executes denial-of-service and modifies web pages in order to execute any command at the client machine The players Input Vulnerabilities – An Attacker 1. A Web application that accepts user input • Anonymous Internet User • Malicious Internal User – A company’s Web server (i.e. Web application) 2. The input is used to create dynamic content • External (e.g.: Shop, Information, CRM, Supplier) 3. The input is insufficiently validated • Internal (e.g.: Employees Self Service Portal) – A Client • Any type of customer • Anonymous user accessing the Web-Server XSS Steps Example: XSS (jsp) Attacker Web Server Post Forum Message: Did you know this? Subject: GET Money for FREE !!! ..... http://myserver.com/test.jsp?name=Stefan GET Money for FREE !!! Body: <script> attack code </script> <script> attack code </script> <HTML> Re: Error message on startup ..... I found a solution! <Body> ..... Can anybody help? Welcome Stefan ..... Get /forum.jsp?fid=122&mid=2241 Error message on startup </Body> ..... </HTML> 1. Attacker sends malicious code http://myserver.com/welcome.jsp?name=<script>alert("Attacked")</script> 2. Server stores message GET Money for FREE !!! <script> attack code </script> <HTML> 3. User requests message <Body> 4. Message is delivered by server Client Welcome <script>alert("Attacked")</ 5. Browser executes script in message !!! attack code !!! script> (c) 2005, EUROSEC GmbH Chiffriertechnik & Sicherheit </Body> 6 (c) 2005, EUROSEC GmbH Chiffriertechnik & Sicherheit 5 </HTML> 1
  • 2. 23/02/2011 Mitigation Mitigation • Input Validation • Implement Cookie Options – Check if the input is what you expect – "httpOnly" Cookies • Prevent disclosure of cookie via DOM access • Do not try to check for "bad input" – use with care, browser compatibility problems may occur – Whitelist testing is better • But: cookies are sent in each HTTP requests – E.G. Trace-Method can be used to disclose cookie • Only what you expect will pass • Passwords still may be stolen via XSS • (correct) Regular expressions – "secure" Cookies * Blacklist testing is no solution because blacklists are • Cookies are only sent over SSL never complete. Mitigation Mitigation • Use Web Application Firewalls • XSS-Prevention Best Practices – Check for malicous input values – Implement the mentioned XSS-Mitigation in – Check for modification of read-only parameters applications – Block requests or filter out parameters – Do not assume input values are benign – 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 2