Question

2. A successful format string unauthorized memory. Answer the followings with proper explanation: [2 points a. This attack wi
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:-

There are several format strings that specify output in C and many other programming languages but our focus is on C.

Format string vulnerabilities are a class of bug that take advantage of an easily avoidable programmer error. If the programmer passes an attacker-controlled buffer as an argument to a printf (or any of the related functions, including sprintf, fprintf, etc), the attacker can perform writes to arbitrary memory addresses. The following program contains such an error:

Since printf has a variable number of arguments, it must use the format string to determine the number of arguments. In the case above, the attacker can pass the string “%p %p %p %p %p %p %p %p %p %p %p %p %p %p %p” and fool the printf into thinking it has 15 arguments. It will naively print the next 15 addresses on the stack, thinking they are its arguments:

work well for identifying policy violations or process weaknesses, but to really evaluate the technical vulnerabilities in your environment, you will need to perform some sort of security testing. Although passive testing sounds harmless, beware that the definition of passive is not always consistent across the field. There are definitely gray areas to be aware of; any testing should require appropriate senior management approval. Most security scanners or vulnerability scanners are tools with large databases of known attacks and weaknesses and will scan the environment for signs of vulnerabilities or compromises. .

Preventing Format String Vulnerabilities

  • Always specify a format string as part of program, not as an input. Most format string vulnerabilities are solved by specifying “%s” as format string and not using the data string as format string
  • If possible, make the format string a constant. Extract all the variable parts as other arguments to the call. Difficult to do with some internationalization libraries
  • If the above two practices are not possible, use defenses such as Format_Guard . Rare at design time. Perhaps a way to keep using a legacy application and keep costs down.Increase trust that a third-party application will be safe
Add a comment
Know the answer?
Add Answer to:
2. A successful format string unauthorized memory. Answer the followings with proper explanation: [2 points a. This attack will lead to violation of which security policies? Explain your attack a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Will facebook be able to have a successful business model without invading privacy? explain your answer?...

    Will facebook be able to have a successful business model without invading privacy? explain your answer? could facebook take any measures to make this possible? BUSINESS PROBLEM-SOLVING CASE Facebook Privacy: Your Life for Sale Facebook has quickly morphed from a small, niche haps most obviously. Facebook allows you to keep in networking site for mostly Ivy League college stu- touch with your friends, relatives, local restaurants, dents into a publicly traded company with a market and, in short, just about...

  • Chapter overview 1. Reasons for international trade Resources reasons Economic reasons Other reasons 2. Difference between...

    Chapter overview 1. Reasons for international trade Resources reasons Economic reasons Other reasons 2. Difference between international trade and domestic trade More complex context More difficult and risky Higher management skills required 3. Basic concept s relating to international trade Visible trade & invisible trade Favorable trade & unfavorable trade General trade system & special trade system Volume of international trade & quantum of international trade Commodity composition of international trade Geographical composition of international trade Degree / ratio of...

  • First, read the article on "The Delphi Method for Graduate Research." ------ Article is posted below...

    First, read the article on "The Delphi Method for Graduate Research." ------ Article is posted below Include each of the following in your answer (if applicable – explain in a paragraph) Research problem: what do you want to solve using Delphi? Sample: who will participate and why? (answer in 5 -10 sentences) Round one questionnaire: include 5 hypothetical questions you would like to ask Discuss: what are possible outcomes of the findings from your study? Hint: this is the conclusion....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT