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!
unsafe variant of the function.X-pan-AuthCheck: on, which indicates to check for authentication downstream. After this, Apache will re-normalize the request and re-process the request with a rewrite rule. Finally, if it's a PHP file, then an authentication check is done based on the header mentioned.RewriteRule. In Apache, the RewriteRule may perform an internal redirect. This is important because extra URL decoding may occur! /unauth. So, the goal is to get Nginx to not set the header yet have Apache use an interesting PHP route. Using the Apache trick from above, URL encoding directory traversal characters can be used to do this. For instance, /unauth/%252e%252e/php/ztp_gate.php/PAN_help/x.css will resolve to /unauth/../php/ztp_gate.php/PAN_help/x.css.gz after the multiple URL decodings. Of course, Apache will resolve the ../ now leading to /php/ztp_gate.php/PAN_help/x.css.gz.default-src works well for is the fallback directive in the CSP. Unfortunately, it doesn't include several, such as form-action.autofill in browsers. By making the form look like a password, it will autofill the inputs for many password managers. If the form is the whole page and the page is clicked on, this will then be submitted to the attacker.form-action directive in the CSP being set to self, there are still some issues with it. First, same-site request forgery is possible when using form-based auth. Dangling markup attacks are another option as well.getenv() function. The function is crashing when loading a byte from environment variables. It was attempting to load data from an invalid memory location. Why is Libc crashing!? openssl to probe for packets, which was the offending code. Since they are using a combination of Python and Rust, Rust didn't think that an unsafe operation was happening. rust-native-tls and used the rustls instead. By calling try_init_ssl_cert_env_vars from Python, a global lock would prevent this race condition. Looking forward, Rust is marking the environment-setter functions unsafe and glibc has tried making getenv more thread-safe. realloc within setenv. To hit this code path, the environmental variables need to line up just write for the realloc to cause issues in getenv(). Given this information, they're pretty lucky that they found this at all. org.springframework.boot repos can only be written to by the owner of this group. To host these, they are done by a global portal or through a legacy OSS repository hosting. JFrog, JBoss and many others are used under the hood to resolve these.contentGenerator tag could be set to velocity. This is a templating engine! So, by overwriting the file with velocity template, RCE is achieved but with authentication. LocationMgr.dll, they found that some of the provided input was not being properly sanitized. In what way? In a SQL query! uint256.max, users could withdraw their collateral again. This manipulated price created a bunch of bad debt in the protocol but users could get their funds back.claimCollateralGains(), the author noticed _accrueDepositorCollateralGain. This function rests a value that SHOULD have been zeroed out. Effectively, this removes the replay protection. This was exploited for 13ish ETH a while ago.subarucs.com. Upon looking at subdomains of this, they found a website that had the title STARLINK Admin Portal. starlinkEnroll.js and login.js that included references to a password reset.getStaticProps is used for prerendering a page for information already available in the build process. getServerSideProps transmits data at the time of the request based upon the provided data, making it dynamic. The former is cachable while the latter is not.__nextDataReq=1 parameter would make this a data request. This means that data can be sent back instead of the HTML, using this flag.getServerSideProps call returns the JSON for the page instead. Assuming that URL parameters are not used in caching, this leads to the JSON being returned from the cache instead of the HTML. cache-control headers based upon the type of the page. Using the x-now-route-matches can get these headers to change, resulting in unintentional data caching.content-type of this page isn't application/json! It's text/html. If any data can be reflected in the page props response, it leads to XSS!