1 /*
2 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
3 | 48Bits Advisory −=− Privilege Elevation in eTrust Antivirus Agent r8 |
4 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
5
6 Affected versions :
7
8
I have tested with:
9
10
− eTrust Antivirus Agent r8 − http://www3.ca.com/solutions/Product.aspx?ID=156
11 (With INOCORE.DLL 8.0.403.0) under XPSP2 and W2KSP4)
12
13 Description :
14
15
eTrust Antivirus r8 is prone to a stack−based buffer overflow vulnerability.
16
17
The Affected component is "eTrust Task service" running as a Windows service,
18
the executable file is located at:
19
20
"%PROGRAMFILES%\CA\eTrustITM\InoTask.exe"
21
22
eTrust Task service uses a shared file mapping named "INOQSIQSYSINFO" as an
23
IPC mechanism, this file mapping have a NULL security descriptor so anyone
24
can view/modify it. This mapping contains information about scheduled tasks,
25
including a field where is specified the file job´s path.
26
27
The vulnerable code is located at IN0CORE.DLL in the function QSIGetQueueID
28
which internally calls QSIGetQuePath passing a fixed buffer in order to
29
retrieve the queue path, no validation is done for the buffer size.
30
31
In order to exploit the vulnerability, malicious users can modify directly
32
the buffer through the file mapping with a long file path, so when InnoTask
33
read it the mentioned stack−based buffer overflow will be triggered.
34
35
36 Technical notes about the exploit:
37
38
Although the component was compiled with /GS option is still possible to exploit it:
39
40
The IONOQSIQSYSINFO filemapping has enough size to contain a long file path which
41
after overflowing return address and SEH Handlers will reach the end of the stack,
42
causing an access exception to be raised, then we can point the exception handler
43
to a memory containing a (pop,pop,ret) or (call [esp+8]) sequence, this isnt a problem
44
for W2K or XPSP1 because we have such sequenc