Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exploit for BE85 (aarch64)? #2

Open
naf419 opened this issue Oct 25, 2024 · 6 comments
Open

Exploit for BE85 (aarch64)? #2

naf419 opened this issue Oct 25, 2024 · 6 comments

Comments

@naf419
Copy link
Owner

naf419 commented Oct 25, 2024

Hello, I'm trying the userland/web exploit with a BE85, what binary did you get the ROP gadget from? Is it from nvrammanager itself or a shared library?

Originally posted by @VsnGamer in #1 (comment)

@naf419
Copy link
Owner Author

naf419 commented Oct 25, 2024

BE85 is aarch64, no? So its going to run into the whole issue of the scanf overrun primitive terminating on a null byte with little endian 64-bit addresses. Same struggle as the x80 which I haven't found a solution for.

But to answer your question, the ROP gadget in my proposed M9Plus exploit was found in nvrammanager itself since its not PIE (because shared libraries would be ASLR'd, yes?)

@naf419 naf419 changed the title Exploit for BE85? Exploit for BE85 (aarch64)? Oct 25, 2024
@VsnGamer
Copy link

Yea that makes sense, doesn't seem there's a vulnerability in this one.
Firmware seems based on openwrt, looks like they kept failsafe, however it's probably read-only root partition.

I'll try whenever I get the time, thanks anyway for your help!

@naf419
Copy link
Owner Author

naf419 commented Oct 26, 2024 via email

@naf419
Copy link
Owner Author

naf419 commented Oct 27, 2024

Just a note that the usermode upgrade in BE85 fw 1.0.22 does NOT contain the sscanf vulnerability, but it DOES in 1.0.18. Still no known technique to deal with aarch64 ASLR problems to exploit it though.
Neither has an obvious signature bypass.
Still need to someone to provide a bootloader dump to look there.

@VsnGamer
Copy link

I've been trying to understand how the app connects via SSH into the router when you are in the same network.

According to the logs in the web interface it seems to use password auth but username seems null.

Also noticed the dropbear binary seems slightly modified (something to do with TPM, runs fw_input.sh add to allow traffic).

I'll try to decrypt the HTTPS traffic later, although it might get complicated if certificate pinning is done in a custom way.

@naf419
Copy link
Owner Author

naf419 commented Oct 27, 2024

I've been trying to understand how the app connects via SSH into the router when you are in the same network.

According to the logs in the web interface it seems to use password auth but username seems null.

Also noticed the dropbear binary seems slightly modified (something to do with TPM, runs fw_input.sh add to allow traffic).

I'll try to decrypt the HTTPS traffic later, although it might get complicated if certificate pinning is done in a custom way.

from looking at the binary of other deco versions and assuming it also applies to BE85, my understanding is that the dropbear binary is customized to remove interactive login shells completely (leaving only port forwarding to two specific ports) and the username auth module that should check etc/password is replaced with a module that looks up userpass in openwrt-style uci config. that uci config is populated based on info sent down from the deco server and same info goes to app so it can port-forward. the port-forward exposes the tmpsvr binary so that openwrt config can be passed via custom protocol from main router to devices on mesh. see also: https://github.com/naf419/tplink_deco_exploits/tree/main/rsa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants