SlideShare a Scribd company logo
<iframe>   UI Redressing   </iframe>




                     <script>
                     function PresentedBy()
                     {
                     document.write(“Jovin Lobo”)
                     }
                     </script>
self.Intro()


 Works for Payatu Technologies (www.payatu.com) as an
  AppSec Consultant.
 Author of 'game|over' – A Linux distro built for learning web app
security.
 Member of null – The Open Security Community www.null.co.in
 Moderating the #null #Pune Chapter ;)
 Very #Annoying too … so u might wanna shoot me in the head

<NOT_Certified>
C|EH , AFCEH .. or any other certification
</NOT_Certified>
Agenda

 Introduction to UI Redressing/Clickjacking.
 Elements of basic clickjacking.
 Advanced Clickjacking techniques.
 Some cool demos :)
 Prevention techniques that Suck !!
 Prevention techniques that dont ….


 Running away as fast as I can before somebody shoots me in the
head.
Already Bored ???
So what is UI Redressing/Clickjacking ??




“ … is a malicious technique of tricking a Web user into
clicking on something different from what the user
perceives they are clicking on, thus potentially revealing
confidential information or taking control of their computer
while clicking on seemingly innocuous web pages ”
UI Redress attack a.k.a Clickjacking


The term "clickjacking" was coined by Jeremiah
Grossman and Robert 'RSnake' Hansen in 2008.


It is seen as a type of 'Confused Deputy' attack
against the browser ….....
Now you are confused ….......
                     arent you ??


Lets watch a video …....
Aaiilaa ... its NOT what it looks
                           like !!!




   Pic taken from : http://detower.com/id12.html
In a nut-shell




Pic from :http://www.protecht.ca/blog/clickjacking-niagara
So what do we need to redress the UI


Iframes : Used to embed one website inside another.
Syntax : <iframe src=”null.co.in” ></iframe>

Opacity : Used to change the transparency of html
elements.

 Stacking Order : Using the 'z-index' property we can
stack the HTML elements on top of one another.
Basic Clickjacking




[ Demo ]: Basic Clickjacking.
So what about text fields ?

Q: Is it possible to make a user enter text ??

A: YES !!!

Q: But how ??




                          Muhahahahahahaha...!!!
Advanced Clickjacking Techniques




    [ Demo ]: Advanced Clickjacking attack.

[Demo]: Content Extraction using Drag and drop
So we can hijack clicks as well as text …..

       Thats practically everything a user does ….


  So how do we prevent UI Redress Attacks ??
Prevention techniques that don't always
                                  work




          *Yes I am still talking about Clickjacking
Frame Busters




“Frame buster / Framekiller is a piece of JavaScript code
that prevents a Web page from being displayed within a
frame.”
Basic Frame Busting code.


<script >
  if
   {
       ( top . l o c a t i o n != l o c a t i o n )
       top . l o c a t i o n = s e l f . l o c a t i o n ;
     }
</script>
Basic frame busters




[Demo:] Basic Frame Busters
Some common frame busters ..




                            Credits :
              Busting Frame Busting:
              a Study of Clickjacking Vulnerabilities
              on Popular Sites.
               By -Gustav Rydstedt, Elie Bursztein,
                         Dan Boneh Collin Jackson
Q: So are we safe from a UI Redress Attack ?
A: NO !!!


And here comes “Double Framing Attack”.
Busting Frame Busters




[Demo] : Double Framing Attack
[eg 1/1] Frame Busters gone wrong




Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites.
By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
[eg 1/2] Frame Busters gone wrong




Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites.
By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
[eg 2/1] Frame Busters gone wrong




Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites.
By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
[eg 2/2] Frame Busters gone wrong




Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites.
By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
[eg 3/1] Frame Busters gone wrong




Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites.
By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
[eg 3/2] Frame Busters gone wrong




Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites.
By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
So do Javascripts solve this issue ?



                 What if I hire
    this guy to write a frame
    buster for me



   Am I safe ??
The best FrameBuster so far..

<script>

if (self == top)
{
 document.documentElement.style.visibility='visible';
}
else
{
 top.location = self.location;
}
</script>


Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites.
By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
Other ways of busting frame busters.


 ●   IE7 var location = “clobbered”
                 <script> var location = "clobbered";
                                             </script>
              <iframe src="http://www.victim.com">
                                             </iframe>
 ●   [Demo] Google Chrome “sandbox”
 ●   [Demo] window.onbeforeunload()
Prevention techniques that work

●   Ask for a users password.
Prevention techniques that work

●   CAPTCHA
Prevention techniques that will
                     always work



                “ X-Frame-Options ”




*Just for the record we are still talking about Clickjacking
What are X-Frame-Options ?


“The X-Frame-Options HTTP response header
can be used to indicate whether or not a browser
should be allowed to render a page in a <frame>
or <iframe>.
Sites can use this to avoid clickjacking attacks, by
ensuring that their content is not embedded into
other sites.”
                                            –- MDN
Using X-Frame-Options
    There are three possible values for X-Frame-Options:

DENY
   The page cannot be displayed in a frame, regardless of the
site attempting to do so.

SAMEORIGIN
   The page can only be displayed in a frame on the same
origin as the page itself.

ALLOW-FROM uri
   The page can only be displayed in a frame on the specified
origin.
                                                    --MDN
[Demo] : Setting X-Frame-Options in PHP
Any Questions ??
THANKS !!!!!


        Remember …... Clickjacking is
                              LAME



LAMER
than
References



●[White Paper] Busting frame busting: a study of clickjacking vulnerabilities at
popular sites [BIBTEX] by Gustav Rydstedt, Elie Bursztein, Dan Boneh, and
Collin Jackson

● https://www.owasp.org/index.php/Clickjacking
● http://en.wikipedia.org/wiki/Clickjacking

● http://en.wikipedia.org/wiki/Framekiller

● http://andlabs.org/

● http://blog.skepticfx.com/2011/09/facebook-graph-api-access-token.html
UI Redressing

More Related Content

PDF
[jqconatx] Adaptive Images for Responsive Web Design
PDF
Resisting The Feature Creature
ZIP
Pylons - An Overview: Rapid MVC Web Development with WSGI
PDF
CSS Lessons Learned the Hard Way (Generate Conf)
PDF
Mobile Browser Internal (Blink Rendering Engine)
PPTX
Click jacking
PPTX
Clickjacking
PDF
New Insights into Clickjacking
[jqconatx] Adaptive Images for Responsive Web Design
Resisting The Feature Creature
Pylons - An Overview: Rapid MVC Web Development with WSGI
CSS Lessons Learned the Hard Way (Generate Conf)
Mobile Browser Internal (Blink Rendering Engine)
Click jacking
Clickjacking
New Insights into Clickjacking

Similar to UI Redressing (20)

PPTX
I haz your mouse clicks and key strokes
PPTX
Clickjacking DevCon2011
PDF
Marcus Niemietz - UI Redressing and Clickjacking About click fraud and data t...
PPTX
Make profit with UI-Redressing attacks.
PPTX
I Want These * Bugs Off My * Internet
PDF
Click jacking
PDF
Clickjacking Attack Explained Prevention, Examples, and Proven Fixes.pdf
PDF
Html5: something wicked this way comes - HackPra
PDF
Paper: A Solution for the Automated Detection of Clickjacking Attacks
PDF
Krzysztof kotowicz. something wicked this way comes
PPT
(In)Security Implication in the JS Universe
PPTX
.NET Security Topics
PDF
Things that go bump on the web - Web Application Security
PDF
Something wicked this way comes - CONFidence
PPT
Itc2009 Click Jacking
PDF
Html5: something wicked this way comes
PDF
Clickjacking Attack: Hijacking User’s Click
PPTX
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
PPTX
Lect 4.pptxdsdsdsdfgxgf xzffss sdsdsffff
PDF
XCS110_All_Slides.pdf
I haz your mouse clicks and key strokes
Clickjacking DevCon2011
Marcus Niemietz - UI Redressing and Clickjacking About click fraud and data t...
Make profit with UI-Redressing attacks.
I Want These * Bugs Off My * Internet
Click jacking
Clickjacking Attack Explained Prevention, Examples, and Proven Fixes.pdf
Html5: something wicked this way comes - HackPra
Paper: A Solution for the Automated Detection of Clickjacking Attacks
Krzysztof kotowicz. something wicked this way comes
(In)Security Implication in the JS Universe
.NET Security Topics
Things that go bump on the web - Web Application Security
Something wicked this way comes - CONFidence
Itc2009 Click Jacking
Html5: something wicked this way comes
Clickjacking Attack: Hijacking User’s Click
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Lect 4.pptxdsdsdsdfgxgf xzffss sdsdsffff
XCS110_All_Slides.pdf
Ad

More from n|u - The Open Security Community (20)

PDF
Hardware security testing 101 (Null - Delhi Chapter)
PPTX
SSRF exploit the trust relationship
PDF
PDF
Api security-testing
PDF
Introduction to TLS 1.3
PDF
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
PDF
Talking About SSRF,CRLF
PPTX
Building active directory lab for red teaming
PPTX
Owning a company through their logs
PPTX
Introduction to shodan
PDF
Detecting persistence in windows
PPTX
Frida - Objection Tool Usage
PDF
OSQuery - Monitoring System Process
PDF
DevSecOps Jenkins Pipeline -Security
PDF
Extensible markup language attacks
PPTX
PDF
Hardware security testing 101 (Null - Delhi Chapter)
SSRF exploit the trust relationship
Api security-testing
Introduction to TLS 1.3
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Talking About SSRF,CRLF
Building active directory lab for red teaming
Owning a company through their logs
Introduction to shodan
Detecting persistence in windows
Frida - Objection Tool Usage
OSQuery - Monitoring System Process
DevSecOps Jenkins Pipeline -Security
Extensible markup language attacks
Ad

Recently uploaded (20)

PPTX
Lesson notes of climatology university.
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Computing-Curriculum for Schools in Ghana
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
Hazard Identification & Risk Assessment .pdf
PDF
RMMM.pdf make it easy to upload and study
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
Complications of Minimal Access Surgery at WLH
PDF
Weekly quiz Compilation Jan -July 25.pdf
Lesson notes of climatology university.
Orientation - ARALprogram of Deped to the Parents.pptx
A powerpoint presentation on the Revised K-10 Science Shaping Paper
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
Final Presentation General Medicine 03-08-2024.pptx
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Computing-Curriculum for Schools in Ghana
A systematic review of self-coping strategies used by university students to ...
Unit 4 Skeletal System.ppt.pptxopresentatiom
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Hazard Identification & Risk Assessment .pdf
RMMM.pdf make it easy to upload and study
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Practical Manual AGRO-233 Principles and Practices of Natural Farming
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Complications of Minimal Access Surgery at WLH
Weekly quiz Compilation Jan -July 25.pdf

UI Redressing

  • 1. <iframe> UI Redressing </iframe> <script> function PresentedBy() { document.write(“Jovin Lobo”) } </script>
  • 2. self.Intro() Works for Payatu Technologies (www.payatu.com) as an AppSec Consultant. Author of 'game|over' – A Linux distro built for learning web app security. Member of null – The Open Security Community www.null.co.in Moderating the #null #Pune Chapter ;) Very #Annoying too … so u might wanna shoot me in the head <NOT_Certified> C|EH , AFCEH .. or any other certification </NOT_Certified>
  • 3. Agenda Introduction to UI Redressing/Clickjacking. Elements of basic clickjacking. Advanced Clickjacking techniques. Some cool demos :) Prevention techniques that Suck !! Prevention techniques that dont …. Running away as fast as I can before somebody shoots me in the head.
  • 5. So what is UI Redressing/Clickjacking ?? “ … is a malicious technique of tricking a Web user into clicking on something different from what the user perceives they are clicking on, thus potentially revealing confidential information or taking control of their computer while clicking on seemingly innocuous web pages ”
  • 6. UI Redress attack a.k.a Clickjacking The term "clickjacking" was coined by Jeremiah Grossman and Robert 'RSnake' Hansen in 2008. It is seen as a type of 'Confused Deputy' attack against the browser ….....
  • 7. Now you are confused …....... arent you ?? Lets watch a video …....
  • 8. Aaiilaa ... its NOT what it looks like !!! Pic taken from : http://detower.com/id12.html
  • 9. In a nut-shell Pic from :http://www.protecht.ca/blog/clickjacking-niagara
  • 10. So what do we need to redress the UI Iframes : Used to embed one website inside another. Syntax : <iframe src=”null.co.in” ></iframe> Opacity : Used to change the transparency of html elements. Stacking Order : Using the 'z-index' property we can stack the HTML elements on top of one another.
  • 11. Basic Clickjacking [ Demo ]: Basic Clickjacking.
  • 12. So what about text fields ? Q: Is it possible to make a user enter text ?? A: YES !!! Q: But how ?? Muhahahahahahaha...!!!
  • 13. Advanced Clickjacking Techniques [ Demo ]: Advanced Clickjacking attack. [Demo]: Content Extraction using Drag and drop
  • 14. So we can hijack clicks as well as text ….. Thats practically everything a user does …. So how do we prevent UI Redress Attacks ??
  • 15. Prevention techniques that don't always work *Yes I am still talking about Clickjacking
  • 16. Frame Busters “Frame buster / Framekiller is a piece of JavaScript code that prevents a Web page from being displayed within a frame.”
  • 17. Basic Frame Busting code. <script > if { ( top . l o c a t i o n != l o c a t i o n ) top . l o c a t i o n = s e l f . l o c a t i o n ; } </script>
  • 18. Basic frame busters [Demo:] Basic Frame Busters
  • 19. Some common frame busters .. Credits : Busting Frame Busting: a Study of Clickjacking Vulnerabilities on Popular Sites. By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
  • 20. Q: So are we safe from a UI Redress Attack ? A: NO !!! And here comes “Double Framing Attack”.
  • 21. Busting Frame Busters [Demo] : Double Framing Attack
  • 22. [eg 1/1] Frame Busters gone wrong Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites. By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
  • 23. [eg 1/2] Frame Busters gone wrong Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites. By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
  • 24. [eg 2/1] Frame Busters gone wrong Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites. By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
  • 25. [eg 2/2] Frame Busters gone wrong Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites. By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
  • 26. [eg 3/1] Frame Busters gone wrong Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites. By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
  • 27. [eg 3/2] Frame Busters gone wrong Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites. By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
  • 28. So do Javascripts solve this issue ? What if I hire this guy to write a frame buster for me Am I safe ??
  • 29. The best FrameBuster so far.. <script> if (self == top) { document.documentElement.style.visibility='visible'; } else { top.location = self.location; } </script> Credits : Busting Frame Busting: A Study of Clickjacking Vulnerabilities on Popular Sites. By -Gustav Rydstedt, Elie Bursztein, Dan Boneh Collin Jackson
  • 30. Other ways of busting frame busters. ● IE7 var location = “clobbered” <script> var location = "clobbered"; </script> <iframe src="http://www.victim.com"> </iframe> ● [Demo] Google Chrome “sandbox” ● [Demo] window.onbeforeunload()
  • 31. Prevention techniques that work ● Ask for a users password.
  • 32. Prevention techniques that work ● CAPTCHA
  • 33. Prevention techniques that will always work “ X-Frame-Options ” *Just for the record we are still talking about Clickjacking
  • 34. What are X-Frame-Options ? “The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a <frame> or <iframe>. Sites can use this to avoid clickjacking attacks, by ensuring that their content is not embedded into other sites.” –- MDN
  • 35. Using X-Frame-Options There are three possible values for X-Frame-Options: DENY The page cannot be displayed in a frame, regardless of the site attempting to do so. SAMEORIGIN The page can only be displayed in a frame on the same origin as the page itself. ALLOW-FROM uri The page can only be displayed in a frame on the specified origin. --MDN
  • 36. [Demo] : Setting X-Frame-Options in PHP
  • 38. THANKS !!!!! Remember …... Clickjacking is LAME LAMER than
  • 39. References ●[White Paper] Busting frame busting: a study of clickjacking vulnerabilities at popular sites [BIBTEX] by Gustav Rydstedt, Elie Bursztein, Dan Boneh, and Collin Jackson ● https://www.owasp.org/index.php/Clickjacking ● http://en.wikipedia.org/wiki/Clickjacking ● http://en.wikipedia.org/wiki/Framekiller ● http://andlabs.org/ ● http://blog.skepticfx.com/2011/09/facebook-graph-api-access-token.html