People often ask me "How did you learn how to hack?" The answer: by reading. This page is a collection of the blog posts and other articles that I have accumulated over the years of my journey. Enjoy!
mod_lua, which allows for Lua scripts to be written within the configuration file. Content-Types. One of these is multipart/form-data which sends data in multiple parts with each one containing a Content-Disposition header with some other formatting as well. r:parsebody() which parses the body of a POST request. When calculating the element data in the request, it subtracts the CRLF amount then 8 bytes more for the two CRLFs prior to the data. This size check ends once the -- string is found. However, what happens if this is improperly formatted? Any time there is a subtraction on a size, we should always think integer underflow!size+1 is done, which will overflow into an allocation of size 0 if our original subtraction bug resulted in -1. memcpy to copy the elements data into a buffer. Since the buffer is no where near this size (because of the overflow), this result sin a large buffer overflow. Although they claim this leads to code execution, I feel like this would crash the server since it is a wildcopy with no stopping factors.