LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-16-2012, 10:46 AM   #1
atomas123
LQ Newbie
 
Registered: Oct 2005
Posts: 13

Rep: Reputation: 0
Hacking the art of exploitation, sometimes don't work


Hello all
this is a question regarding programs from the book Hacking the art of exploitation.
here are the programs i am testing:
notetaker.c
notesearch.c
both of these work
but then
exploit_notesearch.c
auth_overflow.c
don't work

interesting ... is that if I compile these two exploits as a.out (gcc exploit_notesearch.c)
they work
but if I compile them as (gcc -o exploit_notesearch exploit_notesearch.c) the programs works but not the exploits

anyone
thank you
 
Old 01-16-2012, 11:17 AM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
To a very great extent, "think like a book-seller." For some reason or another, people love books about doing naughty things and especially about succeeding at doing naughty things. But reality is very boring. It doesn't sell books.
 
Old 01-16-2012, 07:01 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,222

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Or you could think like a publisher and look for erratta:

http://nostarch.com/hacking2.htm#updates
http://oreilly.com/catalog/errataunc...=9781593271442
 
Old 01-17-2012, 04:42 AM   #4
atomas123
LQ Newbie
 
Registered: Oct 2005
Posts: 13

Original Poster
Rep: Reputation: 0
thank you for the suggestions, but I have already look in to those.

the real question is why does it work with ./a.out and not with ./progname?
 
Old 02-18-2012, 07:35 PM   #5
jkahlich1
LQ Newbie
 
Registered: Feb 2012
Posts: 1

Rep: Reputation: Disabled
Page 147

It is not a typo. If you haven't already, read on. Page 147 answers your question. "The length of the name of the program seems to have an effect on the address..."




Quote:
Originally Posted by atomas123 View Post
thank you for the suggestions, but I have already look in to those.

the real question is why does it work with ./a.out and not with ./progname?
 
Old 04-14-2013, 01:01 PM   #6
tomycat
LQ Newbie
 
Registered: Apr 2013
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by jkahlich1 View Post
It is not a typo. If you haven't already, read on. Page 147 answers your question. "The length of the name of the program seems to have an effect on the address..."
hi,
I have a Suse linux 10,2 (old test linux).
My problem, noteseach.c donīt work unter suse.

Here is the sourcecode:
ww_w.buvica.com/ulixesfox/HCKAOD/final/building_on_basics.html

The adress: bffff947 is my shellcode in inenvironment variable.

./notesearch $(perl -e 'print "\x47\xf9\xff\xbf"x40)

linux say: Segment Error
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to increase file cache? for art work lucydarling Linux - Newbie 2 03-28-2011 06:35 PM
Linux for art work. With no.Mute Linux - General 4 11-29-2009 05:13 AM
Possible anti-exploitation measures in 2.6.21.5-smp? IceDane Linux - Security 1 10-12-2007 08:32 PM
Wanted: Tux / Marianne / Liberty art work. cyent General 1 07-13-2006 04:06 PM
Suse dontīt boot X; donīt ask for root passwd, YAST donīt work... carrie Linux - Newbie 4 10-08-2004 07:46 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration