File tree Expand file tree Collapse file tree 3 files changed +418
-410
lines changed Expand file tree Collapse file tree 3 files changed +418
-410
lines changed Original file line number Diff line number Diff line change @@ -1242,15 +1242,6 @@ def handler_enabled?
1242
1242
not datastore [ 'DisablePayloadHandler' ]
1243
1243
end
1244
1244
1245
- #
1246
- # Returns the state of the PrependMigrate option
1247
- # See https://github.com/rapid7/metasploit-framework/pull/917
1248
- # for discussion.
1249
- #
1250
- def prepend_migrate?
1251
- !!( datastore [ 'PrependMigrate' ] && datastore [ 'PrependMigrate' ] . to_s . downcase == 'true' )
1252
- end
1253
-
1254
1245
##
1255
1246
#
1256
1247
# Handler interaction
Original file line number Diff line number Diff line change 12
12
###
13
13
module Msf ::Payload ::Windows
14
14
15
- include Msf ::Payload ::PrependMigrate
15
+ include Msf ::Payload ::Windows :: PrependMigrate
16
16
17
17
#
18
18
# ROR hash associations for some of the exit technique routines.
@@ -25,6 +25,18 @@ module Msf::Payload::Windows
25
25
'none' => 0x5DE2C5AA , # GetLastError
26
26
}
27
27
28
+
29
+ # @abstract Override to add additional stubs to prepend to the final
30
+ # shellcode. Be sure to call super so other modules may add stubs.
31
+ # @return [String] Stub to place at the begginning of generated shellcode
32
+ def prepends
33
+ ""
34
+ end
35
+
36
+ def generate ( *args )
37
+ return prepends + super
38
+ end
39
+
28
40
#
29
41
# This mixin is chained within payloads that target the Windows platform.
30
42
# It provides special variable substitution for things like EXITFUNC and
You can’t perform that action at this time.
0 commit comments