SlideShare une entreprise Scribd logo
1  sur  19
http://www.flickr.com/photos/8164746@N05/2329405200/
http://www.flickr.com/photos/52137170@N00/56206868/
Web Defacement!




Step 1: Victim Clicks Attack         Step 2: Victim sees a friendly error
Payload                              message
Web Defacement: Insert Exploit




Step 1: Attacker inserts   Step 2: Wait for victim to visit this
exploit                    book
Web Defacement: Exploit Analysis




Step 1: Clear current page   Step 2: Create a fake page
Stealing Session Cookies 



                               Step 2: Cookie is sent to
                               Attacker




                                                           Step 3: Attacker hijacks
Step 1: Victim Clicks Attack                               Victim’s session by adding
Payload                                                    stolen cookie to the browser
Steal Passwords 



                                   Step 2: Victim is
                                   forced to re-login




Step 1: Victim Clicks Attack
Payload                                                 Step 3: Malicious payload
                                                        sends username and
                                                        password to Attacker
Steal Passwords: Exploit Analysis


Step 1: Create fake login




Step 2: Publish fake login
DB Compromise :(




                                  Step 2: Victim can’t
Step 1: Attacker shuts DB         do anything on the
                                  website. DB is down
What’s the biggest app security issue?

                          Cross Site Scripting?
                       SQL / Command Injection?
                       Malicious URL Redirection?
                        Malicious File Execution?

                     Answer: It is temporal.
               And this approach, not appropriate




http://www.flickr.com/photos/34838158@N00/3370167184/
OK. Let’s try again.
             A better approach.
     What’s that single biggest solution?




http://www.flickr.com/photos/14318462@N00/66012169/
What’s that single biggest solution?




                            Context-sensitive Auto Sanitization
                                            &
                                    Defensive Coding

http://www.flickr.com/photos/55046645@N00/3933514241/
(includes validation and encoding) Sanitization




http://www.flickr.com/photos/37386206@N08/4056667699/
(Use Platforms with) Auto (Sanitization)




http://www.flickr.com/photos/73344134@N00/2366984016/
Context-Sensitive




Click. You can fire XSS with JS URI.. So use solution below
But Evolution Doesn’t stop
   No prod auto                                          Web 2.0
    solution yet.                                          DOM
                                                        Ajax/JSON/
Encode Manually                                            XML
           But that’s highly
              error prone.                              Misuse cases




http://www.flickr.com/photos/88442983@N00/1541378785/
Defensive Coding
                                    • Evolution Theory
                                    • E.g. quality code/capability
                                         – document.getElementById('
                                           myAnchor').innerHTML=url;
                                         – YUI().use('node', function
                                           (Y) {
                                           var node =
                                           Y.one('#myanchor');
                                           node.set('text',url);});
                                    • But why do so
                                         – Murphy’s Law
                                         – Mr. Einstein said as well

http://www.flickr.com/photos/diavolo/5870934960/
Yes, takes 2 to tango..




http://www.flickr.com/photos/9737768@N04/3537843322/
Thanks Again….

Contenu connexe

Similaire à Defending Your Frontend

Web PenTest Sample Report
Web PenTest Sample ReportWeb PenTest Sample Report
Web PenTest Sample Report
Octogence
 
Dom XSS: Encounters of the3rd kind
Dom XSS: Encounters of the3rd kindDom XSS: Encounters of the3rd kind
Dom XSS: Encounters of the3rd kind
Bishan Singh
 

Similaire à Defending Your Frontend (20)

Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Web Security - Introduction v.1.3
Web Security - Introduction v.1.3
 
JS Fest 2019. Виктор Турский. 6 способов взломать твое JavaScript приложение
JS Fest 2019. Виктор Турский. 6 способов взломать твое JavaScript приложениеJS Fest 2019. Виктор Турский. 6 способов взломать твое JavaScript приложение
JS Fest 2019. Виктор Турский. 6 способов взломать твое JavaScript приложение
 
Professional Hacking in 2011
Professional Hacking in 2011Professional Hacking in 2011
Professional Hacking in 2011
 
Making the Web Fireproof: A Building Code for Websites
Making the Web Fireproof: A Building Code for WebsitesMaking the Web Fireproof: A Building Code for Websites
Making the Web Fireproof: A Building Code for Websites
 
AppSecCali - How Credential Stuffing is Evolving
AppSecCali - How Credential Stuffing is EvolvingAppSecCali - How Credential Stuffing is Evolving
AppSecCali - How Credential Stuffing is Evolving
 
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
 
Phishing with Super Bait
Phishing with Super BaitPhishing with Super Bait
Phishing with Super Bait
 
How to hide your browser 0-day @ Disobey
How to hide your browser 0-day @ DisobeyHow to hide your browser 0-day @ Disobey
How to hide your browser 0-day @ Disobey
 
Web PenTest Sample Report
Web PenTest Sample ReportWeb PenTest Sample Report
Web PenTest Sample Report
 
Dom XSS: Encounters of the3rd kind
Dom XSS: Encounters of the3rd kindDom XSS: Encounters of the3rd kind
Dom XSS: Encounters of the3rd kind
 
6 ways to hack your JavaScript application by Viktor Turskyi
6 ways to hack your JavaScript application by Viktor Turskyi   6 ways to hack your JavaScript application by Viktor Turskyi
6 ways to hack your JavaScript application by Viktor Turskyi
 
Thinking Outside the Sand[box]
Thinking Outside the Sand[box]Thinking Outside the Sand[box]
Thinking Outside the Sand[box]
 
Reversing & Malware Analysis Training Part 9 - Advanced Malware Analysis
Reversing & Malware Analysis Training Part 9 -  Advanced Malware AnalysisReversing & Malware Analysis Training Part 9 -  Advanced Malware Analysis
Reversing & Malware Analysis Training Part 9 - Advanced Malware Analysis
 
Malware’s Most Wanted: NightHunter. A Massive Campaign to Steal Credentials R...
Malware’s Most Wanted: NightHunter. A Massive Campaign to Steal Credentials R...Malware’s Most Wanted: NightHunter. A Massive Campaign to Steal Credentials R...
Malware’s Most Wanted: NightHunter. A Massive Campaign to Steal Credentials R...
 
CONFidence 2015: The Top 10 Web Hacks of 2014 - Matt Johansen, Johnathan Kuskos
CONFidence 2015: The Top 10 Web Hacks of 2014 - Matt Johansen, Johnathan KuskosCONFidence 2015: The Top 10 Web Hacks of 2014 - Matt Johansen, Johnathan Kuskos
CONFidence 2015: The Top 10 Web Hacks of 2014 - Matt Johansen, Johnathan Kuskos
 
RubyConf 2012: Custom Reverse Proxies
RubyConf 2012: Custom Reverse ProxiesRubyConf 2012: Custom Reverse Proxies
RubyConf 2012: Custom Reverse Proxies
 
iThome CyberSec2021 Container Security
iThome CyberSec2021 Container SecurityiThome CyberSec2021 Container Security
iThome CyberSec2021 Container Security
 
(130216) #fitalk potentially malicious ur ls
(130216) #fitalk   potentially malicious ur ls(130216) #fitalk   potentially malicious ur ls
(130216) #fitalk potentially malicious ur ls
 
OpenTechTalks: Ethical hacking with Kali Linux (Tijl Deneut, UGent)
OpenTechTalks: Ethical hacking with Kali Linux (Tijl Deneut, UGent)OpenTechTalks: Ethical hacking with Kali Linux (Tijl Deneut, UGent)
OpenTechTalks: Ethical hacking with Kali Linux (Tijl Deneut, UGent)
 
Passwords are passé. WebAuthn is simpler, stronger and ready to go
Passwords are passé. WebAuthn is simpler, stronger and ready to goPasswords are passé. WebAuthn is simpler, stronger and ready to go
Passwords are passé. WebAuthn is simpler, stronger and ready to go
 

Dernier

+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...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL 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
 
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
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
+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...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

Defending Your Frontend

  • 3. Web Defacement! Step 1: Victim Clicks Attack Step 2: Victim sees a friendly error Payload message
  • 4. Web Defacement: Insert Exploit Step 1: Attacker inserts Step 2: Wait for victim to visit this exploit book
  • 5. Web Defacement: Exploit Analysis Step 1: Clear current page Step 2: Create a fake page
  • 6. Stealing Session Cookies  Step 2: Cookie is sent to Attacker Step 3: Attacker hijacks Step 1: Victim Clicks Attack Victim’s session by adding Payload stolen cookie to the browser
  • 7. Steal Passwords  Step 2: Victim is forced to re-login Step 1: Victim Clicks Attack Payload Step 3: Malicious payload sends username and password to Attacker
  • 8. Steal Passwords: Exploit Analysis Step 1: Create fake login Step 2: Publish fake login
  • 9. DB Compromise :( Step 2: Victim can’t Step 1: Attacker shuts DB do anything on the website. DB is down
  • 10. What’s the biggest app security issue? Cross Site Scripting? SQL / Command Injection? Malicious URL Redirection? Malicious File Execution? Answer: It is temporal. And this approach, not appropriate http://www.flickr.com/photos/34838158@N00/3370167184/
  • 11. OK. Let’s try again. A better approach. What’s that single biggest solution? http://www.flickr.com/photos/14318462@N00/66012169/
  • 12. What’s that single biggest solution? Context-sensitive Auto Sanitization & Defensive Coding http://www.flickr.com/photos/55046645@N00/3933514241/
  • 13. (includes validation and encoding) Sanitization http://www.flickr.com/photos/37386206@N08/4056667699/
  • 14. (Use Platforms with) Auto (Sanitization) http://www.flickr.com/photos/73344134@N00/2366984016/
  • 15. Context-Sensitive Click. You can fire XSS with JS URI.. So use solution below
  • 16. But Evolution Doesn’t stop No prod auto Web 2.0 solution yet. DOM Ajax/JSON/ Encode Manually XML But that’s highly error prone. Misuse cases http://www.flickr.com/photos/88442983@N00/1541378785/
  • 17. Defensive Coding • Evolution Theory • E.g. quality code/capability – document.getElementById(' myAnchor').innerHTML=url; – YUI().use('node', function (Y) { var node = Y.one('#myanchor'); node.set('text',url);}); • But why do so – Murphy’s Law – Mr. Einstein said as well http://www.flickr.com/photos/diavolo/5870934960/
  • 18. Yes, takes 2 to tango.. http://www.flickr.com/photos/9737768@N04/3537843322/