Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Pen-Test
[Top] [All Lists]

Re: Overflowing Scripts fail to work

Subject: Re: Overflowing Scripts fail to work
Date: Mon, 24 Apr 2006 04:56:26 +0000
Paul Sebastian Ziegler(psz@observed.de)@Sat, Apr 22, 2006 at 10:30:43AM +0200:
Hallo list!

I've been on this for quite some time and after failing to find out
anything on the Internet I've finally decided to propose this question
here. Any help would be greatly appreciated!

Due to interest I have started to try to understand
buffer-overflow-attacks. The theory is fine with me. But now I'm getting
quite some trouble when trying to write exploiting scripts.

Let me show you what I mean:
(code and example runs cut)

Using your C code and the same python code:

(%:~/tmp)- ./a.out `python -c "print 'A' * 524"`
AAAAAAA (lots of As cut)
a.out: stack smashing attack in function main()
zsh: abort      ./a.out `python -c "print 'A' * 524"`
(%:~/tmp)- python
Python 2.4.2 (#1, Oct 16 2005, 00:06:10)
[GCC 3.3.6 (Gentoo Hardened 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import os
os.system("./a.out " + ("A" * 524))
AAAAAAA (again, lots of As)
a.out: stack smashing attack in function main()
6

(%:~/tmp)- python vuln.py
AAAAAAA (As galore)
a.out: stack smashing attack in function main()
(%:~/tmp)

Gentoo with kernel 2.6.12-gentoo-r10, GCC 3.3.6 (Gentoo Hardened 3.3.6,
ssp-3.3.6-1.0, pie-8.7.8), Python 2.4.2 built with this GCC.

The Hardened stuff is why I'm seeing "stack smashing attack", but I can't
imagine why this would be causing a failure where yours isn't (while
running from within python).

Unless the newer kernels added something here (which I doubt), it should
be working for you.  We're on almost the same build.

-- 
Bill Weiss

------------------------------------------------------------------------------
This List Sponsored by: Cenzic

Concerned about Web Application Security? 
Why not go with the #1 solution - Cenzic, the only one to win the Analyst's 
Choice Award from eWeek. As attacks through web applications continue to rise, 
you need to proactively protect your applications from hackers. Cenzic has the 
most comprehensive solutions to meet your application security penetration 
testing and vulnerability management needs. You have an option to go with a 
managed service (Cenzic ClickToSecure) or an enterprise software 
(Cenzic Hailstorm). Download FREE whitepaper on how a managed service can 
help you: http://www.cenzic.com/news_events/wpappsec.php 
And, now for a limited time we can do a FREE audit for you to confirm your 
results from other product. Contact us at request@cenzic.com for details.
------------------------------------------------------------------------------

<Prev in Thread] Current Thread [Next in Thread>