Cyber Forensics
[Day 2] 3. HTTPS and SSH Encryption
D
DITISS AdminHTTPS Encryption
-
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 using
a1b2c3and sendse3f1a...to the server.Encrypted(a1b2c3) - Server decrypts using its private key to retrieve
Encrypted(a1b2c3).a1b2c3
-
Symmetric Encryption (Data Transfer):
- Both the server and browser now use the session key for encrypting and decrypting the actual data (e.g., login credentials, form inputs).
a1b2c3
Example:
- Browser sends: using
Encrypted(data).a1b2c3 - Server decrypts: using
Decrypted(data).a1b2c3
- Both the server and browser now use the session key
SSH Encryption
-
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 using
x9y8z7and sendsd4c5e...to the server.Encrypted(x9y8z7) - Server decrypts using its private key to retrieve
Encrypted(x9y8z7).x9y8z7
-
Symmetric Encryption (Data Transfer):
- Both parties use the session key to encrypt all further communication, including the username and password.
x9y8z7 - This ensures that even if someone intercepts the data, they cannot decipher it without the session key.
Example:
- Client sends: using
Encrypted(username: admin, password: pass123).x9y8z7 - Server decrypts: using
Decrypted(username: admin, password: pass123).x9y8z7
- Both parties use the session key
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...