c - How can hacker take advantage of array or pointers -


i graduate looking find work have question code security.

in java there no out-of-bound arrays , there no pointers suggests java more secure c. in c these out-of-bounds arrays can cause stack corruption or buffer overflow , dangling pointers. in interview may asked "how can hacker take advantages of these?"

how go answering this?

examples welcome.

well, talk heartbleed (there ton of documentation out there).

basically, there api call made via network, code request communication keep-alive, like:

you: send me "potato", 6 chars. response: potato 

however, there no check text requested, , length of text sent in aligned, this:

you: send me "potato", 512 chars. response potato&&&&#8388325099#((#(#)%#(((#%)password:1234#(%()#%((#%#(#%)(#)(%)(##()jfjfeoijf#)j(jf)(#j)(#j#)(j#))j#.... 

where responding computer send potato, plus 506 bytes of stack around local variable, contain anything, including passwords, etc.

that enough example?


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -