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!
advice.md that holds information about how to handle mistakes and on symlinked files themselves being spellchecked. Instead of having this be a regular file, the author made this into a symbolic link. By placing this symbolic link to /proc/self/environ, we can leak a secret and gain write privileges to the repository. GITHUB_TOKEN can be used to write to the repository silently. However, the token is invalidated as soon as the workflow finishes executing. But, this can be raced! By constantly pulling the comments of a PR that we have made programmatically, we can reliability get the token and make a request before anything has happened. .git. The author of the bugs also mentions the scoping of the tokens being as small as possible. pass.json contained a complete description of the license, such as the serial number and personal details. The manifest.json included a hash of all of the files and a signature uses for the manifest file. This is done by obtaining a key from Apple to be used on the wallet. @@containers.name then a few operations happen. First, the table_name is copied into a buffer. Before doing this operation, a validation is done to ensure that there is enough space. This is where the mistake is at.
assert does the validation. Since assert is a macro that produces code only in debug builds but not in release builds, this leads to a buffer overflow that can be reached when running a release build. Boom! get @@aaa @@aaa @@aaa ....@@aaa is replaced with the table name during this operation. This bug is likely exploitable by itself but would require a memory leak in order to exploit. The patch simply removes the assert clauses and adds legit code to validate the size prior to the copy. uint32_t. Even though our structure is much larger than this, the only things needed to make this structure work are in the beginning of the struct!DelegatedAuthModule is loaded. DelegatedAuthModule is not loaded then we have a problem. The frontend forwards the request to the backend for authentication. However, the backend has no idea that it needs to do auth on the SecurityToken header. What does this mean? A complete auth bypass!openPDFDocumentFromLibrary, getCurrentPage and renderpageFromLibrary were used. These make excellent hooks for fuzzing!/var/local/appreg.db stores application registry information and it writable (without restrictions) to our user. adb.conf file. Luckily for us, this is stored on an unencrypted and unprotected partition. By using in-system programming (ISP) or replacing the chip entirely, the configuration or secret can be changed by us. Access to the device is now given!/dev and the network is blocked. However, bind mounts and kill are usable. By replacing the client with our own bash script via a bind-mount and kill the currently running client, the watchdog will attempt to turn the client on, which is just our bash script. Now, SELinux is disabled. librrafm.so to run. Now, we have rooted the vacuum cleaner! What else can we do? OPTEE, which uses ARM Trust Zone, will decrypt firmware updates if we ask nicely. With this, we can reverse the firmware to find other issues. base64(SHA1(serial number)). The password for debug firmwares is #share!#, making it trivial to break into these devices from the internet. FileWrapperImpls had an insane amount of function pointers to overwrite. By lining this up next to our overflow, we can corrupt these values and jump to whatever we want!VirtualProtect over the region where our GIF may be at after calling a different function to get the address of our region. Since we control all of the contents of the GIF, this is a perfect location to make executable. Finally, we have got arbitrary code execution!