On Wed, Jan 18, 2006 at 03:36:05PM -0700, Andy Bradford wrote: > Thus said bibhor dhungel on Mon, 16 Jan 2006 09:33:38 MST: > > After being familiar with Linux for more than a year I want to test > > how much I have learned and what more I need to know. Is there a book, > > test or link to help me identify these needs? > > How about you give a few of us root access, we each get to break one > thing, and we'll see if you can get the system working again without > a reinstall? :-)
Heh. Here, I've got something to throw in root's crontab:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
int main()
{
int fd;
unsigned long offset;
char buf;
srand(time(NULL));
offset = rand() % 2000000;
buf = offset % 255;
fd = open("/proc/kcore", O_WRONLY); /* You need SE Linux ;-) */
if (fd == -1) {
printf("Run me as root\n");
return 1;
}
lseek(fd, offset, SEEK_SET);
write(fd, &buf, 1);
close(fd);
return 0;
}
Mike
.___________________________________________________________________.
Michael A. Halcrow
Security Software Engineer, IBM Linux Technology Center
GnuPG Fingerprint: 419C 5B1E 948A FA73 A54C 20F5 DB40 8531 6DCA 8769
"Che fai tu, terra, in ciel? Dimmi, che fai, Silenziosa Terra?"
- Giuseppe Ungaretti
signature.asc
Description: Digital signature
/* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
