If OSes kept the size of page memory lesser than the smallest possible 'shell' program's size would the OS become more secure against buffer overflow attacks?
-
It is my naive understanding that majority of security attacks propagate by the injection of a crafted 'shell' program into the memory of a running program such that the running program would end up executing the inserted program. I also understand that when a process is trying to access past it's own memory area, the OS inadvertently stops the process ("seg fault"). If the page size is limited to be smaller than the largest possible craftable shell program, wouldn't the OS become automatically secure against buffer overflow attacks?
-
Answer:
No it wouldn't . If the page size is reduced to say 'x' from 'y' and if a executable image of a program previously required 100 pages, now it would require more than 100 pages depending on the factor as to which 'x' is lesser than 'y'. Basically, page size has nothing to do with the OS being secure against buffer overflow attacks. For concreteness, let me add a example. Say your reduced page size is 256 bytes whereas your original page size is 4k bytes. You have a buffer say 512 bytes which will occupy 2 pages in your reduced page size scheme whereas it will occupy just a portion of a page in the original scheme. For stack overflow exploits to succeed, we need some space to host memory, since our buffer is sufficiently large enough to hold the shellcode, we can host the shellcode inside our buffer itself prepended with nops for increasing the probability of exploitation (I assume we dont have any buffer overflow protection like NX, stack cookies , ASLR etc), then we overwrite the saved return address with the address of our shellcode. Now observe that the page size is not a factor as to whether exploitation is a possibility or not, the buffer size is the factor, read more on egghunters which can be used to remediate small buffer problems.
Sebas Sujeen at Quora Visit the source
Other answers
I'm not an expert by any means, but shell codes tend to be very small, much smaller than typical page sizes. So even if your idea works (which I don't know), the hit on performance would probably be prohibitive.
Joël Schaerer
Related Q & A:
- What's the first step to become a non-profit organization?Best solution by Yahoo! Answers
- Is it possible to make life-size mannequins using paper mache?Best solution by Yahoo! Answers
- What's the best way to become a lawyer?Best solution by Yahoo! Answers
- Size yahoo page to screen?Best solution by Yahoo! Answers
- How to change size of page?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.