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

net-snmp-05182005.txt

net-snmp-05182005.txt
Posted Aug 14, 2005
Authored by Eric Romang

net-snmp fixproc contains a security flaw that allows a malicious local attacker the ability to execute arbitrary commands with root privileges.

tags | advisory, arbitrary, local, root
SHA-256 | e45fb19f19ec442e148803aa640b440b3b0b5470ff6e7fbd34aec296f42a3019

net-snmp-05182005.txt

Change Mirror Download
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

#########################################################
net-snmp fixproc insecure temporary file creation

Vendor: http://www.net-snmp.org
Advisory: http://www.zataz.net/adviso/net-snmp-05182005.txt
Vendor informed: yes
Exploit available:no
Impact : low
Exploitation : low

#########################################################

net-snmp fixproc contain a security flaw how could
allow a malicious local attacker to execute arbitrary commands
with root privileges.

##########
Versions:
##########

net-snmp <= 5.2.1

##########
Solution:
##########

Depends the linux distribution you use,
some are patched, some not, the vendor
is looking on a official patch.

#########
Timeline:
#########

Discovered : 2005-05-07
Vendor notified : 2005-05-17
Vendor response : 2005-05-23
Vendor fix : no date
Disclosure : 2005-05-23

#####################
Technical details :
#####################

Just take a look at /usr/bin/fixproc

Line 233 :

# it must be "shell", so execute the shell script defined in database

local ($tmpfile) = "/tmp/fix_$$";

&create_sh_script ($fix{$proc}, $tmpfile);

# return code is number divided by 256
$error_code = (system "$tmpfile") / 256;

- -----------------------------------------

We see that the tmp file is created with $$ value and this script is
execute by the perl system command

The subfunction do only this :

- -------------------------------------

sub create_sh_script
{
local ($file) = pop (@_);
local ($i) = pop (@_);

printf (stderr "create_sh_script\n") if ($debug > 0);

$! = $fixproc_error;
open (file, ">"."$file") || die "$0: cannot open $file\n";
while ( $shell_lines[$i] ne $shell_end_marker )
{
printf (file "%s", $shell_lines[$i]);
$i++;
}
close (file);
system "chmod +x $file";
return file;
}

- ----------------------------------

The same for the fonction do_check()

########
Notice :
########

Take a look on this :

http://rpmfind.net/linux/RPM/suse/9.1/i386/suse/i586/net-
snmp-5.1-80.i586.html

* Tue Mar 16 2004 - ro@suse.de
- use mktemp in fixproc (#36103)

#########
Related :
#########

http://sourceforge.net/tracker/index.php?
func=detail&aid=1203376&group_id=12694&atid=112694
http://bugs.gentoo.org/show_bug.cgi?id=91792

#########
Credits :
#########

Eric Romang (eromang@zataz.net - ZATAZ Audit)
Thxs to Gentoo Security Team. (Taviso, jaervosz, solar, tigger, etc.)



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFCkkQzXXuxWE8lDAcRAhPZAJwNgzs0jacMumLmV6XPgGoy9nXHEgCeMLBx
YZA5wA+dnE9/7QrHPIENyRY=
=624Z
-----END PGP SIGNATURE-----
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close