Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Sql injection on admin login page

Hello, i'm trying to bypass an admin login page using sqli but i keep getting incorrect password, however i tried using 1' as the admin username and password and i got an sql error " You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''1'')' at line 1 " but it doesn't log me into the admin panel, just shows a white page with that text, is there any way to get admin details by runing sql injection on the login page? I tried bruteforcing with a lot of sqli payloads but i still didn't get logged in. Thank You
You need to extract the database and search for the password in database.
(May 26, 2018 05:46 AM)Crystallize. Wrote:  You need to extract the database and search for the password in database.

Like Crystallize said you will need to hack the database and extract the password from within.


(May 26, 2018 04:21 AM)raylex02 Wrote:  Hello, i'm trying to bypass an admin login page using sqli but i keep getting incorrect password, however i tried using 1' as the admin username and password and i got an sql error " You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''1'')' at line 1 " but it doesn't log me into the admin panel, just shows a white page with that text, is there any way to get admin details by runing sql injection on the login page? I tried bruteforcing with a lot of sqli payloads but i still didn't get logged in. Thank You
(May 26, 2018 05:46 AM)Crystallize. Wrote:  You need to extract the database and search for the password in database.

Thanks for your reply, how can i extract the database? I tried running sql injection on the login box by using order by to get the number of columns but i didn't get it, even when i used order by 2 and order by 20000 i still get the sql error i got when i user 1' as the username and password


(May 26, 2018 12:01 PM)Chris.fussner Wrote:  Like Crystallize said you will need to hack the database and extract the password from within.


i tried using sql injection to get the details but i couldn't find the number of columns, how can i hack the database please?
If you want to do it by hand, it's more convenient to have a real&valid username, and only try to inject on password field. However, trying random SQLi found on the net wont help you to pwn this very precise database.
If you don't feel like you have the ability to do it by yourself now, perhaps could you.... hummm.... give a look at automated injection tools ?
(May 28, 2018 12:39 AM)BlindIntruder Wrote:  If you want to do it by hand, it's more convenient to have a real&valid username, and only try to inject on password field. However, trying random SQLi found on the net wont help you to pwn this very precise database.
If you don't feel like you have the ability to do it by yourself now, perhaps could you.... hummm.... give a look at automated injection tools ?

This dudes mentions a good point. You could use SQLMap on Kali Linux which is a fully automated SQL injector. Very simple to use and since it detects the type of DBMS is being used to provide the correct attacks.
(May 28, 2018 01:54 AM)Chris.fussner Wrote:  This dudes mentions a good point. You could use SQLMap on Kali Linux which is a fully automated SQL injector. Very simple to use and since it detects the type of DBMS is being used to provide the correct attacks.

Absolutely what I was thinking about. I couldn't provide links as I am not "ranked" enough on this website. However you don't need to run Kali Linux to use SQLMap. As it is written in Python, you can download it and use it on any operating system you want.
(May 28, 2018 12:39 AM)BlindIntruder Wrote:  If you want to do it by hand, it's more convenient to have a real&valid username, and only try to inject on password field. However, trying random SQLi found on the net wont help you to pwn this very precise database.
If you don't feel like you have the ability to do it by yourself now, perhaps could you.... hummm.... give a look at automated injection tools ?

Thanks bro, I will try sql map and see how it goes
send me the URL and i'll dump it for you
(May 28, 2018 05:07 AM)BlindIntruder Wrote:  Absolutely what I was thinking about. I couldn't provide links as I am not "ranked" enough on this website. However you don't need to run Kali Linux to use SQLMap. As it is written in Python, you can download it and use it on any operating system you want.

I have ParrotSec, tho i just installed it and i'm still trying to understand linux, but i'll watch dome youtube videos and see how to use the sqlmap, thanks once again 🎉


(May 28, 2018 01:56 PM)Cynical pid= Wrote:send me the URL and i'll dump it for you

Sorry i'm trying to learn, i don't need people to hack for me. Thank you
If you're confused about the syntax for SQLMap, or if not manually setting the level and risk doesn't work, you can try:

sqlmap --risk=3 --level=5 "http[colon]//example[dot]com/index.php?ID=1"

First try without the level and risk, and if that doesn't work, up it.
(May 28, 2018 01:59 PM)sk3wl Wrote:  If you're confused about the syntax for SQLMap, or if not manually setting the level and risk doesn't work, you can try:

sqlmap --risk=3 --level=5 "http[colon]//example[dot]com/index.php?ID=1"

First try without the level and risk, and if that doesn't work, up it.

I'm trying to inject a login form will this work?


Update Guys: I tried dumping the database details using sql map but it keeps telling me the login form is not vulnerable, is there any way to get past this please?
(May 28, 2018 06:41 PM)raylex02 Wrote:  I'm trying to inject a login form will this work?


Update Guys: I tried dumping the database details using sql map but it keeps telling me the login form is not vulnerable, is there any way to get past this please?

No, it won't work, because the login form isn't using GET. Don't use SQLMap. It's likely error-based.
Run the query in both fields. What does it tell you?
pastebin [.] com / 8Vv7X6JM
(May 28, 2018 09:09 PM)tengu Wrote:  No, it won't work, because the login form isn't using GET. Don't use SQLMap. It's likely error-based.
Run the query in both fields. What does it tell you?
pastebin [.] com / 8Vv7X6JM

I got an XPATH error that showed me the website's database name... Is there a way to dump the database with this?
You guys here speak with no knowledge on SQLMap and SQLi.
Forms are injectable, and SQLMap supports GET/POST/PUT and cookies SQLi.

The command is
Code
sqlmap -u your-url-with-the-form --forms

Tested a dozen of times and this work perfectly if the form is vulnerable.

EDIT : Even ensure to bypass some common security with --random-agent. --flush-session could also be a good trick to avoid SQLMap re-using old data that shows the the form might not be vulnerable.


(May 28, 2018 10:36 PM)raylex02 Wrote:  I got an XPATH error that showed me the website's database name... Is there a way to dump the database with this?

I didn't noticed this message. SQLMap won't be your tool. You are dealing with Xpath Injection, not with SQLInjection. There is a lot of good documentation on OWASP website for this. (Do you know XML ?)


Possibly Related Threads...
Thread / Author Replies Views Last Post
by ZilixianaJun 25, 2025 12:39 PM 17 1,115 Jun 25, 2025 12:39 PM
Last Post: DuBSteP
by ami.vegad10Nov 21, 2024 02:17 AM 2 395 Nov 21, 2024 02:17 AM
Last Post: person123!
by vmntlyDec 2, 2020 01:52 AM 0 150 Dec 2, 2020 01:52 AM
Last Post: vmntly