Tuesday, January 24, 2012

Auditing MySQL Server Using Nmap

 What you really need in your local pc are
1 - nmap installed
2 - mysql-audit.nse which can be downloaded here
3 - mysql-cis.audit can be downloaded here

before proceed,you need to ensure that the server already allow your IP for checking.How?
Ask the server owner/admin to grant access to your IP.A simple method like below

$ mysql -u root -p
Enter password:

mysql> use mysql

mysql> GRANT ALL ON *.* to root@'your-pc-ip' IDENTIFIED BY 'your-root-password';

mysql> FLUSH PRIVILEGES;





once done, now you can proceed with nmapping.
C:\Users\user0s>nmap -p 3306 192.168.56.101 --script mysql-audit --script-args "mysql-audit.usernamee='root',mysql-audit.password='mysql-password',mysql-audit.filename='C:\Program Files\Nmap\nselib\data\mysql-cis.audit'"

Thanks to Patrik Karlsson because of his contribution on this nmap scripts :)
Share:

0 comments: