Skip to content

Commit dc2fec7

Browse files
author
Tod Beardsley
committed
Land rapid7#5509, remove msfencode and msfpayload
Fixes rapid7#4326 Thanks @wchen-r7!
2 parents 9fa4234 + 5a6a16c commit dc2fec7

File tree

7 files changed

+10
-668
lines changed

7 files changed

+10
-668
lines changed

external/source/DLLHijackAuditKit/regenerate_binaries.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
dllbase = File.expand_path(File.dirname(__FILE__))
44
msfbase = File.expand_path(File.join(dllbase, "..", "..", ".."))
5-
msfp = File.join(msfbase, "msfpayload")
5+
msfv = File.join(msfbase, "msfvenom")
66

77
Dir.chdir(dllbase)
88

9-
system("ruby #{msfp} windows/exec CMD=calc.exe X > runcalc.exe")
10-
system("ruby #{msfp} windows/exec CMD=calc.exe D > runcalc.dll")
11-
system("ruby #{msfp} windows/exec CMD='cmd.exe /c echo yes > exploited.txt' D > runtest.dll")
12-
system("ruby #{msfp} windows/exec CMD='cmd.exe /c echo yes > exploited.txt' X > runtest.exe")
9+
system("ruby #{msfv} -p windows/exec CMD=calc.exe -f exe -o runcalc.exe")
10+
system("ruby #{msfv} -p windows/exec CMD=calc.exe -f dll -o runcalc.dll")
11+
system("ruby #{msfv} -p windows/exec CMD='cmd.exe /c echo yes > exploited.txt' -f dll -o runtest.dll")
12+
system("ruby #{msfv} -p windows/exec CMD='cmd.exe /c echo yes > exploited.txt' -f exe -o runtest.exe")
1313

external/zsh/_msfencode

Lines changed: 0 additions & 82 deletions
This file was deleted.

lib/msf/util/exe.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ def self.win32_rwx_exec_thread(code, block_offset, which_offset='start')
18111811
# Generate an executable of a given format suitable for running on the
18121812
# architecture/platform pair.
18131813
#
1814-
# This routine is shared between msfencode, rpc, and payload modules (use
1814+
# This routine is shared between msfvenom, rpc, and payload modules (use
18151815
# <payload>)
18161816
#
18171817
# @param framework [Framework]

metasploit-framework.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Gem::Specification.new do |spec|
3636
'msfelfscan',
3737
'msfencode',
3838
'msfmachscan',
39-
'msfpayload',
4039
'msfpescan',
4140
'msfrop',
4241
'msfrpc',

modules/payloads/singles/windows/dns_txt_query_exec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@ def initialize(info = {})
4040
# 1. Generate the shellcode you want to deliver via DNS TXT queries
4141
# Make sure the shellcode is alpha_mixed or alpha_upper and uses EDI as bufferregister
4242
# Example :
43-
# ./msfpayload windows/messagebox TITLE="Friendly message from corelanc0d3r" TEXT="DNS Payloads FTW" R | ./msfencode -e x86/alpha_mixed Bufferregister=EDI -t raw
44-
# Output : 654 bytes
43+
# ./msfvenom -p windows/messagebox TITLE="Friendly message from corelanc0d3r" TEXT="DNS Payloads FTW" -e x86/alpha_mixed Bufferregister=EDI -f raw
44+
# Output : 658 bytes
4545
# 2. Split the alpha shellcode into individual parts of exactly 255 bytes (+ remaining bytes)
46-
# In case of 654 bytes of payload, there will be 2 parts of 255 bytes, and one part of 144 bytes
46+
# In case of 658 bytes of payload, there will be 2 parts of 255 bytes, and one part of 144 bytes
4747
# 3. Create TXT records in a zone you control and put in a piece of the shellcode in each TXT record
4848
# The last TXT record might have less than 255 bytes, that's fine
4949
# The first part must be stored in the TXT record for prefix a.<yourdomain.com>
5050
# The second part must be stored in the TXT record for b.<yourdomain.com>
5151
# etc
5252
# First part must start with a. and all parts must be placed in consecutive records
5353
# 4. use the dns_txt_query payload in the exploit, specify the name of the DNS zone that contains the DNS TXT records
54-
# Example : /msfpayload windows/dns_txt_query_exec DNSZONE=corelan.eu C
54+
# Example: ./msfvenom -p windows/dns_txt_query_exec DNSZONE=corelan.eu -f c
5555
# (Example will show a messagebox)
5656
#
5757
# DNS TXT Records :

0 commit comments

Comments
 (0)