start	end	text
0	1880	We'll go ahead and get started.
1880	8500	We'll have Zhengyu Liu and Jingyue Yu present on the Domino Effect.
9380	11520	Let's clap it up for them.
22230	23830	Hello, everyone.
29280	31240	Should we get started?
31680	33200	Okay.
33280	35000	So, hello, everyone.
35000	43160	Welcome to our talk, the Domino Effect automated detection and exploitation of cloud vulnerability at scale.
43160	51240	So, I'm Zhengyu Liu, and this is my collaborator, Jingyue Yu, and this is our joint work with Tao Li, Zifeng Kang, and my advisor, Yingzhi Cao.
51960	57860	And we're both PhD students from Johns Hopkins University, focused on web security and software security.
57860	67380	And we spend our most of time studying vulnerabilities, building security testing tools, and thinking about how to make the modern world a better place.
68600	73300	And today, we're excited to share our research on dump clobbering.
73300	82140	So, I will first start a very quick overview of what dump clobbering is, and then explain the challenges of detecting those vulnerabilities at scale.
82140	86100	And introduce our automated analysis framework, HAWQ.
86100	101700	And after that, Zhengyu will take over to present our large-scale zero-day hunting results and show how we turn those HTML injection into the end-to-end exploits with dump clobbering gadgets we find.
103260	105020	So, let's begin.
105940	112700	So, dump clobbering originates from an old but still standard browser feature defined in the HTML specification.
112740	118500	And it allows you to perform named lookups on window or document objects to access elements on a page.
118500	124360	Well, this feature provides a convenient way to reference dump elements by their ID or name.
124680	134780	It often opens the door to the dump clobbering attack in the scenario where those elements are attacker-controlled, and it's more than the developer's intention to use them at all.
135220	148220	By crafting a name collision between the dump element's ID or name attributes and a property accessed via the window or document, the attacker could pollute the JavaScript value and change the application logic.
149400	160920	So, and especially modern web applications often accept a wide range of user inputs, including like script-less raw HTML to support things like rich text formatting or like embed media.
161380	174000	For a more concrete example, to give an illustration for people not very familiar with this, is that at first the attacker needs to inject a link or element to the page.
174380	181020	And then the page contains JavaScript that probably reads from like window.remote to load additional scripts.
181020	186760	And if it's undefined, it fallbacks to use like a city and URL and load script from there.
187340	194740	However, with the attacker inject link whose ID equals to the remote, the lookup is no longer undefined.
194740	197900	And instead, it refers to the injected A-link.
198100	200420	And this is what we call a clobber.
201200	206400	And later, like when the dump element is concatenated with the string, type cohesion occurs.
206400	216240	And for those link elements, this converts them from a dump element to their ref value and producing a URL controlled by the attacker.
216760	223480	And finally, the URL flows to the script.source and loading malicious code from attacker's domain.
224940	235100	Since dump clobbering was first introduced by Grace Hess in 2013, a lot of work has been working towards understanding various clobbering techniques.
235100	246240	And as a core, the key question is, which HTML markups can clobber which JavaScript targets and probably enter which browser implementations?
246380	254600	Because the clobbering behaviors is defined in the HTML specification, but the browser implementation varies slightly.
255840	269340	And building on years of the findings and also the updates from the browser, the recent paper from Oakland 2003 called Clobbering Time is the first to systematically answer this question.
269340	280960	It uncovered over 30,000 clobbering-capable HTML markups across five distinct techniques, making a real significant forward in this field.
281880	288200	However, identifying those clobbering behaviors is just the initial payload landing step of the attack.
288420	293480	And for the full exploitation, we still need the gadgets and the exploits.
293540	305920	So the following question is, can we automatically detect those gadgets and generate working exploits so that we can really test them at scale and better understand its landscape in our modern web?
305920	308820	And this is where our work comes in.
309320	312180	So to do that, there are two main challenges.
312260	321240	The first one is that real-world JavaScript, especially after minified or bundled, is full of dynamic behaviors, like aliasing or directed property lookups.
321240	324980	And it's very unfriendly to our static analysis tools.
324980	334300	And those features make it extremely hard to track how data flows through an application, and in turn makes the gadgets a very hard problem.
334700	336860	The second challenge is exploit generation.
337280	342120	In DOM clobbering, the payload is no longer a string, which is usually the case.
342120	343620	But it's a DOM element.
343620	352480	And that element needs to be compatible with the JavaScript operations in the gadgets and carry the attacker-controlled values to the sensitive syncs.
352480	361400	And if the element itself is malformed or is not incompatible with the gadgets, it may break the code or just fail to propagate the payload.
362580	371620	Okay, now let's take a look at a motivating example and show how those challenges failed our existing approaches.
371880	379260	This is a zero-day cross-site scripting caused by DOM clobbering found by Hawk in my favorite Red Hat platform, HackMD.
379520	388920	The HTML injection was possible because the developer allowed the name attributes on the tag and exposing its application to the DOM clobbering.
389560	398840	To escalate the HTML injection to cross-site scripting, Hawk found vulnerable gadgets from the Google client API library used in the page.
398840	406820	And the Google client library is used by a website that tries to integrate the Google service, like Google Drive, Google Maps, or YouTube.
406820	420140	And once the library is loaded on the page, it will precise the developer-defined configurations in the page and callbacks in and by searching the corresponding script tag that contains the configuration URL.
420140	431740	And then we'll use a new function, which you can dynamically generate a function, like a generated JavaScript code, by parsing those configuration objects and execute its code.
432600	439160	But here's the problem, that the source it uses, document.script, is vulnerable to DOM clobbering.
439160	449580	So the attacker can inject a clobbered DOM element that is not a script, like an f-frame with a crafted name equals to the script, to hijack the configuration object.
449820	464760	And combining the HTML injection and the DOM clobbering gadgets in the page, the attacker could achieve cross-scripting by sharing a malicious HackMD node and probably perform any unsorted actions on behalf of the user.
465560	472740	And do you know, like, both the HTML injection and DOM clobbering gadgets have been fixed by the HackMD and the Google, respectively.
473840	476520	And let's talk about the private work.
476660	482080	Like, this thing is a static NS2 that tries to detect this by looking at the source code.
482080	488580	But it fails to detect it because of the dynamic behavior and condition logic embedded in the gadget code.
489220	497620	Secondly, exploiting the gadgets requires HTML that satisfy both the data flow and control flow constraints along the chain.
497620	504040	The data flow constraints ensure that payloads can flow from one attacker-controlled variables to another.
504040	511660	While the control flow constraints ensures that the program state, like, SQ the gadget's logic.
511660	515780	So we don't, like, SQ it earlier.
515920	521200	For example, involves a subscript operation of the value.
521200	526040	So this means our objects must behave like a collection , such as collections.
526420	533380	If it's just a single element, the access on it will throw a runtime error and the gadget will just fail to execute.
534400	543520	And the thing fails to generate a working exploit because it only considers the initial pattern, but ignores all the constraints in the gadget code.
543520	550240	And as a result, it produces payloads like image name equals to script that will never reach the sink.
550600	559620	Another popular client-side testing, too, failed to detect it because it relies on a canary-based testing.
559620	569640	While this approach works very well for stream-based exploits by checking whether partial attacker-controlled values reach the sink, it does not apply to dump clobbering.
570520	578080	Because dump clobbering requires a near-correct HTML element and considering all the constraints from the gadgets.
578080	582320	And it randomly generates HTML that will just never reach the sink.
582500	589260	Or even worse, it will just break the website's functionality and skip executing many real gadgets.
590220	590820	Okay.
591320	594600	Now let's see how we solve the problem with HAWQ.
595500	598300	HAWQ operates in three stages.
598300	610800	So our key insight here is that instead of directly injecting HTML marks from the start, we first perform the tint tracking on website-defined values from those potential clobberable source to the sink.
610800	619120	And this phase is non-intrusive and helps us identify a wide range of potential gadgets without needing to guess the payload.
619220	626700	And next, based on the tint trace, we extract the data flow and control flow constraint and use them to generate the corresponding exploit markups.
626760	638960	Finally, we insert those crafted markups to the page and replay the execution and check whether the payloads reach the sink, confirming whether the gadget is really exploitable or not.
642090	647710	Specifically, in the first stage, HAWQ performs dynamic tint analysis on website-defined values.
647710	649950	We categorize the source into two tabs.
649950	656970	First, the lookups on document can be directly shadowed by the attacker-injected values, like documented links, documented strings.
657010	662530	And in this case, we can directly tint the original values and observe how they propagate in the program.
662670	670630	And second, there are lookups on, like, window objects where the attacker clobber value is only used if the original value is undefined.
670630	677630	And this typically appears in, like, those fallback expressions, like tannery operators or, like, logic or checks.
677630	686930	And in such case, HAWQ will track those fallback values instead and identify opportunities where the attacker-controlled value might take effect.
687310	696850	And HAWQ will only inject its own value, like random value, when there is no website-defined value is present as a fallback.
697690	705130	The sink used in our tint tracking are typical, like, client-side sinks, like in VAL, SETs, Temout, and others.
705770	708910	The tinted value in the page are managed in two ways.
708910	718510	For objects with properties, we just insert another, like, specific field, a non-enumerable property, so that it doesn't interfere with the normal behavior.
718890	729110	For those primitive values, which are very hard to be tinted, we wrap them with a special object that holds both a concrete value and its tint metadata.
729110	732770	So, this allows us to track even undefined values.
733690	742070	Our tint engine supports propagation across JavaScript operations, JavaScript built-ins, and browser-native APIs, and so on.
742550	751750	And the tint propagation rules are implemented in a very extensible way, like adding support of new APIs is as simple as defining a single handler function.
752890	757590	And we implement the tint analysis using a code-rewriting approach based on geology.
757590	770970	Instead of instrumenting the browser itself, it gives us a very flexible feature and allows us to track all types of JavaScript values and supports cross-browser analysis without relying on the browser internals.
771630	778350	The output of the first stage would be the tint trace represents in a tint dependency graph.
778430	784630	And the backbone are the operations, and there are concrete values and also the attacker-controlled tinted values.
785350	801530	Next, the challenge would be, once we have this tint dependency graph, how do we generate the HTML markups that can leverage those operations observed in the graph and carry the attacker-controlled strain all the way to the sinks?
801670	815050	And in the second stage, in this stage, we will introduce the concept of a symbolic DOM, which allows us to formally define the constraints that DOM elements must satisfy at each step along the path.
815050	824150	And then we implement a simple DOM constraint solver that uses those representations to automatically generate the compatible and exploit-ready HTML markups.
825810	832430	So, the first step, to model... so, we need to understand what a successful exploit would look like.
832430	840270	So, to model a valid exploit, we treat the HTML payload as flowing through four key stages in the tint dependence graph.
840270	846290	The initial clobbering, where the attacker's DOM elements first inject to the JavaScript program.
846290	853870	The advanced clobbering, where some parts of the first injected DOM elements get loaded to the program.
854470	862090	And the third stage is DOM to strain, where the strain payload loads from the attacker-controlled DOM elements to the page.
862090	870110	And the final stage is strain to strain, where the strain is precise, or transformed and finally flows to the sink.
871030	881310	In the first stage, the DOM elements should contain ID or name attributes correspond to the name, the lookup keys, which is quite straightforward.
881850	886450	On the second stage, the attacker-controlled elements must be further loaded.
886450	894210	And this stage is only necessary when there are additional JavaScript operations before the strain payloads can be loaded.
894210	902730	And since we cannot skip any JavaScript operations in the graph, so we need to use this advanced clobbering techniques to fulfill them.
902730	917750	And the problem would become, if the base object is an attacker-controlled DOM element, how do we format in a way to make the results of the operation could also be attacker-controlled DOM elements and without raising any error?
917790	920110	And there are a few strategies that can be taken.
920110	927830	The first way is HTML injection, that you can inject multiple DOM elements with the same name attributes, and it will look like an array.
928170	940870	The second way is to use the well-known nested window proxy, parent, child, or input form those relationships to clobber lookups, like whose property is a general string.
940970	950130	And the third way targets a certain DOM-specific properties, like previous symboling, and by arranging the DOM elements to match the expected structure.
951690	967070	And later on, when the attacker... there are several rounds of advanced clobbering, and later on the attacker needs to load its string from the controlled DOM elements to the program, because the final payloads shown in the thing should be in a type of string.
967110	969530	And there are three main ways to achieve this.
969530	974830	The first is the well-known techniques through type cohesion during binary operation, like add.
975010	978390	And this applies to the a and area elements.
978390	983210	We are accessing those elements and triggers the use of its ref value as a string.
983650	994590	The catch here is the ref value must be a valid URL, and browser will often auto-fix it with the protocol, like HTTPS, or whatever is used in the current page.
994590	1003390	And to bypass this, attacker will need to inject a base tag before the clobbered element, controlling how those relative URLs are resolved.
1004190	1010490	Another two-stage operations can be leveraged are function calls and get-fued, which is less documented.
1010770	1019230	For the function calls, some JavaScript built-ins and browser APIs would automatically coerce its argument or property values to a string.
1019530	1028770	So in that case, if the attacker control value is passed to those and or accessed in this way, the browser would perform the cohesion just like those during the binary operations.
1029450	1033090	The third way is to exploit the attribute name collision.
1033090	1038950	Like if a property name matched to a legitimate reflected DOM attribute, it can be abused.
1038950	1053990	For example, if the application erased the value property from the element, then the attacker could inject an input tag with a payload saved in its value attribute, because it's a valid attribute name.
1054630	1061650	And our paper includes a comprehensive list of those attributes and APIs that can be used in this stage.
1062530	1068870	And finally, there would be a result of a string-related transformation and finally flows to the sink.
1069970	1074850	Okay, so we know what a legitimate DOM element should look like.
1074850	1082850	To describe those in a formal way so that we can solve them, we need this symbolic DOM syntax.
1083730	1090450	So it's basically a constraint syntax to describe a set of DOM elements with the same list of features.
1090590	1095070	And it comes with four primitives, int, boolean, string, node, and collection.
1095350	1100750	And each node represents a DOM element which can have a tag name and several attributes.
1100850	1104110	And a node can have siblings and children.
1104110	1109570	And a valid symbolic DOM that can be concrete to the HTML must have one root node.
1110330	1122090	And then with each operation type and also the stage we just mentioned, we could generate the constraints on the inputs or outputs elements using the operations.
1122090	1130230	For example, to achieve document to DOM through the document.p operation, the DOM elements can be described on the page.
1130690	1135990	Whereas the is root has tag name and has attribute constraints.
1136070	1141390	And when p equals to the script, so we can concrete to a very simple HTML element.
1141990	1150510	And with those model constraints, we can traverse all the operations nodes and attach those constraints to the attacker-controlled nodes.
1150510	1162570	And each attacker-controlled node in the graph should have two conjunctive sets of constraints as they serve as the return value of this operation and arguments of the subsequent operations.
1163430	1166550	And finally, we need to merge and solve those constraints.
1166630	1173710	And the key insight here is that the way it starts from small and then connects those and finally concrete to the HTML.
1173890	1174610	So what does it mean?
1174610	1183650	It means that first of all, we focus on the local constraints like a C1 and expand it into a disjunctive norm form or DNF form.
1183650	1191970	And in this form, each local constraint can represent a valid possible DOM trace that satisfies those constraints.
1192070	1198970	And next, we will merge the formulas across different DNFs if they point to the same tinted nodes.
1198970	1207270	And during this process, conflicts may rest and we just need to get rid of them and only save the valid combinations.
1207290	1218130	And you can think of the second stage as attaching different DOM trace at their shared nodes and discard any combination that doesn't fit together.
1218410	1225850	And in the last step, we will just concrete the formulas to the HTML marks as exploits.
1227650	1239250	And finally, in the last step, we would just inject our generated payload and replay the web page and see whether our canary value from the exploit could really flow to the sink.
1240030	1245690	And next, I'm going to hand over to my collaborator and she will show the results.
1247270	1248390	Hi.
1249770	1250610	All right.
1250610	1253150	So let's get to the real exciting part.
1253150	1268890	Now I'm going to show some real world examples we found with our toolhawk as well as some so those include some DOM clobbering gadgets in the wild in web applications and libraries and also end-to-end exploitations.
1269170	1279250	So first, we apply our toolhawk to tranquil top 5,000 websites and found 497 zero-day exploitable gadgets.
1279250	1300610	So there are our cases includes more than web bundlers like webpack, RS pack, white, polyfuse, and some core functional libraries like prism, page find, mess jacks, version 2 and version 3, and also some third-party services including plausible analytics,
1300610	1307010	Google client, API library, and also web application framers like Astro.
1307010	1308710	Our data set is public.
1308710	1312890	You can access the whole data set through this QR code if you are interested.
1314690	1318550	So the first case I want to show you is the webpack.
1318550	1328830	So according to an investigation, there are an average of 1.27 webpack bundles per site among the tranquil top 100K websites.
1328830	1337310	So this vulnerability we found by Hawk can lead to cross-site scripting on websites that uses webpack as the bundler.
1337470	1342650	So in case you are not familiar, so the pipeline of using webpack is like this.
1342650	1356090	First you have to feed the website source code to the webpack to generate the production code, which includes a compressed website code and also the webpack runtime code, which is a webpack library code.
1356090	1361670	And in that webpack runtime code is where we found the dump clobbering gadgets.
1361670	1371550	So with that dump clobbering gadget, if that website contains an HTML injection, this gadget can cause cross-site scripting.
1372730	1375810	So let's jump into the code gadget.
1376490	1390010	So webpack requires the developer to set the public house to be auto or you can either leave it to be empty in hope that the webpack will help you load some external scripts.
1390010	1394950	But actually it is doing more harm than you think it is doing good.
1395470	1404850	So if we pay attention to the code itself, in the first box we marked up, so the document or current script can actually be clobbered.
1404850	1411050	And then in the box 2, the script URL is loaded as the document.script.sauce.
1411050	1427270	So in this case, if we construct our payload like this with the source equals to HTTPS attacker.control.server, that script URL will be an attacker control URL.
1427270	1438990	And then later, finally, this script URL is used as the webpack required.p, which will be later load that script from that attacker control domain.
1438990	1443170	So that will cause arbitrary script loading from the attacker server.
1446260	1449600	So the second case I want to show is the Astro.
1449600	1457000	It is a widely adopted client server web framework to help you construct a web application from scratch.
1458280	1468400	So in this code, we can also find some clobbering gadget where the clobberable element is here, the document.scripts.
1468400	1470860	But this case is a little bit special.
1470860	1478260	So if we pay attention how the document.script is used, we can see it is accessed through array.from.
1478260	1486020	So the code is treating the document.scripts as an array, not just one single HTML element.
1486020	1494600	So in this case, we have to construct the payload as an HTML collection instead of just single one HTML element.
1496040	1505060	So and then if we jump into the for loop to see how do we reach the final sync, we can see two conditional checks before we reach the sync.
1505060	1513680	So the first condition check checks whether the script.dataset.astro.exec is equal to an empty string.
1513680	1523120	And the second condition checks check the type which is an attribution which is the type attribution of the HTML element we got before.
1523380	1531320	So to bypass those two condition checks with our payload, the first script.dataset is undefined.
1531320	1536780	So the first condition will return false which causes the code to continue execution.
1536800	1543780	And then when we reach the second condition, the type again in our payload, the type attribution does not exist.
1543780	1547740	So the second condition will also return false.
1547960	1558980	That will finally lead us to the final sync where the new script is loaded from new script is created as a new element with a script type.
1558980	1564220	And it's innerHTML is copied from the payloads in innerHTML.
1564220	1572620	So finally we can achieve arbitrary code execution if we construct our payload as this HTML collection.
1573360	1576700	So in our case, the innerHTML will be alert 1.
1577560	1580200	That caused the process drifting.
1580200	1585160	And then the final case study I want to show you is the UM editor.
1585160	1588780	It's an editor previously maintained by Baidu.
1588780	1593580	So in this code, it's a little bit straightforward.
1593580	1608940	So if we see ‑‑ we can see the clobberable element is the window.UM editor underscore home underscore URL which in our case will be the HTTP attacker.control.com.
1608940	1615180	And then later that variable URL is used to be assigned to a global variable.
1615180	1618240	UM editor underscore config.
1618240	1628420	And then later that variable is concatenated with some constant strings to construct the final URL that will be ‑‑ that the code will be loading the script from.
1628420	1633780	It is also causing the scripts being loaded from the attacker's domain.
1636330	1641310	So finally I want to talk about the end‑to‑end exploitation.
1641310	1647390	So to understand the end‑to‑end exploitation, we first need to achieve HTML injection.
1647390	1655070	So as mentioned before, the web application they accept and process all sorts of user inputs.
1655070	1657590	But how does it become unsafe?
1657590	1660650	So we have some basic findings.
1660650	1668830	So first, some sanitizers from these websites, they do not strip the ID or name attribution by default.
1668850	1679590	And the web applications, they are not aware of this vulnerability and they rely on those ID or name attributes for intended logic.
1679590	1690390	So due to these reasons, the ID or name attribute, they sometimes slip through the white lists as they don't seem harmful at all.
1691730	1702490	So based on how these web applications process the user inputs, we categorize the input factors of HTML injection into two types.
1702490	1706590	The first is by user typing and the application rendering.
1706590	1713650	The second is by the user copy and paste HTML elements into the page directly.
1714010	1717010	So the first case is easy to understand.
1717010	1731330	The attacker might input some raw HTML strings such as the image tag with source equals to X and on error equals to alert 1 into some user controllable fields.
1731330	1738930	And then those strings are later parsed and rendered by the web application without proper sanitization.
1740290	1748570	So the second input factor is to insert through copy and paste HTML elements into the page directly.
1748570	1751250	This is based on several factors.
1751250	1759530	The first is that the elements whose content editable attributes is enabled, they can accept HTML elements directly.
1759530	1767170	And second is that the clipboard data can have text or HTML MIME type, not just plain text.
1767170	1775350	And also the browser clipboard APIs, they will sanitize cross-site scripts but they do not sanitize ID or name attributes.
1775350	1780610	As mentioned before, they don't look harmful at all at most of the cases.
1781450	1792670	So based on these factors, what if the website just saved these HTML elements input from the user or attacker without proper sanitization?
1792670	1795690	That will cause the stored HTML injection.
1796770	1800130	I will show you with one real world example we found.
1800130	1805330	So this is the Canvas LMS discussion at JHU in our school.
1805330	1815890	So in the discussion board, in the input box, if you just directly input some raw HTML text into the input box, they will be sanitized.
1815890	1826450	But if you directly copy and paste HTML elements into the input box, the website will actually accept those elements and render those elements in the website.
1826450	1828850	That will cause the HTML injection.
1829030	1834030	This is usually caused by the web application developers.
1834030	1843370	They are mostly cautious about user inputs by typing but sometimes they are just careless about the contents from the clipboard.
1843370	1847130	That's why it's causing HTML injection in this case.
1848070	1856550	So we also manually hunted for HTML injection in the world in real world applications.
1856550	1871390	So we manually discovered 187 HTML injection vulnerabilities in various web applications including wiki, web mail, forum, editors, RSS, social media, chat bot, and so on.
1871390	1878530	So and we also summarized 12 editors and client-side libraries that are vulnerable to HTML injection.
1878530	1881830	They can also be accessed in our public data set.
1883310	1900030	And then in terms of end to end exploitation, with all the DOM clobbering gadgets we found by HAWQ and also the HTML injection vulnerabilities we found manually, we can achieve 12 end to end exploitation with our with those gadgets and HTML injection.
1900030	1907990	So in those includes 11 of them leading to cross-site scripting and one of these two CSRF.
1907990	1915810	And the affected applications include the Jupyter lab or notebook and also Canvas LMS.
1917510	1922370	So let's dive into the Jupyter lab or Jupyter notebook for details.
1922370	1937950	The first summary, so we found HTML injection in Jupyter lab, Jupyter notebook, web page, and also we found DOM clobbering gadget with HAWQ in both version 2 and version 3.
1938030	1943670	The message library is used by the Jupyter lab to render mathematical formulas.
1943670	1948250	And though combining those two together we can achieve end to end exploitation.
1950050	1969070	So in terms of the HTML injection, we found that in the markdown preview page of Jupyter lab, if we insert some, if we just type in raw HTML tags for example image or whatever HTML elements, it will be accepted and rendered in the web page.
1970550	1976510	And we also reported this end to end vulnerability to the developer of Jupyter lab.
1976510	1988590	And they also confirmed that it is not trivial to mitigate this vulnerability because the ID and name attributes they are assumed to work by a large number of widget libraries.
1988590	1994750	So a very easy example is that for example there is a markdown file with two hash tags hello.
1994750	2001710	This tag will be rendered as an H2 element with the ID equals to hello.
2001710	2011090	And the ID hello will later or somewhere be used as the fragment identifier in the URL to locate that element in the page.
2013840	2025820	So if we take a look at the MathJax library, it is a library used while used to render mathematical formulas and it is used by the Jupyter lab.
2026600	2034240	So with our toolhawk we found dump clobbering gadgets in both MathJax version 2 and version 3.
2034240	2041360	And just days before they released version 4 and they promised to fix this vulnerability but we haven't checked yet.
2041360	2043760	Just say good luck.
2044560	2045220	Okay.
2045220	2053520	So if we take a look at the MathJax version 2 we will find the window dot MathJax here is clobberable element.
2053520	2062420	And then later that variable is combined is concatenated with some constant strings to construct a file URL.
2062420	2065660	And here a type coercion happens.
2065840	2079740	And finally that file URL is used to load is used to the script source which is to load the attacker control the scripts.
2080160	2083620	That will cause cross-site scripting.
2083620	2098380	And but if we take a look at the version 3 just at the first glance there is no more clobberable window dot MathJax and there is no more loading of additional dependency scripts by default.
2098520	2111760	But by leveraging hawk we found that MathJax version 3 they supports using the require macro which allows you to load extension scripts.
2112240	2120140	So we further found that in version 3 of MathJax there is a clobberable element called document dot current script.
2120140	2130380	And then later that document dot current script is document dot current script SRC attribution is get.
2130380	2140320	And with some regular expression replacement operation the string from that payload is retrieved.
2140320	2152100	And then finally that T variable is assigned to the R dot SRC which is which is the SRC attribute of one script element in a page.
2152100	2156820	That is also causing loading scripts from the attacker's domain.
2160480	2162400	So okay.
2163440	2169780	So till now we have both dump clobbering gadgets from MathJax both version 2 and version 3.
2170020	2187020	And also with our research on dump clobbering we reported those problems and Firefox is also supporting considering patching the dump clobbering by disabling the shadowing on document lookups.
2187660	2192980	And they are they are referring to the zero day gadgets found by our tool hawk.
2192980	2194740	That's good news.
2194840	2205700	So to summary we design and implement hawk a dynamic analysis tool for automatically detecting and exploiting dump clobbering gadgets.
2205700	2223220	So and we also conduct a large scale study over the trunk top 5,000 websites and identify 497 exploitable gadgets revealing the widespread presence of dump clobbering vulnerabilities in popular client side libraries.
2223220	2234360	And also we demonstrate 12 end to end exploitations by combining the discover gadgets with real world HTML injections validating their practical impact.
2234360	2239980	So our tool the source code, the data set and the paper are all open source.
2239980	2242960	Feel free to access them if you are interested.
2243100	2249040	And also both of us, Zhang Yu and Jianjia, we are open to internship or full time jobs.
2249040	2253660	So if you have any opportunities please feel free to reach out to us.
2253660	2254260	Thank you.
