DOC PREVIEW
UHCL CSCI 5931 - buffer overflow

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Buffer OverflowWhat is Buffer Overflow?Process Memory OrganizationBuffer OrganizationExamplesSlide 6Buffer Overflow CountermeasuresReferencesThank youBuffer Overflow Maddikayala, jagadish. CSCI 5931Web SecurityProf. T. Andrew Yang Monday Feb. 23CSCI 5931 Web Security What is Buffer Overflow?A buffer is a contiguous allocated chunk of memory, such as an array or a pointer in C Buffer overflow occurs when a program or process tries to store more data in a buffer than it was intended to hold Buffer overflows are exploited to change the flow of a program in executionBuffer overflows are by far the most commonly exploited bug on the linux/unix Operating systemsCSCI 5931 Web Security Process Memory Organizationenv, argv stringsenv, argv pointersstackheap.bss.data.textHigh addessLow addressHeapint main(){Char *var = malloc(3);…}var points to an address which is in the heap.bsschar global;int main(){….}int main(){static int var;…}global and var will be in .bss.datachar global = ‘a’;int main(){…}int main(){static char var = ‘a’;…}global and var will be in .dataCSCI 5931 Web Security Buffer OrganizationStorage of xyz buffer.Buffer “xyz” in memoryTwo consecutive buffers, xyz and abcde.\0 z y x\0 z y x\0 ed c b aUnused byte1 word = 4 bytesCSCI 5931 Web Security Examples char a[5]="yang"; char b[9]="security"; strcpy(b, "maddikayala"); printf("%s\n", a);Initial stack organization After the overflow \0g n a y\0y t i ru c e s\0g n a y\0 a l ay a k id d a mababCSCI 5931 Web Security Exampleschar a[4]="tom";char b[8]="michael";strcpy(b, "maddikayala");printf("%s\n", a); Initial stack organization After the overflow\0 m o t\0 l a eh c i m\0 a l ay a k id d a maba overwrittenbThis is the kind of vulnerability used in buffer overflow exploitsCSCI 5931 Web Security Buffer Overflow Countermeasures Write secure codeNon-executable BuffersAdvanced debugging tools–Fault injection tools–Static analysis tools–StackShield and StackGuardCompilers–offer warnings on the use of unsafe constructs such as gets (), strcpy ()–generate the code with built-in safeguards to prevent the use of illegal addressesCSCI 5931 Web Security Referenceshttp://mixter.void.ru/exploit.htmlhttp://www.linuxjournal.com/article.php?sid=6701http://www.linuxjournal.com/article.php?sid=2902http://www.devbuilder.org/asp/dev_article.asp?aspid=43http://immunix.org/StackGuard/discex00.pdfhttp://www.infosecwriters.com/texts.php?op=display&id=134http://searchsecurity.techtarget.com/sDefinition/0,,sid14_gci549024,00.htmlCSCI 5931 Web Security Thank you Any


View Full Document

UHCL CSCI 5931 - buffer overflow

Documents in this Course
Load more
Download buffer overflow
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view buffer overflow and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view buffer overflow 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?