02/05/2016

QSEE privilege escalation vulnerability and exploit (CVE-2015-6639)

In this blog post we'll discover and exploit a vulnerability which will allow us to gain code execution within Qualcomm's Secure Execution Environment (QSEE). I've responsibly disclosed this vulnerability to Google and it has been fixed - for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exact timeline, see cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Timeline" section below.

 The QSEE Attack Surface

 

As we've seen in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 previous blog post, Qualcomm's TrustZone implementation enables cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Normal World" operating system to load trusted applications (called trustlets) into a user-space environment within cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Secure World", called QSEE.

This service is provided to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Normal World" by sending specific SMC calls which are handled by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Secure World" kernel. However, since SMC calls cannot be invoked from user-mode, all communication between cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Normal World" and a trustlet must pass through cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Normal World" operating system's kernel.

Having said that, regular user-space processes within cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Normal World" sometimes need to communicate with trustlets which provide specific services to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m. For example, when playing a DRM protected media file, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 process in charge of handling media within Android, "mediaserver", must communicate with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 appropriate DRM trustlet in order to decrypt and render cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 viewed media file. Similarly, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 process in charge of handling cryptographic keys, "keystore",  needs to be able to communicate with a special trustlet ("keymaster") which provides secure storage and operation on cryptographic keys.

So if communicating with trustlets requires cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ability to issue SMCs, and this cannot be done from user-mode, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n how do cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se processes actually communicate with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlets?

The answer is by using a Linux kernel device, called "qseecom", which enables user-space processes to perform a wide range of TrustZone-related operations, such as loading trustlets into cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 secure environment and communicating with loaded trustlets.



However! Although necessary, this is very dangerous; communication with TrustZone exposes a large (!) attack surface - if any trustlet that can be loaded on a particular device contains a vulnerability, we can exploit it in order to gain code execution within cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trusted execution environment. Moreover, since cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trusted execution environment has cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ability to map-in and write to all physical memory belonging to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Normal World", it can also be used in order to infect cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Normal World" operating system's kernel without cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re even being a vulnerability in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 kernel (simply by directly modifying cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 kernel's code from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Secure World").

Because of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dangers outlined above, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 access to this device is restricted to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 minimal set of processes that require it. A previous dive into cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 permissions required in order to access cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 driver has shown that only four processes are able to access "qseecom":
  • surfaceflinger (running with "system" user-ID)
  • drmserver (running with "drm" user-ID)
  • mediaserver (running with "media" user-ID)
  • keystore (running with "keystore" user-ID)

This means that if we manage to get a hold of any of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se four processes, we would cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n be able to directly attack any trustlet of our choice, directly bypassing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Linux kernel in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 process! In fact, this is exactly what we'll do - but we'll get to that later in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 series.

For this blog post, let's assume that we already have code-execution within cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "mediaserver" process, thus allowing us to directly focus on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 attack surface provided by trustlets. Here's an illustration to help visualise cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 path of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exploit chain we'll cover during cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 series and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 focus of this post:



Vulnerability Scope


I haven't been able to confirm cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exact scope of this issue. I've statically checked quite a few devices (such as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Droid Turbo, Nexus 6, Moto X 2nd Gen), and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y were all vulnerable. In fact, I believe cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 issue was very wide-spread, and may have affected most Qualcomm-based devices at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 time.

So why was this issue so prevalent? As we'll see shortly, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 vulnerability is contained in a trustlet and so does not rely on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 TrustZone kernel (which tends to change substantially between SoCs), but racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r on code which is designed to be able to execute in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same manner on many different devices. As such, all devices containing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet were made vulnerable, regardless of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir SoC.

Also note that on some devices cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 vulnerable code was present but appeared slightly different (it may have been an older version of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same code).  Those devices are also vulnerable, although cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 indicators and strings you might search for could be slightly different. This means that if you're searching for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exact strings mentioned in this post and don't find cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m, don't be dissuaded! Instead, reverse-engineer cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 tools from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 previous blog post, and check for yourself.

Enter Widevine


Previously, we decided to focus our research efforts on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "widevine" trustlet, which enables playback of DRM encrypted media using Widevine's DRM platform. This trustlet seems like a good candidate since it is moderately complex (~125KB) and very wide-spread (according to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir website, it is available on over 2 billion devices).

After assembling cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 raw trustlet, we are left with an ELF file, waiting to be analysed. Let's start by taking a look at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function registered by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet in order to handle incoming commands:



As we can see, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 first 32-bit value in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 command is used to specify cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 command code, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 high-word of which is used to sort cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 commands into four different categories.

Taking a peek at each of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 category-handling functions reveals that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 categories are quite rich - all in all, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are about 70 different supported commands - great! However, going over 70 different commands would be a pretty lengthy process - perhaps we can find a shortcut that'll point us in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 right direction? For example, maybe cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re's a category of commands that were accidentally left in even though cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're not used on production devices?

Since cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 libraries which are used to interact with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlets are also proprietary, we can't look through cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 source code to find cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 answers. Instead, I wrote a small IDAPython script to lookup all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 references to "QSEECom_send_cmd", cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function used to send commands to trustlets, and check what cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "command-code" value is for each reference. Then I simply grouped cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 results into cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 categories above, producing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 following results:


So... Nobody is using 5X commands. Suspicious!

Sifting through cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 functions in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 5X category, we reach cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 following command:



Pretty straight-forward: copies cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 data from our request buffer into a "malloc"-ed buffer (note that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 length field here is not controlled by us, but is derived from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 real buffer length passed to QSEOS). Then, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function's flow diverges according to a flag in our request buffer. Let's follow cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 flow leading to "PRDiagVerifyProvisioning":



Finally, we found a vulnerability!

After some simple validation (such as checking that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 first DWORD in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 command buffer is indeed zero), cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function checks cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 value of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fourth DWORD in our crafted command buffer. As we can see above, setting that value to zero will lead us to a code-path in which a fully-controlled copy is performed from our command buffer into some global buffer, using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 third DWORD as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 length argument. Since this code-path only performs cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 vulnerable memcpy and nothing else, it is much more convenient to deal with (since it doesn't have unwanted side-effects), so we'll stick to this code-path (racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r than cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 one above it, which seems more complex).

Moreover, you might be wondering what is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "global buffer" that's referred to in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function above. After all, it looks a little strange - it isn't passed in to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function at any point, by is simply referred to "magically", by using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 register R9.

Remember how cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlets that we analysed in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 previous blog post had a large read-write data segment? This is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 data segment in which all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 modifiable data of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet is stored - cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 stack, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 heap and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 global variables. In order to quickly access this segment from any location in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code, Qualcomm decided to use cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 platform-specific R9 register as a "global register" whose value is never modified, and which always points to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 beginning of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 aforementioned segment. According to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ARM AAPCS, this is actually valid behaviour:


What now?


Now that we have a primitive, it's time to try and understand which pieces of data are controllable by our overflow. Again, using a short IDAPython script, we can search for all references to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "global buffer" (R9) which reside after cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 overflown buffer's start address (that is, after offset 0x10FC). Here are cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 results:


Disappointingly, nearly all of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se functions don't perform any "meaningful" operations of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 controllable pieces of data. Specifically, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 vast majority of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se functions simply store file-system paths in those memory locations, which imply no obvious way to hijack control flow.

Primitive Technology


Since cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re aren't any function pointers or immediate ways to manipulate control flow directly after cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 overflown buffer, we'll need to upgrade our buffer overflow primitive into a stronger primitive before we can gain code execution.

Going through cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 list of functions above, we come across interesting block of data referred to by several functions:

As you can see above, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 block of 0x32 DWORDs, starting at offset 0x169C, are used to store "sessions".  Whenever a client sends commands to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Widevine trustlet, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y must first create a new "session", and all subsequent operations are performed using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 specific session identifier issued during cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 session's creation. This is needed, for example, in order to allow more than a single application to decrypt DRM content at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same time while having completely different internal states.

In any case, as luck would have it, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 sessions are complex structures - hinting that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y may be used in order to subtly introduce side-effects in our favour. They are also within our line-of-fire, as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y are stored at an offset greater than that of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 overflown buffer. But, unfortunately, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 0x32 DWORD block mentioned above only stores cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 pointers to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se session objects, not cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 objects cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365mselves. This means that if we want to overwrite cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se values, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y must point to addresses which are accessible from QSEE (ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rwise, trying to access cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m will simply result in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet crashing).


Finding Ourselves


In order to craft legal session pointers, we'll need to find out where our trustlet is loaded. Exploring cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 relevant code reveals that QSEOS goes to great lengths in order to protect trustlets from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Normal World". This is done by creating a special memory region, referred to as "secapp-region", from which cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet's memory segments are carved. This area is also protected by an MPU, which prevents cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Normal World" from accessing it in any way (attempting to access those physical addresses from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Normal World" causes cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 device to reset).

On cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r hand, trustlets reside within cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 secure region and can obviously access cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir own memory segments. Not only that, but in fact trustlets can access all allocated memory within cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "secapp" region, even memory belonging to ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r trustlets! However, any attempt to access unallocated memory within cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 region results in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet immediately crashing.

...Sounds like we're beginning to form a plan!

We can use cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 overflow primitive in order to overwrite a session pointer to a location within cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "secapp" region. Now, we can find a command which causes a read attempt using our poisoned session pointer. If cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet crashes after issuing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 command, we guessed wrong (in that case, we can simply reload cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet). Ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rwise, we found an allocated page in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "secapp" region.


But... How do we know which trustlet that page belongs to?

We already have a way to differentiate between allocated and unallocated pages. Now, we need some way to distinguish between pages based on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir contents.

Here's an idea - let's look for a function that behaves differently based on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 read value in a cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 session pointer:


Okay! This function tries to access cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 data at session_pointer + 0xDA. If that value is equal to one, it will return cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 value 24, ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rwise, it will return 35.

This is just like finding a good watermelon; by "tapping" on various memory locations and listening to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "sound" cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y make, we can deduce something about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir contents. Now we just need to give our trustlet a unique "sound" that we can identify by tapping on it.

Since we can only listen to differences between one and non-one values, let's mark our trustlet by creating a unique pattern containing ones and zeros within it. For example, here's a pattern which doesn't occur in any ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r trustlet:


Now, we can simply write this pattern to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet's data segment by using over overflow primitive, effectively giving it its own distinct "sound".

Finally, we can repeat cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 following strategy until we find cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet:
  • Randomly tap a memory location in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "secapp" region:
    • If it sounds "hollow" (i.e., cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet crashes) - cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re's nothing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re, so reload our trustlet
    • Ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rwise, tap cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 sequence of locations within cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 page which should contain our distinct marking pattern. If it sounds like cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 pattern above, we found our trustlet

Of course, inspecting cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 allocation scheme used by QSEOS could allow us to speed things furcá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r by only checking relevant memory locations. For example, QSEOS seems to allocate trustlets consecutively, meaning that simply scanning from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 end of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "secapp" region to its beginning using increments of half cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet's size will guarantee a successful match.


A (messy) write primitive


Now that we have a way to find cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 secure region, we are able to craft "valid" session pointers, which point to locations within cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet. Next up, we need to find a way to create a write primitive. So... are cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re any functions which write controllable data into a session pointer?

Surprisingly, nearly all functions that do write data to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 session pointer do not allow for arbitrary control over cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 data being written. Nonecá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365less, one function looks like it could be of some help:

This function generates a random DWORD to be used as a "nonce", cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n checks if enough time elapsed since cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 previous time it was called. If so, it adds cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 random value to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 session pointer by calling "addNonceToCache".

First of all, since cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "time" field is saved in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 global buffer after our overflown buffer, we can easily clear it using our overflow primitive, thus removing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 time limitation and allowing us to call cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function as frequently as we'd like. Also, note that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 generated nonce's random value is written into a buffer which is returned to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 user - this means that after a nonce is generated, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 caller also learns cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 value of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 nonce.

Let's take a peek at how cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 nonces are stored in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 session pointer:


So cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re's an array of 16 nonces in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 session object - starting at offset 0x88. Whenever a nonce is added, all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 previous nonce values are "rolled over" one position to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 right (discarding cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 last nonce), and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 new nonce is written into cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 first location in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 nonce array.

See where we're going with this? This is actually a pretty powerful write primitive (albeit a little messy)!

Whenever we want to write a value to a specific location, we can simply set cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 session pointer to point to that location (minus cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 offset of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 nonces array). Then, we can start generating nonces, until cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 least-significant byte (this is a little-endian machine) in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 generated nonce matches cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 byte we would like to write. Then, once we get a match, we can increment cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 session pointer by one, generate cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 next byte, and so forth.



This allows us to generate any arbitrary value with an expectancy of only 256 nonce-generation calls per byte (since this is a geometric random variable). But at what cost?

Since cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 values in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 nonce cache are "rotated" after every call, this means that we mess-up cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 15 DWORDs after cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 last written memory location. We'll have to work our way around that when we design cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exploit.

 Writing an exploit

We finally have enough primitives to craft a full exploit! All we need to do is find a value that we can overwrite using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 messy write primitive, which will allow us to hijack cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 control flow of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 application.

Let's take a look at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function in charge of handling cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "6X" category of commands:



As you can see, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function calls cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 requested commands by using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 command ID specified as an index into an array stored in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 global buffer. Each supported command is represented by a 12-byte entry in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 array, containing four pieces of information:
  • The command code (32-bits)
  • A pointer to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 handling function itself (32-bits)
  • The minimal input length (16-bits)
  • The minimal output length (16-bits)

If this information is valid, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function pointer is executed, passing in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 user's input buffer as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 first argument and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 output buffer as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 second argument.

If we choose an innocuous 6X command, we can overwrite cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 corresponding entry in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 array above so that its function pointer will be directed at any piece of code we'd like to execute. Then, simply calling this command will cause cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet to execute cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code at our controlled memory location. Great!

We should be wary, however, not to choose a function which lies directly before an "important" command that we might need later. This is because our messy write primitive will destroy cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 following 15 DWORDs (or racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 next 5 array entries). Let's take a look at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function which populates cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 entries in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 command array:


There are six consecutive entries corresponding to unused functions. Therefore, if we choose to overwrite cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 entry directly before cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m, we'll stay out of trouble.

 

Universal Shellcode Machine


Although we can now hijack cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 control flow, we still can't quite execute arbitrary code within QSEE yet. The regular course of action at point would probably be to find a stack-pivot gadget and write a short ROP chain which will enable us to allocate shellcode - however, since cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlets' code segments aren't writeable, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 TrustZone kernel doesn't expose any system call to QSEE to allow cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 allocation of new executable pages, we are left with no way to create executable shellcode.

So does this mean we need to write all our logic as a ROP chain? That would be extremely inconvenient (even with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 aid of automatic "ROP"-compilers), and might even not be possible if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ROP gadgets in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet are not Turing-Complete.

Luckily, after some careful consideration, we can actually avoid cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 need to write longer ROP chain. If we think of our shellcode as a Turing Machine, we would like to create a "Universal Turing Machine" (or simulator), which will enable us to execute any given shellcode as if it were running completely within QSEE.

Given a piece of code, we can easily simulate all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 control-flow and logic in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Normal World", simply by executing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code fully in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Normal World". But what about operations which behave differently in a QSEE-context? If we think about it, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are only a few such operations:
  • Reading and writing memory
  • Calling system calls exposed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 TrustZone kernel
These operations must execute within QSEE. However, we can actually execute both of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se operations in QSEE by writing one small ROP chain!

All we need is a single ROP chain which will:
  • Hijack control flow to a separate stack
  • Prepare arguments for a function call
  • Call cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 wanted QSEE function
  • Return cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 result to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 user and restore execution in QSEE
As you can see, all this chain do is to enable us to execute any given QSEE function using any supplied arguments. But how can we use it to simulate cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 special operations?

Well, since all system-calls in QSEE have matching calling-stubs in each trustlet, we can use our ROP chain to execute any system call with ease. As for memory accesses - cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re is an abundance of QSEE functions which can be used as read and write gadgets. Hence, both operations are simple to execute using our short ROP chain.

This leaves us with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 following model:


This also means that executing arbitrary shellcode in QSEE doesn't require any engineering effort! All cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 shellcode developer needs to do is to delegate memory accesses and system calls to specific APIs exposed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exploit. The rest of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 shellcode's logic can remain unchanged and execute completely in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Normal World". We'll see an example of some shellcode using this model shortly.

Finding a stack pivot


In order to execute a ROP chain, we need to find a convenient stack-pivot gadget. When dealing with large or medium-sized applications, this is not a daunting task - cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re is simply enough code for us to find at least one gadget that we can use.

However, since we're only dealing with ~125KB of code, we might not be that lucky. Not only that, but at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 point at which we hijack cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 control flow, we only have control over cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 registers R0 and R1, which point to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 input and output buffers, respectively.

After fully disassembling cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet's code we are faced with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 harsh truth - it seems as though cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re is no usable stack pivot using our controlled registers. So what can we do?

Recall that ARM opcodes can be decoded in more than one way, depending on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 value of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 T bit in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 CPSR. When cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 bit is set, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 processor is executing in "Thumb" mode, in which cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 instruction length is 16-bits. Ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rwise, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 processor is in "ARM" mode, with an instruction length of 32-bits.

We can easily switch between cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se modes by using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 least-significant bit of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 PC register when performing a jump. If cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 least-significant bit is set, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 T bit will be set, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 processor will switch to "Thumb" mode. Ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rwise, it will switch to ARM mode.

Looking at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet's code - it seems to contain mostly "Thumb" instructions. But perhaps if we were to forcibly decode cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 instructions as if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y were "ARM" instructions, we'd be able to find a hidden stack pivot which was not visible beforehand.

Indeed, that is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 case! Searching through cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ARM opcodes reveals a very convenient stack-pivot:


By executing this opcode, we will be able to fully control cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 stack pointer, program counter and ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r registers by using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 values stored in R0 - which, as we saw above, points to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fully user-controlled input buffer. Great!

As for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rest of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ROP chain - it is pretty standard. In order to execute a function and return all we need to do is build a short chain which:
  • Sets cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 low registers (R0-R3) and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 stack arguments to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function's arguments
  • Set cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 link register to point to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rest of our chain
  • Jump to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function's start address
  • When control is returned via cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 crafted LR value, store cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 return value in user-accessible memory location, such as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 supplied output buffer
  • Restore cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 stack pointer to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 original location and return to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 location from which control was originally hijacked
You can find cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 complete ROP chain and gadgets in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 provided exploit code, but I imagine it's exactly what you'd expect.

Putting it all togecá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r


At long last, we have all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 pieces needed to create a fully functional exploit. Here's a short run-down of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exploit's stages:
  • Find cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Widevine application by repeatedly "tapping" cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 secapp region and "listening"
  • Create a "messy" write gadget using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 nonce-generation command
  • Overwrite an unused 6X command entry using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 write gadget to direct it to a stack-pivot
  • Execute any arbitrary code using a small ROP chain under cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Universal Shellcode Machine"



The Exploit


As always, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 full exploit code is available here:

https://github.com/laginimaineb/cve-2015-6639

I've also included a sample shellcode using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 model described earlier. The shellcode reads a file from TrustZone's secure file-system - SFS. This file-system is encrypted using a special hardware key which should be inaccessible to software running on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 device - you can read more about it here. Regardless, running within cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Secure World" allows us to access SFS fully, and even extract critical encryption keys, such as those used to decrypt DRM content.

In fact, this is all it takes:


Also, please note that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are quite a few small details that I did not go into in this blog post (for brevity’s sake, and to keep it interesting). However, every single detail is documented in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exploit's code. So by all means, if you have any unanswered questions regarding cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exploit, I encourage you to take a look at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code and documentation.

What's next?


Although we have full code-execution within QSEE, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are still some things beyond our reach. Specifically, we are limited only to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 API provided by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 system-calls exposed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 TrustZone kernel. For example, if we were looking to unlock a bootloader, we would probably need to be able to blow cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 device's QFuses. This is, understandably, not possible from QSEE.

With that in mind, in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 next blog post, we'll attempt to furcá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r elevate our privileges from QSEE to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 TrustZone kernel!

Timeline 

  • 27.09.2015 - Vulnerability disclosed
  • 27.09.2015 - Initial response from Google
  • 01.10.2015 - PoC sent to Google
  • 14.12.2015 - Vulnerability fixed, patch distributed

I would also like to mention that on 19.10.2015 I was notified by Google that this issue has already been internally discovered and reported by Qualcomm. However, for some reason, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fix was not applied to Nexus devices.

Moreover, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are quite a few firmware images for ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r devices (such as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Droid Turbo) that I've downloaded from that same time period that appeared to still contain cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 vulnerability! This suggests that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re may have been a hiccup when internally reporting cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 vulnerability or when applying cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fix.

Regardless, as Google has included cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 issue in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 bulletin on 14.12.2015, any OEMs that may have missed cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 opportunity to patch cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 issue beforehand, got anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r reminder.

1,685 comments:

  1. Do you know where Widevine is located on a Motorola Droid Maxx? Or at least how to locate it?

    ReplyDelete
    Replies
    1. This comment has been removed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author.

      Delete
    2. I'd be really really surprised... There are a lot of paths, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 location changes across OEMs and devices. Try cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se paths: /firmware/vendor, /vendor/, /firmware/image, /system/firmware/, /system/vendor/

      Delete
    3. It has it, however I can not find it. All cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r TrustZone apps are stored in /firmware/image, however I do not see Widevine cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re.

      Delete
    4. Those are part of an image shipped with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 device, called NON-HLOS. Anyway, just run "find" and look for widevine.mdt (make sure you have root privs before)

      Delete
    5. Yep, definitely can't find it. Find output (Minus cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 few directory not found in /proc):
      http://pastebin.com/1AyHcYQC

      Delete
  2. Ah, that's surprising - only device I've seen without it. Here's something else you can try: QC added cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 PRDiag commands to ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r trustlets as well, so you can search to see if any of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m are vulnerable using "grep -r PRDiag /"

    ReplyDelete
    Replies
    1. The only one with PRDiag is tzapps.

      Delete
    2. Will cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same code work? Or will it need adapted? (Besides cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 widevine path part)

      Delete
    3. Also, my phone apparently still has support for widevine though. The .jar for it is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re.

      Delete
  3. The same vuln should work, but you'll need a new exploit (since cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 wv sessions won't be cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re, etc.).

    ReplyDelete
    Replies
    1. Alright! Thanks again.

      Delete
    2. If you would be so kind as to email me and give me some pointers, that would be great. Here's my email:
      bfox200012@gmail.com

      Delete
    3. Actually, upon looking at tzapps, it seems that tzapps IS widevine..

      Delete
    4. Or maybe not..it does have a lot of widevine references though.

      Delete
  4. Would this work on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 LG G5? (If this is a really stupid question I'm sorry I'm very new to this)
    If you have cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 time to explain how to use this to a beginner, please email me at fredo0429@gmail.com

    ReplyDelete
    Replies
    1. I think it would, but I've never checked it specifically. Feel free to search for "PRDiag" in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 firmware image to make sure.

      Delete
    2. This comment has been removed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author.

      Delete
  5. Can we use this to achieve root on devices with Marshmallow?

    ReplyDelete
    Replies
    1. Sure, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Android version doesn't really matter - QSEE can infect any running kernel.

      See cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 next blog post: http://bits-please.blogspot.com/2016/05/war-of-worlds-hijacking-linux-kernel.html

      Delete
  6. Is this SFS encryption used on modemst1 and modemst2 to encrypt NV values?

    ReplyDelete
    Replies
    1. Great question!

      I did some research in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 past into cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 modemst1 and modemst2 filesystems, but this was a long time ago and probably not 100% accurate (since reversing QDSP6 is hard and time-consuming).

      IIRC, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 modemst filesystems use something called EFS2 which relies on a processor-specific hardware key. SFS uses a hardware-key from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 application processor, but EFS uses a hardware-key from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 baseband processor.

      Delete
    2. Cheers for your reply,

      You mentioned SFS uses a HBK, would this be cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same key that is used to encrypt cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 device when encryption is enabled? It was my understanding that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Crypto Core0 only had access to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 key, much like a TPM it would never expose cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 key.

      Indeed modem reversing is hard, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 architecture is a little like ARM, in your experience, how much trust does cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 modem have? Can cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 modem access cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 QFPROM region? Or configure cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 XPU?

      Delete
    3. I don't think SFS uses cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same key used for device encryption (cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 patent mentions cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 device-specific hardware key "52" in regards to SFS). Also, yes - cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 hardware keys are supposed to be accessible only to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Crypto Core (although this could be something interesting to research in order to make sure).

      As for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 modem - I've done quite a lot of research into it and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 MBA module; both seem to have very little amounts of "trust" - no XPU or QFPROM access.

      On cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r side, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 TrustZone kernel should be able to configure cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 XPUs, which would enable access to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 modem's memory from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 TZ kernel (however, I haven't been able to access any XPU-protected region from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 TZ kernel yet - I have no idea how cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 XPUs work and reversing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 responsible TZ code takes a long time).

      Delete
    4. This comment has been removed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author.

      Delete
    5. Cheers for your reply, indeed some more research does need to completed.

      A little off topic, will you be at BlackHat this year? I'd love to meet you!

      Delete
    6. I might get around to it later this year, it does sound like an interesting thing to check out.

      Also, unfortunately I won't make it to BH this year since it overlaps cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exam season, but I'd love to chat as well. Perhaps I'll see you later in anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r con?

      Delete
  7. How did you map out/get symbols for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 various widevine command codes? aka how did you produce widevine_commands.h?

    ReplyDelete
    Replies
    1. By reversing Widevine's code. There are quite a few logs left in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code which helped, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are three functions that I couldn't figure out (or were unused), but maybe cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir names exist in older versions of Widevine (I didn't check). Also - some commands didn't have names in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Widevine application itself, but did have names in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 calling libraries (like cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 OEMCrypto* family of functions).

      Delete
  8. Hey..Question if you don't mind..What would I be looking for in tzapps to exploit it in a similar manner to this?

    ReplyDelete
  9. Hey, I downloaded cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 newest drivers of qcom-shamu from https://developers.google.com/android/nexus/drivers#dragonmxc89f and found cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re is no difference below cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 key code you mentioned here, seems like this is not fixed?

    ReplyDelete
    Replies
    1. It's fixed in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 official firmware images (see https://developers.google.com/android/nexus/images) and in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 OTA images.

      I think cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 page you linked is used to provide firmware images for AOSP - but you're right - it looks like Google forgot to apply cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 patch cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re (so users of CM/ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r AOSP-based ports of Nexus 6 would still be vulnerable). Would you like to file a security report with Google? Here's a link: https://code.google.com/p/android/issues/entry?template=Security%20bug%20report

      Delete
    2. This comment has been removed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author.

      Delete
    3. thanks laginimaineb, I also downloaded shuma images and OTA from https://developers.google.com/android/nexus/images and found cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code is still same, did you review cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 widevine from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se images? or do you know how it was fixed? thanks :)

      Delete
    4. I tested https://dl.google.com/dl/android/aosp/shamu-ota-mob30i-c0bdba8e.zip and https://dl.google.com/dl/android/aosp/shamu-lrx21o-factory-e028f5ea.tgz

      Delete
    5. also cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 modified date of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 widevine from above images is prior to 14.12.2015(Vulnerability fixed, patch distributed)

      Delete
    6. Sorry for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 late response! Only got around to it now...

      Anyway, I think you're right, apparently cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fix wasn't applied to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Nexus 6 after all. Thank you for your vigilance! This is really surprising, especially since I initially reported it to Google with regards to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Nexus 6 specifically, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fix should have been included in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 January 2016 update.

      I don't quite understand why this happened... The duo article covering cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 vulnerability (https://duo.com/blog/sixty-percent-of-enterprise-android-phones-affected-by-critical-qsee-vulnerability) states that 60% of Android devices are still vulnerable, so it seems like this vulnerability is here to stay for a while.

      Could you please update me as to whecá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r or not you are reporting this to Google? Obviously this needs to be fixed.

      Delete
    7. thanks laginimaineb, I have notified Google, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y are reviewing it, keep you posted

      Delete
    8. Google is still reviewing:(

      Delete
    9. This comment has been removed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author.

      Delete
    10. Hi laginimaineb,

      pls refer to https://dl.google.com/dl/android/aosp/shamu-mob30w-factory-21715256.zip for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 bug fix:)

      Delete
  10. Hi again. Sorry for bugging you before, but I have found cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Widevine location for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 LG G5. It is located in "/system/vendor/firmware/widevine.mdt".

    What exactly do I do with this?

    ReplyDelete
    Replies
    1. Also, I keep getting this error whenever I try and run cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code: "[-] Failed to load Widevine: Bad file descriptor"

      Delete
    2. Make sure you changed cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 widevine path in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exploit (IIRC in defs.h) to that path, and that you're running as eicá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r media or root

      Delete
    3. Ah OK, I will change that :)

      Unfortunately root is not available for my device at this time, how can I run it as media?

      Delete
    4. Ah OK, I will change that :)

      Unfortunately root is not available for my device at this time, how can I run it as media?

      Delete
    5. For that you'll need a mediaserver vulnerability. I'm releasing one for all Android devices and versions soon.

      Delete
    6. Awesome! Thanks, you're cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 best :)

      Delete
    7. Awesome! Thanks, you're cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 best :)

      Delete
  11. This comment has been removed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author.

    ReplyDelete
  12. Hi laginimaineb! Thanks for your great articles. Could you explain how did you find cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 value SECURE_APP_REGION_START and size of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 whole secapp region available for memory allocation for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlets, please? Is this values are same for all Qualcomm's SoCs?
    What is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 probability of allocation of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same memory region after trustlet to be crashed while searching location of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet ?

    ReplyDelete
  13. Hi, To enable Widevine Level 1 on HDMI is it mandatory have to HDCP enabled and provisioned on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Qualcomm processor?

    Cheers,
    Sundeep

    ReplyDelete
  14. Hi laginimaineb,

    Thanks for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 awesome article!

    The firmware image you linked on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 previous article (https://dl.google.com/dl/android/aosp/shamu-lmy48m-factory-336efdae.tgz) now points to patched version of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 firmware.
    I am trying to reproduce this exploit and could you please share cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exact vulnerable firmware image that you used? Thanks alot!

    ReplyDelete
  15. Hi laginimaineb,

    I have following three questions. Could you please answer cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m for me?

    1. Does this trusted app running in secure wold has page tables? if so, is it 2 level page table?
    2. Do you know how MMU translates cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 virtual address to physical address in QSEE? Incase of TLB miss, it checks TTBR to find second level page table and from second level page table, it finds cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 physical address?
    3. RAM is divided into secure RAM (for secure world) and non secure RAM (non secure world), right? Is it possible to find cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 physical address range of secure RAM?

    Thanks a lot,
    Karthik

    ReplyDelete
    Replies
    1. 1. It does, but I haven't looked at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m in depth. You can use my TZ kernel exploit to read TTBR0 and dump cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 translation table.

      2.It's cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exact same process as listed in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ARM VMSA.

      3. Yes, but do you mean pages that are marked secure or simply cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 secapp region? In any case, you can find secapp by looking at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 kernel dtb, and you can find cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 TZ monitor memory ranges by looking at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 TZ ELF (TZ monitor uses a flat translation table so no need to translate VAs to PAs)

      Delete
  16. Nice writing! You mentioned "in fact trustlets can access all allocated memory within cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "secapp" region, even memory belonging to ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r trustlets!".

    However, in your slides "https://microsoftrnd.co.il/Press%20Kit/BlueHat%20IL%20Decks/GalBeniamini.pdf", you mentioned that "Trustlets cannot access cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 memory of ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r loaded trustlets", "Even if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y know cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir loading address within “secapp”".

    So I wonder, indeed can cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlets for Qualcomm implementation can access cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 memory of ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r trustlets or not?
    Thanks.

    ReplyDelete
    Replies
    1. Hi CrazyGalaxy,

      Thanks for reading! As mentioned in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 BlueHat IL presentation, trustlets can't access one anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r's memory ranges, as I later discovered when I was writing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 TrustZone kernel exploit. However, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 reason I got it wrong in this blog post was that probing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 memory ranges in "secapp" didn't always crash, even for addresses that *weren't* in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 current trustlet. In hindsight, I think this is because of shared data structures that were located in "secapp", and were readable by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trustlet.

      All cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 best,
      Gal.

      Delete
  17. The exploit code in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Github is written for device Nexus 6, lmy48m, right?

    If reproducing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exploit on ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r devices like Nexus 5, what parameters need to be updated?
    Only SECURE_APP_REGION_START and SECURE_APP_REGION_SIZE, or a lot of ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rs? Thanks.

    ReplyDelete
    Replies
    1. This comment has been removed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author.

      Delete
    2. I also changed cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 DATA_SEGMENT_OFFSET and DATA_SEGMENT_SIZE (need to -1). But still does not work.

      It seems it cannot find cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 widevine application in memory:

      [+] Crashed in linear scan, jumping ahead
      [-] Failed to find application
      : No such file or directory

      Delete
    3. Hi CrazyGalaxy,

      Yes, you would need to adjust cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rest of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 symbols (see symbols.h) to match cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exact version of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Widevine trustlet that you're trying to exploit. Ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r than that, as you've stated above, you'll need to set cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 secure apps region bounds to match cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ones defined in your kernel's dtb.

      All cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 best,
      Gal.

      Delete
  18. Has anyone had luck with this exploit on MSM8909? Seems PRDiag is missing

    ReplyDelete
  19. How to Clear TPM Security Processor Firmware The term TPM stands for Trusted Platform Module. If our PC is TPM enabled cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n it is our first priority to update our security processor. Windows Defender Security Centre regularly sends us cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 priority message to update cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 TPM firmware. It can also say us to update cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 TPM security processor firmware.

    ReplyDelete
  20. Hello! Do you use Twitter? I’d like to follow you if that would be okay. I’m absolutely enjoying your blog and look forward to new posts.

    NFR live stream
    Watch NFR live Online
    NFR live stream 2018
    NFR Live on CBS Sports Network

    ReplyDelete
  21. When a car or truck turning at an intersection cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y would look if a vehicle is nearby or not, as a usual habit driver looks for large vehicles like ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r cars. If he doesn’t see any ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r large vehicle, he presumes no one on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 back and slows cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 car to change cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 road. What he fails to see is a motorcycle on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 back as its very small for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 vehicles he is most used to see on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 road. So, here is what a motorcyclist should do to avoid such an incident. - Motorists

    ReplyDelete
  22. Very Awesome write up !!! You have provided best efforts Here Thank You for This
    Great Blog Post. I am going to Bookmark your Blog for Furcá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r Visit.

    Walmartone Login
    Mysubwaycard
    Mygiftcardsite
    Freedom APK
    Walmart Credit Card Login
    Tell Subway

    ReplyDelete
  23. Well !!! This is very awesome Happy Easter 2019 Images and good written article Good Friday 2019 Images you have provided here all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Information and facts Kentucky Derby 2019 are always truthful and great. Thanks for this awesome article

    ReplyDelete

  24. Hey, thanks for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 article mate
    Download Cartoon HD app and watch Movies, Television, Web Series and Cartoon Shows for FREE


    ReplyDelete
  25. This comment has been removed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author.

    ReplyDelete
  26. This comment has been removed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author.

    ReplyDelete
  27. Nice Blog, Thank you so much for sharing such an amazing blog with us. Visit
    Dynamic Website Designing Company in Delhi

    ReplyDelete
  28. Visit for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 services of Shipping, Freight Forwarders and Logistics Companies at Y & H Cargo India.
    Shipping Company in India

    ReplyDelete
  29. Nice Blog, Get cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 best Audio and Sound Engineering courses by Spin gurus.
    Music Production Course

    ReplyDelete
  30. Thank you so much for sharing such a valuable blog with us.
    Best Performing Mutual Fund

    ReplyDelete
  31. excellent put up, very informative. I wonder why cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 opposite experts of this sector do not understand this. You must continue your writing. I’m sure, you’ve a great readers’ base already!

    Happy Easter Images 2019
    Happy Easter Pics 2019 For Facebook
    Happy Easter Bunny Images 2019 For Facebook
    Happy Easter Wallpaper 2019 For Facebook
    Happy Easter Background 2019 For Facebook

    ReplyDelete
  32. Sanal para birimi olan bitcoin, bir çok ödeme kanallarını geride bırakarak en fazla tercih edilen yöntem olarak 2018 yılına damgasını vurmuştu. Özellikle sürekli artış göstermesi bir çok yatırımcının ilgisini çekerken son dönemlerdeki ciddi düşüş grafiği Bitcoin’e yatırım yapanlara büyük sıkıntılar da yaşatmaya başladı ancak hala oldukça popüler olan bitcoin sayesinde tamamen gizli ve güvenli bir şekilde bakiye yüklemek ve para çekmek oldukça kolay.

    ReplyDelete
  33. Amazing Blog, Thank you so much for sharing such an amazing blog. Visit Ogeninfo for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 creative and Dynamic Website Designing Services in Delhi.
    Website Designing Company in Delhi

    ReplyDelete
  34. Thanks dear for sharing such amazing information. Visit for retirement planning calculator

    ReplyDelete
  35. Amazing blog, Visit Y&H Cargo India for Shipping and Freight Forwarding Services.
    Logistics Company in Delhi

    ReplyDelete
  36. Thanks for this informative blog sharing with us, Visit Mutual Fund Wala to get Investment Schemes and Mutual Fund Advisors.
    Mutual Fund Advisor

    ReplyDelete
  37. Nice Post thanks for sharing it s very useful. This Blog gives me so much information….
    Web Development Company in Delhi

    ReplyDelete

  38. La veilleuse coranique bluetooth avec sa télécommande pour offrir.
    Cadeau ramadam idéal
    La veilleuse coranique personnalisée pas cher
    Veilleuse coranique pas cher
    Veilleuse coranique pas cher

    Découvrez La veilleuse coranique Munawara
    Video de la Veilleuse coranique munawara
    Veilleuse coranique munawara


    Je travailles sur un projet de fabrication de cornes de gazelle personnalisée
    cornes de gazelle marocaine
    cornes de gazelle algerienne
    Merci de laisser ce lien c'est sympa...

    Le casque vapeur hair steamer permet de lutter contre la sécheresse, la chute des cheveux et leur mauvaise santé , dans le confort de votre domicile. Le hair steamer est un casque vapeur qui apporte une dose d'hydratation pour les cheveux crépus.
    Hair steamer vapohair
    Lee hair steamer casque vapeur est recommendé par fes femmes aux cheveux crépus
    Casque vapeur
    La casque vapeur hair steamer apporte beaucoup de bienfait au cheveux crépus de type afro Hair.
    hair steamer Casque vapeur hydratation cheveux crépus
    hair steamer casque vapeur

    ReplyDelete
  39. Your work is very good and I appreciate you and hopping for some more informative posts brat diet

    ReplyDelete
  40. Cool work dude.

    https://bomberfriendsmodapk.net/

    ReplyDelete
  41. Nice article keep it up like this in your future.I hope you do best afford and make future bright.
    Best website designing company in Kashmiri Gate

    ReplyDelete
  42. Normally I do not read post on blogs, but I would like to say that this write-up very forced me to try and do so! Your writing style has been surprised me. Thank you, very nice article.

    Passover Images 2019
    Passover Images 2019 For Facebook
    Happy Passover Images 2019
    Passover Images 2019 HD
    Passover Images 2019 Free Download

    ReplyDelete
  43. I feel happy about and learning more about this topic. keep sharing your information regularly for my future reference. This content creates new hope and inspiration within me. Thanks for sharing an article like this. cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 information which you have provided is better than anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r blog.
    IELTS Coaching in Dwarka
    Best IELTS Coaching in Dwarka

    ReplyDelete
  44. Your blog was really impressive and meaningful. Thank you so much for sharing
    love problem solution in delhi

    ReplyDelete
  45. This comment has been removed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author.

    ReplyDelete
  46. What is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 best App Store alternative?

    Install Tutuapp, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 free platform to download games and apps on iOS.

    ReplyDelete
  47. Amazing Post! That is a great and so creative idea. Thank you for sharing
    Question and Answer Submission Site List

    ReplyDelete
  48. Article really helped me a lot. Thanks so much for sharing this blog. Mobile Apps Development Company Delhi

    ReplyDelete
  49. Good Job and thanks for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 post.
    aos tv

    ReplyDelete
    Replies
    1. Thanks for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 amazing article. Mohela login

      Delete
  50. Live TV App - AOS TV with all categories channels and channels from around cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 world.

    ReplyDelete



  51. In love with this post.thankyou for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 information.
    Please do find cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 attached files and download it form our website.

    http://nikefactoryoutletstore.com/ideas-for-a-malware-free-android-smartphone/
    http://www.nrdirectory.com/growing-android-functions-getting-a-head-begin/
    http://www.paslanmazstore.com/android-security-how-safe-is-your-android-cellphone/
    http://www.akibooks.com/firewall-for-android/
    http://www.immobilier-de-vendee.com/overview-of-android-functions-growth/

    ReplyDelete
  52. blockchain technology can resist cyber attack but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re is a lot do protect from cyber criminala attacks. learn more in bitcoin online course

    ReplyDelete
  53. Watch Free Live TV from around cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 world on hd streamz

    ReplyDelete
  54. really amazing article. really nice way of define cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 things. Android App Development Company in Delhi

    ReplyDelete
  55. You Have Good Knowledge on this topic and you explained things very Well till cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 end, Thanks for Article bro!
    Angularjs Training in Bangalore , Angular 2 Training in bangalore

    ReplyDelete
  56. This comment has been removed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author.

    ReplyDelete
  57. Thanks for sharing such a nice Blog.I like it.

    mcafee.com/activate
    norton.com/setup

    ReplyDelete
  58. There is no doubt in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 app you can easily download cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 app cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 most exciting features are waiting for you can easily go with TutuApp. There are nothing extra features required in this app because cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 most important items are already available in his update versions. Download Latest Version. Also love Snaptube For PC

    ReplyDelete
  59. APKUncle is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Best tech site that gives Latest Android APK records, News, Tutorials and How to guides.
    https://apkuncle.com//
    https://apkuncle.com/live-nettv-apk/
    https://apkuncle.com/tutuapp-apk/
    https://apkuncle.com/spotify-premium-apk/
    https://apkuncle.com/appvn-apk/

    ReplyDelete
  60. KineMaster for Android, free and safe download. KineMaster apk latest version: Mobile video editing at its finest.
    kinemaster for pc

    ReplyDelete
  61. Having a website for any kind of business is a must in today’s competitive scenario but what about having an attractive design of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 website that directly appeals cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 senses of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 user. Get in touch with Jeewangarg – The Best Website Designing Company in Delhi to get cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Appealing Website Designs.

    ReplyDelete
  62. I’m waiting for your next post, because I got lots of valuable information by this. Get Vinyl Signage Printing and Commercial Vehicle Wrap by Kalakutir Pvt Ltd.
    Commercial Vehicle Wrap

    ReplyDelete
  63. Very nice post and right to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 point. also, see ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r posts really good content I find here. Thank you.
    shot blasting machine
    shot blasting
    sand blasting
    sand blasting machine
    steel shots distributors
    Sandblasting Abrasive media

    ReplyDelete
  64. Thanks for sharing this post, this is really very nice informative post. Here we are presenting netcreativemind.com
    SEO SEM Specialist Recruiters | SEO/SEM Placement Consultant
    SEO SEM Specialist
    Information security Placement Consultants
    Data Analyst Recruitment Agency

    ReplyDelete
  65. QuickBooks Diagnostic Tool is a great tool to solve network issues, data file damages and several ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r problems that commonly occur in QuickBooks.

    ReplyDelete
  66. For Best private ambulance call at Almas ambulance service in Delhi. We help patients to get best medical care on right time by our ambulance service.
    http://www.almasambulance.com
    International air ambulance
    Air ambulance Kolkata
    Air ambulance guwahati
    Air ambulance patna
    Air ambulance ranchi
    Air ambulance srinagar
    Air ambulance Delhi

    ReplyDelete
  67. Nice Blog, keep it up for more updates about this type of blog.Carolina Classics is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 manufacturer of best F-100 Classic Ford Truck Parts| Buy Ford F100 truck parts online at Carolina Classics. Classic Ford Truck Parts
    F-100 Ford Truck Parts
    Classic Ford Truck Body Parts

    ReplyDelete
  68. Thanks For sharing this informative post. Here we are presenting Let's Life Breacá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365.
    5 Best Tips to Beat Pollen Allergies - Breacá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365Fresh

    ReplyDelete
  69. That was such an awesome content to read and going through it.Thanks for such a good information.our product related for servo voltage stabilizer and transformer manufecturer company in Delhi Our company is also Step Down Transformer Manufecturer in Delhi.

    Servo Stabilizer Manufacturer in india
    what is Step Down Transformer
    Distribution Transformers Manufacturer in india
    Step Down Transformer

    ReplyDelete
  70. Corpac is India’s No.1 Professional PP Corrugated Sheets Manufacturers, suppliers and Currently being exported to countries like Qatar, New Zealand, Germany, Philippines, UK and Spain, this product is achieving new growth with over 10 years Experience. Corrugated plastic sheets are very versatile material that can be used in a variety of applications around cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 homes, companies and also for craft projects, call 9899362119." We manufacture Polypropylene Corrugated Sheets and fabricated products under one roof. We market our products not only in India but export to various countries across cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 world.

    ReplyDelete
  71. Given article is very helpful and very useful for my admin, and pardon me permission to share articles here hopefully helped :

    Cara Mengobati Kaligata Secara Alami Dan Cepat

    ReplyDelete
  72. Given article is very helpful and very useful for my admin, and pardon me permission to share articles here hopefully helped :

    Cara Mengobati Kista Payudara Secara Alami
    Cara Mengatasi Gatal Selangkangan Secara Alami

    ReplyDelete
  73. Thanks for sharing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 useful information. This is a nice blog. Web Designing Company in Delhi

    ReplyDelete
  74. I Personally Like Your Post, You Have Shared Good Article. It Will Help Me In Great Deal.

    samsung contact number
    samsung support number

    ReplyDelete
  75. QuickBooks Error 103 appears when cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 QuickBooks is not accepting cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 login request and you need to update your login details in QuickBooks online. To resolve Error 103 QuickBooks contact QuickBooks Tech Support Number 1-877-263-2742.
    QuickBooks Error 103 | Quicken Error CC-585


    ReplyDelete
  76. Hey,
    Thanks for sharing this helpful & wonderful post. i really appreciate your hard work. this is very useful & informative for me.
    thanks for sharing with us. thanks a lot.
    Regards

    FutureTricks

    ReplyDelete
  77. We are so much interested to get good values about this blog. They were all trying to know cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 importance of new schools. Then every student will get good education from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 school.
    flipkart customer care
    flipkart big billion days
    flipkart helpline
    flipkart app download
    flipkart no cost emi | bajaj finserv emi card
    flipkart buyback guarantee
    flipkart seller support number
    flipkart internship
    flipkart smartbuy
    Download flipkart app For PC/Laptop Windows 10/7/8.1/8/XP

    ReplyDelete
  78. Nice blog, Get you website designing responsive and creative and also digital marketing services at ogen info system Delhi, India.
    SEO Service in Delhi

    ReplyDelete
  79. This comment has been removed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author.

    ReplyDelete
  80. Thanks for Shearing this information. this is a very useful for everyone.
    mobile application development service in USA

    ReplyDelete
  81. Thank you for bestowing this information which will enlighten many of us. It’s really helpful for me and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 one who wants to know more about mobile app development company.

    ReplyDelete

  82. I am very grateful you did share your knowledge here. It is an excellent post
    clipping path service|Photo Retouching services|Vector Tracing

    ReplyDelete