被全智(allwinner)遺忘(?)的後門(backdoor)

A root backdoor for debugging ARM-powered Android gadgets managed to end up in shipped firmware – and were surprised this sort of colossal blunder doesnt happen more often.

The howler is the work of Chinese ARM SoC-maker Allwinner, which wrote its own kernel code underneath a custom Android build for its devices.

Its Linux 3.4-based kernel code, on Github here, contains what looks to The Register like a debug mode the authors forgot to kill. Although it doesnt appear to have made it into the mainstream kernel source, it was picked up by firmware builders for various gadgets using Allwinners chips.

Its triggered by writing rootmydevice to the special file /proc/sunxi_debug/sunxi_debug. That gives the current running process root privileges. If that file is present on your device or single-board computer, then you need to get rid of it. This is the code that checks for the magic write:

if(!strncmp("rootmydevice",(char*)buf,12)){ cred = (struct cred *)__task_cred(current); cred->uid = 0; cred->gid = 0; cred->suid = 0; cred->euid = 0; cred->euid = 0; cred->egid = 0; cred->fsuid = 0; cred->fsgid = 0; printk("now you are root
"); }

Tkaiser, a moderator over at the forums of the Armbian operating system (a Linux distro for ARM-based development boards) notes theres a number of vulnerable systems in the field.

As tkaiser writes, echo "rootmydevice" > /proc/sunxi_debug/sunxi_debug "from any process with any UID will get root, and its probably remotely exploitable if combined with networked services that might allow access to /proc."

He adds: 「This security flaw is currently present in every OS image for H3, A83T or H8 devices that rely on kernel 3.4.」

As well as all Orange Pi images except for Armbians freshly patched 5.10, these vulnerable gadgets include ARM dev boards from FriendlyARM, SinoVoip (its M2+ and M3 Banana Pi boards), Cubietruck, and LinkSprites pcDuino8 Uno.

There are probably other products out there using the Allwinner SoC and the dodgy code. Tkaiser pointed out that FriendlyARM was also quick to issue a patch. ?

This is what a root debug backdoor in a Linux kernel looks like a€¢ The Register


推薦閱讀:

什麼是 Dirty hack?
網路安全 | 間諜軟體與入門硬體工具
網路安全 | 什麼是社會工程學攻擊?
美劇里的黑客入侵都很簡單的樣子,現實如此嗎?
網路安全 | 便攜移動硬體工具

TAG:Hack | 計算機安全 | 信息技術IT |