Logo/

Web and Networking Essentials

Log in

Made with ScholarlyMake flashcards like these from your own notes

Web and Networking Essentials

Questions and answers

138 cards
  1. Question:What is a network application?

    Answer:A network application is a computer application that requires communication over the network, where layer two protocols are used by the client and server.

  2. Question:Name three examples of network applications and their associated transport layer protocols.

    Answer:Email (SMTP), Web (HTTP), File transfer (FTP).

  3. Question:What is the primary focus of security in web applications according to the material?

    Answer:Security in web applications is mainly achieved through security mechanisms of the transport layer.

  4. Question:When was HTTP originally defined, and what is the version discussed in the material?

    Answer:HTTP was originally defined in 1991 (RFC 1945) and has undergone several revisions; the discussion is based on HTTP/1.1 (RFC 2616).

  5. Question:What are the two transport layer protocols used by Internet applications?

    Answer:TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).

  6. Question:Why do Internet applications choose TCP over UDP?

    Answer:Applications choose TCP on the application to provide reliable data delivery.

  7. Question:Which transport protocol is used for electronic mail?

    Answer:SMTP (Simple Mail Transfer Protocol) uses TCP.

  8. Question:Which transport protocol is typically used for web browsing?

    Answer:HTTP uses TCP.

  9. Question:What transport protocols are used for remote file access?

    Answer:NFS (Network File System) uses UDP or TCP.

  10. Question:What is a port number?

    Answer:A port number is a number that identifies a network application running on a host.

  11. Question:What are well-known server-side port numbers for HTTP?

    Answer:HTTP uses port 80.

  12. Question:Why should unused ports be closed?

    Answer:To reduce attack surface, as a packet to an unused port will be received and processed by the network stack.

  13. Question:What type of protocol is TCP?

    Answer:TCP is a connection-oriented protocol.

  14. Question:Describe the three-way handshake in TCP connection establishment.

    Answer:The client sends a SYN segment; the server responds with a SYN-ACK segment; the client sends an ACK segment.

  15. Question:What does the server send with the second segment in TCP handshake?

    Answer:The server sends a SYN-ACK segment with a special TCP segment.

  16. Question:Why is the three-way handshake used in TCP?

    Answer:To establish a connection before data transfer and to offer reliable data transfer and congestion control services.

  17. Question:What is the purpose of source and destination port numbers in a TCP segment?

    Answer:They are used for process-to-process delivery.

  18. Question:What do the 32-bit sequence number and acknowledgment number fields in TCP do?

    Answer:They are used for error detection.

  19. Question:What does the 4-bit header length field in a TCP segment specify?

    Answer:It specifies the length of the TCP header in 32-bit words.

  20. Question:What is the purpose of the 16-bit receive window field in TCP?

    Answer:It indicates the number of bytes that the receiver will accept (used for flow control).

  21. Question:What does the checksum field in a TCP segment do?

    Answer:It is used for error detection.

  22. Question:How many bits does the flags field in TCP contain?

    Answer:The flags field contains 6 bits.

  23. Question:What are URG and ACK flags used for in TCP?

    Answer:Used for connection setup and teardown.

  24. Question:What does the PSH flag indicate in TCP?

    Answer:It indicates that the receiver should pass the data to the upper layer immediately.

  25. Question:What is the purpose of the urgent pointer field in TCP?

    Answer:It indicates the end of the urgent data in this segment.

  26. Question:What is HTTP?

    Answer:HTTP is a transfer protocol initially developed for the Web.

  27. Question:What version of HTTP is discussed, and what RFC defines it?

    Answer:HTTP/1.1, defined in RFC 2616.

  28. Question:Besides web, what other applications use HTTP?

    Answer:Instant messaging to transfer XML files and audio/video streaming.

  29. Question:What are the only ports open for outbound communication in firewall configuration for HTTP?

    Answer:Ports 80 and 443.

  30. Question:What does a web page consist of?

    Answer:A web page consists of a base HTML file with several referenced objects like JPEG images.

  31. Question:What are the three components of a URL?

    Answer:Host name, pathname, filename.

  32. Question:What is the general format of an HTTP request message?

    Answer:Request line (method URL version), header lines (header field name: value), entity body (optional).

  33. Question:Provide an example of an HTTP request message.

    Answer:GET /utah/state.html HTTP/1.1 Connection: close User-Agent: Mozilla/5.0 Accept-Language: en-US.

  34. Question:What does the GET method in HTTP do?

    Answer:GET is used to get an object.

  35. Question:What does the POST method in HTTP do?

    Answer:POST is used to upload data to a specific path, e.g., when submitting a form.

  36. Question:What does the HEAD method in HTTP do?

    Answer:HEAD is used to retrieve meta-data about an object, used for debugging the server.

  37. Question:What does the PUT method in HTTP do?

    Answer:PUT is used to upload an object to a specific path, used by web publishing tools.

  38. Question:What is the general format of an HTTP response message?

    Answer:Status line (version status code phrase), header lines (header field name: value), entity body.

  39. Question:Provide an example of an HTTP/1.1 200 OK response message.

    Answer:HTTP/1.1 200 OK Date: Thu, 12 Jun 2019 15:30:10 GMT Connection: close Last-Modified: Sun, 12 May 2019 15:40 GMT Content-Length: 6821 Content-Type: text/html ...

  40. Question:What does HTTP status code 200 mean?

    Answer:OK: request succeeded, information is returned in the response.

  41. Question:What does HTTP status code 301 mean?

    Answer:Moved Permanently: requested object has been moved to new URL.

  42. Question:What does HTTP status code 400 mean?

    Answer:Bad Request: request cannot be understood by the server.

  43. Question:What does HTTP status code 401 mean?

    Answer:Unauthorized: authentication is required and has failed or not yet provided.

  44. Question:What does HTTP status code 500 mean?

    Answer:Internal Server Error: server encountered an unexpected condition.

  45. Question:What does HTTP status code 505 mean?

    Answer:Gateway Timeout: server did not receive a timely response from the upstream server.

  46. Question:Why are cookies used in HTTP?

    Answer:HTTP is stateless, so cookies are used to identify users and maintain user sessions.

  47. Question:What are the three components of cookie technology?

    Answer:A cookie header line in the HTTP response message, a cookie header line in the HTTP request message, a back-end database at the web site.

  48. Question:How does a cookie identify a user?

    Answer:The web site maintains a database of user info; when a user visits, the site sets a cookie with a unique ID; on return, the cookie is sent back to match the ID.

  49. Question:What privacy issue can arise from cookies?

    Answer:Third-party cookies allow multiple sites to build detailed user profiles without consent.

  50. Question:What security threat involves cookies and cross-site scripting?

    Answer:Malicious scripts injected into web pages can access cookies, enabling attacks like session hijacking.

  51. Question:What is a web proxy server?

    Answer:A web proxy server is a network entity that satisfies HTTP requests on behalf of a client.

  52. Question:How does a web proxy work in satisfying requests?

    Answer:The client sends requests to the proxy; the proxy fetches from the origin server and returns to the client.

  53. Question:What benefit does a web proxy provide in an organization?

    Answer:Faster response times by caching web content and enabling content filtering.

  54. Question:How can web proxies control user access?

    Answer:By monitoring and controlling access to the network, making unauthorized web activities traceable.

  55. Question:Why is there a need for web security?

    Answer:Web content is easy to develop, but underlying software is complex and may hide vulnerabilities; untrained users are common clients.

  56. Question:What web security threat involves modification of data in transit?

    Answer:Eavesdropping and gaining access to confidential information.

  57. Question:What web security threat involves impersonating a legitimate user?

    Answer:Pharming, where users are directed to fraudulent sites.

  58. Question:What web security threat involves denial of service?

    Answer:DDoS attacks that flood the server with requests.

  59. Question:What web security threat involves unauthorized access?

    Answer:Brute force attacks on authentication mechanisms.

  60. Question:Where are security facilities located in the TCP/IP protocol stack?

    Answer:At network level (IPsec), transport level (TLS/SSL), and application level (HTTPS, SSH).

  61. Question:What is TLS?

    Answer:TLS (Transport Layer Security) is one of the most widely used security services, evolved from SSL.

  62. Question:What are the common versions of TLS?

    Answer:TLS 1.2 and TLS 1.3 (defined in RFC 5246 and August 2018 RFC).

  63. Question:What is the most common implementation of TLS?

    Answer:TLS 1.2.

  64. Question:How does TLS use TCP?

    Answer:TLS is designed to make use of TCP to provide a reliable end-to-end secure channel.

  65. Question:What are the two layers of protocols in TLS?

    Answer:Handshake protocol and Record protocol.

  66. Question:What is a TLS session?

    Answer:A TLS session is an association between a client and a server, defined by session parameters that can be shared among multiple connections.

  67. Question:What is a TLS connection?

    Answer:A TLS connection is a transport (typically TCP) connection for which a session is created.

  68. Question:What parameters define a TLS session state?

    Answer:Session identifier, peer certificate, compression method, cipher spec, master secret.

  69. Question:What parameters define a TLS connection state?

    Answer:Client write MAC secret, server write MAC secret, client write key, server write key, client write IV, server write IV, sequence numbers.

  70. Question:What is the primary purpose of the TLS Record Protocol?

    Answer:The TLS Record Protocol provides services for TLS connections, including confidentiality, integrity, and handling of application data.

  71. Question:How does the TLS Record Protocol ensure message integrity?

    Answer:It uses a Message Authentication Code (MAC) to ensure integrity of the transmitted messages.

  72. Question:What happens to the original message on the receiving side in TLS Record Protocol?

    Answer:On the receiving side, the process is reversed before the encapsulated message is produced and delivered to the receiving application.

  73. Question:In the TLS Record Protocol operation, what is the first step for application data?

    Answer:Application data is fragmented into blocks of 2^14 bytes or less.

  74. Question:What does the MAC step involve in TLS Record Protocol?

    Answer:A MAC is applied to ensure message integrity.

  75. Question:How is data encrypted in the TLS Record Protocol?

    Answer:The data block is encrypted using symmetric cryptography allowed by AEAD.

  76. Question:What is the default behavior for data blocks in TLS Record Protocol?

    Answer:By default, the data block is not compressed.

  77. Question:What type of cryptography is used for both encryption and authentication in TLS?

    Answer:AEAD (Authenticated Encryption with Associated Data) performs both encryption and authentication.

  78. Question:What does the TLS Record Header contain?

    Answer:The TLS Record Header contains content type, major and minor version, and compressed length.

  79. Question:What are the possible content types in TLS Record Header?

    Answer:Content types include change_cipher_spec, alert, handshake, application_data.

  80. Question:What is the maximum length value for compressed length in TLS Record Header?

    Answer:The maximum value allowed is 2^14 bytes.

  81. Question:In the TLS Record Header structure, what follows the optionally compressed plaintext?

    Answer:The MAC (if not AEAD) or 16 or 20 bytes.

  82. Question:What is the structure of the TLS Record Payload?

    Answer:It consists of an 8-bit type, length, and data for change cipher spec, or type, length, and handshake data for other upper layer protocols.

  83. Question:What is the purpose of the Change Cipher Spec Protocol in TLS?

    Answer:It is used to tell the receiver that subsequent records will be protected using the newly negotiated cipher spec and keys.

  84. Question:What does the Change Cipher Spec message consist of?

    Answer:It consists of a single byte with value 1.

  85. Question:What is the purpose of the Alert Protocol in TLS?

    Answer:It is used to convey TLS-related alerts to the receiver.

  86. Question:What is the structure of an Alert message in TLS?

    Answer:The message consists of two bytes: the first byte takes the value warning (1) or fatal (2); the second byte contains a code that indicates the specific alert.

  87. Question:What is the primary function of the Handshake Protocol in TLS?

    Answer:It enables the server and client to authenticate each other, while negotiating encryption algorithms and cryptographic keys for the following sessions.

  88. Question:When must Handshake authentication be performed in TLS?

    Answer:Handshake authentication must be performed before any application data is sent.

  89. Question:What fields does a Handshake message type include?

    Answer:Type (1 byte), length (3 bytes), and content (variable bytes).

  90. Question:How does the Handshake Protocol differ between TLS 1.2 and TLS 1.3?

    Answer:TLS 1.3 has fewer messages exchanged to improve performance.

  91. Question:What is the purpose of the figure showing TLS 1.3 handshake messages?

    Answer:It shows the messages exchanged in TLS 1.3.

  92. Question:Where can a detailed explanation of the TLS 1.3 handshake protocol be found?

    Answer:A detailed explanation can be found at tls13.net.

  93. Question:What is HTTPS?

    Answer:HTTPS is the combination of HTTP and SSL/TLS to implement secure communication between a web browser and a web server.

  94. Question:How is HTTPS typically implemented?

    Answer:Port 443 is used, which involves SSL/TLS.

  95. Question:What is the relationship between HTTPS, SSL, and TLS?

    Answer:There is no fundamental change over TLS; older SSL implementations are referred to as HTTPS.

  96. Question:What security services does HTTPS provide?

    Answer:It provides end-to-end confidentiality and integrity.

  97. Question:How does HTTPS ensure message integrity?

    Answer:It uses MAC and the HMAC in SSL/TLS.

  98. Question:What verifies the web server's identity in HTTPS?

    Answer:The web server signs a digital certificate to verify it belongs to the specified domain.

  99. Question:What happens if a self-signed certificate is used in HTTPS?

    Answer:The browser will display a warning.

  100. Question:In HTTPS, what elements of communication are encrypted?

    Answer:URL of the requested document, contents of the document, contents of forms from browser to server and from server to browser.

  101. Question:When is the HTTP request message sent in HTTPS?

    Answer:The HTTP request message will first be installed before the first HTTP data is sent as TLS application data.

  102. Question:What are the four categories of attacks on the handshake protocol in SSL/TLS?

    Answer:Protocol flaws, implementation flaws, side-channel attacks, cryptographic breaks.

  103. Question:Give examples of side-channel attacks on SSL/TLS.

    Answer:Timing attacks, cache attacks.

  104. Question:What is POODLE in the context of SSL/TLS attacks?

    Answer:POODLE (Padding Oracle On Downgraded Legacy Encryption) enables attackers to decrypt data by modifying encrypted blocks.

  105. Question:How can POODLE attacks be avoided?

    Answer:Avoid CBC ciphers and TLS 1.0 or below; TLS 1.3 completely removed support for CBC ciphers.

  106. Question:What is BEAST in SSL/TLS attacks?

    Answer:BEAST (Browser Exploit Against SSL/TLS) exploits CBC predictability between parties.

  107. Question:What is the CRIME attack on SSL/TLS?

    Answer:CRIME exploits compression to leak information.

  108. Question:How can CRIME be mitigated?

    Answer:By disabling TLS compression, which is the default behavior in most cases.

  109. Question:What is Heartbleed?

    Answer:Heartbleed is a vulnerability in OpenSSL binary implementation that allows attackers to read random contents from memory, which may contain private keys.

  110. Question:What is SSH?

    Answer:SSH (Secure Shell) is a protocol for secure network communication designed to be relatively simple and inexpensive.

  111. Question:What was the original purpose of SSH?

    Answer:It was designed as a replacement for telnet, rlogin, rcp, and rsh.

  112. Question:What applications use SSH besides login?

    Answer:Secure file transfer (SFTP), secure copy (SCP), and tunneling other applications.

  113. Question:What are the versions of SSH mentioned?

    Answer:Current version is SSH-2; SSH-1 is obsolete.

  114. Question:What layers are in the SSH protocol stack?

    Answer:Transport layer protocol, user authentication protocol, connection protocol.

  115. Question:What does the Transport Layer Protocol in SSH provide?

    Answer:Server authentication, confidentiality, and integrity.

  116. Question:How does SSH Transport Layer Protocol authenticate the server?

    Answer:It possesses a public/private key pair; the host key is used to authenticate the identity of the host.

  117. Question:What does the client do with the host's public key in SSH?

    Answer:The client knows the CA root key and can verify the validity of all host keys certified by accepted CAs.

  118. Question:What symmetric encryption algorithms does SSH use?

    Answer:Multiple host keys using different symmetric encryption algorithms.

  119. Question:What is the first step in SSH key exchange?

    Answer:Client and server exchange version strings.

  120. Question:What follows version exchange in SSH Transport Layer?

    Answer:Algorithm negotiation and key exchange.

  121. Question:What is new in SSH-2 packet format?

    Answer:Packet length, padding length, payload, padding, and MAC.

  122. Question:What are the required cryptographic algorithms in SSH Transport Layer?

    Answer:Diffie-Hellman or Elliptic Curve Diffie-Hellman groups, and integrity algorithms like HMAC-SHA2.

  123. Question:What are recommended ciphers for SSH?

    Answer:chacha20-poly1305, aes128-ctr, aes192-ctr, aes256-ctr.

  124. Question:What authentication methods does SSH support?

    Answer:Public key, password, and host-based.

  125. Question:How does password authentication work in SSH?

    Answer:A message containing password, which is protected by encryption to the server.

  126. Question:What is public key authentication in SSH?

    Answer:A pair of public/private keys; the private key is stored on the client while the public key is known to the server.

  127. Question:What is host-based authentication in SSH?

    Answer:Authentication based on the client's host; the user is not asked for credentials.

  128. Question:What does the SSH Connection Protocol assume?

    Answer:It assumes that a secure, authenticated connection is in use.

  129. Question:What is channel multiplexing in SSH?

    Answer:Multiple logical channels over a single connection.

  130. Question:What are the three stages for channels in SSH Connection Protocol?

    Answer:Opening a channel, data transfer, and closing a channel.

  131. Question:What types of channels are recognized in SSH Connection Protocol?

    Answer:Session, X11, forwarded-tcpip, direct-tcpip.

  132. Question:What is a session channel in SSH?

    Answer:Executes a shell or application such as file transfer or a system command.

  133. Question:What is X11 forwarding in SSH?

    Answer:Forwards an X11 graphical window from a remote machine to a local display.

  134. Question:What is direct-tcpip in SSH channels?

    Answer:Forwards a port that connects to a remote service on a remote machine.

  135. Question:What is the purpose of port forwarding in SSH?

    Answer:It provides the ability to convert between a secure SSH connection and another type of connection.

  136. Question:What are the two types of port forwarding in SSH?

    Answer:Remote forwarding and local forwarding.

  137. Question:In local port forwarding, what happens?

    Answer:Creates a port on the local machine that connects to a service on a remote machine via the SSH server.

  138. Question:In remote port forwarding, what occurs?

    Answer:Remote machine connects to a port on the SSH server, which tunnels to a local service.