SlideShare a Scribd company logo
1 of 57
Everybody loves html5,
h4ck3rs too
~#Whoami
2
Nahidul Kibria
Co-Leader, OWASP Bangladesh,
Senior Software Engineer, KAZ Software Ltd.
Security Enthusiastic
Which part you care
Everybody loves html5…Well
h4ck3rs too… What!!!
3
4
What is HTML5
 Next major version of HTML.
 The Hypertext Markup Language version 5
(HTML5) is the successor of HTML 4.01,
XHTML 1.0 and XHTML 1.1
 Adds new tags, event handlers to HTML.
Many more….
 HTML5 is not finished
5
HTML5 is already here.
HTML5 TEST - http://html5test.com/
6
Many features
supported by
latest versions of
FireFox, Chrome,
Safari and Opera
.
Standard web model
HTML5 OVERVIEW
Web
sockets
COR
Iframe
Sandboxing
Web Messaging
WEB BROWSER
SECURITY MODELS
The same origin policy
The cookies security mode
The Flash security model/SandBox
Same Origin Policy
The same origin policy prevents document or script
loaded from one origin, from getting or setting
properties from a of a document from a different
origin.
An origin is defined as the combination of
• host name,
• protocol,
• and port number;
The Browser “Same Origin” Policy
11
bank.com
blog.net
XHR
XHR
document,
cookies
TAG
TAG
JS
What Happens if the Same
Origin Policy Is Broken?
Some major HTML5 feature
• CORS-Cross-Origin Resource Sharing
• WebSockets
• WebWorkers
• Javascript APIs
13
Today I want to show you
how far an attacker go
with simple JavaScript and html5
So you can convince your boss
to give effort on security measure
My intention is not make you panic
Disclaimer
15
Cross Origin Request (COR)
• Originally Ajax calls were subject to Same Origin
Policy
• Site A cannot make XMLHttpRequests to Site B
• HTML5 makes it possible to make these cross do
main
• Calls site A can now make XMLHttpRequests
to Site B as long as Site B allows it.
Response from Site B should include a header:
Access ‐Control ‐Allow‐Origin: Site A
16
Cross-Origin Resource Sharing
<allow-access-from domain="*">
The OWASP Foundation
http://www.owasp.org
CORS-Cross-Origin Resource Sharing
Why programmer happy?
Lets see from attacker view
XSS-Cross Site Scripting
18
Demo
19
xss attack vector
20
Impact of xss
History Stealing
Intranet Hacking
XSS Defacements
DNS pinning
IMAP3
MHTML
Hacking JSON
Cookie stealing
Clipboard stealing
Cookie stealing
Pr3venting
XSS Defacements
If you still cannot manage your boss
More Evil use
I do not care
Show me how my
org is effected
Attacking intranet
25
Obtaining NAT’ed IP
Addresses
Java
applet
Java
applet
Java
applet
If the victim’s Web browser is a Mozilla/Firefox, it’s
possible to skip the applet
27
<script>
function natIP() {
var w = window.location;
var host = w.host;
var port = w.port || 80;
var Socket = (new
java.net.Socket(host, port)).getLocalAddress().getHostAddress();
return Socket;
}
</script>
Demo
Not only NAT’ed IP ,You can lots more
system info
28
Port Scanning
29
O’ Really
Port Scanning
window.onerror = err;
<script src=http://ip/></script>
if (! msg.match(/Error loading script/))
//ip does not exit’s
Else
Find internal ip
Blind Web Server Fingerprinting
Apache Web Server /icons/apache_pb.gif
HP Printer /hp/device/hp_invent_logo.gif
<img src="http://intranet_ip/unique_image_url"
onerror="fingerprint()" />
HTML5 Made it easy
32
www.andlabs.org/tools/jsrecon.html
Demo
What just happed
33
Port Scanning: Beating protections
Blocking example for known ports
(Firefox, WebSockets and CORS)
➔ http://example.com:22
Workaround!
➔ ftp://example.com:22
It works on Internet Explorer, Mozilla Firefox,
Google Chrome and Safari
Based on timeouts, it can be configured
34
WTFun
35
Port Scanning: result
Self‐triggering XSS exploits with
HTML5
A common XSS occurrence is injection inside some
attribute of INPUT tags. Current techniques require
user interaction to trigger this XSS
<input type="text" value="‐>Injecting here"
onmouseover="alert('Injected val')">
• HTML5 turns this in to self ‐triggering XSS
<input type="text” value="‐‐>Injecting here"
onfocus="alert('Injected value')"
autofocus>
36
Black‐list XSS filters
Html5 introduce many new tag
37
How your browser
become a proxy of an
attacker?
38
http://erlend.oftedal.no/blog/?blogid=107
The OWASP Foundation
http://www.owasp.org
CSRF(Cross-Site Request
Forgery)
The Sleeping Giant
Victim logon to bank.com
The OWASP Foundation
http://www.owasp.org
Converting POST to
GET
The OWASP Foundation
http://www.owasp.org
Credentials Included
bank.com
blog.net
https://bank.com/fn?param=1
JSESSIONID=AC934234…
The OWASP Foundation
http://www.owasp.org
Cross-Site
Request Forgery
bank.com
attacker’s post at blog.net
Go to Transfer Assets
https://bank.com/fn?param=1Select FROM Fund
https://bank.com/fn?param=1Select TO Fund
https://bank.com/fn?param=1Select Dollar Amount
https://bank.com/fn?param=1Submit Transaction
https://bank.com/fn?param=1Confirm Transaction
https://bank.com/fn?param=1
The OWASP Foundation
http://www.owasp.org
Demo
XSS & CSRF- Killer Combo
Programmers Prepare, Users Beware
<form method="POST" name="form0"
action="http://my.victim.mutillidae:81/mutillidae/index.php?page=add-to-your-blog.php">
<input type="hidden" name="csrf-token" value="SecurityIsDisabled"/>
<input type="hidden" name="blog_entry" value="This is come from CSRF"/>
<input type="hidden" name="add-to-your-blog-php-submit-button" value="Save Blog Entry"/>
</form>
The OWASP Foundation
http://www.owasp.org
How Does CSRF Work?
Tags
<img src=“https://bank.com/fn?param=1”>
<iframe src=“https://bank.com/fn?param=1”>
<script src=“https://bank.com/fn?param=1”>
Autoposting Forms
<body onload="document.forms[0].submit()">
<form method="POST" action=“https://bank.com/fn”>
<input type="hidden" name="sp" value="8109"/>
</form>
XmlHttpRequest
Subject to same origin policy
What Can Attackers Do with CSRF?
46
Anything an authenticated user can do
• Click links
• Fill out and submit forms
• Follow all the steps of a wizard interface
Using CSRF to Attack Internal Pages
47
attacker.com
internal.mybank.com
Allow
ed!
CSRF
Intern
al Site
TAG
internal browser
Web Workers
 Web Workers provide the possibility for JavaScript to run in the background.
 Web Workers alone are not a security issue.
 But they can be used indirectly for launching work intensive attacks without the user
noticing it.
48
http://www.andlabs.org/tools/ravan.html
Web Storage
49
Web Storage Vuln. & Threats
Session Hijacking
• If session identifier is stored in local storage, it can be stolen with JavaScript.
• No HTTPOnly flag.
Disclosure of Confidential Data
• If sensitive data is stored in the local storage, it can be stolen with JavaScript.
User Tracking
• Additional possibility to identify a user.
Persistent attack vectors
• Attacker can be store persistently on the user browser
50
Offline Web Application
51
Cache Poisoning
• Caching of the root directory
possible.
• HTTP and HTTPs caching possible.
52
Ok Enough, Just tell
me can attacker Get a
remote (Control)shell
of my PC??
Infection method known as Drive by
download
53
In summary
54
Web Worker Cracking Hashes in JS Cloud=
Web
Worker
Cross-origin
resource
sharing
+ = Powerful DDoS attacks
Web
Worker +
Cross-origin
resource
sharing
+
Web
socket = Web-based Botnet.
Is HTML5 hopelessly
(in)secure?
Ahem no…but security has been a major
consideration in the design of the
specification But it is incredibly hard to
add features in any technology without
increasing the possibility of abused.
55
Reference
 Compass Security AG
 http://userguidepdf.info/html5-web-
security-v1.html
 http://html5sec.org
 https://www.owasp.org/index.php/HTML5_Sec
urity_Cheat_Sheet
 http://dev.w3.org/html5/spec/Overview.html
56
57
Twitter:@nahidupa
Be secure & safe
HTML5 make everybody happy including h4ck3rs and make security professional busy.

More Related Content

What's hot

Make CSRF Again
Make CSRF AgainMake CSRF Again
Make CSRF AgainNetsparker
 
Client-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesClient-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesOry Segal
 
Cracking into embedded devices and beyond
Cracking into embedded devices and beyondCracking into embedded devices and beyond
Cracking into embedded devices and beyondamiable_indian
 
Hacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass FirewallsHacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass FirewallsNetsparker
 
Same Origin Policy Weaknesses
Same Origin Policy WeaknessesSame Origin Policy Weaknesses
Same Origin Policy Weaknesseskuza55
 
Securing AEM webapps by hacking them
Securing AEM webapps by hacking themSecuring AEM webapps by hacking them
Securing AEM webapps by hacking themMikhail Egorov
 
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...CODE BLUE
 
Attack Chaining: Advanced Maneuvers for Hack Fu
Attack Chaining: Advanced Maneuvers for Hack FuAttack Chaining: Advanced Maneuvers for Hack Fu
Attack Chaining: Advanced Maneuvers for Hack FuRob Ragan
 
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.Mikhail Egorov
 
The Hidden XSS - Attacking the Desktop & Mobile Platforms
The Hidden XSS - Attacking the Desktop & Mobile PlatformsThe Hidden XSS - Attacking the Desktop & Mobile Platforms
The Hidden XSS - Attacking the Desktop & Mobile Platformskosborn
 
Same-origin Policy (SOP)
Same-origin Policy (SOP)Same-origin Policy (SOP)
Same-origin Policy (SOP)Netsparker
 
A Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications securityA Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications securityMikhail Egorov
 
Buried by time, dust and BeEF
Buried by time, dust and BeEFBuried by time, dust and BeEF
Buried by time, dust and BeEFMichele Orru
 
Secure Programming In Php
Secure Programming In PhpSecure Programming In Php
Secure Programming In PhpAkash Mahajan
 
Javascript Security
Javascript SecurityJavascript Security
Javascript Securityjgrahamc
 
Html5: Something wicked this way comes (Hack in Paris)
Html5: Something wicked this way comes (Hack in Paris)Html5: Something wicked this way comes (Hack in Paris)
Html5: Something wicked this way comes (Hack in Paris)Krzysztof Kotowicz
 
JavaScript Security
JavaScript SecurityJavaScript Security
JavaScript SecurityJason Harwig
 
OWASP Pune Chapter : Dive Into The Profound Web Attacks
OWASP Pune Chapter : Dive Into The Profound Web AttacksOWASP Pune Chapter : Dive Into The Profound Web Attacks
OWASP Pune Chapter : Dive Into The Profound Web AttacksNarendra Bhati
 
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programsAEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programsMikhail Egorov
 

What's hot (20)

Make CSRF Again
Make CSRF AgainMake CSRF Again
Make CSRF Again
 
Client-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesClient-side JavaScript Vulnerabilities
Client-side JavaScript Vulnerabilities
 
Cracking into embedded devices and beyond
Cracking into embedded devices and beyondCracking into embedded devices and beyond
Cracking into embedded devices and beyond
 
Hacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass FirewallsHacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass Firewalls
 
Flashack
FlashackFlashack
Flashack
 
Same Origin Policy Weaknesses
Same Origin Policy WeaknessesSame Origin Policy Weaknesses
Same Origin Policy Weaknesses
 
Securing AEM webapps by hacking them
Securing AEM webapps by hacking themSecuring AEM webapps by hacking them
Securing AEM webapps by hacking them
 
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
 
Attack Chaining: Advanced Maneuvers for Hack Fu
Attack Chaining: Advanced Maneuvers for Hack FuAttack Chaining: Advanced Maneuvers for Hack Fu
Attack Chaining: Advanced Maneuvers for Hack Fu
 
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
 
The Hidden XSS - Attacking the Desktop & Mobile Platforms
The Hidden XSS - Attacking the Desktop & Mobile PlatformsThe Hidden XSS - Attacking the Desktop & Mobile Platforms
The Hidden XSS - Attacking the Desktop & Mobile Platforms
 
Same-origin Policy (SOP)
Same-origin Policy (SOP)Same-origin Policy (SOP)
Same-origin Policy (SOP)
 
A Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications securityA Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications security
 
Buried by time, dust and BeEF
Buried by time, dust and BeEFBuried by time, dust and BeEF
Buried by time, dust and BeEF
 
Secure Programming In Php
Secure Programming In PhpSecure Programming In Php
Secure Programming In Php
 
Javascript Security
Javascript SecurityJavascript Security
Javascript Security
 
Html5: Something wicked this way comes (Hack in Paris)
Html5: Something wicked this way comes (Hack in Paris)Html5: Something wicked this way comes (Hack in Paris)
Html5: Something wicked this way comes (Hack in Paris)
 
JavaScript Security
JavaScript SecurityJavaScript Security
JavaScript Security
 
OWASP Pune Chapter : Dive Into The Profound Web Attacks
OWASP Pune Chapter : Dive Into The Profound Web AttacksOWASP Pune Chapter : Dive Into The Profound Web Attacks
OWASP Pune Chapter : Dive Into The Profound Web Attacks
 
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programsAEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
 

Viewers also liked

Banking malware zeu s zombies are using in online banking theft.
Banking malware zeu s zombies are using in online banking theft.Banking malware zeu s zombies are using in online banking theft.
Banking malware zeu s zombies are using in online banking theft.Nahidul Kibria
 
Sending a for ahuh. win32 exploit development old school
Sending a for ahuh. win32 exploit development old schoolSending a for ahuh. win32 exploit development old school
Sending a for ahuh. win32 exploit development old schoolNahidul Kibria
 
Scaling application with RabbitMQ
Scaling application with RabbitMQScaling application with RabbitMQ
Scaling application with RabbitMQNahidul Kibria
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) securityNahidul Kibria
 
Web Application Penetration Testing Introduction
Web Application Penetration Testing IntroductionWeb Application Penetration Testing Introduction
Web Application Penetration Testing Introductiongbud7
 

Viewers also liked (6)

Banking malware zeu s zombies are using in online banking theft.
Banking malware zeu s zombies are using in online banking theft.Banking malware zeu s zombies are using in online banking theft.
Banking malware zeu s zombies are using in online banking theft.
 
G3t R00t at IUT
G3t R00t at IUTG3t R00t at IUT
G3t R00t at IUT
 
Sending a for ahuh. win32 exploit development old school
Sending a for ahuh. win32 exploit development old schoolSending a for ahuh. win32 exploit development old school
Sending a for ahuh. win32 exploit development old school
 
Scaling application with RabbitMQ
Scaling application with RabbitMQScaling application with RabbitMQ
Scaling application with RabbitMQ
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) security
 
Web Application Penetration Testing Introduction
Web Application Penetration Testing IntroductionWeb Application Penetration Testing Introduction
Web Application Penetration Testing Introduction
 

Similar to Everybody loves html5,h4ck3rs too

Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptWarning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptCyber Security Alliance
 
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
 
W3 conf hill-html5-security-realities
W3 conf hill-html5-security-realitiesW3 conf hill-html5-security-realities
W3 conf hill-html5-security-realitiesBrad Hill
 
Rich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeRich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeJeremiah Grossman
 
Java Web Security Class
Java Web Security ClassJava Web Security Class
Java Web Security ClassRich Helton
 
Evolution Of Web Security
Evolution Of Web SecurityEvolution Of Web Security
Evolution Of Web SecurityChris Shiflett
 
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdfEN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdfGiorgiRcheulishvili
 
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011Samvel Gevorgyan
 
Krzysztof Kotowicz - Hacking HTML5
Krzysztof Kotowicz - Hacking HTML5Krzysztof Kotowicz - Hacking HTML5
Krzysztof Kotowicz - Hacking HTML5DefconRussia
 
Waf.js: How to Protect Web Applications using JavaScript
Waf.js: How to Protect Web Applications using JavaScriptWaf.js: How to Protect Web Applications using JavaScript
Waf.js: How to Protect Web Applications using JavaScriptDenis Kolegov
 
RoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails exampleRoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails exampleRailwaymen
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Anna Klepacka
 
Hacking HTML5 offensive course (Zeronights edition)
Hacking HTML5 offensive course (Zeronights edition)Hacking HTML5 offensive course (Zeronights edition)
Hacking HTML5 offensive course (Zeronights edition)Krzysztof Kotowicz
 
Html5 security
Html5 securityHtml5 security
Html5 securityKrishna T
 
04. xss and encoding
04.  xss and encoding04.  xss and encoding
04. xss and encodingEoin Keary
 
Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008Jeremiah Grossman
 

Similar to Everybody loves html5,h4ck3rs too (20)

Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptWarning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
 
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...
 
W3 conf hill-html5-security-realities
W3 conf hill-html5-security-realitiesW3 conf hill-html5-security-realities
W3 conf hill-html5-security-realities
 
Rich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeRich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safe
 
Java Web Security Class
Java Web Security ClassJava Web Security Class
Java Web Security Class
 
Evolution Of Web Security
Evolution Of Web SecurityEvolution Of Web Security
Evolution Of Web Security
 
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdfEN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
 
Building Client-Side Attacks with HTML5 Features
Building Client-Side Attacks with HTML5 FeaturesBuilding Client-Side Attacks with HTML5 Features
Building Client-Side Attacks with HTML5 Features
 
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
 
Krzysztof Kotowicz - Hacking HTML5
Krzysztof Kotowicz - Hacking HTML5Krzysztof Kotowicz - Hacking HTML5
Krzysztof Kotowicz - Hacking HTML5
 
Waf.js: How to Protect Web Applications using JavaScript
Waf.js: How to Protect Web Applications using JavaScriptWaf.js: How to Protect Web Applications using JavaScript
Waf.js: How to Protect Web Applications using JavaScript
 
RoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails exampleRoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails example
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
 
Html5 hacking
Html5 hackingHtml5 hacking
Html5 hacking
 
Hacking HTML5 offensive course (Zeronights edition)
Hacking HTML5 offensive course (Zeronights edition)Hacking HTML5 offensive course (Zeronights edition)
Hacking HTML5 offensive course (Zeronights edition)
 
Html5 security
Html5 securityHtml5 security
Html5 security
 
Attacking HTML5
Attacking HTML5Attacking HTML5
Attacking HTML5
 
Starwest 2008
Starwest 2008Starwest 2008
Starwest 2008
 
04. xss and encoding
04.  xss and encoding04.  xss and encoding
04. xss and encoding
 
Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008
 

Recently uploaded

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 

Recently uploaded (20)

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 

Everybody loves html5,h4ck3rs too

  • 2. ~#Whoami 2 Nahidul Kibria Co-Leader, OWASP Bangladesh, Senior Software Engineer, KAZ Software Ltd. Security Enthusiastic
  • 3. Which part you care Everybody loves html5…Well h4ck3rs too… What!!! 3
  • 4. 4
  • 5. What is HTML5  Next major version of HTML.  The Hypertext Markup Language version 5 (HTML5) is the successor of HTML 4.01, XHTML 1.0 and XHTML 1.1  Adds new tags, event handlers to HTML. Many more….  HTML5 is not finished 5
  • 6. HTML5 is already here. HTML5 TEST - http://html5test.com/ 6 Many features supported by latest versions of FireFox, Chrome, Safari and Opera .
  • 9. WEB BROWSER SECURITY MODELS The same origin policy The cookies security mode The Flash security model/SandBox
  • 10. Same Origin Policy The same origin policy prevents document or script loaded from one origin, from getting or setting properties from a of a document from a different origin. An origin is defined as the combination of • host name, • protocol, • and port number;
  • 11. The Browser “Same Origin” Policy 11 bank.com blog.net XHR XHR document, cookies TAG TAG JS
  • 12. What Happens if the Same Origin Policy Is Broken?
  • 13. Some major HTML5 feature • CORS-Cross-Origin Resource Sharing • WebSockets • WebWorkers • Javascript APIs 13
  • 14. Today I want to show you how far an attacker go with simple JavaScript and html5 So you can convince your boss to give effort on security measure My intention is not make you panic Disclaimer
  • 15. 15 Cross Origin Request (COR) • Originally Ajax calls were subject to Same Origin Policy • Site A cannot make XMLHttpRequests to Site B • HTML5 makes it possible to make these cross do main • Calls site A can now make XMLHttpRequests to Site B as long as Site B allows it. Response from Site B should include a header: Access ‐Control ‐Allow‐Origin: Site A
  • 17. The OWASP Foundation http://www.owasp.org CORS-Cross-Origin Resource Sharing Why programmer happy? Lets see from attacker view
  • 21. Impact of xss History Stealing Intranet Hacking XSS Defacements DNS pinning IMAP3 MHTML Hacking JSON Cookie stealing Clipboard stealing
  • 24. If you still cannot manage your boss More Evil use I do not care Show me how my org is effected
  • 27. If the victim’s Web browser is a Mozilla/Firefox, it’s possible to skip the applet 27 <script> function natIP() { var w = window.location; var host = w.host; var port = w.port || 80; var Socket = (new java.net.Socket(host, port)).getLocalAddress().getHostAddress(); return Socket; } </script>
  • 28. Demo Not only NAT’ed IP ,You can lots more system info 28
  • 30. Port Scanning window.onerror = err; <script src=http://ip/></script> if (! msg.match(/Error loading script/)) //ip does not exit’s Else Find internal ip
  • 31. Blind Web Server Fingerprinting Apache Web Server /icons/apache_pb.gif HP Printer /hp/device/hp_invent_logo.gif <img src="http://intranet_ip/unique_image_url" onerror="fingerprint()" />
  • 32. HTML5 Made it easy 32 www.andlabs.org/tools/jsrecon.html Demo
  • 34. Port Scanning: Beating protections Blocking example for known ports (Firefox, WebSockets and CORS) ➔ http://example.com:22 Workaround! ➔ ftp://example.com:22 It works on Internet Explorer, Mozilla Firefox, Google Chrome and Safari Based on timeouts, it can be configured 34 WTFun
  • 36. Self‐triggering XSS exploits with HTML5 A common XSS occurrence is injection inside some attribute of INPUT tags. Current techniques require user interaction to trigger this XSS <input type="text" value="‐>Injecting here" onmouseover="alert('Injected val')"> • HTML5 turns this in to self ‐triggering XSS <input type="text” value="‐‐>Injecting here" onfocus="alert('Injected value')" autofocus> 36
  • 37. Black‐list XSS filters Html5 introduce many new tag 37
  • 38. How your browser become a proxy of an attacker? 38 http://erlend.oftedal.no/blog/?blogid=107
  • 39. The OWASP Foundation http://www.owasp.org CSRF(Cross-Site Request Forgery) The Sleeping Giant
  • 40. Victim logon to bank.com
  • 42. The OWASP Foundation http://www.owasp.org Credentials Included bank.com blog.net https://bank.com/fn?param=1 JSESSIONID=AC934234…
  • 43. The OWASP Foundation http://www.owasp.org Cross-Site Request Forgery bank.com attacker’s post at blog.net Go to Transfer Assets https://bank.com/fn?param=1Select FROM Fund https://bank.com/fn?param=1Select TO Fund https://bank.com/fn?param=1Select Dollar Amount https://bank.com/fn?param=1Submit Transaction https://bank.com/fn?param=1Confirm Transaction https://bank.com/fn?param=1
  • 44. The OWASP Foundation http://www.owasp.org Demo XSS & CSRF- Killer Combo Programmers Prepare, Users Beware <form method="POST" name="form0" action="http://my.victim.mutillidae:81/mutillidae/index.php?page=add-to-your-blog.php"> <input type="hidden" name="csrf-token" value="SecurityIsDisabled"/> <input type="hidden" name="blog_entry" value="This is come from CSRF"/> <input type="hidden" name="add-to-your-blog-php-submit-button" value="Save Blog Entry"/> </form>
  • 45. The OWASP Foundation http://www.owasp.org How Does CSRF Work? Tags <img src=“https://bank.com/fn?param=1”> <iframe src=“https://bank.com/fn?param=1”> <script src=“https://bank.com/fn?param=1”> Autoposting Forms <body onload="document.forms[0].submit()"> <form method="POST" action=“https://bank.com/fn”> <input type="hidden" name="sp" value="8109"/> </form> XmlHttpRequest Subject to same origin policy
  • 46. What Can Attackers Do with CSRF? 46 Anything an authenticated user can do • Click links • Fill out and submit forms • Follow all the steps of a wizard interface
  • 47. Using CSRF to Attack Internal Pages 47 attacker.com internal.mybank.com Allow ed! CSRF Intern al Site TAG internal browser
  • 48. Web Workers  Web Workers provide the possibility for JavaScript to run in the background.  Web Workers alone are not a security issue.  But they can be used indirectly for launching work intensive attacks without the user noticing it. 48 http://www.andlabs.org/tools/ravan.html
  • 50. Web Storage Vuln. & Threats Session Hijacking • If session identifier is stored in local storage, it can be stolen with JavaScript. • No HTTPOnly flag. Disclosure of Confidential Data • If sensitive data is stored in the local storage, it can be stolen with JavaScript. User Tracking • Additional possibility to identify a user. Persistent attack vectors • Attacker can be store persistently on the user browser 50
  • 51. Offline Web Application 51 Cache Poisoning • Caching of the root directory possible. • HTTP and HTTPs caching possible.
  • 52. 52 Ok Enough, Just tell me can attacker Get a remote (Control)shell of my PC??
  • 53. Infection method known as Drive by download 53
  • 54. In summary 54 Web Worker Cracking Hashes in JS Cloud= Web Worker Cross-origin resource sharing + = Powerful DDoS attacks Web Worker + Cross-origin resource sharing + Web socket = Web-based Botnet.
  • 55. Is HTML5 hopelessly (in)secure? Ahem no…but security has been a major consideration in the design of the specification But it is incredibly hard to add features in any technology without increasing the possibility of abused. 55
  • 56. Reference  Compass Security AG  http://userguidepdf.info/html5-web- security-v1.html  http://html5sec.org  https://www.owasp.org/index.php/HTML5_Sec urity_Cheat_Sheet  http://dev.w3.org/html5/spec/Overview.html 56
  • 57. 57 Twitter:@nahidupa Be secure & safe HTML5 make everybody happy including h4ck3rs and make security professional busy.

Editor's Notes

  1. Because we are here the security guy we care second part
  2. B4 go to the HTML5
  3. See Also: http://taossa.com/index.php/2007/02/08/same-origin-policy/
  4. My intention is not make you panic
  5. if the victim’s Web browser is a Mozilla/Firefox, it’s possible to skip the applet requirement and invoke a Java socket directly from JavaScript space. The net-net effect between these two techniques is more or less the same.
  6. If xss is there all csrf protection can be bypass