10 - Strings
STEM / Programming / Whatever
In video 10 of our series on rediscovering the C programming language, we'll discuss strings. There was no possible way to cover everything related to strings in one video. However, I covered a handful of topics and even got a bit nerdy looking into why one way of building a string results in it being read-only while another way does not. We also talk about and do some light experiementation on how if we're not paying attention, we can make our programs buggy and exploitable! Music was downloaded from mixkit.co and is by Lily J.
Code can be found at: https://github.com/ronwellman/rediscover_c
02:41 - use 'n' variant functions when possible 08:40 - strings example 10:59 - modify strings example 12:26 - discover string storage 12:30 - xxd to hexdump our executable 13:38 - readelf to disect section headers of executable 15:16 - objdump to look at the assembly code of executable 17:15 - python3 binascii.unhexlify to reveal our second string on the stack 19:01 - recap of where strings are stored 19:58 - strlen and finding NULL terminator 23:05 - overwriting the NULL terminator 25:03 - using strcpy to overflow a string 29:17 - strtoll vs atoi discussion 37:22 - get input from user 42:08 - fgets example 48:32 - buffered streams 55:45 - strtok discussion
243178400 Bytes