O'Reilly logo

Penetration Testing with Perl by Swizec Teller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

MySQL post exploitation

After finding a SQLi vulnerability, we can use a few techniques to gather as much information as possible. In the next four subsections, we will learn how to obtain column counts, server information, table result sets, and all records from tables and databases, using the SQLi vulnerability and Perl.

Discovering the column count

Let's turn our attention to what we can do with the column count. We should instantly recognize that we can put simple MySQL keywords or functions into one of the fields, for instance, @@version, to find the version of the DBMS for potential future remote exploitation. @@datadir can be used to provide insight into the structure of the server's filesystem. Also, @@hostname can produce the hostname of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required