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!
generateActivationToken will generate an activation code for an existing OAuth2 client. Calling activate will return the client ID and client secret for this user. generateActivationToken to get the code and sending this code to activate for a default client in the system, we can now act as a application calling the provider. This gives us much more attack surface to work with. dbCheck accepts a JDBC URI in order to make a database connection remotely. However, this is a known vulnerable sink that can be taken to code execution. CommonsBeanutils1 gadget (found from ysoserial tool), a shell can easily be gained. A second way is abusing the local gadget socketFactory. By instantiating this object, an attacker can control trigger the execution of a constructor defined in an arbitrary Java class with a controlled string argument. sudo -l, they reviewed the scripts that could be run as root. First, the script publishCaCert.hzn will copy a file into a specified location then make it read/writable by the executor of the script. By doing this, sensitive files can be leaked. gatherConfig.hzn will take a DEBUG file and change the permissions of this to be in the TOMCAT user/group. Using this script, we can specify a symbolic link called debugConfig.txt to a root owned file to change the permissions. To get persist access via either of these methods, the script certproxyService.sh can be set to modifiable then run as root.