SlideShare uma empresa Scribd logo
1 de 32
A Framework for Web 2.0
        Secure Widgets



        Vagner Figueredo de Santana,
    Prof. Maria Cecília Calani Baranauskas
           Institute of Computing

     Prof. Marco Aurélio Amaral Henriques
School of Electrical and Computer Engineering
Agenda

• Problem and context

• Objective

• Security and JavaScript

• Literature review

• Framework proposal

• Conclusions
2
Problem and context:
Web 1.0 vs Web 2.0
• Web 1.0
  o Focus is content
  o Active producer to passive consumer
  o Few produce
  o Content weakly integrated semantically

• Web 2.0
  o Focus is end user
  o Anyone can produce and/or consume
  o Content is more integrated
  o Integration agregates value to the content
  o Term created to represent this paradigm shift



3
Problem and context:
HTML, CSS, and JavaScript
• Usually Web pages count on:
  o Markup language (e.g., HTML)
  o Style Sheets (e.g., CSS)
  o Scripts (e.g., JavaScript)

• All of them have characteristics relative to security

• But JavaScript has a prominent role
  o It is a programming language
  o It allows communication
  o It is hard to verify if the code is malicious
  o Let’s see an example


4
Problem and context:
HTML, CSS, and JavaScript
...
var url = { toString: function(){
    this.toString() = function(){
        return “bad” ;
    } ;
    return “good” ;
 }
} ;
...



5
Problem and context:
Widget and Mashup
• Widget
  o User Interface (UI) components that add functionalities
  o May use JavaScript to send/receive data (AJAX)
  o External scripts are placed in the same scope of others
  o Example: Twitter component

• Mashup
  o Technique of building applications integrating content
  o Combines services gracefully for the user
  o Can be built at the client or at the server
  o In sum, integrates different widgets
  o Example: Addict-o-matic



6
Problem and context:
Widget and Mashup




           Widget server



7
Problem and context:
Widget and Mashup




8
Problem and context:
Widget and Mashup
                          Web page is a
                          point of attack




     Communication is a
       point of attack


9
Problem and context:
Scenario of usage
• 74.9% of most popular homepages use JavaScript in a insecure way
   o Insecure insertion:
       <script src=" [external script ] " ... >
   o Insecure generation:  
       document.write( [external content] )
       eval( [external content] ) 

• 43.6% use code from 3 or more extermal domains

• In average, use code from 5 external domains

• 2 of the top 10 vulnerabilities pointed by OWASP
  (Open Web Application Security Project)



10
Objective

• Show common attacks related to the JavaScripts

• Comment on attack vectors considering JavaScript usage

• Propose a framework to securely reuse Web 2.0 widgets

• Present how to use it considering current technologies




11
Security and Javascript:
Common attacks - XSS
• Stands for Cross-Site Scripting

• 2nd most occurred attack in the OWASP Top 10

• Is possible to run script in the main document of a Web page

• With the scope access is possible do deface, change forms'
  destination, log events, etc.

• Example:
  Try to search for <script>alert("XSS")</script>

• More examples available at:
  http://ha.ckers.org/xss.html
12
Security and Javascript:
Common attacks - CSRF
• Stands for Cross-Side Request Forgery

• 5th most occurred attack in the OWASP Top 10

• Browsers insert credentials in requests (e.g., cookie, IP)

• If an application uses only these credentials to authenticate, it allows
  CSRF attacks

• The attacker can perform requests on behalf of the user

• Example:
  var image = new Image();
  image.src = "http://www.target.com/abuse/1234";


13
Security and Javascript:
Data exchange
• In mashups is desirable to exchange data among different
  domains (cross-domain)

• AJAX was designed to exchange data between the client
  and the domain that served the Javascript

• The restriction that avoids cross-domain connections using
  XMLHttpRequest is called Same Origin Policy (SOP)

• SOP does not apply to cross-domain tags:
  <script>, <style>, and <img>

• Common workaround: insecure JavaScript
14
Security and Javascript:
Data exchange
• If insecure use of Javascript takes place, then the task of
  verifying whether a script is malicious becomes more difficult

• SOP applies when a mashup is built at the client

• But mashups built at the server result in overhead

• Let’s see an example…




15
Security and Javascript:
Data exchange
Mashup built at the server
     Web page server




                       Widget server
16
Security and Javascript:
Data exchange
Mashup built at the server




17
Security and Javascript:
Data exchange
Mashup built at the server




18
Security and Javascript:
Data exchange
Mashup built at the server




19
Security and Javascript:
Data exchange
Mashup built at the client
                             Widget server
     Web page server




                             Widget server




20
Security and Javascript:
Data exchange
Mashup built at the client




21
Security and Javascript:
Data exchange
Mashup built at the client




22
Security and Javascript:
Data exchange
Mashup built at the client




23
Literature review:
State of the art
• Lightweight Self-protecting Javascript
   o Intercepts requests in order to protect the code
   o Vulnerable to delete() function

• Subspace
  o Wrap external scripts in nested <iframe> tags
  o Requires the manipulation of document.domain


• Maintenance of code
  o Guidelines
  o Do not present a concrete solution




24
Literature review:
Common practices and proposals
• Dynamic Script Tag (unsafe insertion!)
  o Adding <script src=" [external code] "> to DOM tree


• Iframe Proxy (or Fragment Identifier Messaging)
   o <iframe src="...# [messages] " ... >
   o Results in usability problems


• Other ideas
     • JSONRequest
     • <module> tag




25
Framework proposal:
Assumptions
• Web page and the communication are points of attack

• The Web page must be free of XSS Holes

• The website must be free of insecure use of JavaScript

• Message integrity

• HTTPS authentication between devices




26
Framework proposal:
Patterns considered
• Model-View-Controller
  o Inspires the overal architetural organization

• GoF (Gang of Four)
  o Proxy
      Mediates cross-domain requests to guarantee proper
       filtering of the content received at client
      It must not run JavaScript received from the widget
       server
• PoEAA (Patterns of Enterprise Application Architecture)
   o Template View
       Embeds proper UI component considerng
        filtered content
27
Framework proposal:
Overall architecture




28
Framework proposal:
Using current technologies




29
Framework proposal:
Discussion
• Use of different technologies can add complexity

• Inexistence of XSS Hole is a strong requirement

• GoF Patterns… PoEAA… anything new?

• The proposed framework addresses a gap identified in the
  literature

• Developers can build solutions to improve security
     • Considering current technologies
     • Without requiring any action from users

30
Conclusions

• Applications are ahead of browsers technology

• Disabling JavaScript is not a practical solution

• Developers are applying workarounds to policies and
  restrictions in order to use certain Web 2.0 features

• Browsers security model should deal with JavaScript
  filtering

• Client-side programming is not less or more
  important than server-side programming,
  it is just another part of Web 2.0 applications
31
Thank you!
        vsantana@ic.unicamp.br


         Acknowledgments
          FAPESP (#grant 2009/10186-9)




Icons source: http://openiconlibrary.sourceforge.net/

Mais conteúdo relacionado

Mais procurados

Repository and Unit Of Work Design Patterns
Repository and Unit Of Work Design PatternsRepository and Unit Of Work Design Patterns
Repository and Unit Of Work Design PatternsHatim Hakeel
 
Introduction to the Nancy Framework
Introduction to the Nancy FrameworkIntroduction to the Nancy Framework
Introduction to the Nancy FrameworkTim Bourguignon
 
Ajax Security Dangers
Ajax Security DangersAjax Security Dangers
Ajax Security Dangersdrkimsky
 
FULL stack -> MEAN stack
FULL stack -> MEAN stackFULL stack -> MEAN stack
FULL stack -> MEAN stackAshok Raj
 
Building Modern Web Apps with MEAN Stack
Building Modern Web Apps with MEAN StackBuilding Modern Web Apps with MEAN Stack
Building Modern Web Apps with MEAN StackSuresh Patidar
 

Mais procurados (6)

Repository and Unit Of Work Design Patterns
Repository and Unit Of Work Design PatternsRepository and Unit Of Work Design Patterns
Repository and Unit Of Work Design Patterns
 
Ajax
AjaxAjax
Ajax
 
Introduction to the Nancy Framework
Introduction to the Nancy FrameworkIntroduction to the Nancy Framework
Introduction to the Nancy Framework
 
Ajax Security Dangers
Ajax Security DangersAjax Security Dangers
Ajax Security Dangers
 
FULL stack -> MEAN stack
FULL stack -> MEAN stackFULL stack -> MEAN stack
FULL stack -> MEAN stack
 
Building Modern Web Apps with MEAN Stack
Building Modern Web Apps with MEAN StackBuilding Modern Web Apps with MEAN Stack
Building Modern Web Apps with MEAN Stack
 

Destaque

ICEIS 2012 - VISUALIZING USER INTERFACE EVENTS: Event Stream Summarization th...
ICEIS 2012 - VISUALIZING USER INTERFACE EVENTS: Event Stream Summarization th...ICEIS 2012 - VISUALIZING USER INTERFACE EVENTS: Event Stream Summarization th...
ICEIS 2012 - VISUALIZING USER INTERFACE EVENTS: Event Stream Summarization th...Vagner Santana
 
IHC 2010 - Bringing Users of a Digital Divide Context to Website Evaluation U...
IHC 2010 - Bringing Users of a Digital Divide Context to Website Evaluation U...IHC 2010 - Bringing Users of a Digital Divide Context to Website Evaluation U...
IHC 2010 - Bringing Users of a Digital Divide Context to Website Evaluation U...Vagner Santana
 
MCPL2013 - Social network analyses in organizations: challenges and approache...
MCPL2013 - Social network analyses in organizations: challenges and approache...MCPL2013 - Social network analyses in organizations: challenges and approache...
MCPL2013 - Social network analyses in organizations: challenges and approache...Vagner Santana
 
IHC 2010 - Competição de avaliação
IHC 2010 - Competição de avaliaçãoIHC 2010 - Competição de avaliação
IHC 2010 - Competição de avaliaçãoVagner Santana
 
W4A2013 - Firefixia: An Accessibility Web Browser Customization Toolbar for P...
W4A2013 - Firefixia: An Accessibility Web Browser Customization Toolbar for P...W4A2013 - Firefixia: An Accessibility Web Browser Customization Toolbar for P...
W4A2013 - Firefixia: An Accessibility Web Browser Customization Toolbar for P...Vagner Santana
 
W4A2013 - Web Accessibility Snapshot: An Effort to Reveal Coding Guidelines C...
W4A2013 - Web Accessibility Snapshot: An Effort to Reveal Coding Guidelines C...W4A2013 - Web Accessibility Snapshot: An Effort to Reveal Coding Guidelines C...
W4A2013 - Web Accessibility Snapshot: An Effort to Reveal Coding Guidelines C...Vagner Santana
 
Desenvolvimento de Software
Desenvolvimento de SoftwareDesenvolvimento de Software
Desenvolvimento de SoftwareVagner Santana
 
Introdução à Engenharia de Requisitos e RUP
Introdução à Engenharia de Requisitos e RUPIntrodução à Engenharia de Requisitos e RUP
Introdução à Engenharia de Requisitos e RUPVagner Santana
 
Padrões Arquiteturais de Sistemas
Padrões Arquiteturais de SistemasPadrões Arquiteturais de Sistemas
Padrões Arquiteturais de SistemasVagner Santana
 

Destaque (11)

ICEIS 2012 - VISUALIZING USER INTERFACE EVENTS: Event Stream Summarization th...
ICEIS 2012 - VISUALIZING USER INTERFACE EVENTS: Event Stream Summarization th...ICEIS 2012 - VISUALIZING USER INTERFACE EVENTS: Event Stream Summarization th...
ICEIS 2012 - VISUALIZING USER INTERFACE EVENTS: Event Stream Summarization th...
 
IHC 2010 - Bringing Users of a Digital Divide Context to Website Evaluation U...
IHC 2010 - Bringing Users of a Digital Divide Context to Website Evaluation U...IHC 2010 - Bringing Users of a Digital Divide Context to Website Evaluation U...
IHC 2010 - Bringing Users of a Digital Divide Context to Website Evaluation U...
 
MCPL2013 - Social network analyses in organizations: challenges and approache...
MCPL2013 - Social network analyses in organizations: challenges and approache...MCPL2013 - Social network analyses in organizations: challenges and approache...
MCPL2013 - Social network analyses in organizations: challenges and approache...
 
IHC 2010 - Competição de avaliação
IHC 2010 - Competição de avaliaçãoIHC 2010 - Competição de avaliação
IHC 2010 - Competição de avaliação
 
W4A2013 - Firefixia: An Accessibility Web Browser Customization Toolbar for P...
W4A2013 - Firefixia: An Accessibility Web Browser Customization Toolbar for P...W4A2013 - Firefixia: An Accessibility Web Browser Customization Toolbar for P...
W4A2013 - Firefixia: An Accessibility Web Browser Customization Toolbar for P...
 
W4A2013 - Web Accessibility Snapshot: An Effort to Reveal Coding Guidelines C...
W4A2013 - Web Accessibility Snapshot: An Effort to Reveal Coding Guidelines C...W4A2013 - Web Accessibility Snapshot: An Effort to Reveal Coding Guidelines C...
W4A2013 - Web Accessibility Snapshot: An Effort to Reveal Coding Guidelines C...
 
Desenvolvimento de Software
Desenvolvimento de SoftwareDesenvolvimento de Software
Desenvolvimento de Software
 
Introdução à Engenharia de Requisitos e RUP
Introdução à Engenharia de Requisitos e RUPIntrodução à Engenharia de Requisitos e RUP
Introdução à Engenharia de Requisitos e RUP
 
Acessibilidade web
Acessibilidade webAcessibilidade web
Acessibilidade web
 
Padrões de Projeto
Padrões de ProjetoPadrões de Projeto
Padrões de Projeto
 
Padrões Arquiteturais de Sistemas
Padrões Arquiteturais de SistemasPadrões Arquiteturais de Sistemas
Padrões Arquiteturais de Sistemas
 

Semelhante a WWW/Internet 2011 - A Framework for Web 2.0 Secure Widgets

Get Started with JavaScript Frameworks
Get Started with JavaScript FrameworksGet Started with JavaScript Frameworks
Get Started with JavaScript FrameworksChristian Gaetano
 
O2 platform and ASP.NET MVC, by Michael Hidalgo
O2 platform and ASP.NET MVC, by Michael HidalgoO2 platform and ASP.NET MVC, by Michael Hidalgo
O2 platform and ASP.NET MVC, by Michael HidalgoDinis Cruz
 
Getting Started with Spring Framework
Getting Started with Spring FrameworkGetting Started with Spring Framework
Getting Started with Spring FrameworkEdureka!
 
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...Divyanshu
 
Web security: Securing Untrusted Web Content in Browsers
Web security: Securing Untrusted Web Content in BrowsersWeb security: Securing Untrusted Web Content in Browsers
Web security: Securing Untrusted Web Content in BrowsersPhú Phùng
 
Owasp web application security trends
Owasp web application security trendsOwasp web application security trends
Owasp web application security trendsbeched
 
[2.1] Web application Security Trends - Omar Ganiev
[2.1] Web application Security Trends - Omar Ganiev[2.1] Web application Security Trends - Omar Ganiev
[2.1] Web application Security Trends - Omar GanievOWASP Russia
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Ganesh Kondal
 
Html5 Application Security
Html5 Application SecurityHtml5 Application Security
Html5 Application Securitychuckbt
 
AJAX: How to Divert Threats
AJAX:  How to Divert ThreatsAJAX:  How to Divert Threats
AJAX: How to Divert ThreatsCenzic
 
Selecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkSelecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkRajitha Pathiraja
 
Web security: Securing untrusted web content at browsers
Web security: Securing untrusted web content at browsersWeb security: Securing untrusted web content at browsers
Web security: Securing untrusted web content at browsersPhú Phùng
 
Devopsdays london: Let’s talk about security
Devopsdays london:  Let’s talk about securityDevopsdays london:  Let’s talk about security
Devopsdays london: Let’s talk about securityJustin Cormack
 
Developing Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax PushDeveloping Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax PushDoris Chen
 
Web development tips and tricks
Web development tips and tricksWeb development tips and tricks
Web development tips and tricksmaxo_64
 
Java script and web cryptography (cf.objective)
Java script and web cryptography (cf.objective)Java script and web cryptography (cf.objective)
Java script and web cryptography (cf.objective)ColdFusionConference
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCUlrich Krause
 
MvvmCross Seminar
MvvmCross SeminarMvvmCross Seminar
MvvmCross SeminarXamarin
 

Semelhante a WWW/Internet 2011 - A Framework for Web 2.0 Secure Widgets (20)

Transforming the web into a real application platform
Transforming the web into a real application platformTransforming the web into a real application platform
Transforming the web into a real application platform
 
Get Started with JavaScript Frameworks
Get Started with JavaScript FrameworksGet Started with JavaScript Frameworks
Get Started with JavaScript Frameworks
 
O2 platform and ASP.NET MVC, by Michael Hidalgo
O2 platform and ASP.NET MVC, by Michael HidalgoO2 platform and ASP.NET MVC, by Michael Hidalgo
O2 platform and ASP.NET MVC, by Michael Hidalgo
 
Getting Started with Spring Framework
Getting Started with Spring FrameworkGetting Started with Spring Framework
Getting Started with Spring Framework
 
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
 
Web security: Securing Untrusted Web Content in Browsers
Web security: Securing Untrusted Web Content in BrowsersWeb security: Securing Untrusted Web Content in Browsers
Web security: Securing Untrusted Web Content in Browsers
 
Owasp web application security trends
Owasp web application security trendsOwasp web application security trends
Owasp web application security trends
 
[2.1] Web application Security Trends - Omar Ganiev
[2.1] Web application Security Trends - Omar Ganiev[2.1] Web application Security Trends - Omar Ganiev
[2.1] Web application Security Trends - Omar Ganiev
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
 
Html5 Application Security
Html5 Application SecurityHtml5 Application Security
Html5 Application Security
 
AJAX: How to Divert Threats
AJAX:  How to Divert ThreatsAJAX:  How to Divert Threats
AJAX: How to Divert Threats
 
Selecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkSelecting the Best Javascript Web Framework
Selecting the Best Javascript Web Framework
 
Software Engineering 2014
Software Engineering 2014Software Engineering 2014
Software Engineering 2014
 
Web security: Securing untrusted web content at browsers
Web security: Securing untrusted web content at browsersWeb security: Securing untrusted web content at browsers
Web security: Securing untrusted web content at browsers
 
Devopsdays london: Let’s talk about security
Devopsdays london:  Let’s talk about securityDevopsdays london:  Let’s talk about security
Devopsdays london: Let’s talk about security
 
Developing Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax PushDeveloping Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax Push
 
Web development tips and tricks
Web development tips and tricksWeb development tips and tricks
Web development tips and tricks
 
Java script and web cryptography (cf.objective)
Java script and web cryptography (cf.objective)Java script and web cryptography (cf.objective)
Java script and web cryptography (cf.objective)
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVC
 
MvvmCross Seminar
MvvmCross SeminarMvvmCross Seminar
MvvmCross Seminar
 

Último

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 

Último (20)

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 

WWW/Internet 2011 - A Framework for Web 2.0 Secure Widgets

  • 1. A Framework for Web 2.0 Secure Widgets Vagner Figueredo de Santana, Prof. Maria Cecília Calani Baranauskas Institute of Computing Prof. Marco Aurélio Amaral Henriques School of Electrical and Computer Engineering
  • 2. Agenda • Problem and context • Objective • Security and JavaScript • Literature review • Framework proposal • Conclusions 2
  • 3. Problem and context: Web 1.0 vs Web 2.0 • Web 1.0 o Focus is content o Active producer to passive consumer o Few produce o Content weakly integrated semantically • Web 2.0 o Focus is end user o Anyone can produce and/or consume o Content is more integrated o Integration agregates value to the content o Term created to represent this paradigm shift 3
  • 4. Problem and context: HTML, CSS, and JavaScript • Usually Web pages count on: o Markup language (e.g., HTML) o Style Sheets (e.g., CSS) o Scripts (e.g., JavaScript) • All of them have characteristics relative to security • But JavaScript has a prominent role o It is a programming language o It allows communication o It is hard to verify if the code is malicious o Let’s see an example 4
  • 5. Problem and context: HTML, CSS, and JavaScript ... var url = { toString: function(){ this.toString() = function(){ return “bad” ; } ; return “good” ; } } ; ... 5
  • 6. Problem and context: Widget and Mashup • Widget o User Interface (UI) components that add functionalities o May use JavaScript to send/receive data (AJAX) o External scripts are placed in the same scope of others o Example: Twitter component • Mashup o Technique of building applications integrating content o Combines services gracefully for the user o Can be built at the client or at the server o In sum, integrates different widgets o Example: Addict-o-matic 6
  • 7. Problem and context: Widget and Mashup Widget server 7
  • 9. Problem and context: Widget and Mashup Web page is a point of attack Communication is a point of attack 9
  • 10. Problem and context: Scenario of usage • 74.9% of most popular homepages use JavaScript in a insecure way o Insecure insertion:  <script src=" [external script ] " ... > o Insecure generation:    document.write( [external content] )  eval( [external content] )  • 43.6% use code from 3 or more extermal domains • In average, use code from 5 external domains • 2 of the top 10 vulnerabilities pointed by OWASP (Open Web Application Security Project) 10
  • 11. Objective • Show common attacks related to the JavaScripts • Comment on attack vectors considering JavaScript usage • Propose a framework to securely reuse Web 2.0 widgets • Present how to use it considering current technologies 11
  • 12. Security and Javascript: Common attacks - XSS • Stands for Cross-Site Scripting • 2nd most occurred attack in the OWASP Top 10 • Is possible to run script in the main document of a Web page • With the scope access is possible do deface, change forms' destination, log events, etc. • Example: Try to search for <script>alert("XSS")</script> • More examples available at: http://ha.ckers.org/xss.html 12
  • 13. Security and Javascript: Common attacks - CSRF • Stands for Cross-Side Request Forgery • 5th most occurred attack in the OWASP Top 10 • Browsers insert credentials in requests (e.g., cookie, IP) • If an application uses only these credentials to authenticate, it allows CSRF attacks • The attacker can perform requests on behalf of the user • Example: var image = new Image(); image.src = "http://www.target.com/abuse/1234"; 13
  • 14. Security and Javascript: Data exchange • In mashups is desirable to exchange data among different domains (cross-domain) • AJAX was designed to exchange data between the client and the domain that served the Javascript • The restriction that avoids cross-domain connections using XMLHttpRequest is called Same Origin Policy (SOP) • SOP does not apply to cross-domain tags: <script>, <style>, and <img> • Common workaround: insecure JavaScript 14
  • 15. Security and Javascript: Data exchange • If insecure use of Javascript takes place, then the task of verifying whether a script is malicious becomes more difficult • SOP applies when a mashup is built at the client • But mashups built at the server result in overhead • Let’s see an example… 15
  • 16. Security and Javascript: Data exchange Mashup built at the server Web page server Widget server 16
  • 17. Security and Javascript: Data exchange Mashup built at the server 17
  • 18. Security and Javascript: Data exchange Mashup built at the server 18
  • 19. Security and Javascript: Data exchange Mashup built at the server 19
  • 20. Security and Javascript: Data exchange Mashup built at the client Widget server Web page server Widget server 20
  • 21. Security and Javascript: Data exchange Mashup built at the client 21
  • 22. Security and Javascript: Data exchange Mashup built at the client 22
  • 23. Security and Javascript: Data exchange Mashup built at the client 23
  • 24. Literature review: State of the art • Lightweight Self-protecting Javascript o Intercepts requests in order to protect the code o Vulnerable to delete() function • Subspace o Wrap external scripts in nested <iframe> tags o Requires the manipulation of document.domain • Maintenance of code o Guidelines o Do not present a concrete solution 24
  • 25. Literature review: Common practices and proposals • Dynamic Script Tag (unsafe insertion!) o Adding <script src=" [external code] "> to DOM tree • Iframe Proxy (or Fragment Identifier Messaging) o <iframe src="...# [messages] " ... > o Results in usability problems • Other ideas • JSONRequest • <module> tag 25
  • 26. Framework proposal: Assumptions • Web page and the communication are points of attack • The Web page must be free of XSS Holes • The website must be free of insecure use of JavaScript • Message integrity • HTTPS authentication between devices 26
  • 27. Framework proposal: Patterns considered • Model-View-Controller o Inspires the overal architetural organization • GoF (Gang of Four) o Proxy  Mediates cross-domain requests to guarantee proper filtering of the content received at client  It must not run JavaScript received from the widget server • PoEAA (Patterns of Enterprise Application Architecture) o Template View  Embeds proper UI component considerng filtered content 27
  • 30. Framework proposal: Discussion • Use of different technologies can add complexity • Inexistence of XSS Hole is a strong requirement • GoF Patterns… PoEAA… anything new? • The proposed framework addresses a gap identified in the literature • Developers can build solutions to improve security • Considering current technologies • Without requiring any action from users 30
  • 31. Conclusions • Applications are ahead of browsers technology • Disabling JavaScript is not a practical solution • Developers are applying workarounds to policies and restrictions in order to use certain Web 2.0 features • Browsers security model should deal with JavaScript filtering • Client-side programming is not less or more important than server-side programming, it is just another part of Web 2.0 applications 31
  • 32. Thank you! vsantana@ic.unicamp.br Acknowledgments FAPESP (#grant 2009/10186-9) Icons source: http://openiconlibrary.sourceforge.net/

Notas do Editor

  1. Open Web Application Security Project
  2. Open Web Application Security Project
  3. Open Web Application Security Project
  4. Open Web Application Security Project
  5. Open Web Application Security Project