On Wed, Jan 18, 2006 at 07:59:52PM -0700, Bryan Sant wrote:
> On 1/18/06, Michael Halcrow <[EMAIL PROTECTED]> wrote:
> > 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;
> > }
>
> Or for the lazy:
> while true; do
> cat /dev/random > /proc/kcore
> done
The trick is to not make the computer crash *too* quickly or *too*
predictably. Little things need to happen. Like, process names and
attributes need to get tweeked just a tad here and there. Inodes need
to be occasionally linked to random parts of memory. DMA transfers
need to jump a few bytes off from where they should be reading.
BTW, this won't work w/ more recent kernels.
;-)
Mike
.___________________________________________________________________.
Michael A. Halcrow
Security Software Engineer, IBM Linux Technology Center
GnuPG Fingerprint: 419C 5B1E 948A FA73 A54C 20F5 DB40 8531 6DCA 8769
Every rule has an exception, except the rule of exceptions.
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. */
