Results 1 to 2 of 2

Thread: # 3 lines C-prog hurts MS VC

Hybrid View

  1. #1
    Imported blog (Kris Kaspersky)
    Join Date
    May 2008
    Posts
    61

    # 3 lines C-prog hurts MS VC

    do you trust your compiler? do you complete “secondhand” sources? yeah, we all do that. but do you know that evil sources might hurt your compiler and sometimes even abuse your host OS (if compiler works inside guest VM Ware/Virtual PC environment). no MS specific extension! just pure ANSI C!

    well, try this…

    #include “stdio.h”
    #include “limits.h”
    int hack[INT_MAX] = {1,2,3};
    main(){
    printf(”hello world!\n”); return hack[INT_MAX-1];
    }
    what happened? oh… trying to create a very big array (2Gb!) complier fed up all memory and end up with error. if you don’t have enough physical memory and page file is not disabled - OS is hunting hdd for a long time, slowing down the whole system.

    the same trick works with some assemblers - just define a huge array (TASM and MASM are affected).

    I wonder: how many translators have this bug? please, download the source code, try to compile it and mail result to info#re-lab.org or leave your comment here. please, test every translator you have under your hands. not only C/C++ but DELPHI/Pascal/ASM as well. thanks!



    http://nezumi-lab.org/blog/?p=61

  2. #2
    floop.org
    Guest

    You are just using a crappy compiler

    $ gcc -o test c-DoS.c
    c-DoS.c:32: error: size of array ‘hack’ is too large
    I promise that I have read the FAQ and tried to use the Search to answer my question.

Similar Threads

  1. Newbie looking for some guide lines(c++ RE)
    By Zius in forum The Newbie Forum
    Replies: 5
    Last Post: December 17th, 2012, 18:29
  2. How to find all rows/lines with a specific memory address?
    By tDJ in forum OllyDbg Support Forums
    Replies: 4
    Last Post: October 21st, 2005, 01:26
  3. Taking control of a prog
    By ReVeR in forum The Newbie Forum
    Replies: 9
    Last Post: December 22nd, 2004, 13:18
  4. Unpacked prog. does not run on different OS.
    By Harding in forum Malware Analysis and Unpacking Forum
    Replies: 5
    Last Post: September 5th, 2003, 22:09
  5. I need to trace thru a prog
    By Crackin_Newbie in forum Malware Analysis and Unpacking Forum
    Replies: 17
    Last Post: May 25th, 2002, 04:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •