Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Security and Privacy
FedoraForum Search

Forgot Password? Join Us!

Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 8th July 2008, 10:27 PM
Master Blaster Offline
Registered User
 
Join Date: May 2008
Posts: 7
Couple of questions about format string vulnerabilities

Hi everyone.

I just starting reading a white paper about the so-called "format string attacks". The paper, which can be found at http://julianor.tripod.com/bc/tn-usfs.pdf, is quite tricky for me. First of all it was written with the x86 architecture in mind. I'm, however, using a x86_64 system (Fedora 9) so I had to download the glibc-devel.i386 package and compile all the sample programs with the "-m32" switch.

And now for my problems: as you can see in the paper, the writer claims that by running the sample program with "%x %x %x %x" as it's invocation argument I can see the value of the local variable x (which is 1). In my case, however, this value appears only when I use five %x's. Why is that?

Moreover, I also noticed that for some reason every time I run the program x is loaded into a different memory address. Why is this? In the paper this address is fixed and doesn't change in between separate executions....

Thanks in advance.
Reply With Quote
  #2  
Old 8th July 2008, 10:58 PM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,302
b/c the way stacks are constructed and the way the automatics are allocated is NOT consistent across systems.

On an x86 (F8) I get "1" - at eight %x's !

I think the issue is far overblown. If you can execute a program and you can write to it's data space this is almost as powerful as making any system call with any argument you wish. Of course tihs does no harm unless you have privledge to do harm in the first place. You can't overwrite another process or the kernel not can you write to the proc tables. The issue is most with things like setuid programs that could be subverted with other's provledges.

Last edited by stevea; 8th July 2008 at 11:08 PM.
Reply With Quote
  #3  
Old 15th July 2008, 09:31 AM
aagestrand's Avatar
aagestrand Offline
Registered User
 
Join Date: Jul 2008
Location: Norway
Posts: 5
The reason for your program being loaded in different memory locations is most likely due to a security feature called address-space randomization, in which the kernel tries to protect itself against buffer attacks by randomizing the location of in-memory components. This is to stop attackers from utilizing a fixed offset to target vulnerable locations in memory. As always, there's a way around it. Sigh.

I seem to recall this is a kernel setting and that you can turn it off by using sysctl.
__________________
Åge Strand
http://ahs.name
Reply With Quote
Reply

Tags
couple, format, questions, string, vulnerabilities

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Just a couple questions Perfex Using Fedora 11 1st November 2007 11:18 PM
Couple Questions cmanns Installation and Live Media 15 13th October 2006 10:40 PM


Current GMT-time: 14:32 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat