Cyber Forensics

[Day 2] 3. HTTPS and SSH Encryption

D
DITISS Admin
••3 min read

HTTPS Encryption

  1. Asymmetric Encryption (Handshake):

    • When you visit a website (e.g., https://example.com), your browser requests a secure connection.
    • The server sends its public key as part of an SSL/TLS certificate.
    • Your browser uses this public key to encrypt a random session key (a symmetric key) and sends it to the server.
    • The server uses its private key to decrypt the session key.

    Example:

    • Public Key (Server):
      e3f1a...
    • Random Session Key (Browser):
      a1b2c3
    • Browser encrypts
      a1b2c3
      using
      e3f1a...
      and sends
      Encrypted(a1b2c3)
      to the server.
    • Server decrypts
      Encrypted(a1b2c3)
      using its private key to retrieve
      a1b2c3
      .
  2. Symmetric Encryption (Data Transfer):

    • Both the server and browser now use the session key
      a1b2c3
      for encrypting and decrypting the actual data (e.g., login credentials, form inputs).

    Example:

    • Browser sends:
      Encrypted(data)
      using
      a1b2c3
      .
    • Server decrypts:
      Decrypted(data)
      using
      a1b2c3
      .

SSH Encryption

  1. Asymmetric Encryption (Handshake):

    • When an SSH connection is initiated, the client (e.g., your computer) and server exchange public keys.
    • The client generates a session key, encrypts it using the server's public key, and sends it to the server.
    • The server decrypts the session key using its private key.

    Example:

    • Public Key (Server):
      d4c5e...
    • Session Key (Client):
      x9y8z7
    • Client encrypts
      x9y8z7
      using
      d4c5e...
      and sends
      Encrypted(x9y8z7)
      to the server.
    • Server decrypts
      Encrypted(x9y8z7)
      using its private key to retrieve
      x9y8z7
      .
  2. Symmetric Encryption (Data Transfer):

    • Both parties use the session key
      x9y8z7
      to encrypt all further communication, including the username and password.
    • This ensures that even if someone intercepts the data, they cannot decipher it without the session key.

    Example:

    • Client sends:
      Encrypted(username: admin, password: pass123)
      using
      x9y8z7
      .
    • Server decrypts:
      Decrypted(username: admin, password: pass123)
      using
      x9y8z7
      .

Key Distinctions in Wireshark:

  • SSH Traffic:
    • Appears on TCP port 22 with encrypted packets. The payload (e.g., username/password) is entirely encrypted.
  • HTTPS Traffic:
    • Shows as TLS or SSL packets, with encrypted application data. You won’t see the raw HTTP content without decryption.

Read Next

8/26/2026

[Day 2] 4. Extra

1. **Who is the first responder?** - The first responder is the person who first identifies and reports a potential cyber incident. They ar...

8/26/2026

[Day 3] 1. Disk imaging in Cyber Forensics

#### Using Containers for Anonymity - Containers allow the use of tools without installation or leaving a trace. - Dockerfiles of images are store...