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:

June 2023

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jun 1st
    18 Files
  • 2
    Jun 2nd
    13 Files
  • 3
    Jun 3rd
    0 Files
  • 4
    Jun 4th
    0 Files
  • 5
    Jun 5th
    32 Files
  • 6
    Jun 6th
    39 Files
  • 7
    Jun 7th
    0 Files
  • 8
    Jun 8th
    0 Files
  • 9
    Jun 9th
    0 Files
  • 10
    Jun 10th
    0 Files
  • 11
    Jun 11th
    0 Files
  • 12
    Jun 12th
    0 Files
  • 13
    Jun 13th
    0 Files
  • 14
    Jun 14th
    0 Files
  • 15
    Jun 15th
    0 Files
  • 16
    Jun 16th
    0 Files
  • 17
    Jun 17th
    0 Files
  • 18
    Jun 18th
    0 Files
  • 19
    Jun 19th
    0 Files
  • 20
    Jun 20th
    0 Files
  • 21
    Jun 21st
    0 Files
  • 22
    Jun 22nd
    0 Files
  • 23
    Jun 23rd
    0 Files
  • 24
    Jun 24th
    0 Files
  • 25
    Jun 25th
    0 Files
  • 26
    Jun 26th
    0 Files
  • 27
    Jun 27th
    0 Files
  • 28
    Jun 28th
    0 Files
  • 29
    Jun 29th
    0 Files
  • 30
    Jun 30th
    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