diff --git a/README.md b/README.md index d2c353d..7aa7434 100644 --- a/README.md +++ b/README.md @@ -23,4 +23,7 @@ make -f devices/samsung_s7/Makefile Then proceed to move the debugger to `dump/debugger.bin`. To get to work, run `source/exploit/exploit.py`. The launch.json's are located in source/exploit, so its recommended to open this folder in your VSCode/favourite IDE. ### Viewing/building documentation -To view documentation, ensure you have sphinx installed. If not, run `sudo apt install python3-sphinx`. Then proceed to build the documentation by running `make livehtml` in `documentation`. \ No newline at end of file +To view documentation, ensure you have sphinx installed. If not, run `sudo apt install python3-sphinx`. Then proceed to build the documentation by running `make livehtml` in `documentation`. + +## Pushing documentation to confluence +Run `sphinx-build -b confluence source _build/confluence` from documentation/ to push docs to confluence. They will appear in the DT_Sphinx space. If running issues, be sure to remove the '_build' folder and try again! \ No newline at end of file diff --git a/documentation/.~lock.exynos_exploit_chain.odg# b/documentation/.~lock.exynos_exploit_chain.odg# deleted file mode 100644 index b800641..0000000 --- a/documentation/.~lock.exynos_exploit_chain.odg# +++ /dev/null @@ -1 +0,0 @@ -,jonathan,1kqdsx3-l,23.08.2024 11:35,file:///home/jonathan/.config/libreoffice/4; \ No newline at end of file diff --git a/documentation/Makefile b/documentation/Makefile index fd09622..e93a242 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -13,6 +13,9 @@ BUILDDIR = build help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) +confluence: + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" -E -a $(O) + .PHONY: help Makefile livehtml: diff --git a/documentation/_build/confluence/.cache_confluence_config b/documentation/_build/confluence/.cache_confluence_config new file mode 100644 index 0000000..3f8d44e --- /dev/null +++ b/documentation/_build/confluence/.cache_confluence_config @@ -0,0 +1 @@ +{"hash": "23bc85713aeb2ef093eda071313cc8bc57509988f49973c4234ac4d9a94cc99d"} \ No newline at end of file diff --git a/documentation/_build/confluence/.cache_confluence_dochash b/documentation/_build/confluence/.cache_confluence_dochash new file mode 100644 index 0000000..71b4b78 --- /dev/null +++ b/documentation/_build/confluence/.cache_confluence_dochash @@ -0,0 +1 @@ +{"BootROM_8890/01_start": "646fdd9dfa95f318f95410cdd89da6f141cd2ec81a924baaa8ea4451e8a89bc0", "BootROM_8890/02_frederics_exploit": "836eaf31227b51f67d44ededc2f5bc094ecd6b536c61959ba812edb1fbedf03d", "BootROM_8890/03_exploit_boot_chain": "a45ee44296c16624fafa979a90cc1efea179119c1f765ccd6ed62a2e7448b0b4", "BootROM_8890/04_notes": "b18e488a60b63c232c39d00ba09877caff4bf846400e2c47c08fa17eba1ff0e6", "index": "b0809c6b5260a9da5c501beb8c077ab83786dbe3e371931ab45e23b93f316ec8"} \ No newline at end of file diff --git a/documentation/_build/confluence/.cache_confluence_publish b/documentation/_build/confluence/.cache_confluence_publish new file mode 100644 index 0000000..bd03b57 --- /dev/null +++ b/documentation/_build/confluence/.cache_confluence_publish @@ -0,0 +1 @@ +{"index": "187979570", "BootROM_8890/01_start": "187979572", "BootROM_8890/02_frederics_exploit": "187979553", "BootROM_8890/03_exploit_boot_chain": "187979576", "BootROM_8890/04_notes": "187979578"} \ No newline at end of file diff --git a/documentation/_build/confluence/.doctrees/BootROM_8890/01_start.doctree b/documentation/_build/confluence/.doctrees/BootROM_8890/01_start.doctree new file mode 100644 index 0000000..baed073 Binary files /dev/null and b/documentation/_build/confluence/.doctrees/BootROM_8890/01_start.doctree differ diff --git a/documentation/_build/confluence/.doctrees/BootROM_8890/02_frederics_exploit.doctree b/documentation/_build/confluence/.doctrees/BootROM_8890/02_frederics_exploit.doctree new file mode 100644 index 0000000..14fe42a Binary files /dev/null and b/documentation/_build/confluence/.doctrees/BootROM_8890/02_frederics_exploit.doctree differ diff --git a/documentation/_build/confluence/.doctrees/BootROM_8890/03_exploit_boot_chain.doctree b/documentation/_build/confluence/.doctrees/BootROM_8890/03_exploit_boot_chain.doctree new file mode 100644 index 0000000..ba5d3f1 Binary files /dev/null and b/documentation/_build/confluence/.doctrees/BootROM_8890/03_exploit_boot_chain.doctree differ diff --git a/documentation/_build/confluence/.doctrees/BootROM_8890/04_notes.doctree b/documentation/_build/confluence/.doctrees/BootROM_8890/04_notes.doctree new file mode 100644 index 0000000..f965b1a Binary files /dev/null and b/documentation/_build/confluence/.doctrees/BootROM_8890/04_notes.doctree differ diff --git a/documentation/_build/confluence/.doctrees/environment.pickle b/documentation/_build/confluence/.doctrees/environment.pickle new file mode 100644 index 0000000..d734af0 Binary files /dev/null and b/documentation/_build/confluence/.doctrees/environment.pickle differ diff --git a/documentation/_build/confluence/.doctrees/index.doctree b/documentation/_build/confluence/.doctrees/index.doctree new file mode 100644 index 0000000..de871f9 Binary files /dev/null and b/documentation/_build/confluence/.doctrees/index.doctree differ diff --git a/documentation/_build/confluence/BootROM_8890/01_start.conf b/documentation/_build/confluence/BootROM_8890/01_start.conf new file mode 100644 index 0000000..c00bc0a --- /dev/null +++ b/documentation/_build/confluence/BootROM_8890/01_start.conf @@ -0,0 +1,18 @@ +
The Exynos 8890 BootROM is a small piece of code that runs on the Exynos SoC at boot runtime. It is responsible for initializing the hardware and loading the first stage bootloader from storage. The BootROM is stored in a read-only memory and cannot be modified.
Useful links:
Be sure to use the correct firmware and firmware version for your S7 when trying this exploit/Frederic’s recovery boot (otherwise the booting will likely fail after sending BL31)!
There are no stack canaries or guard pages, and no ASLR. Meaning there are almost no protections in place. There is however an SMC and a MMU. The SMC is used to communicate with the secure world, and the MMU is used to map the memory.
Rom is at address 0x0 and is unwritable (Sometimes this is writeable due to MMU caching) and is 0x20000 bytes long.
Samsung releases firmware files for their devices. These files contain the bootloader, modem, and other firmware files. To see how the ROM works we are interested in the sboot firmware, which contains multiple stages of the bootloader.
These files can then be used to boot the device into USB recovery. To extract the sboot.bin file from a samsung firmware file:
For additional bootloaders, see: Github exynos8890-exynos-usbdl-recovery
The memory layout of the Exynos 8890 is as follows:
When the ROM is unable to boot from the internal storage, it enters Exynos Recovery Mode
.
In this mode the bootROM accepts data over USB. There is little functionality other than receiving data, meaning almost no additional attack surface except for the download protocol.
The Exynos BootROM uses a custom protocol to download a bootable image over USB. This image is verified and executed by the BootROM. Unauthorized images are rejected. Initial authorisation is done using the ‘_auth_bl1’ function. Frederic has exploited a vulnerability in the download protocol to load Unauthorized images.
\ No newline at end of file diff --git a/documentation/_build/confluence/BootROM_8890/02_frederics_exploit.conf b/documentation/_build/confluence/BootROM_8890/02_frederics_exploit.conf new file mode 100644 index 0000000..503cbbb --- /dev/null +++ b/documentation/_build/confluence/BootROM_8890/02_frederics_exploit.conf @@ -0,0 +1,94 @@ +Frederic published a blogpost on reversing the USB stack of the Exynos BootROM and a blogpost on exploiting the Exynos 8890 BootROM. Here we will discuss the exploit in more detail.
The code can be found in the exynos-usbdl repository.
The bootRom is the first code that runs on the Exynos SoC. It is responsible for initializing the hardware and loading the first stage bootloader from storage. The BootROM is stored in a read-only memory and cannot be modified (making vulnerabilities in this permanent/non-patcheable). The BootROM is responsible for initializing the USB controller and receiving the first stage bootloader from the USB host. It will be waiting for a package in the following format (dldata == download data):
A key For uploading a stage to boot, a custom protocol is used. The dldata that has to be send is 512 bytes long, and has the following format:
The dldata packet is used to send data to the BootROM.
+ +The size in the packet is the total size of the packet, including header and footer. If we modify this, we will have a payload size of around 502 bytes.
This protocol remains mostly the same for newer Exynos SoCs.
The Exynos 8890 uses the Synopsys DesignWare USB 3.0 controller. Much of the code is shared with the DWC3 driver in the Linux kernel, except that the ROM does not do any scheduling and a lot of features have been removed(OTG handling, etc).
The base address of the usb controller (dwusb3) is mapped at 0x1540000, with a size of 0x10000: (can be found at: Exynos8890 dtsi).
This is a basic USB controller, but some functions, that are also present in the linux kernel, should be visible in the bootROM as well. Available functions could be: linux-kernel-dwc3.
The USB host sends a USB_REQ_SET_ADDRESS, ‘0x05’, which the connected device has to acknowledge, and will then start sending data to this address. Initially, the device will send data to ‘0x00’.
Ghidra shows DWC3_DCFG & 0xfffffc00 | DWC3_DCFG & 7 | (param_1 & 0x7f) << 3;, essentially preserves bits 0-2 and 10-31, and sets bits 3-9 to the value of param_1, which is then likely the address of the device.
bootrom exynos 8890 dwc3_dcfg_devaddr
+ +Other general device descriptors are also sent from the device to the host (to describe the device), these are visible in/at ‘usb_init_device_descriptor’ (6098) and usb_init_descriptors (610c). Two end point addresses are visible: bEndpointAddress 0x81 and 0x02. 0x81 is 10000001 in binary, with bit 7 being ‘1’, which means that the bulk transfer direction is IN. 0x02 is 00000010 in binary, with bit ‘7’ being ‘0’, which means that the bulk transfer direction is OUT.
Data is transferred via Transfer Request Blocks (TRB), dwc3_depcmd_starttransfer is used. The TRB then contains a buffer address, where transferred data from the host is written to. The buffer allocation is done by ‘usb_setup_event_buffer’, which sets bufferHigh (DWC3_GEVNTADRLO), bufferLow (DWC3_GEVNTADRHI) and bufferSize (DWC3_GEVNTSIZ).
Originally described in this blogpost. Our if-statement is written a bit different, but boils down to the same thing.
The exynos bootrom uses a simple USB protocol to receive a bootloader binary from a USB host. The binary sent is called ‘dldata’. In Ghidra, at 21518, we can see that it consists of unit32_t: ready?, uint32: size, ? : data, uint16: footer. The contents of this data are checked before being being written.
The ready flag is set to 0 in the Exynos 8890 BootROM in an earlier function on pdVar1->size (pdVar1.size)
+ +The dldata struct in the Exynos 8890 BootROM
+ +In essence, the payload is not allowed to be larger than 0x206fff (34013183), it checks so with 2 seperate checks 1) In the first condition, the size has to be smaller than 0x206ffff (pdVar1->size < 0x206ffff) (34013183 in decimal), 2) and in the second condition, it checks whether 0x206ffff is indeed still less than the size of the payload + remaining (size + remaining)(0x206ffff < pdVar1->size + remaining).
If both conditions are met, the payload will NOT be loaded. But this makes sense, as both checks just ensure that the payload is not larger than 0x206ffff.
The bug is however, that the check that the check is done on a uint32_t (2^32 = 4294967296), but the max value that can be checked by a uint32 is 0xFDFDE7FF = 4294967295. So a value of 0xFDFDE7FF + 1 = 0xFDFDE800 = 4294967296, which is larger than the max value of a uint32. So if a payload of this size or more is used, which is much larger than the max requested value 0x206ffff, the check will pass and the payload will still be loaded.
The size check in the Exynos 8890 BootROM
+ +Sending such large amounts of data can cause a memory overflow, and will cause the target to crash. Not interesting for exploitation in this context. However, the USB packages that are sent, are split into smaller packages with a size of 0xFFFE00.
The max allowed chunk size, after which the payload is split.
+ +The dl_buf pointer is set to the amount it expects to write, instead to the amount that it has written. By transferring a large amount of data, without actually writing it (so in a package, send no data, but tell the target that you’re sending data with a length larger than 0xFDFDE800), will cause the pointer to move, without actually writing data.
The trick then becomes, to get the pointer to an address we would like to exploit unto. Then we have a little less than 512 bytes (502 according to dldata) to write our payload.
Might be a 0/N-day if exploitable
There is a bug(unpatched?) in receiving the last packet of the usb image:
The bug is an integer underflow in the calculation of the remaining size of the image.
+ diff --git a/documentation/_build/confluence/BootROM_8890/03_exploit_boot_chain.conf b/documentation/_build/confluence/BootROM_8890/03_exploit_boot_chain.conf new file mode 100644 index 0000000..9878293 --- /dev/null +++ b/documentation/_build/confluence/BootROM_8890/03_exploit_boot_chain.conf @@ -0,0 +1,281 @@ +This part describes the boot chain of the Exynos 8890
SoC.
This is all still under development and will change.
Keep this overview in mind when reading through the boot chain exploit.
In our initial approach, we were manually booting all stages from the debugger, and jumping directly back to the debugger (without using the USB protocol). This was done to keep the debugger alive throughout the boot chain, but this became very difficult after BL31, as the MMU didn’t allow us to read/write to most spaces, cutting off our access to BL31 during boot at some point. And losing our debugger interface in the process.
This is also why there is some ghost code within the project. We were trying to keep the debugger alive throughout the boot chain, but this was not easily feasible.
Get the correct payloads for the bootROM stages from samsung firmware files, or from Exynos8890 usbdl-recovery images/firmwares.
bootrom stages +
+File |
+Strings output |
+Likely boot stage? |
+
---|---|---|
sboot.bin.1.bin |
+Exynos BL1 |
+BL1 |
+
sboot.bin.2.bin |
+BL31 %s |
+BL31 |
+
sboot.bin.3.bin |
+Unsure. Contains strings like: TOP_DIV_ACLK_MFC_600 and APOLLO_DIV_APOLLO_RUN_MONITOR |
+BL2? |
+
sboot.bin.4.bin |
+Contains more textual information, and references to post BL2 boot, and android information |
+Kernel boot/BL33? |
+
Gupje is the debugger we’ll be loading onto the device and will be moving around throughout the bootchain.
Gupje needs to be built and loaded onto the device. Throughout the exploit, we’ve been moving the debugger to different spaces in memory on the device. This was necessary as the space we initially used, was in the way of the space used for BL31 or BL2. After BL31, we lost access to the debugger, as BL2 was overwriting our last available space. At some point we moved the debugger to 0x11200000, as we saw that this space was used by BL31. Here below the most important arguments to build the debugger. This space is executable when the MMU is off.
Here the linksript.txt
file.
And the symbols.ld
file.
After initial exploitation the goal was to fully boot the device. We’re now moving into the next phase: 1) loading a debugger 2) and then to continue booting the device. If we manage to keep access to the debugger throughout the boot, this gives us room to exploit the device. But, the debugger needs to be kept ‘alive’ through the boot chain. The main difficulties here are the location of the debugger in memory (as it gets overwritten) and the MMU being enabled after BL31.
The initial debugger is written to 0x2069000
, with debugger_stack and _storage at 0x0206b000
and 0x0206d000
respectively.
After the initial loading of the debugger, the processor state reported is (using ghidra assistant):
LR/X30 being the line register. This is the address the processor will jump to when the function is done (important to keep track off).
After a cache flush, the debugger seems to be cleared as well, so the debugger is relocated to 0x20c0000
, with _stack and _storage now at 0x20c2000
and 0x20c4000
respectively. This is done by running:
The processor state reported then is:
We searched for quite some time for a space which was both writeable and executable. After BL31, most space became unreachable, with the MMU not allowing read/write at most spaces. We tried putting the debugger in the GPU cache, and tried some other spaces visible in the dtsi files, but eventually we found a space at 0x11200000
. This space is executable when the MMU is off. With the MMU on, we can read/write but not execute here.
Python code to setup the debugger.
Frederic created a payload called ‘Exynos8890dump_bootrom’, which used the usb dwc3 protocol (USB Synopsys DesignWare USB 3.0), to read and dump the bootrom. This payload was slightly modified, to keep the USB connection alive (stage1.bin). Frederic’s C code was implemented in python.
After this exploitation, we’re able to send custom payloads. The first payload that is sent, sets up the debugger. In order to run the debugger, a small amount of the bootROM was reversed in order to implement send/recv functionality.
@EljakimHerrewijnen: what send/recv did you reverse? What code from the bootROM did you reverse?
Here, in order, the patches we applied to get BL1 to boot:
Boot chain
+ +Overwrite the USB return address pointer (0x02020f60) to jump back to the debugger. self.cd.memwrite_region(0x02020f60, p64(DEBUGGER_ADDR))
Set link register to debugger and jump into the boot USB (0x000064e0) function. self.cd.arch_dbg.state.LR = DEBUGGER_ADDR
and then self.cd.restore_stack_and_jump(0x000064e0)
Now we can send the BL1 binary to the device. self.send_normal_stage(open("../S7/g930f_latest/g930f_sboot.bin.1.bin", "rb").read())
. At this point, we retain access to the debugger.
To patch the authentication, we set X0 and X1 to 1, then again set the link register to the debugger, and jump into the authentication function at 0x00012848
. self.cd.arch_dbg.state.X0 = 1
and self.cd.arch_dbg.state.X1 = 1
and self.cd.arch_dbg.state.LR = lr
and then self.cd.restore_stack_and_jump(0x00012848)
We flush the cache self.usb_write(b"FLSH")
(Frederic did this as well).
Now we hijack the USB download function to jump back to the debugger. self.cd.memwrite_region(0x020200dc, p32(DEBUGGER_ADDR))
and self.cd.memwrite_region(0x02021880, self.cd.arch_dbg.sc.branch_absolute(DEBUGGER_ADDR, branch_ins="br"))
And finally, we again restore our link register to the debugger, and jump into BL1 self.cd.restore_stack_and_jump(0x000002c0)
Overview of the initial boot function in the Exynos 8890.
+ +At this point, after loading and executing BL1, the device returns to the debugger. Normally, the device would boot into BL1, and would then wait for the next boot stage to be sent over USB. But because we hijacked the USB return address pointer, the device returns to the debugger.
Regarding auth_bl1: Initially we thought that 0x0 indicated a verified boot state (as is plausible when reading the decompiled code in Ghidra). But after modifying BL1 in the header and contents, this value did not change.
git commit 8cb5f2e1 fully boots, you can use this commit to patch BL1 only.
Next up is BL31, which is loaded by BL1. BL31 is written at 0x02024000
with the entry point at 0x02024010
, it ends at 0x02048000
. BL31
is the secure monitor. The monitor uses memory that is also being used by the debugger, so we will have to relocate it to keep code exeuction.
Example of BL31 using memory from the initial debugger.
+ +BL31 also configures the VBAR_EL3 and MMU so the memory mapping will probably change after this stage (preparation for trustzone?). Here we decided to move the debugger to 0x02048000, as this space is still accessible after BL31, but this space will get overwritten by BL2.
At this point we switched our approach to booting the device, as we were unable to keep the debugger alive throughout the boot chain. We now boot the device normally, and then try to get our debugger after booting each stage. Because of this, we didn’t need to modify a lot after BL1. Essentially all we did was:
Set the link register to the debugger: self.cd.arch_dbg.state.LR = DEBUGGER_ADDR
Jump into our hijacked USB function: self.cd.restore_stack_and_jump(hijacked_fun)
Send BL31: self.send_normal_stage(open("../S7/g930f_latest/g930f_sboot.bin.2.bin", "rb").read())
Continue a function that BL1 called via the USB: self.cd.restore_stack_and_jump(0x2022948)
Jump into BL31: self.cd.restore_stack_and_jump(0x02024010)
This boot process restores us to the debugger, but after this, we’re unable to access most memory spaces. Notably, we tried getting access to the TTBR0_EL3. But something prohibits us reading there. We weren’t able to find any executable space that was still available, for after BL2. BL2 would overwrite our debugger at this point.
While looking for flags which were used for the MMU, we found a function at 0x020244e8
which we were able to turn off, but which still allowed a full boot into recovery. The MMU however stated to being disabled.
get special registers: self.cd.arch_dbg.fetch_special_regs()
MMU state: self.cd.arch_dbg.state.R_SCTLR_EL3.mmu
Function patheable that turns off MMU, but keeps boot intact.
+ +Additionally we found a space at 0x11207010
, while looking for bit flags in ghidra, which seemed to be a memory read/write space. This space was not executable, unless the MMU was turned off. We used this space to store our debugger, then before booting BL31, we patched the if-statement above to disable the MMU. And booted.
Patch if-statement to not be met: self.cd.memwrite_region(0x020244e8, struct.pack('>I', 0x1f0c00f1))
Jump into BL31: self.cd.restore_stack_and_jump(0x02024010)
This is our current progress. BL2 has booted, and shows the VBAR’s for EL1.
The last stage before the kernel boots.
Boot chain with EL3 and EL1 areas
+ diff --git a/documentation/_build/confluence/BootROM_8890/04_notes.conf b/documentation/_build/confluence/BootROM_8890/04_notes.conf new file mode 100644 index 0000000..0f01e17 --- /dev/null +++ b/documentation/_build/confluence/BootROM_8890/04_notes.conf @@ -0,0 +1,143 @@ +General notes on interesting/peculiar things found on the S7 USB recovery boot process
What is interesting about the ROM is that it starts by checking MPIDR_EL1 register and doing a conditional branch to 0x20e0000.
At this point, we assumed that the authentication was succesful, and the bootROM would jump back to the debugger after loading, but this was not the case. After running this function, we were able to send a single packet, but never received a response. Indicating that the function we were executing never returned on us.
BL1 authentication
+ +If authentication at auth_bl1 is succesful, the returns a value from a function at 1230c
. This function does some things, but eventually jumps to a function at:
BL1 authentication
+ +After authentication the bootROM jumps to this function at, we can execute this function with the debugger.
BL1 is loaded at the download buffer and self copies to 0x02022000
and resumes execution there, with a size of 0x2000 (0x02022000
to 0x02024000
).
However, this does not result in a jump back to the debugger. But the ROM still allows receival of one data package from the USB host (this is likely the system ‘waiting’ to receive the bootloader).
By adding the IMEM to ghidra, we can have a look at what is going here. After having modified the LR to jump back to the debugger and jumping into auth_bl1 at 0x00012848
we jump back to the debugger. Jumping into BL1 at 2c0
does not return us to the debugger. Here we need to hijack 020200dc
and 02021880
we’re able to boot into BL1. We store the address of the hijacked function, to restore it later for a proper boot flow.
Authentication of BL1 seems to be done at 0x0012848
. With return value ‘0’ expected when this function is executed, to execute other functions.
BL1 authentication.
+ +bl1 interacts with several pheriperals, from the DTB these are:
Probably the only thing it does is set some clocks and prepare for BL31.
The reason for this is the following code in bl1:
This code uses a predefined ROM function(I was looking for it) and jumps back to that function when it’s done. This function is at address 0x020200e8
, looking in our IMEM dump we can see where in the ROM this points to:
Replacing this function with our debugger makes us jump back:
However this does not fully run bl1, so we will have to dig a bit deeper to see the puropose and when to jump back to the debugger.
After booting BL31, the MMU seems to be set up, and we’re unable to do get any data off of spaces we’re not ‘allowed’ to access. Patching the if-statement at 0x020244e8, disables the bit that says that the MMU is setup, but booting into recovery is possible (meaning the MMU is setup). Additionally, the memory at 0x02035600 is still not dumpable. At 0x02048000 is still accessible.
Weird space found at 0x105c2400. Seems to contain references to usb buffer (about 48-64 bytes). Also space at 0x020307f0, but I lose access to this after booting
Interesting links: - Heap overflow - UART on S8
By accident found space at 0x11207010. Seems to be a memory read/write space. Not executable however, unless the MMU is turned off.
We can use this space to store our debugger, and patch the boot process. After loading BL2, we’re now indeed loading VBAR’s for EL1.
bl31 MMU is 0x0 (0x1=enabled, 0x0=disabled) TTBR0_EL3: 0xbc4640892f1460, TTBR1_EL2: 0x854d39cb76f0, TTBR0_EL1: 0xa5c20f408c581142 VBAR_EL3: 0x18800, VBAR_EL2: 0x0, VBAR_EL1: 0x0 TCR_EL3: 0x0, TCR_EL2: 0x80800000, TCR_EL1: 0x0 SCTLR_EL3: 0xc5183a, SCTLR_EL2: 0x30c5083a, SCTLR_EL1: 0xc5083a MAIR_EL3: 0x44e048e000098aa4, MAIR_EL2: 0x9e42bf572931240b, MAIR_EL1: 0x44e048e000098aa4 Current EL: 0xc
Jumped to 0x11207010 and back
bL2 [+] Sent stage Connected device! 0x4e8 0x1234 MMU is 0x0 (0x1=enabled, 0x0=disabled) TTBR0_EL3: 0xbc4640892f1460, TTBR1_EL2: 0x854d39cb76f0, TTBR0_EL1: 0xa5c20f408c581142 VBAR_EL3: 0x2031800, VBAR_EL2: 0x0, VBAR_EL1: 0x2053800 TCR_EL3: 0x0, TCR_EL2: 0x80800000, TCR_EL1: 0x0 SCTLR_EL3: 0xc5183a, SCTLR_EL2: 0x30c5083a, SCTLR_EL1: 0x30c5083a MAIR_EL3: 0x44e048e000098aa4, MAIR_EL2: 0x9e42bf572931240b, MAIR_EL1: 0x44e048e000098aa4 Current EL: 0xc
The debugger at 0x11200000 can only dump 0x768 at a time (its space related. Before BL31 this is also an issue.).
There’s an odd space at 0x14kk. With things like deadcafe:
Documentation on Samsung devices, currently mainly the Samsung S7. Here we’re exploiting the Exynos 8890, which is present on both the Samsung S7 and the MIB3 High (VAG).
BootROMs:
+