exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

symantecAV.txt

symantecAV.txt
Posted Feb 16, 2004
Authored by Dr. Peter Bieringer

The Symantec AntiVirus Scan Engine for Linux has a possible race condition via a symlink attack in /tmp.

tags | advisory
systems | linux
SHA-256 | 7603b97a86063ada3a6bbaacd9422e0f4212735f47d6515ab0e95f25df4ccb24

symantecAV.txt

Change Mirror Download
Hi,

during evaluation of Symantec AntiVirus Scan Engine for Red Hat Linux
(file: Scan_Engine_430-RedHat-1.zip) we found a race condition using
default configuration.

Like written in "Implementation_Guide.pdf" on page 134 LiveUpdate can be
triggered by cron via a shell script:

# /opt/SYMCScan/bin/liveupdate.sh -virusdefs
or
# /bin/sh /opt/SYMCScan/bin/liveupdate.sh -virusdefs

This will create a log file in /tmp with a very predictable name:
"/tmp/LiveUpdate.log" (with permissions of 644)

# ll /tmp/
-rw-r--r-- 1 symantec avdefs 4517 Feb 16 15:05 LiveUpdate.log

This is defined in the config file "liveupdate.conf":

# cat /etc/liveupdate.conf
protocol=http
host=liveupdate.symantec.com
workdir=/tmp
logfile=/tmp/LiveUpdate.log <---!!!!!!

Impact:
Before first run of LiveUpdate (like suggested in doc, user "symantec" does
this) a possible race condition via a symlink attack by another user will
result in the creation of a new file (as user "symantec") or appending
LiveUpdate log to an existent file (owned by user "symantec").

Additional *important* note:
Because the PDF document doesn't match the as-it-is of the installation (an
user "symantec" can't execute liveupdate.sh" without adjusting the
permissions of the shell script and the directory "virusdefs") it's very
possible, that admins configure the crontab entry for "liveupdate.sh" as
user "root"!

# ll /opt/SYMCScan/bin/liveupdate.sh
-rwxr-x--- 1 root root 14700 Feb 16 16:16
/opt/SYMCScan/bin/liveupdate.sh

# ll /opt/SYMCScan |grep virusdefs
drwxr-xr-x 2 root root 4096 Feb 16 16:16 virusdefs


BTW: The installer uses PID for tmp directory naming, another minor issue...

# ll /tmp/
drwxr-xr-x 2 root root 4096 Feb 16 15:47 symcinst9918
# ps -ax | grep 9918
9918 pts/0 S 0:02 sh ./ScanEngine.sh

-> fix to a unpredictable name


BTW2: looks like a temp directory during install has always the same name.
# ll /tmp/
drwx------ 2 root root 4096 Feb 16 16:16 savsetmp

-> fix to a unpredictable name


BTW3: temporary directory during LiveUpdate run has permissions 755
# ll /tmp/
drwxr-xr-x 2 root root 4096 Feb 16 16:37 1076967476267

-> fix permissions to at least 750, perhaps it's also not the best method
to use Unix time in milliseconds to name this directory.


Suggestions/workarounds:
* for the software vendor:
use a better default value, e.g.
logfile=/var/log/LiveUpdate.log
Fix permissions of log file to at least 640
Fix PDF document or/and permissions for
liveupdate.sh and directory virusdefs
(and on RHL systems: "/usr/bin/sh" doesn't exist, fix to "/bin/sh")
Fix predictable directory names during installation
Fix permissions of temp directory during LiveUpdate run to at least 750
Fix name of temp directory to a more unpredictable one


* for administrators:
adjust config file before first run of the LiveUpdate process
adjust permissions of
liveupdate.sh and directory virusdefs
and run liveupdate.sh as non-root user


Regards,
Dr. Peter Bieringer
--
Dr. Peter Bieringer Phone: +49-8102-895190
AERAsec Network Services and Security GmbH Fax: +49-8102-895199
Wagenberger Straße 1 Mobile: +49-174-9015046
D-85662 Hohenbrunn E-Mail: pbieringer@aerasec.de
Germany Internet: https://www.aerasec.de
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    38 Files
  • 24
    Sep 24th
    65 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close