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!
.git/config. But why?[ for a section header would make the parser believe it was looking at a new section when it really wasn't!.git/config using this. They found this was possible via a section was being removed or renamed. Git Credential Protocol to retrieve credentials from a process. There are several implementations of this depending on the platform, such as Windows and MacOS. protocol=https\nhost=github.com\n would return protocol=https\nhost=github.com\nusername=USERNAME\npassword=PASSWORD. Git forbids newline and NULL byte characters in any of these names. But, is this sufficient?\r is a splitter for regex and is allowed by the protocol, this creates a problem. The same attack could be launched on the .NET version of this product as well. http://%0dprotocol=https%0dhost=github.com%0d@localhost:13337/. This will break into the following:
protocol=http host=localhost username=\rprotocol=https\rhost=github.com\r
.lfsconfig, newline injection into the protocol is possible - this issue required an alternative path to hit. url = http://%0Ahost=github.com%0Aprotocol=https%0A@localhost:13337/ would turn into the following:
capability[]=authtype capability[]=state protocol=http host=localhost username= host=github.com protocol=https
tokenForHost function will always return true for non-GitHub owned instances. There are several cases where this is sent, such as GitHub enterprises, and CodeSpaces environment variables are set.github.com, this isn't actually validated by git to match the currently requested host. So, Codespaces will send the token to the domain that hosts the repos, even if not GitHub.com.\n) while Windows required a CRLF still..gitmodules is a configuration file in a Git repo that controls submodules. When parsing, it attempts to support both cases described above - Unix \n and \r\n. It should be noted that besides reading these files, git can also write to them directly."foo^M" where ^M is the line feed. The file location is validated at this point..git/modules/foo/config the content is written as foo^M without the quotes. foo without the ^M. This is because the parser will strip out the final CR at the end of a line..git/hooks to force it to write arbitrary code and open upon finishing the clone. Pretty neat!glogoligatureoogle gets mapped to google for instance. That's pretty terrifying! The bug report triager found lots of other cases where this happens as well besides this one. 222E2322 was an out of range number that was rejected for one parser but fine by another. Since this doesn't have security consequences, they patched out to accept this case as valid. This happened several times. It should be noted that using a fuzzer is an iterative process - it's not just letting it run once and forgetting about it.serde_json gets a parsing error while json-rust parsers it. After looking at a hexdump, it becomes clear - the vertical control tab (^K) is causing the issue. json-rust has a goal of being less strict than the other JSON parser, since this can cause friction at times.Invalid JSON exception with no data to get the full response data. Notably, they wanted to get the AWS metadata information.NetworkException and wasn't very useful. So, they decided to do some fuzzing around the types of 3xx status codes and their handling.fetchLater function was added. This will send requests after some time, even if the tab is closed. This means it may be possible to do the following:
fetchLater for a fetch requests that uses cookies for a sensitive API.fetchLater request runs in the context of the users session. This is an easy account takeover from here!hash(key||message) would always be the same for every message. Since the attack described above requires two separate messages, this removes the attack vector entirely. Or, so we thought. Since a bug in ellipitic.js was announced, this is being rethought.[1, 1, 30] and [17, 30] led to the same nonces being used. If an attacker could trick the system to sign these two pieces of data, they could recover the key as a result.Panic doesn't occur in this section of code by a malicious adversary is essential. It's common for projects to have generic panic handlers to deal with this.sudo call to CosmWasm to a user-controlled contract to be called. Since there is no gas limit, a user can run an infinite loop, allowing this process to continue indefinitely. Simply adding a gas meter on user-controlled operations is a wise move.