Skip to content

Commit 85c0c8b

Browse files
committed
Add support to detect mshtml build
Some IE vulns are build-specific, in that case we need a way to detect the build version. On IE9 and newer, the build version is the same as the one you see in WinDBG when you do lmv m mshtml. On IE8, it returns something else I don't know.
1 parent 0c3a535 commit 85c0c8b

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

lib/msf/core/exploit/remote/browser_exploit_server.rb

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,20 @@ module Exploit::Remote::BrowserExploitServer
4242

4343
# Requirements a browser module can define in either BrowserRequirements or in targets
4444
REQUIREMENT_KEY_SET = {
45-
:source => 'source', # Either 'script' or 'headers'
46-
:ua_name => 'ua_name', # Example: MSIE
47-
:ua_ver => 'ua_ver', # Example: 8.0, 9.0
48-
:os_name => 'os_name', # Example: Microsoft Windows
49-
:os_flavor => 'os_flavor', # Example: XP, 7
50-
:language => 'language', # Example: en-us
51-
:arch => 'arch', # Example: x86
52-
:proxy => 'proxy', # 'true' or 'false'
53-
:silverlight => 'silverlight', # 'true' or 'false'
54-
:office => 'office', # Example: "2007", "2010"
55-
:java => 'java', # Example: 1.6, 1.6.0.0
56-
:clsid => 'clsid', # ActiveX clsid. Also requires the :method key
57-
:method => 'method' # ActiveX method. Also requires the :clsid key
45+
:source => 'source', # Either 'script' or 'headers'
46+
:ua_name => 'ua_name', # Example: MSIE
47+
:ua_ver => 'ua_ver', # Example: 8.0, 9.0
48+
:os_name => 'os_name', # Example: Microsoft Windows
49+
:os_flavor => 'os_flavor', # Example: XP, 7
50+
:language => 'language', # Example: en-us
51+
:arch => 'arch', # Example: x86
52+
:proxy => 'proxy', # 'true' or 'false'
53+
:silverlight => 'silverlight', # 'true' or 'false'
54+
:office => 'office', # Example: "2007", "2010"
55+
:java => 'java', # Example: 1.6, 1.6.0.0
56+
:clsid => 'clsid', # ActiveX clsid. Also requires the :method key
57+
:method => 'method', # ActiveX method. Also requires the :clsid key
58+
:mshtml_build => 'mshtml_build' # mshtml build. Example: "65535"
5859
}
5960

6061
def initialize(info={})
@@ -379,6 +380,7 @@ def get_detection_html(user_agent)
379380
380381
<% if os == OperatingSystems::WINDOWS and client == HttpClients::IE %>
381382
d['<%=REQUIREMENT_KEY_SET[:office]%>'] = window.ie_addons_detect.getMsOfficeVersion();
383+
d['<%=REQUIREMENT_KEY_SET[:mshtml_build]%>'] = ScriptEngineBuildVersion().toString();
382384
<%
383385
clsid = @requirements[:clsid]
384386
method = @requirements[:method]

0 commit comments

Comments
 (0)