3 | 48Bits Advisory −=− Privilege Elevation in eTrust Antivirus Agent r8 |
6 Affected versions :
I have tested with:
− 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)
13 Description :
eTrust Antivirus r8 is prone to a stack−based buffer overflow vulnerability.
The Affected component is "eTrust Task service" running as a Windows service,
the executable file is located at:
eTrust Task service uses a shared file mapping named "INOQSIQSYSINFO" as an
IPC mechanism, this file mapping have a NULL security descriptor so anyone
can view/modify it. This mapping contains information about scheduled tasks,
including a field where is specified the file jobÂ´s path.
The vulnerable code is located at IN0CORE.DLL in the function QSIGetQueueID
which internally calls QSIGetQuePath passing a fixed buffer in order to
retrieve the queue path, no validation is done for the buffer size.
In order to exploit the vulnerability, malicious users can modify directly
the buffer through the file mapping with a long file path, so when InnoTask
read it the mentioned stack−based buffer overflow will be triggered.
36 Technical notes about the exploit:
Although the component was compiled with /GS option is still possible to exploit it:
The IONOQSIQSYSINFO filemapping has enough size to contain a long file path which
after overflowing return address and SEH Handlers will reach the end of the stack,
causing an access exception to be raised, then we can point the exception handler
to a memory containing a (pop,pop,ret) or (call [esp+8]) sequence, this isnt a problem
for W2K or XPSP1 because we have such sequenc