From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14577 invoked by alias); 13 Oct 2007 18:55:34 -0000 Received: (qmail 14566 invoked by uid 22791); 13 Oct 2007 18:55:34 -0000 X-Spam-Check-By: sourceware.org Received: from mu-out-0910.google.com (HELO mu-out-0910.google.com) (209.85.134.186) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 13 Oct 2007 18:55:30 +0000 Received: by mu-out-0910.google.com with SMTP id w9so974100mue for ; Sat, 13 Oct 2007 11:55:28 -0700 (PDT) Received: by 10.86.33.10 with SMTP id g10mr3488733fgg.1192301727815; Sat, 13 Oct 2007 11:55:27 -0700 (PDT) Received: from ?192.168.1.35? ( [90.185.18.157]) by mx.google.com with ESMTPS id y2sm3161345mug.2007.10.13.11.55.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 13 Oct 2007 11:55:27 -0700 (PDT) Message-ID: <4711149D.1040906@gmail.com> Date: Sat, 13 Oct 2007 22:10:00 -0000 From: IceDane User-Agent: Thunderbird 1.5.0.13 (X11/20070824) MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Stack protection mechanisms in 4.0+/4.1.2? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-10/txt/msg00169.txt.bz2 Hey there. A course in my school involves exploitation of various vulnerabilities, such as buffer overflows and format string vulnerabilities and so on. I'm currently running kbuntu, latest version, which comes with gcc 4.1.2 stock. If I compile a vulnerable program(A simple strcpy of argv[1] to a small buffer) and then attempt to execute an exploit, no matter what i do, it fails. I realize that the ubuntu gcc 4.1.2 compiles with the -fstack-protector as default, however, even if I use -fno-stack-protector, the problem still prevails. All kernels since 2.6 also come with virtual address space randomization as default, and I've disabled that. Anyway, I found something that said if you installed gcc 3.3, you'd be fine. I try that, and voila, exploit executes accordingly. Now, I ask - What is it, other than the -fstack-protector flag, which can disable buffer overflow exploits like that in gcc? P.S. I just installed ubuntu to see if the problem prevailed here - I was using slack 12.0 just yesterday, with the same version of GCC, and I had the exact same problem. All help greatly appreciated.