David Buchanan

David Buchanan

@retr0.id

reverse engineering, cryptography, exploits, hardware, file formats, and generally giving computers a hard time Fedi: @retr0id@retr0.id Macroblog: https://www.da.vidbuchanan.co.uk/blog/

55.7K followers614 following30K posts

David Buchanan reposted

have you seen the new supply chain vuln? don't update tubu. it's literally on heebee. they got poodee's deps. they infiltrated dippy. roll back weeno. disable scripts in ~/.gumpyrc. it's in poob. do not install poob. do not update poob. uninstall poob right now. poob has it in for you.

anyway I guess this is proof that a full Play Integrity bypass is within "weekend project" territory. this approach does not exploit any bugs or rely on leaked key material, so it cannot be patched.

injected frida-gadget via slightly modified AndKittyInjector

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

View full thread

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

View full thread

it's very funny to me that you can't mmap an anonymous+exec page, but you can map an executable file just fine and then overwrite it with your own code. all these mitigations are very annoying, but they are only an annoyance.

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

View full thread

now we're cooking - thinking about it, I can probably use this to inject shellcode into pid1 and spawn myself a root shell that way

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

View full thread

claude's exploit did not work so I'll have to use my brain oldschool style (claude seems repeatedly confused by physical vs virtual address spaces)

I gave up on getting a root shell, since that isn't my real goal here. I just want to be able to inject code into other processes. I patched ptrace_may_access in kernel .text to always return true, so now I can access anything that would normally be gated on that - e.g. /proc/pid/maps.

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

View full thread

for this device, the kernel is always at a fixed physical address - so walking kernel structs is easy. so the plan is, find pid1's cred struct and duplicate it into the current process. and also disable DEFEX (which seems easy once the offsets are known)

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

View full thread

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

View full thread

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

View full thread

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.

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

View full thread

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

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

View full thread

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

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

View full thread

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

View full thread

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

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

View full thread

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

View full thread

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!

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

they call it cooking because when the first caveman showed it to his tribe they were like "woah you really cooked with this one"