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!
callAgreement is to use a placeholder ctx so that Solidity can read it directly from the argument ctx that should be there. deleteAnyFlowBad. callAgreement. This creates the ctx and puts a stamp on it.createFlow to verify that the calling host contract is authorized to do so.authorizeTokenAccess to hand over the ctx and deserialize the original call.deleteAnyFlowBad. After everything is merged into a single byte array. The expected empty ctx can contain spoofed data, causing a MAJOR problem to occur. Since the abi decoder ignores the legit ctx, we have now tricked the code into parsing the wrong ctx. calldata can be crafted to impersonate other users. This can be used to create IDA indexes on behalf of other users to steal tokens in their possession.struct anon_vma in the memory management (MM) subsystem of the Linux kernel. folio->mapping can get a dangling reference to a anon_vma object. By calling madvise(..., MADV_PAGEOUT), the access on anon_vma can be repeated in the free state. down_read_trylock() would corrupt the memory at a chosen address after some primitive hunting.anon_vma belongs to its own kmalloc cache, it's not simple to free and reclaim. The author points to a known technique to free all of the objects in the slab page, flush the percpu freelist and cause the virtual memory to get sent back to the regular allocator. With a spray, we can control this.copy_user since the data is controllable and there is a length value in a consistent register (RCX) that we can overwrite. uname requests. This is because copy_to_user is throughout.prctl to create a stack overflow where none existed in the past. {% for e in users|dictsort:sort % to iterate through all of the usernames in a filtered way. dictsort uses the built in function sorted with a custom function to decide the order. The sort attempts to exclude all sensitive values in the object (__ by convention). _proper_resolver to remove list and function invocation. Overall, amazing post on a crazy side channel!puhttpsniff caught their eye. Using the curl --user-agent "a\";/sbin/reboot;\"" http://192.168.1.1. This was on the LAN side. /etc/shadow has a hardcoded password that was easily cracked via John the Ripper. Now, the telnet port can be used to connect. Additionally, the telnet prompt had hardcoded commands but had a special bad door sh to escape this. sh command to escape the shell.HTTP_X_FORWARDED can be used to control the IP. Since the IP is used by authentication purposes, this is a complete authentication bypass.poller_id parameter for the bad sync proc_open. This creates a fairly trivial command injection vulnerability that can be used to get code execution. cacti_escapeshellarg was used on the variable in two separate places to prevent a regression from occurring. ${T(java.lang.Runtime)}. This is a SpEL shorthand for referencing a Java class by name. However, the Akamai WAF blocked this request, even though they knew it was vulnerable. Now, we must learn why this was blocked by the WAF and how to work around it, which took over 500 requests to do.1${2.class} will output java.lang.Integer. To create an arbitrary class, the author tried 1${2.class.forName("java.lang.String")} which was rejected based upon the function forName..exec() is why. Reading the Java documentation (which is usually amazing), gave them the function toString() to get a non-static reference to a character. With this, they could use a toString() on an integer to return the proper character in a string they needed. Progress!java.lang.Runtime.exec. They used a known technique as follows:
Class.forName function to get an arbitrary package.java.lang.Runtime to pass to the function.getRuntime function.exec with our string.uname -a response could be seen! The bug had been exploited and the WAF bypassed. To me, the interesting part of the article isn't the bypass itself but the thoughts around bypassing the WAF and problem solving. flashrom!flashrom and a Raspberry Pi, the image can be completely dumped. They even have the commands they ran!call command can be used to call any code at any location.exec("cookie_user -c ".$_COOKIE['CookieID'])); is ran. This is used to execute PHP code dynamically. Since the string CookieID is controlled by us, this can be used inject our own code into the program.CoreModGeneral contains a arbitrary file read vulnerability. A URL can be passed in but does not validate the URI type. This means an attacker can pass in the file:// scheme and retrieve arbitrary files from the system. automation.secret. By using the arbitrary file read from above, we can escalate privileges to read the credentials and login as this user. automation.secret file! So, once we read the file, we can use a previous vulnerability to delete the file, making us appear as a regular user. Now we are a normal user!A\' would become A\\' instead of A\\\', allowing us to escape the context. WaitObject, WaitCondition and WaitTimeout headers. Using this, it is possible to use the blind injection to retrieve arbitrary data. Although, this data is not very sensitive.COMMAND option, which allows for Nagios External Commands. Even though this sounds promising, many of the sensitive commands were disabled for security reasons in Nagios already. PROCESS_FILE. Issuing this command directs Nagios to read the file, execute each line of the file and exits. If the second parameter of the command is non-zero, it will delete the file being processed. This gives us an arbitrary file deletion primitive. auth.secret. When performing authentication if the secret is not known, it will reload the file with 256 random characters. auth.secret file: NagVis. This is done in a seamless fashion by verifying the session cookie but doesn't do any proper validation on whether the file is empty or not but the main process does.