@@ -19,13 +19,6 @@ def initialize(info = {})
19
19
20
20
register_advanced_options (
21
21
[
22
- Msf ::OptBool . new ( 'PrependSetresuid' ,
23
- [
24
- false ,
25
- "Prepend a stub that executes the setresuid(0, 0, 0) system call" ,
26
- false
27
- ]
28
- ) ,
29
22
Msf ::OptBool . new ( 'PrependSetreuid' ,
30
23
[
31
24
false ,
@@ -40,13 +33,6 @@ def initialize(info = {})
40
33
false
41
34
]
42
35
) ,
43
- Msf ::OptBool . new ( 'PrependSetresgid' ,
44
- [
45
- false ,
46
- "Prepend a stub that executes the setresgid(0, 0, 0) system call" ,
47
- false
48
- ]
49
- ) ,
50
36
Msf ::OptBool . new ( 'PrependSetregid' ,
51
37
[
52
38
false ,
@@ -89,16 +75,6 @@ def apply_prepends(buf)
89
75
end
90
76
91
77
def handle_x86_osx_opts ( pre , app )
92
- if ( datastore [ 'PrependSetresuid' ] )
93
- # setresuid(0, 0, 0)
94
- pre << "\x31 \xc0 " +# xorl %eax,%eax #
95
- "\x50 " +# pushl %eax #
96
- "\x50 " +# pushl %eax #
97
- "\x50 " +# pushl %eax #
98
- "\x50 " +# pushl %eax #
99
- "\x66 \xb8 \x37 \x01 " +# movw $0x0137,%ax #
100
- "\xcd \x80 " # int $0x80 #
101
- end
102
78
103
79
if ( datastore [ 'PrependSetreuid' ] )
104
80
# setreuid(0, 0)
@@ -119,17 +95,6 @@ def handle_x86_osx_opts(pre, app)
119
95
"\xcd \x80 " # int $0x80 #
120
96
end
121
97
122
- if ( datastore [ 'PrependSetresgid' ] )
123
- # setresgid(0, 0, 0)
124
- pre << "\x31 \xc0 " +# xorl %eax,%eax #
125
- "\x50 " +# pushl %eax #
126
- "\x50 " +# pushl %eax #
127
- "\x50 " +# pushl %eax #
128
- "\x50 " +# pushl %eax #
129
- "\x66 \xb8 \x38 \x01 " +# movw $0x0138,%ax #
130
- "\xcd \x80 " # int $0x80 #
131
- end
132
-
133
98
if ( datastore [ 'PrependSetregid' ] )
134
99
# setregid(0, 0)
135
100
pre << "\x31 \xc0 " +# xorl %eax,%eax #
@@ -159,10 +124,6 @@ def handle_x86_osx_opts(pre, app)
159
124
end
160
125
161
126
def handle_x64_osx_opts ( pre , app )
162
- if ( datastore [ 'PrependSetresuid' ] )
163
- # setresuid(0, 0, 0)
164
- raise RuntimeError , "setresuid syscall is not implemented on x64 OSX systems"
165
- end
166
127
167
128
if ( datastore [ 'PrependSetreuid' ] )
168
129
# setreuid(0, 0)
@@ -185,11 +146,6 @@ def handle_x64_osx_opts(pre, app)
185
146
"\x0f \x05 " # syscall
186
147
end
187
148
188
- if ( datastore [ 'PrependSetresgid' ] )
189
- # setresgid(0, 0, 0)
190
- raise RuntimeError , "setresgid syscall is not implemented on x64 OSX systems"
191
- end
192
-
193
149
if ( datastore [ 'PrependSetregid' ] )
194
150
# setregid(0, 0)
195
151
pre << "\x41 \xb0 \x02 " +# mov r8b, 0x2 (Set syscall_class to UNIX=2<<24)
0 commit comments