Privledge Escalation

So i was screwing around with my cheap router and found out you can ssh into it. Its running linux under the hood but im just a standard user. Does anybody know how to get root access on it?

Kernel Version 2.6.20.16
Processor Type Mips

i have a tftp server setup so i can insert and copy files from it. i can write and execute from the tmp directory.

Thanks in advance.

@moderators if this is against the rules feel free to lock it.

Thats the known CVEs for that kernel: http://www.security-database.com/cpe.php?detail=cpe:/o:linux:linux_kernel:2.6.20.16

2 Likes

any ideas on how to set some of them up. cant compile code on the device because no gcc or cc.

You could get the matching compiler on your attacking machine and pre-compile it there before uploading it to the router.

how would you pre-compile the code?

It's not called pre-compile, it's called cross compilation.
GCC (+binutils) allows to cross compile to MIPS.
Prebuilt cross compilers: https://www.linux-mips.org/wiki/Toolchains or you could build your own.

2 Likes

alright thanks will try to cross compile lots of example to test over the weekend.

Well, at least I got the idea right XD Thanks for correcting!

Enjoy and good luck =)

2 Likes

thanks.

If your still looking you could use the DirtyC0W or Cowroot exploit and cross compile for mips

Closed due to necro :)