Format String Vulnerability

This is a discussion on Format String Vulnerability within the C Programming forums, part of the General Programming Boards category; Hello I have a final assignment that unfortunately I picked thinking it would be a breeze. Of course it has ...

  1. #1
    Registered User
    Join Date
    May 2012
    Posts
    1

    Format String Vulnerability

    Hello

    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
    http://www.cis.syr.edu/~wedu/seed/La...mat_String.pdf

    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
    Location
    Singapore
    Posts
    21,714
    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*
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    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, 07: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 Cprogramming.com
    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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21