Post

kinda crazy how much phone you can buy for £92 these days - this thing is still getting security updates *and* it has a headphone jack

very nice of them to label their test pads. I wouldn't be surprised if the MT6769V has some known brom vulns but that's not what I'm interested in

what I *am* interested in is the interface between the CPU and the DRAM. I've removed the epoxy and carefully sanded away some of the solder mask. what happens when I poke the data lines with a needle?

answer: bitflips!!! each channel is only 16 bits wide, so exploitation will be slightly trickier than on a wider bus - within e.g. a 64-bit PTE, we are forced to target 4 different bit-offsets at once, 3 of which will probably cause a hard crash. but 25% isn't bad!

some *very* promising initial results, although it crashed at the end, while trying to test the r/w primitive. plausibly because I flipped too many bits - will keep attempting (this one was on the third attempt, previous attempts just crashed the device)

hell yeah - second attempt after this, the r/w primitive worked fully. now I need to figure out the second half of the LPE - overwriting a setuid binary won't work

plausibly this is a SELinux thing™, I thought I'd keep things simple to start with so I'm just patching cred - if anyone has any guesses what the issue might be lmk

ok yeah this is a SELinux Thing™, will need a more intelligent exploit strat. surely there is good prior art of anrdoid phys r/w -> root?

current plan: dump /sys/kernel/btf/vmlinux out of kernel memory (normally it needs root to read), then I can infer layouts of all the kernel structs I care about, and do more targeted struct-walking instead of pattern scanning

0 reposts23 likes

I've had an unlucky streak in terms of getting the exploit to trigger, I'm currently trying to dump all of physmem to a file for analysis but it hasn't landed yet.

I was about to mention yep you'd be better off trying this on not a Samsung but if I recall it's pretty trivial to defeat defex

DEFEX puts the cred struct in a hypervisor writable only memory region, so you can't write to it even with a kernel physical write. you probably want to overwrite one of the executable paths that are used by a usermode helper and trigger it, or overwrite a libc file cache page and pivot into init

hmm, maybe they changed it since i last looked? other hypervisors would also store uid sets in the hypervisor and check those against what kernel memory, but i didnt think DEFEX did that.

it's been a loooong time since I've done android pwn, can you not just poke something to disable selinux if you have phys arb w anymore?