SQL NINJA CTF SOLUTIONS FOR BASIC INJECTION CATEGORY


This CTF base on sql injection. If we want to exploit sql injection we have to follow a rule. that is,
we must balance the query. If we successfully balanced the query we can easily exploit the sql
injection.

Challenge 1

When i put a single quote at the end of the url i will get below output.

While we obtain the output, we can say this output is one of the sql error. The actual error is,
this one has extra single quote (''1'''). So we have to balance it. If we want to balance
this we must add OR’1’=’1 this at the end part of the url. After attaching
the query will be modified like this a’or’1’=’1. The last quote will be added by system.

Challenge 2

In this challenge if we put single quote we will get below error

Our input directly goes within double quote so, this query does not need to put any special
character for query balancing purposes, hence we can directly insert our malicious(+or+1=1) code
at the end of the url.

 Challenge 3

This level does not give any sql related output while we use single quote at the end.so we have
to move on double quote. If we use double quote at the end of the url we will get as usual sql error.
Then we can balance the query by using this “-- -” malicious code. Now we can inject the harmful
code within the url.

Challenge 4

In this level shows close bracket symbol with in the error message so we have to fill that bracket
as well.
So i use this code “)-- -” to balance the query.

Comments

  1. Could you elaborate on what you meant by "balancing queries"?

    ReplyDelete
    Replies
    1. 1st of all you have to produce a SQL error to identity the vulnerability. after found the vulnerability you should fix the SQL error by your self. it is called as query balancing.

      Delete
  2. Thank you share with us ninja information

    ReplyDelete
  3. Are you in need of finance? we give out guarantee cash at 3% interest rate. Contact us on any kind of finance now: financialserviceoffer876@gmail.com whatsapp Number +918929509036 Dr James Eric Finance Pvt Ltd

    ReplyDelete
  4. TODAY TESTIMONY ON HOW I GOT MY LOAN AMOUNT $800,000.00 DOLLARS FROM A RELIABLE AND TRUSTED LOAN COMPANY LAST WEEK Email for immediate response drbenjaminfinance@gmail.com

    Hello everyone, My name is Mrs. Carolin Glowski, I'm from Europe, am here to testify of how i got my loan from BENJAMIN LOAN FINANCE after i applied Two times from various loan lenders who claimed to be lenders right here this forum, i thought their lending where real and i applied but they never gave me loan until a friend of mine introduce me to {Dr. Benjamin Scarlet Owen} the C.E.O of BENJAMIN LOAN FINANCE who promised to help me with a loan of my desire and he really did as he promised without any form of delay, I never thought there are still reliable loan lenders until i met {Dr. Benjamin Scarlet Owen} who really helped me with my loan and changed my life for the better. I don't know if you are in need of an urgent loan also, So feel free to contact Dr. Benjamin Scarlet Owen on his email address drbenjaminfinance@gmail.com

    ReplyDelete

Post a Comment

Popular posts from this blog

Install android studio on the parrot os

How to do simple brute force attack with burp suite

PoC video of How to Hack Gmail and Bitcoin Wallet using SS7 flaw