So, very excited to bring up our next speaker. And I'm going to try this again. Jen John? Jen John Dye. Jen John Dye. Awesome. So he is going to talk about owning Android devices. How many people have Android devices? Yeah, be afraid. Be afraid. He's coming for your things. Let's give our next speaker a big round of applause. Have a great time, man. Thank you, John. Hi everyone. Today I will present how we found the target's target and won the largest bank in the history of SR program. Originally, my colleagues Guang Gong and William Young came to explain to you. But they could not come due to the visa. As we know, the PIX4 is the most expensive device in the world. So, we have to protect it. But the PIX4 is protected by many layers of security. In the 2017 mobile Samsung, iPhone, have been found many times. But only PIX4 was a survivor. No research, no researchers even to challenge it. But our team discovered a working exploit chain. Which could comprise the PIX4 remotely. Because of the severity of the virus we got of our detailed report, we were award the highest reward in the history of the ASR program. Next, I will show the details. First, introduce myself and my colleagues. I'm a research, security researcher at 360, our team, and focus on Android system security research, vulnerability hunting and exploiting. Guang Gong, senior security researcher at our team, and he focused on Android and Chrome security research. He has spoken at several security conference and the winner at many famous contests, like Panchang, Panchang Mobile. I'm very happy to have you here. Wenliang is a security researcher at 360, our team, and he focused on Android system security research. In this talk, I will introduce how we found PIXR. We use two bugs to pound PIXR. One, we add engine bug to compress the and the other is system server bug. That is used to escape from PIXR, and the other is system server bug, that is used to save the roles and achieve elevation of private . I will show the details later. Here's my agenda. This piece mainly includes three parts. How to exploit the V8 engine bug, and then exploit the bug of system server process. Finally, we will make some conclusions. So, I will show the first part, and introduce us share a and we'll allow assembly. And then, analyze the first bug of the exploit chain. See we 2017, 51, 16. And then I will talk about how to exploit the vulnerability. And here we go. So for what we're talking Shared array buffer object is used to represent a generic fixed length row binary data buffer, similar to the array buffer object. We add 6.0 introduce support for shared array buffer. A low level mechanism to share memory between, between Javascript workers and a single nice control flow across workers. Shared array buffer gives Javascript access to shared memory, atomics and the font text. Shared array, shared array buffers also unlocks ability to post thread applications to the web, where ASM don't just or web assembly. So, this is the only way to do it. Unfortunately, shared array buffer was disassembled by default in all major browsers on January 2018 in response to maritime and spec tree. We, but we reported the bug on July 2017, so not affected. Maybe it will be enabled in the future. It's worth paying, paying attention to. Web assembly is a new type of code that can be run in the modern web browsers. It is a low level assembly like language with a compact binary format that runs with near native performance and a profile language such as C or C++ with a complication tagging so that they can run on the web. It is also designed to run on the web. It is also designed to run on JavaScript, allowing both to work together. Here's the example, how to involve the function that is export from the simple WSSM file. Okay, I introduced some basic knowledge, so an analysis of V8 bug in detail. The vulnerability ability was fixed in Chrome 16.1 down zero down 16.1, 16.3, 16.9. So from 16 to person primary this may be effect. By combining the three features, shared array, array and buffer, WebAssembly and WebWorker in Chrome and OOP access can be triggered through, through a rest condition. Simply speaking, WebAssembly codes can be put into a shared array buffer and then transferred to a WebWorker. Then the main thread process the WebAssembly code. The worker threads can modify the code at the same time which causes an OOP access. So here's a bucket, the bucket code. The bucket is in the function get first arguments as bus. Where the arguments ARJs may be an array, array buffer or types array or object. After shared webbuffer is imported to JavaScript, a type array can be backed by a shared array buffer. So the content of the types array can be modified by, by other work threads at the same time. Here's a PLC. The worker threads modify the WebAssembly code at the same time. Another thread is parsing the code. Yep. So this is the, this is the, this is the, this is the, this is the, this is the web assembly code. The WebAssembly code is put into a shared array buffer. Then a type of above object is created using the shared array buffer as a buffer. After that, a worker thread is created and the shared array buffer is passed to the newly created worker thread. While the main, the main thread is parsing the WebAssembly code. The worker thread modifies the, is the web the shared rebuffer. After the main thread's bound check, the instruction code zero can be motivated by the worker thread to code 128 and then be passed and compiled by the main thread. So, OOB access occurs. Now let's look at the main thread. So, the main thread is the assembly code. The instruction code zero was modified to code 128, making OOB access. So, code zero instruction can be modified to code any other variable assembly function. So, the exploration of this bug is straightforward. So, the instruction code zero instruction if code zero is modified to code dollar leak, registers and the stack of contents are dumped to while assembly memory because function zero and function dollar leak have a different number of arguments. The results, this resulting in many useful pieces of data in the stack being leaked. Sorry. We cannot modify the instruction code zero. Any, any code function x instruction can be modified. Assume function x is a web, web, WSM function with six arguments as shown above. When we x complied the function x in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in, in. In IS 32, architecture, the first five arguments are passed through the registers and the sixth argument is passed through the stack. All the arguments can be set to any value by Javascript. So, another Javascript function called WSS, is a function a WebAssembly function, we add, compile, create a JS to WSM function internally. After completion, the JavaScript function will call JS to WSM function. And then JS to WSM function will call the WebAssembly function. JS to WSM function use different core convention. Its first arguments is passed through stack. So, if we modify core function X to call JS to WSM function, what will happen? The JS to WSM function will take the six arguments of function X as its first argument. But it takes its first argument as an object pointer. So, type the first argument as an object pointer. Confusion will be triggered when the argument is passed to the to number function. This means we can pass any values as an object pointer to the to number function. Thus, we can fake an array of other objects in some address such as in a double array and pass the address to to number function. Exploits of an OOP access in V8 is straightforward for world. Usually through these few steps. Leak array buffer's content and then fake an array buffer a double array by using leaked data. Next, pass faked array buffer's address to to number. Modify back install and back a link. Next, pass faked array buffer's address to to number. Modify back a link. Next, pass faked array buffer's address to triple dollar check. then pass faked array buffer's address to both of them. At the end, pass faked array buffer's address to to OPPOS and then pass back that address to the to number feature. So in the end. In the doing are done. Let's do the 10 traffic Bobber. So if web assembly code and two ports without using shared memory. Next, I will talk about the second bug of the four exploit chain. Analyze the bug and introduce a way to escape standard bugs and show how we exploit the bug. So, let's start with the first bug. The standard bug escape bug is caused by map and on map mistake and cause a use after on map issue. The bug code is in the function the relic map and the relic on map. Both functions are in the relic model. The relic map maps are in the relic model. The relic map maps are géographic for memory space, Tyson's Не over side. This is ausannie to a base pointer. The relic map assigned to the card. The info on this The mapped memory will be unmapped in function direct on map. Let's have a look. When unmapping, base pointer is passed to system core on map directly without minus the offset. The offset is not used at all. As a result, map and unmap are mismatched. The map is unmapped. However, the member, the member, the member offset can be manu, manu, manipulated from a Chrome's standard box process. So, it's possible to unmap any pages in system server from Chrome's standard box renderer process. We have achieved RCE, but if you want to trigger the system server bug from the, from the Chrome, we have to bypass the standard box. Then, I will introduce a way to escape standard box. In the picture, we can see that Chrome is a standard box process, belong to isolated app domain. From the SEPolice file of isolated app, a view service like activity service can be caught in standard box. The standard box process. Also, we can get activity service from the standard box process. Then, when starting activity, function inverse not isolated caller will be invoked, which will check if the caller is, is in isolated app domain. Because of SELinux, most systems service has, have been restricted, restricted to access from standard box process and view and viewer functions can be called in the isolated app domain. Attack service is getting narrow. From the codes, we can see that. Despite various restrictions, we will still find that in general way, that can get renderer process reach system server by bounding core, bounder core, with passable object. A lot of classes in, imple, implements the interface passable. The member function creates from password of all these classes can be called from Chrome's standard box using bounder code, bounder code. Graphic buffer is a key to this. So, we will also see that Z1 is used in, in the exploration. I will talk about it later. This is the case. To reach system server, avoid, avoiding, enforce North Aslan's caller. And it's remote transact by bounder core. The bounder be passed from renderer is passed in activity options constructor. So, we get a way to reach system server from Chrome. Core creates from parser to create the bounder. Encapsulate, encapsulated with a graph buffer. And then we can use the bounder and call the bounder method conferred to trans, translucent and pass the malicious bounder to system server. Exploit bug. We, we complete the exploit through the six steps shown above. Next, I will detail each step. So, the first step is the address space sampling. Step one, address space sampling. We make the, we make the address space layout looks at the show above. A heap drank, a heap drank is right above some continuous, a shared memory mapping. Step two, trigger the bug. Unmark, unmark the part of heap and, and, and shared, a shared memory. Unmark four k, four kilobytes in heap drank. And two, two million to, two million minus fourth k, kb in shared memory. Shared memory 29. So, there is, there is two M gap between heap drank and, and, and shared memory. Shared memory 29. Step three, fill the unmarked space with an, with an sh, sh memory. The gap is filled with a shared memory one thousand or one. And, and, and shared memory one thousand or one. Step four, spray the heap. The heap data will be writing to the, to the shared memory. The heap manager believes the memory ran, range between the two red address is still mongered by it and will allocate memory from this range. Resulting heap data is writing to a, a shared memory. Step five, allocates graphic buffer objects in a shared memory overwrite feature function pointer. Because the field, a shared memory in step three, in step three is mapped. Both, both in, both by system server and renderer process. Partial heap of a system server is not a shared memory. can be read and writing by renderer process and we can try our system server to allocate some graphic buffer object in a shared memory. We can read virtual table of a graphic buffer object and override the virtual function pointer by writing the shared memory. Step 6. As graphic buffer is inherited from ref base which has a memory member function named on last strong ref. We can read the virtual table address from a shared memory and then can calculate the address of function on last a strong last strong ref. We found some ROP as chance in lab UI and modify the virtual table of a graphic buffer to try trigger ROP. When our when our graphic buffer object is deconstructed the virtual function on last strong ref is called. So we can replace this function this virtual function to jump to ROP. When GC is in ROP happens the counter flow goes to ROP. So. Ok. Finally let's summarize the contents of this talk. First we comprise the Chrome renderer with VH bug. And then we will talk about the use-to-use. So first. All of these bugs have already fix security updates of December 2017. our colleagues at our team and core team. That's all. Thank you.