Testing Linux skills

Michael Halcrow mike at halcrow.us
Wed Jan 18 17:00:29 MST 2006

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;

        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);
        return 0;

                         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 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: Digital signature
Url : http://plug.org/pipermail/plug/attachments/20060118/33df0ad2/attachment.bin 

More information about the PLUG mailing list