@@ -51,13 +51,57 @@ def execute_file
51
51
raise NotImplementedError
52
52
end
53
53
54
+ #
55
+ # Maps legacy Meterpreter script names to replacement post modules
56
+ def legacy_script_to_post_module ( script_name )
57
+ {
58
+ 'autoroute' => 'post/windows/manage/autoroute' ,
59
+ 'checkvm' => 'post/windows/gather/checkvm' ,
60
+ 'duplicate' => 'post/windows/manage/multi_meterpreter_inject' ,
61
+ 'enum_chrome' => 'post/windows/gather/enum_chrome' ,
62
+ 'enum_firefox' => 'post/windows/gather/enum_firefox' ,
63
+ 'enum_logged_on_users' => 'post/windows/gather/enum_logged_on_users' ,
64
+ 'enum_powershell_env' => 'post/windows/gather/enum_powershell_env' ,
65
+ 'enum_putty' => 'post/windows/gather/enum_putty_saved_sessions' ,
66
+ 'enum_shares' => 'post/windows/gather/enum_shares' ,
67
+ 'file_collector' => 'post/windows/gather/enum_files' ,
68
+ 'get_application_list' => 'post/windows/gather/enum_applications' ,
69
+ 'getcountermeasure' => 'post/windows/manage/killav' ,
70
+ 'get_filezilla_creds' => 'post/windows/gather/credentials/filezilla_server' ,
71
+ 'getgui' => 'post/windows/manage/enable_rdp' ,
72
+ 'get_local_subnets' => 'post/windows/manage/autoroute' ,
73
+ 'get_valid_community' => 'post/windows/gather/enum_snmp' ,
74
+ 'getvncpw' => 'post/windows/gather/credentials/vnc' ,
75
+ 'hashdump' => 'post/windows/gather/smart_hashdump' ,
76
+ 'hostsedit' => 'post/windows/manage/inject_host' ,
77
+ 'keylogrecorder' => 'post/windows/capture/keylog_recorder' ,
78
+ 'killav' => 'post/windows/manage/killav' ,
79
+ 'metsvc' => 'post/windows/manage/persistence_exe' ,
80
+ 'migrate' => 'post/windows/manage/migrate' ,
81
+ 'packetrecorder' => 'post/windows/manage/rpcapd_start' ,
82
+ 'persistence' => 'post/window/manager/persistence_exe' ,
83
+ 'prefetchtool' => 'post/windows/gather/enum_prefetch' ,
84
+ 'remotewinenum' => 'post/windows/gather/wmic_command' ,
85
+ 'schelevator' => 'exploits/windows/local/ms10_092_schelevator' ,
86
+ 'screenspy' => 'post/windows/gather/screen_spy' ,
87
+ 'screen_unlock' => 'post/windows/escalate/screen_unlock' ,
88
+ 'search_dwld' => 'post/windows/gather/enum_files' ,
89
+ 'service_permissions_escalate' => 'exploits/windows/local/service_permissions' ,
90
+ 'uploadexec' => 'post/windows/manage/download_exec' ,
91
+ 'webcam' => 'post/windows/manage/webcam' ,
92
+ 'wmic' => 'post/windows/gather/wmic_command' ,
93
+ } [ script_name ]
94
+ end
95
+
54
96
#
55
97
# Executes the supplied script, Post module, or local Exploit module with
56
98
# arguments +args+
57
99
#
58
100
# Will search the script path.
59
101
#
60
102
def execute_script ( script_name , *args )
103
+ post_module = legacy_script_to_post_module ( script_name )
104
+ script_name = post_module if !post_module . nil?
61
105
mod = framework . modules . create ( script_name )
62
106
if mod
63
107
# Don't report module run events here as it will be taken care of
0 commit comments