SlideShare a Scribd company logo
1 of 23
HTTPINTRODUCTION
• The Hypertext Transfer Protocol (HTTP) is an application-level
protocol for distributed, collaborative, hypermedia information
systems. HTTP has been in use by the World-Wide Web global
information initiative since 1990.
• The first version of HTTP, referred to as HTTP/0.9, was a simple
protocol for raw data transfer across the Internet.
• HTTP/1.0, improved the protocol by allowing messages to be in the
format of MIME-like messages, containing meta information about
the data transferred and modifiers on the request/response semantics.
• HTTP/1.0 does not sufficiently take into consideration the effects of
hierarchical proxies, caching, the need for persistent connections, and
virtual hosts.
A BRIEF DIGRESSION ON TCP/IP
HTTP sits at top of the TCP/IP Protocol Stack
Network Interfaces
HTTP
TCP
IP
Application Layer
Transport Layer
Network Layer
Data Link Layer
The ports let TCP carry
multiple protocols that connect
services running on default
ports:
• HTTP on port 80
How an HTTP Message is delivered over TCP/IP connection:
GET /index.html HTTP/1.1<CRLF>
Host: www.hostname.com Con…
HTTP Message’s data stream is chopped up
into chunks small enough to fit in a TCP
segment
The segments are shipped to the right destination inside IP datagrams
The chunks ride inside TCP segments used
to reassemble them correctly on the other
end of the connection
OVERALL OPERATION OF HTTP
 The HTTP protocol is a request/response
protocol.
 A client sends a request to the server in
the form of a request method, URI,
and protocol version, followed by a
MIME-like message containing request
modifiers, client information, and possible
body content over a connection with a
server.
 The server responds with a status line,
including the message's protocol version
and a success or error code, followed by a
MIME-like message containing server
information, entity meta information, and
possible entity-body content.
• URLs used early on by all Internet protocols, including various document retrieval protocols.
• More specifications (both from 1994):
– URL : Uniform Resource Locators
– URI : Universal Resource Identifiers
– URL is just one type of a URI.
• Hypertext came to predominate as the most efficient way of providing access to resources
– Fast, flexible, generic, extensible
– Facilitated searching, collaboration, annotation
• HTTP now the central mechanism for requesting and serving URL based resources.
HTTP AND URLS
• URL (Uniform Resource Locators )
– Provides single short string to identify network-accessible resource
– <scheme>://<host>[:<port>]/<path>[?<query>]
– http://www.w3.org/Icons/w3c_home.gif
• URI (Uniform Resource Identifier)
– Identifies a resource either by location or name.
– The selection of the representation can be determined by the web server through
HTTP content negotiation.
– A superset of URLs
– http://www.w3.org/Icons/w3c_home.
– http request line contains a non-URL URI
URLS AND URIS
HTTP REQUIRES A TCP CONNECTION
 Before systems can exchange HTTP messages,
they must establish a TCP connection.
 Steps 1,2, 3 in this eg. Show the connection
establishment.
 Once the TCP connection is available, the client
sends the server an HTTP request. The final 2
steps, show the closing of TCP connection
PERSISTENCE CONNECTION
 Prior to persistent connections, a separate TCP
connection was established to fetch each URL,
increasing the load on HTTP servers and
causing congestion on the Internet.
 Persistent HTTP connections have a number of
advantages:
• By opening and closing fewer TCP connections,
CPU time is saved, and memory used for TCP
protocol control blocks is also saved.
• HTTP requests and responses can be pipelined
on a connection. Pipelining allows a client to
make multiple requests without waiting for each
response, allowing a single
PIPELINING
Pipelining lets an HTTP client
issue new request without
waiting for responses from its
previous messages.
In this figure, the client sends
its first request in step 4.
It immediately follows that
with a second request in step
5.
The client does not wait for
the server’s response, which
arrives in step 6.
HTTP SERVERS TURN URLS INTO RESOURCES
THROUGH A REQUEST-RESPONSE CYCLE
HTTP Request
HTTP Client
Asks for resource by its URL:
http://www.Site.com/test.html
HTTP Server
www.Site.com
HTTP Response
Resource
/test
 HTTP messages consist of requests from client to server and responses
from server to client.
HTTP-message = Request | Response ; HTTP/1.1 messages
 The Resource Identified by a Request
REQUEST
 An origin server that does differentiate resources based on the host
requested MUST use the following rules for determining the requested
resource on an HTTP/1.1 request:
HTTP MESSAGE
RESPONSE
 After receiving and interpreting a request message, a
server responds with an HTTP response message.
Response = Status-Line
*( general-header |
response-header |
entity-header )
CRLF [ message-body ]
A CLOSER LOOK AT THE REQUEST METHODS
NEGOTIATION
 Content Negotiation
 Server-driven Negotiation
 Agent-driven Negotiation
 Transparent Negotiation
Caching in http
Therefore, the HTTP/1.1 protocol provides these important elements:
1. Protocol features that provide full semantic transparency when this is required by all parties.
2. Protocol features that allow an origin server or user agent to explicitly request and control non-transparent operation.
3. Protocol features that allow a cache to attach warnings to responses that do not preserve the requested approximation of semantic
transparency.
Security Considerations
 Authentication of Clients
 Abuse of Server Log Information
 Privacy Issues Connected to Accept Headers
 DNS Spoofing
• (HTTPS) Hypertext Transfer Protocol over
Secure Socket Layer (SSL).
• First implementation of HTTP over
SSL was issued in 1995 by Netscape.
HTTPS
CRYPTOGRAPHY
Important information Data, Data, Data.
Encryption
Encryption Algorithm =
cipher
Hh2sh!~hH==E#@ns8676%===sdf
Plain Text
Cipher Text
Some random String
CRYPTOGRAPHY CONT.
Decryption
Algorithm
Important information Data, Data, Data.
Hh2sh!~hH==E#@ns8676%===sdf
Some random String
Symmetric Key
ASYMMETRIC (PUBLIC-KEY) ENCRYPTION
ImportantinformationData,Data,Data.
Hh2sh!~hH==E#@ns8676%===sdf
ImportantinformationData,Data,Data.
DecryptEncrypt
Public Key Private Key
SSL HANDSHAKE PROCESS
Client requests HTTPS session
Certificate sent back (with public key)
Client creates session key (53)
Session key
encrypted with public key(X$qp0)
At this point only client knows
session key
Session encrypted with symmetric session
key (53)
session key decrypted
with private key
At this point both client
and server knows
session key
Encrypted session key sent to server
• There were away to get around the encryption instead of trying to break it
• Ali wants to send secure messages to Ahmed.
• Man intercepts Ali’s messages.
• Man talks to Ali and pretends to be Ahmed.
• Man talks to Ahmed and pretends to be Ali.
MAN-IN-THE-MIDDLE (MITM) ATTACK
CONCEPT
Ali AhmedMan
Ea Ec
Ec Eb
E{a,b,c} = Ali’s, Ahmed’s, and Man’s public keys, respectively
• Ali uses the public key she thinks she received from Ahmed (Man’s)
• Ahmed uses the key he thinks is Ali’s (also Man’s)
• As a result, Man not only gains access to secure information but also can modify it (e.g. transfer
money to a different account etc.)
MITM ATTACK CONCEPT
THANK YOU

More Related Content

What's hot

Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
rahul kundu
 

What's hot (20)

Https
HttpsHttps
Https
 
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
 
Http
HttpHttp
Http
 
Http
HttpHttp
Http
 
HTTP Request and Response Structure
HTTP Request and Response StructureHTTP Request and Response Structure
HTTP Request and Response Structure
 
Http Protocol
Http ProtocolHttp Protocol
Http Protocol
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
Cookies & Session
Cookies & SessionCookies & Session
Cookies & Session
 
Https
HttpsHttps
Https
 
Basics of HTTP - Nafis Fuad
Basics of HTTP - Nafis FuadBasics of HTTP - Nafis Fuad
Basics of HTTP - Nafis Fuad
 
HTTPS
HTTPSHTTPS
HTTPS
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
 
HTTP Protocol Basic
HTTP Protocol BasicHTTP Protocol Basic
HTTP Protocol Basic
 
Http and its Applications
Http and its ApplicationsHttp and its Applications
Http and its Applications
 
Lec 7(HTTP Protocol)
Lec 7(HTTP Protocol)Lec 7(HTTP Protocol)
Lec 7(HTTP Protocol)
 
Https presentation
Https presentationHttps presentation
Https presentation
 
Http Vs Https .
Http Vs Https . Http Vs Https .
Http Vs Https .
 
HTTPS
HTTPSHTTPS
HTTPS
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
SMTP Simple Mail Transfer Protocol
SMTP Simple Mail Transfer ProtocolSMTP Simple Mail Transfer Protocol
SMTP Simple Mail Transfer Protocol
 

Similar to Http protocol

Web Server Technologies I: HTTP
Web Server Technologies I: HTTP Web Server Technologies I: HTTP
Web Server Technologies I: HTTP
webhostingguy
 

Similar to Http protocol (20)

Http VS. Https
Http VS. HttpsHttp VS. Https
Http VS. Https
 
Compute rNetwork.pptx
Compute rNetwork.pptxCompute rNetwork.pptx
Compute rNetwork.pptx
 
Httpbasics 1207412539273264-9-converted
Httpbasics 1207412539273264-9-convertedHttpbasics 1207412539273264-9-converted
Httpbasics 1207412539273264-9-converted
 
Web
WebWeb
Web
 
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptHTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
 
Http_Protocol.pptx
Http_Protocol.pptxHttp_Protocol.pptx
Http_Protocol.pptx
 
The HTTP and Web
The HTTP and Web The HTTP and Web
The HTTP and Web
 
Web Server Technologies I: HTTP
Web Server Technologies I: HTTP Web Server Technologies I: HTTP
Web Server Technologies I: HTTP
 
Web Server Technologies I: HTTP & Getting Started
Web Server Technologies I: HTTP & Getting StartedWeb Server Technologies I: HTTP & Getting Started
Web Server Technologies I: HTTP & Getting Started
 
Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guide
 
Advanced Web Design And Development BIT 3207
Advanced Web Design And Development BIT 3207Advanced Web Design And Development BIT 3207
Advanced Web Design And Development BIT 3207
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Ch-1_.ppt
Ch-1_.pptCh-1_.ppt
Ch-1_.ppt
 
Web & HTTP
Web & HTTPWeb & HTTP
Web & HTTP
 
Introduction to the Internet and Web.pptx
Introduction to the Internet and Web.pptxIntroduction to the Internet and Web.pptx
Introduction to the Internet and Web.pptx
 
Module 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptxModule 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptx
 
Web services
Web servicesWeb services
Web services
 
http presentation 1.pptx
http presentation 1.pptxhttp presentation 1.pptx
http presentation 1.pptx
 
application of http.pptx
application of http.pptxapplication of http.pptx
application of http.pptx
 

Recently uploaded

Recently uploaded (20)

HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 

Http protocol

  • 1. HTTPINTRODUCTION • The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World-Wide Web global information initiative since 1990. • The first version of HTTP, referred to as HTTP/0.9, was a simple protocol for raw data transfer across the Internet. • HTTP/1.0, improved the protocol by allowing messages to be in the format of MIME-like messages, containing meta information about the data transferred and modifiers on the request/response semantics. • HTTP/1.0 does not sufficiently take into consideration the effects of hierarchical proxies, caching, the need for persistent connections, and virtual hosts.
  • 2. A BRIEF DIGRESSION ON TCP/IP HTTP sits at top of the TCP/IP Protocol Stack Network Interfaces HTTP TCP IP Application Layer Transport Layer Network Layer Data Link Layer The ports let TCP carry multiple protocols that connect services running on default ports: • HTTP on port 80
  • 3. How an HTTP Message is delivered over TCP/IP connection: GET /index.html HTTP/1.1<CRLF> Host: www.hostname.com Con… HTTP Message’s data stream is chopped up into chunks small enough to fit in a TCP segment The segments are shipped to the right destination inside IP datagrams The chunks ride inside TCP segments used to reassemble them correctly on the other end of the connection
  • 4. OVERALL OPERATION OF HTTP  The HTTP protocol is a request/response protocol.  A client sends a request to the server in the form of a request method, URI, and protocol version, followed by a MIME-like message containing request modifiers, client information, and possible body content over a connection with a server.  The server responds with a status line, including the message's protocol version and a success or error code, followed by a MIME-like message containing server information, entity meta information, and possible entity-body content.
  • 5. • URLs used early on by all Internet protocols, including various document retrieval protocols. • More specifications (both from 1994): – URL : Uniform Resource Locators – URI : Universal Resource Identifiers – URL is just one type of a URI. • Hypertext came to predominate as the most efficient way of providing access to resources – Fast, flexible, generic, extensible – Facilitated searching, collaboration, annotation • HTTP now the central mechanism for requesting and serving URL based resources. HTTP AND URLS
  • 6. • URL (Uniform Resource Locators ) – Provides single short string to identify network-accessible resource – <scheme>://<host>[:<port>]/<path>[?<query>] – http://www.w3.org/Icons/w3c_home.gif • URI (Uniform Resource Identifier) – Identifies a resource either by location or name. – The selection of the representation can be determined by the web server through HTTP content negotiation. – A superset of URLs – http://www.w3.org/Icons/w3c_home. – http request line contains a non-URL URI URLS AND URIS
  • 7. HTTP REQUIRES A TCP CONNECTION  Before systems can exchange HTTP messages, they must establish a TCP connection.  Steps 1,2, 3 in this eg. Show the connection establishment.  Once the TCP connection is available, the client sends the server an HTTP request. The final 2 steps, show the closing of TCP connection
  • 8. PERSISTENCE CONNECTION  Prior to persistent connections, a separate TCP connection was established to fetch each URL, increasing the load on HTTP servers and causing congestion on the Internet.  Persistent HTTP connections have a number of advantages: • By opening and closing fewer TCP connections, CPU time is saved, and memory used for TCP protocol control blocks is also saved. • HTTP requests and responses can be pipelined on a connection. Pipelining allows a client to make multiple requests without waiting for each response, allowing a single
  • 9. PIPELINING Pipelining lets an HTTP client issue new request without waiting for responses from its previous messages. In this figure, the client sends its first request in step 4. It immediately follows that with a second request in step 5. The client does not wait for the server’s response, which arrives in step 6.
  • 10. HTTP SERVERS TURN URLS INTO RESOURCES THROUGH A REQUEST-RESPONSE CYCLE HTTP Request HTTP Client Asks for resource by its URL: http://www.Site.com/test.html HTTP Server www.Site.com HTTP Response Resource /test
  • 11.  HTTP messages consist of requests from client to server and responses from server to client. HTTP-message = Request | Response ; HTTP/1.1 messages  The Resource Identified by a Request REQUEST  An origin server that does differentiate resources based on the host requested MUST use the following rules for determining the requested resource on an HTTP/1.1 request: HTTP MESSAGE
  • 12. RESPONSE  After receiving and interpreting a request message, a server responds with an HTTP response message. Response = Status-Line *( general-header | response-header | entity-header ) CRLF [ message-body ]
  • 13. A CLOSER LOOK AT THE REQUEST METHODS
  • 14. NEGOTIATION  Content Negotiation  Server-driven Negotiation  Agent-driven Negotiation  Transparent Negotiation Caching in http Therefore, the HTTP/1.1 protocol provides these important elements: 1. Protocol features that provide full semantic transparency when this is required by all parties. 2. Protocol features that allow an origin server or user agent to explicitly request and control non-transparent operation. 3. Protocol features that allow a cache to attach warnings to responses that do not preserve the requested approximation of semantic transparency. Security Considerations  Authentication of Clients  Abuse of Server Log Information  Privacy Issues Connected to Accept Headers  DNS Spoofing
  • 15. • (HTTPS) Hypertext Transfer Protocol over Secure Socket Layer (SSL). • First implementation of HTTP over SSL was issued in 1995 by Netscape. HTTPS
  • 16. CRYPTOGRAPHY Important information Data, Data, Data. Encryption Encryption Algorithm = cipher Hh2sh!~hH==E#@ns8676%===sdf Plain Text Cipher Text Some random String
  • 17. CRYPTOGRAPHY CONT. Decryption Algorithm Important information Data, Data, Data. Hh2sh!~hH==E#@ns8676%===sdf Some random String Symmetric Key
  • 19. SSL HANDSHAKE PROCESS Client requests HTTPS session Certificate sent back (with public key) Client creates session key (53) Session key encrypted with public key(X$qp0) At this point only client knows session key Session encrypted with symmetric session key (53) session key decrypted with private key At this point both client and server knows session key Encrypted session key sent to server
  • 20. • There were away to get around the encryption instead of trying to break it • Ali wants to send secure messages to Ahmed. • Man intercepts Ali’s messages. • Man talks to Ali and pretends to be Ahmed. • Man talks to Ahmed and pretends to be Ali. MAN-IN-THE-MIDDLE (MITM) ATTACK CONCEPT Ali AhmedMan Ea Ec Ec Eb E{a,b,c} = Ali’s, Ahmed’s, and Man’s public keys, respectively
  • 21. • Ali uses the public key she thinks she received from Ahmed (Man’s) • Ahmed uses the key he thinks is Ali’s (also Man’s) • As a result, Man not only gains access to secure information but also can modify it (e.g. transfer money to a different account etc.) MITM ATTACK CONCEPT
  • 22.