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!
${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.