Exploit database

GH-7390ed10c06ac87fb5d5e665ca29da6e

hoshinolina/agx-exploit

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2022-32947

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files9
hoshinolina/agx-exploitRevision dc0b831e4238

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

slides/index.html

HTML · 27,216 bytes
<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

		<title>Lina &amp; Cyan - I hacked macOS! (CVE-2022-32947)</title>

		<link rel="stylesheet" href="dist/reset.css">
		<link rel="stylesheet" href="dist/reveal.css">
		<link rel="stylesheet" href="css/sky2.css">
		<script src="js/jquery-3.7.1.min.js"></script>
		<script src="js/unicorn-aarch64.min.js"></script>
		<script src="js/capstone-arm64.min.js"></script>
		<script src="js/emu.js"></script>
		<script src="js/memory.js"></script>
		<script src="js/exploit_code.js"></script>
		<script src="js/symbols.js"></script>

		<!-- Theme used for syntax highlighted code -->
		<link rel="stylesheet" href="plugin/highlight/monokai.css">
		<style>
		.reveal pre code {
			max-height: 600px;
		}
		.box {
			display: inline-block;
			text-align: left;
			position: relative;
			left: 0;
			top: 0;
		}
		.hbox {
			display: flex;
			flex-direction: row;
			text-align: center;
			justify-content: center;
		}
		.hbox > * {
			align-self: center;
		}
		div.group {
			margin: auto;
			display: flex;
			flex-direction: row;
			text-align: center;
		}
		div.group > div {
			position: relative;
			margin: auto;
			display: block;
			text-align: left;
		}
		img.over {
			position: absolute;
			left: 0;
			top: 0;
		}
		p.ahem {
			font-size: 40%;
			margin: 0;
		}
		.highlight {
			color: #d00;
		}
		.highlight2 {
			font-weight: bold;
			color: #d00;
		}
		.mseq {
			font-size: 50%;
			border-style: solid;
			border-color: #d3506f;
			border-width: 4px  0   0  4px;
			border-radius: 2px;
			width: 80%;
			margin: 0 auto;
		}
		.mseq ul {
			flex-grow: 1;
			flex-basis: 0;
			margin: 0;
		}
		.mseq li {
			list-style: none;
			border-style: solid;
			border-color: #d3506f;
			border-width:  0  4px 4px  0;
			background-color: rgba(255, 255, 255, 0.369);
			padding: 0 5px;
			position: relative;
		}
		.mseq ul:last-child li:last-child {
			border-radius: 0 0 2px 0;
		}
		.mseq li span {
			color: #a61200;
			font-weight: bold;
		}
		.mseq b {
			display: block;
			left: 0;
			top: 0;
			position: absolute;
			width: 100%;
			height: 100%;
			background-color: #6f6;
			z-index: -1;
		}

		button {
			font-size: 50%;
			font-weight: bold;
			padding: 0.2em 0.5em;
		}

		#demo {
			/*border: solid 1px black;*/
			display: flex;
			width: 100%;
			height: 100%;
		}

		#leftpane {
			flex-grow: 1;
		}

		#exploit, #asm {
			font-size: 50%;
			line-height: normal;
		}

		#exploit {
			height: 700px;
			max-height: 700px;
		}

		#registers {
			font-family: monospace;
			font-size: 25%;
			font-weight: bold;
			width: 350px;
			margin-left: 40px;
		}
		#registers td {
			border: 2px solid #d3506f;
		}
		#registers td:nth-child(2) {
			width: 100%;
		}
		#mseqregpanel h3 {
			font-size: 50%;
		}
		#mseqregs {
			font-family: monospace;
			font-size: 35%;
			font-weight: bold;
			width: 920px;
		}
		#mseqregs td {
			border: 3px solid #d3506f;
			width: 5%;
		}
		#mseqregs td:nth-child(2) {
			width: 40%;
		}
		#mseqregs td:nth-child(4) {
			width: 40%;
		}
		.line.current {
			background-color: #633;
		}
		.symbol {
			color: #128000;
		}
		.changed {
			color: #a61200;
		}
		/* Tooltip container */
		.tooltip {
			position: relative;
		}
		/* Tooltip text */
		.tooltip .tooltiptext {
			font-weight: bold;
			white-space: normal;
			font-size: 20px;
			top: -5px;
			right: 100%;
			font-family: var(--r-main-font);

			visibility: hidden;
			width: 220px;
			background-color: #128000;
			color: #fff;
			text-align: center;
			padding: 10px;
			border-radius: 6px;

			/* Position the tooltip text - see examples below! */
			position: absolute;
			z-index: 1;
		}

		#mseqregs .tooltip .tooltiptext {
			font-size: 20px;
			top: 0;
		}

		.tooltip .tooltiptext::after {
			content: " ";
			position: absolute;
			top: 20px;
			left: 100%; /* To the right of the tooltip */
			margin-top: -5px;
			border-width: 5px;
			border-style: solid;
			border-color: transparent transparent transparent #128000;
		}

		/* Show the tooltip text when you mouse over the tooltip container */
		.tooltip:hover .tooltiptext {
			visibility: visible;
		}

		#codepanel {
			display: flex;
			flex-direction: row;
		}

		#demo.rop-mode #mseqregpanel {
			display: none;
		}

		#expanel {
			max-width: 1024px;
			width: 1024px;
		}

		#demo.rop-mode #expanel {
			max-width: 600px;
			font-size: 45%;
		}

		#asmpanel {
			margin-left: 10px;
		}

		#asm {
			font-size: 45%;
		}

		#asm line {
			position: absolute;
		}

		#asm .op {
			font-weight: bold;
			color: #ffbfc7;
		}

		#asm .args {
			color: #c7ffff;
		}

		#asm .label {
			margin-top: 2em;
			color: #c7bfff;
		}

		#asm .tooltip .tooltiptext {
			font-size: 20px;
			top: -5px;
			right: 108%;
		}

		#demo.mseq-mode #asmpanel {
			display: none;
		}

		#demo.rop-mode #codepanel {
			height: 90%;
		}

		#asm .tooltip .tooltiptext {
			font-weight: bold;
			white-space: normal;
			font-size: 20px;
			top: -5px;
			left: 105%;
		}

		#asm .tooltip .tooltiptext::after {
			left: unset;
			right: 100%;
			border-color: transparent #128000 transparent transparent;
		}
		</style>
	</head>
	<body>
		<div class="reveal">
			<div class="slides">
				<section>
					<section>
						<h1>I hacked macOS!!!</h1>
						<h3>CVE-2022-32947</h3>
						<p>With Lina✨ &amp; Cyan💎 </p>
						<p><a href="https://github.com/asahilina/agx-exploit">GitHub</a> · <a href="https://www.youtube.com/watch?v=hDek2cp0dmI">Video</a></p>
					</section>
					<section>
						<h2>On today's menu...</h2>
						<ul>
							<li class="fragment"><a href="#s_gpuintro">A bit about GPUs</a></li>
							<li class="fragment"><a href="#s_vm">How virtual memory works</a></li>
							<li class="fragment"><a href="#s_cmdbuf">What's a GPU command buffer?</a></li>
							<li class="fragment"><a href="#s_uppl">Apple's super secret uPPL</a></li>
							<li class="fragment"><a href="#s_rop">Return-oriented programming</a></li>
							<li class="fragment"><a href="#s_demo">Special demo!</a></li>
						</ul>
					</section>
					<section>
						<h1>But first a demo!!!</h1>
					</section>
					<section>
						<img src="img/root.png" height=600>
						<p>
							<a href="https://www.youtube.com/watch?v=hDek2cp0dmI&t=10m">Live demo</a> ·
							<a href="https://github.com/asahilina/agx-exploit/tree/main/demo_exploit">Source code</a>
						</p>
					</section>
				</section>
				<section>
					<section id="s_gpuintro">
						<h1>GPU intro</h1>
					</section>
					<section>
						<h2>CPU vs. GPU</h2>
						<img src="img/cpugpu.svg" height=600>
					</section>
					<section>
						<h2>How Apple GPUs work</h2>
						<img src="img/gpufwhw.svg" height=600>
					</section>
				</section>
				<section>
					<section>
						<h1>That day in 2022...</h1>
					</section>
					<section>
						<div class="box">
							<img src="img/lina_notices.png">
						</div>
					</section>
				</section>
				<section>
					<section id="s_vm">
						<h1>Virtual Memory</h1>
						<h3>What's a page table anyway?</h3>
					</section>
					<section>
						<h2>Pointers</h2>
						<pre class="cpp"><code>#include &lt;iostream&gt;

	using namespace std;

	int main() {
		int a = 0;
		void *p = &a;

		cout << "&a is " << p << " nya!" << endl;
	}</code></pre>
						<pre class="fragment"><code class="plaintext">&amp;a is 0x7fffc6ba5ddc nya!</code></pre>
					</section>
					<section>
						<p class="fragment">This is a virtual address!<br>↓</p>
						<p><code class="plaintext">0x7fffc6ba5ddc</code></p>
						<p class="fragment">↓<br>
							<code class="plaintext">0x814745ddc</code><br>
							↑<br>This is the physical address!
						</p>
					</section>
					<section>
						<h1>How does this work?</h1>
					</section>
					<section>
						<div class="box">
							<img src="img/virtualmemory.svg" height=600>
							<img class="over fragment" src="img/virtualmemory2.svg" height=600>
						</div>
					</section>
					<section>
						<div class="box">
							<img src="img/pagetables.svg" height=600>
							<img class="over fragment" src="img/pagetables2.svg" height=600>
							</div>
					</section>
					<section>
						<div class="box">
							<img src="img/cpugpuproc.svg" height=850>
							<img class="over fragment" src="img/cpugpuproc_1.svg" height=850>
							<img class="over fragment" src="img/cpugpuproc_2.svg" height=850>
						</div>
					</section>
					<section>
						<h2>GPU/CPU Memory</h2>
						<div class="box">
							<img class="fragment fade-out" data-fragment-index="1" src="img/cpugpupt.svg" height=850>
							<img class="over fragment" data-fragment-index="1" src="img/cpugpukpt.svg" height=850>
						</div>
					</section>
					<section>
						<h1>Page Tables</h1>
					</section>
					<section>
						<div class="hbox">
							<div class="box">
								<img src="img/pt_big.svg" height=900>
								<img class="over fragment" data-fragment-index="1" src="img/pt_big2.svg" height=900>
							</div>
							<div style="font-size: 75%" class="fragment" data-fragment-index="1">
								<p>40 bits for virtual address (1 TiB)</p>
								<p>16 KiB pages → 67,108,864 pages total</p>
								<p>8 bytes per page address<br><span class="fragment" data-fragment-index="2">=<br><span class="highlight">512 MiB page table!!!!</span></span></p>
								<span class="fragment highlight2" data-fragment-index="2" style="font-size: 200%">Too big!!!</p>
							</div>
						</div>
					</section>
					<section>
						<img src="img/pt_tree.svg" height=900>
					</section>
					<section>
						<img src="img/pt_translation.svg" height=900>
					</section>
					<section>
						<h2>Permissions</h2>
						<img src="img/pt_permissions.svg" height=600>
					</section>
					<section>
						<img src="img/uat_space.svg" height=900>
					</section>
					<section>
						<h2>TTBAT</h2>
						<p>Translation Table Base Address Table</p>
						<img src="img/ttbat.svg" height=700>
					</section>
				</section>
				<section>
					<section>
						<h1>That day in 2022...</h1>
					</section>
					<section>
						<div class="box">
							<img src="img/lina_notices.png">
							<img class="over fragment" src="img/lina_notices_1.svg">
							<img class="over fragment" src="img/lina_notices_2.svg">
							<img class="over fragment" src="img/lina_notices_3.svg">
							<img class="over fragment" src="img/lina_notices_4.svg">
							<img class="over fragment" src="img/lina_notices_5.svg">
						</div>
					</section>
				</section>
				<section>
					<section id="s_cmdbuf">
						<h1>Hacking command buffers</h1>
						<h3>Weird machines?</h3>
					</section>
					<section>
						<h2>Command buffers</h2>
						<div class="box">
							<img src="img/cmdbuf.svg" height=750>
							<img class="over fragment" src="img/cmdbuf_1.svg" height=750>
							<img class="over fragment" src="img/cmdbuf_2.svg" height=750>
							<img class="over fragment" src="img/cmdbuf_3.svg" height=750>
						</div>
					</section>
					<section>
						<h2>Micro Commands</h2>
						<div class="hbox mseq">
							<ul>
								<li><code>00</code>: <span class="fragment" data-fragment-index="1">-</span></li>
								<li><code>01</code>: <span>Wait For Idle</span></li>
								<li><code>02</code>: <span class="fragment" data-fragment-index="1">Wait 2</span></li>
								<li><code>03</code>: <span class="fragment" data-fragment-index="1">Doorbell</span></li>
								<li><code>04</code>: <span class="fragment" data-fragment-index="1">Write 8-bit reg</span></li>
								<li><code>05</code>: <span class="fragment" data-fragment-index="1">Write 32-bit reg</span></li>
								<li><code>06</code>: <span class="fragment" data-fragment-index="1">Write 64-bit reg</span></li>
								<li><code>07</code>: <span class="fragment" data-fragment-index="1">-</span></li>
								<li><code>08</code>: <span class="fragment" data-fragment-index="1">Read 8-bit reg</span></li>
								<li><code>09</code>: <span class="fragment" data-fragment-index="1">Read 32-bit reg</span></li>
								<li><code>0a</code>: <span class="fragment" data-fragment-index="1">Read 64-bit reg</span></li>
								<li><code>0b</code>: <span class="fragment" data-fragment-index="1">Wait 32-bit reg</span></li>
								<li><code>0c</code>: <span class="fragment" data-fragment-index="1">Wait 64-bit reg</span></li>
								<li><code>0d</code>: <span class="fragment" data-fragment-index="1">-</span></li>
								<li><code>0e</code>: <span class="fragment" data-fragment-index="1">Store 32-bit</span>
									<b class="fragment" data-fragment-index="2"></b></li>
							</ul>
							<ul>
								<li><code>0f</code>: <span class="fragment" data-fragment-index="1">Store 64-bit</span>
									<b class="fragment" data-fragment-index="2"></b></li>
								<li><code>10</code>: <span class="fragment" data-fragment-index="1">Load 32-bit</span>
									<b class="fragment" data-fragment-index="2"></b></li>
								<li><code>11</code>: <span class="fragment" data-fragment-index="1">Load 64-bit</span>
									<b class="fragment" data-fragment-index="2"></b></li>
								<li><code>12</code>: <span class="fragment" data-fragment-index="1">?</span></li>
								<li><code>13</code>: <span class="fragment" data-fragment-index="1">?</span></li>
								<li><code>14</code>: <span class="fragment" data-fragment-index="1">?</span></li>
								<li><code>15</code>: <span class="fragment" data-fragment-index="1">Test (If)</span>
									<b class="fragment" data-fragment-index="2"></b></li>
								<li><code>16</code>: <span class="fragment" data-fragment-index="1">Logic op</span>
									<b class="fragment" data-fragment-index="2"></b></li>
								<li><code>17</code>: <span class="fragment" data-fragment-index="1">Add 16-bit</span>
									<b class="fragment" data-fragment-index="2"></b></li>
								<li><code>18</code>: <span>Retire</span></li>
								<li><code>19</code>: <span>Timestamp</span></li>
								<li><code>1a</code>: <span class="fragment" data-fragment-index="1">KTrace</span></li>
								<li><code>1b</code>: <span class="fragment" data-fragment-index="1">?</span></li>
								<li><code>1c</code>: <span class="fragment" data-fragment-index="1">?</span></li>
								<li><code>1d</code>: <span class="fragment" data-fragment-index="1">?</span></li>
							</ul>
							<ul>
								<li><code>1e</code>: <span class="fragment" data-fragment-index="1">Jump (Cond)</span>
									<b class="fragment" data-fragment-index="2"></b></li>
								<li><code>1f</code>: <span class="fragment" data-fragment-index="1">?</span></li>
								<li><code>20</code>: <span class="fragment" data-fragment-index="1">?</span></li>
								<li><code>21</code>: <span class="fragment" data-fragment-index="1">?</span></li>
								<li><code>22</code>: <span>Start Vertex</span></li>
								<li><code>23</code>: <span>Finish Vertex</span></li>
								<li><code>24</code>: <span>Start Fragment</span></li>
								<li><code>25</code>: <span>Finish Fragment</span></li>
								<li><code>26</code>: <span>Start Blit</span></li>
								<li><code>27</code>: <span>Finish Blit</span></li>
								<li><code>28</code>: <span class="fragment" data-fragment-index="1">?</span></li>
								<li><code>29</code>: <span>Start Compute</span></li>
								<li><code>2a</code>: <span>Finish Compute</span></li>
								<li><code>2b</code>: <span class="fragment" data-fragment-index="1">?</span></li>
								<li><code>2c</code>: <span class="fragment" data-fragment-index="1">?</span></li>
							</ul>
						</div>
					</section>
					<section>
						<h2>It's Turing Complete!</h2>
						<ul>
							<li>2 64-bit scratch registers</li>
							<li>Loads and stores (direct only)</li>
							<li>AND, OR, XOR, shifts</li>
							<li>Test for zero ("if")</li>
							<li>Jump / Conditional jump</li>
						</ul>
					</section>
					<section>
						<h2>Tricks</h2>
						<p>Indirect read/writes?<br><code style="font-size: 80%">R0 = *R1;</code></p>
						<p class="fragment"><img src="img/selfmod.svg" height=450></p>
					</section>
					<section>
						<h2>Tricks</h2>
						<p>Multiply?<br><code style="font-size: 80%">R1 = 10 × R0;</code></p>
						<p class="fragment"><img src="img/multiply.svg" height=600></p>
					</section>
					<section>
						<h2>We can:</h2>
						<ul>
							<li>Read/write firmware data memory</li>
							<li>Do math</li>
						</ul>
						<h2>We can't:</h2>
						<ul>
							<li>Modify the firmware code</li>
							<li>Modify the page tables</li>
						</ul>
						<p class="fragment highlight">But...</p>
					</section>
				</section>
				<section>
					<section id="s_uppl">
						<h1>uPPL</h1>
					</section>
					<section>
						<h2>More secrets...</h2>
						<div class="box">
							<img src="img/uppl.svg" height=750>
							<img class="over fragment" src="img/uppl_1.svg" height=750>
						</div>
					</section>
					<section>
						<h2>uPPL can map memory!</h2>
						<ul>
							<li class="fragment">If page is uPPL: <b>DENY</b></li>
							<li class="fragment">If page is page table: <b>DENY</b></li>
							<li class="fragment">If page is secure uPPL/kernel data: <b>DENY</b></li>
							<li class="fragment highlight">If page is TTBAT.... ??? <b class="fragment">ALLOWED!!!</b></li>
							<p class="fragment highlight"><b>They forgot to blocklist that one!!!!</b></p>
						</ul>
					</section>
					<section>
						<h2>Hack Idea</h2>
						<ul>
							<li class="fragment">Make fake PT that gives access to the real PTs</li>
							<li class="fragment">Ask uPPL to give us access to the TTBAT</li>
							<li class="fragment">Write fake PT to TTBAT (context 63 TTB0)</li>
							<li class="fragment">Ask uPPL to activate context 63</li>
							<li class="fragment highlight">Write fake PT address to TTB1 page table</li>
						</ul>
						<p class="fragment highlight"><b>GPU can now read/write page tables directly!!</b></li>
					</section>
					<section>
						<h2>Problem</h2>
						<p class="fragment">We can read/write stuff from the microsequence, but we can't call the uPPL...</p>
						<p class="fragment">We can't modify the firmware code directly...</p>
						<h2 class="fragment">Solution</h2>
						<p class="fragment highlight2">Return-oriented Programming (ROP)!</p>
					</section>
				</section>
				<section>
					<section id="s_rop">
						<h1>Return-oriented programming</h1>
						<h3>More weird machines????</h3>
					</section>
					<section>
						<h2>Call and return</h2>
						<div class="group">
							<div>
								<img class="fragment fade-in-then-out" src="img/callret.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret_1.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret_2.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret_3.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret_4.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret_5.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret_6.svg" height=800>
								<img class="fragment fade-in over" src="img/callret_7.svg" height=800>
							</div>
						</div>
					</section>
					<section>
						<h2>Multiple calls?</h2>
						<div class="group">
							<div>
								<img class="fragment fade-in-then-out" src="img/callret2_bad0.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_bad1.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_bad2.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_bad3.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_bad4.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_bad5.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_good0.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_good1.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_good2.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_good3.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_good4.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_good5.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_good6.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_good7.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_good8.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/callret2_good9.svg" height=800>
								<img class="fragment fade-in over" src="img/callret2_good10.svg" height=800>
							</div>
						</div>
					</section>
					<section>
						<h2>Challenge!</h2>
						<div class="group">
							<div>
								<img class="fragment fade-in-then-out" src="img/rop_0.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/rop_1.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/rop_2.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/rop_3.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/rop_4.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/rop_5.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/rop_6.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/rop_7.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/rop_8.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/rop_9.svg" height=800>
								<img class="fragment fade-in over" src="img/rop_10.svg" height=800>
							</div>
						</div>
					</section>
					<section>
						<h2>Data registers</h2>
						<div class="group">
							<div>
								<img class="fragment fade-in-then-out" src="img/rop_regs0.svg" height=800>
								<img class="fragment fade-in-then-out over" src="img/rop_regs1.svg" height=800>
								<img class="fragment fade-in over" src="img/rop_regs2.svg" height=800>
							</div>
						</div>
					</section>
					<section>
						<h2>Gadgets can be weird...</h2>
						<p><code>g_calltwo</code>: Call two functions...</p>
						<p class="fragment">But the first argument is a pointer to a pointer to a pointer to the function</p>
						<p class="fragment">And the second one is a pointer to 0x70 before a pointer to the function</p>
					</section>
					<section>
						<h2>Gadgets can be weird...</h2>
						<p><code>g_store</code>: Store a value to memory...</p>
						<p class="fragment">But it actually stores to the address you pass plus 0xa78</p>
					</section>
				</section>
				<section>
					<section id="s_demo">
						<h1>Exploit time!</h1>
						<h3>This is going to be so yabai...</h3>
					</section>
					<section>
						<h2>Putting it together</h2>
						<ul style="font-size: 85%">
							<li class="fragment"><b>Shader</b>: Set up microseq and ROP chain data in unused memory</li>
							<li class="fragment"><b>Shader</b>: Overwrite microseq pointers</li>
							<li class="fragment"><b>Microsequence</b>: Calculate and fill in a lot of data using firmware info, then overwrite stack to start ROP</li>
							<li class="fragment"><b>ROP</b>: Use uPPL bug and make a page table accessible to shaders</li>
							<li class="fragment"><b>Shader</b>: Map more page tables and get access to <b class="highlight2">ALL RAM</b></li>
							<li class="fragment highlight2">Profit?????</li>
						</ul>
					</section>
					<section>
						<p>It's hard to demo this all working in practice...</p>
						<p class="fragment highlight2">Challenge Accepted!<br>
						<img src="img/letsgo.png" width=400></p>
					</section>
					<section id="demoslide">
						<div id="demo">
							<div id="leftpane">
								<div id="buttons">
									<button id="b_reset">Reset</button>
									<button id="b_next">Next</button>
									<button id="b_step">Step</button>
									<button id="b_rop">Skip to ROP</button>
									<button id="b_mode">Mode</button>
								</div>
								<div id="codepanel">
									<pre id="expanel"><code class="cpp" data-noescape id="exploit"></code></pre>
									<pre id="asmpanel"><code class="plaintext" data-noescape id="asm"></code></pre>

								</div>
								<div id="mseqregpanel">
									<h3>Microsequence registers</h3>
									<table id="mseqregs">
										<tr>
											<td>R0</td>
											<td id="mseq0">0x0000000000000000</td>
											<td>R1</td>
											<td id="mseq1">0x0000000000000000</td>
										</tr>
									</table>
								</div>
							</div>
							<table id="registers">
								<tr><td>X0</td><td id="rx0"></td></tr>
								<tr><td>X1</td><td id="rx1"></td></tr>
								<tr><td>X2</td><td id="rx2"></td></tr>
								<tr><td>X3</td><td id="rx3"></td></tr>
								<tr><td>X4</td><td id="rx4"></td></tr>
								<tr><td>X5</td><td id="rx5"></td></tr>
								<tr><td>X6</td><td id="rx6"></td></tr>
								<tr><td>X7</td><td id="rx7"></td></tr>
								<tr><td>X8</td><td id="rx8"></td></tr>
								<tr><td>X9</td><td id="rx9"></td></tr>
								<tr><td>X10</td><td id="rx10"></td></tr>
								<tr><td>X11</td><td id="rx11"></td></tr>
								<tr><td>X12</td><td id="rx12"></td></tr>
								<tr><td>X13</td><td id="rx13"></td></tr>
								<tr><td>X14</td><td id="rx14"></td></tr>
								<tr><td>X15</td><td id="rx15"></td></tr>
								<tr><td>X16</td><td id="rx16"></td></tr>
								<tr><td>X17</td><td id="rx17"></td></tr>
								<tr><td>X18</td><td id="rx18"></td></tr>
								<tr><td>X19</td><td id="rx19"></td></tr>
								<tr><td>X20</td><td id="rx20"></td></tr>
								<tr><td>X21</td><td id="rx21"></td></tr>
								<tr><td>X22</td><td id="rx22"></td></tr>
								<tr><td>X23</td><td id="rx23"></td></tr>
								<tr><td>X24</td><td id="rx24"></td></tr>
								<tr><td>X25</td><td id="rx25"></td></tr>
								<tr><td>X26</td><td id="rx26"></td></tr>
								<tr><td>X27</td><td id="rx27"></td></tr>
								<tr><td>X28</td><td id="rx28"></td></tr>
								<tr><td>X29</td><td id="rx29"></td></tr>
								<tr><td>LR</td><td id="rx30"></td></tr>
								<tr><td>SP</td><td id="rsp"></td></tr>
								<tr><td>PC</td><td id="rpc"></td></tr>
							</table>
						</div>
					</section>
				</section>
			</div>
		</div>

		<script src="dist/reveal.js"></script>
		<script src="plugin/notes/notes.js"></script>
		<script src="plugin/markdown/markdown.js"></script>
		<script src="plugin/highlight/highlight.js"></script>
		<script>
			// More info about initialization & config:
			// - https://revealjs.com/initialization/
			// - https://revealjs.com/config/

			Emu.init();

			Reveal.initialize({
				hash: true,
				width: 1440,
				height: 1080,

				// Learn about plugins: https://revealjs.com/plugins/
				plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
			});
		</script>
	</body>
</html>