Thread: Format String Vulnerability

  1. #1
    Registered User
    Join Date
    May 2012

    Format String Vulnerability


    I have a final assignment that unfortunately I picked thinking it would be a breeze. Of course it has proven to be the hardest task I have attempted all semester and has led me to this post. The lab can be found here

    My problem is that when I follow exactly what the lab says I can not get any results. I have crashed the program using %s multiple times (that is extremely easy) when i try to read the "secret" from the supplied address in memory I can not seem to do so.

    what i am supplying to the program is something along the lines of..
    \xff\x01\x48\x08 %x %x %x %x %s

    where ff014808 is the address given by the program. I have tried literally hundreds of variations of this and other inputs with more %x's or less to try and pinpoint the distance between the user input[] and the address passed to the printf() function on the stack however I can not seem to get anywhere!

    Any ideas?

    Greatly Appreciated!!

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    I understand that this is an academic exercise, but please refer to the forum guidelines:
    6. Messages relating to cracking, (erroneously called "hacking" by many), copyright violations, or other illegal activities will be deleted. Due to the overlapping boundaries of code with malicious intent, and other legitimate uses of it, the moderators will assess each potential infraction on a case by case basis.
    I suggest that you consult your instructor(s) for help.

    *thread closed*
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Format string in C++
    By pmdusso in forum C++ Programming
    Replies: 5
    Last Post: 10-31-2011, 12:28 PM
  2. Comodo Firewall Vulnerability (Port 0)
    By Mario F. in forum Tech Board
    Replies: 0
    Last Post: 11-11-2009, 08:56 AM
  3. string format ...
    By SkinneyEd in forum C++ Programming
    Replies: 5
    Last Post: 10-20-2005, 10:08 AM
  4. M$ JPG Vulnerability
    By Davros in forum A Brief History of
    Replies: 10
    Last Post: 09-27-2004, 01:40 AM
  5. What is 'buffer overrun vulnerability' in IIS?
    By Web admin in forum Windows Programming
    Replies: 1
    Last Post: 08-16-2001, 03:33 AM

Tags for this Thread