Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Has Gentoo 2007.0 a non-executable stack by default?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Leman
n00b
n00b


Joined: 24 Jan 2008
Posts: 3

PostPosted: Thu Jan 24, 2008 12:12 pm    Post subject: Has Gentoo 2007.0 a non-executable stack by default? Reply with quote

Hello,
I'm reading a book about buffer overflows and I'm trying a piece of software that executes code in the stack. It gives me a segmentation fault when executed. I have debugged it and I have seen problems after the execution flow jumps to the shellcode placed in the heap. I would like to know if Gentoo implements a non-executable stack by default and how to uninstall or disable it.
I have search the net and I have found info about exec-shield and PaX. I have not installed anything like PaX and /proc/sys/kernel/exec-shield does not exist. I have tried to echo a 0 into /proc/sys/kernel/exec-shield just in case but I can't. It says that the file does not exist and I can't create it even as root.
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Thu Jan 24, 2008 1:46 pm    Post subject: Reply with quote

Hardened Gentoo is what you want, which includes pax/ssp amongst other security hardening features.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
Leman
n00b
n00b


Joined: 24 Jan 2008
Posts: 3

PostPosted: Thu Jan 24, 2008 2:26 pm    Post subject: Reply with quote

Hopeless wrote:
Hardened Gentoo is what you want, which includes pax/ssp amongst other security hardening features.


No. What I want is to disable this protection. I want an executable stack because I want to study how buffer overflows and exploits in general are programmed.
Back to top
View user's profile Send private message
Suicidal
l33t
l33t


Joined: 30 Jul 2003
Posts: 959
Location: /dev/null

PostPosted: Thu Jan 24, 2008 4:10 pm    Post subject: Reply with quote

Do you have No Execute enabled on your processor in the bios?

If you really want to play with buffer overflows why not install something like redhat 6 in a VM?

http://sunsite.mff.cuni.cz/MIRRORS/archive.download.redhat.com/redhat/linux/6.2/en/iso/i386/
Back to top
View user's profile Send private message
Leman
n00b
n00b


Joined: 24 Jan 2008
Posts: 3

PostPosted: Thu Jan 24, 2008 4:25 pm    Post subject: Reply with quote

Suicidal wrote:
Do you have No Execute enabled on your processor in the bios?


I will check that, thanks.

Suicidal wrote:

If you really want to play with buffer overflows why not install something like redhat 6 in a VM?


Yes. I have just downloaded Centos and I have already installed VMWare on my machine but I would like to solve this problem to know why this is happening.
Back to top
View user's profile Send private message
Suicidal
l33t
l33t


Joined: 30 Jul 2003
Posts: 959
Location: /dev/null

PostPosted: Thu Jan 24, 2008 4:33 pm    Post subject: Reply with quote

Leman wrote:
Suicidal wrote:
Do you have No Execute enabled on your processor in the bios?


I will check that, thanks.

Suicidal wrote:

If you really want to play with buffer overflows why not install something like redhat 6 in a VM?


Yes. I have just downloaded Centos and I have already installed VMWare on my machine but I would like to solve this problem to know why this is happening.


CentOS isn't too old, and its compiler will be relatively modern; if you install something old like RH6 you can play with 7 years of known exploits.

I would at least tray an OS release that is at least a year older that the publication date on the book - Just to be safe.
Back to top
View user's profile Send private message
jcat
Veteran
Veteran


Joined: 26 May 2006
Posts: 1337

PostPosted: Tue Feb 05, 2008 4:47 pm    Post subject: Reply with quote

Suicidal wrote:
Do you have No Execute enabled on your processor in the bios?



Pardon my possible ignorance, but..
How would you be able to boot a system without being able to execute binaries!??




Cheers,
jcat
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Tue Feb 05, 2008 5:43 pm    Post subject: Reply with quote

jcat wrote:
Suicidal wrote:
Do you have No Execute enabled on your processor in the bios?



Pardon my possible ignorance, but..
How would you be able to boot a system without being able to execute binaries?
What they are referring to is the NX bit, which ensures that no code is run from areas in memory that are only supposed to contain data rather than executable code.

Read the wikipedia article for a better explanation.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
jcat
Veteran
Veteran


Joined: 26 May 2006
Posts: 1337

PostPosted: Tue Feb 05, 2008 5:45 pm    Post subject: Reply with quote

Thanks for the info :)



Cheers,
jcat
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum