HTTP REQUEST AND RESPONSE
Http request and response contains some headers . that may be security headers, informational headers etc.
for see request and response u have to use intercepter tool
best tool is burp-suite
here is link of burp-suite pro . you can download and use
HTTP REQUEST::::::
open your browser and got to any website and intercept the request .......
request contians followinf information like given below-----
The first line of every HTTP request consists of two items, separated by spaces:
- Get method is most commonly used in website to retrieve web pages.
- HTTP version 1.1 used . there are two versions http 1.0 and http 1.1. http 1.1 is
upgraded version of http 1.0 . difference between http 1.0 and http 1.1
- http 1.0 version allow only one resource request but http version 1.1 allows multiple resource request
- http 1.0 version have only basic authentication .means all informations go in plain text (for example ----- a weak boy go to boxing.. sure it willnot win and can loss his life). but http 1.1 version have digest authentication means sensitive information like passsword go to server in hashes form (secure then http 1.0)
- http 1.0 have some basic status code and no any alert and warning status code
for gain more knowledge differnce between http 1.0 and http 1.1
- Host: host refers to hostname which specifies domain name from which request originated .host header is needed if many websites are hosted on same server . if host header is not present in this case then this lead to vulnerability like host header injection,open redirection,dom based xss.
- User-Agent: it provides information about browser like (version and name,etc )from which website served. like:The web server can use this information to serve different web pages to different web browsers and different operating systems. For example, a website could send mobile pages to mobile browsers, modern pages to modern browsers, and a “please upgrade your browser” message to Internet Explorer 6.
- Accept: Accept header tells the server that which mime types are understood by browser. so server response in that format
- Cookie: Cookie header is used to submit additional parameters that the server
has issued to the client like session id,domain name,expiry,path etc
- http 1.0 version allow only one resource request but http version 1.1 allows multiple resource request
- http 1.0 version have only basic authentication .means all informations go in plain text (for example ----- a weak boy go to boxing.. sure it willnot win and can loss his life). but http 1.1 version have digest authentication means sensitive information like passsword go to server in hashes form (secure then http 1.0)
- http 1.0 have some basic status code and no any alert and warning status code
for gain more knowledge differnce between http 1.0 and http 1.1
- Host: host refers to hostname which specifies domain name from which request originated .host header is needed if many websites are hosted on same server . if host header is not present in this case then this lead to vulnerability like host header injection,open redirection,dom based xss.
- User-Agent: it provides information about browser like (version and name,etc )from which website served. like:The web server can use this information to serve different web pages to different web browsers and different operating systems. For example, a website could send mobile pages to mobile browsers, modern pages to modern browsers, and a “please upgrade your browser” message to Internet Explorer 6.
- Accept: Accept header tells the server that which mime types are understood by browser. so server response in that format
- Cookie: Cookie header is used to submit additional parameters that the server
has issued to the client like session id,domain name,expiry,path etc
- User-Agent: it provides information about browser like (version and name,etc )from which website served. like:The web server can use this information to serve different web pages to different web browsers and different operating systems. For example, a website could send mobile pages to mobile browsers, modern pages to modern browsers, and a “please upgrade your browser” message to Internet Explorer 6.
- Accept: Accept header tells the server that which mime types are understood by browser. so server response in that format
- Cookie: Cookie header is used to submit additional parameters that the server has issued to the client like session id,domain name,expiry,path etc
HTTP RESPONSE
In response :
first line have http version and status code (that tell what status of request like 200,301, here status code is 301 means that page you are accessing is moved ,no longer accessible)
- Location: it indicates the url to redirect a page to;
- Content-type: it tells that which type of data are using web application like html,text etc
- set-cookie: when any browser surf website then the server add cookie in cookies by set-cookie header
- expires: this heaader have expiry data of cookies .if there are no expire header then that session automatically expire after browser close out
Comments