TCP/IP Handshake Walkthrough

Durre ShaffaDurre Shaffa
2 min read

Introduction

In this interactive task from the Networking Fundamentals module of TryHackMe's Pre-Security course, we deep dive into how communication begins between two devices over the TCP/IP protocol using a concept known as the 3-way TCP handshake.

Instead of just reading theory, this lab challenges learners to help two virtual characters, Alice and Bob, establish a reliable connection by correctly reassembling the TCP handshake.


What Is the TCP Handshake?

The 3-way handshake is the foundational process by which two devices establish a TCP connection before transmitting data. It consists of:

  1. SYN – Client sends a connection request

  2. SYN-ACK – Server acknowledges and agrees to the request

  3. ACK – Client confirms, and the connection is established

This ensures both sides are synchronized before actual data transfer begins.


Static Lab Walkthrough

Lab Objective:

Reorder the packet exchanges between Alice and Bob in the correct sequence to form a proper TCP handshake.

Action Taken:

In the lab simulation, I reviewed the communication logs between Alice and Bob and dragged the three handshake packets into the correct order:

  1. Alice sends SYN

  2. Bob replies with SYN-ACK

  3. Alice responds with ACK

Outcome:

Once the sequence was correctly arranged, the virtual TCP session between Alice and Bob was established successfully, and the lab displayed the flag at the end of the conversation.

Takeaway:

  • The TCP handshake is critical for ensuring reliable communication

  • Misordered or missing steps = no connection

  • Understanding this flow helps with deeper analysis of network behavior (e.g., packet sniffing, intrusion detection)


Quiz Answer

QuestionAnswer
What is the value of the flag given at the end of the conversation?THM{TCP_CHATTER}

Final Thoughts

This task made the TCP/IP model feel far more intuitive. Rather than memorizing steps, I had to apply them in context, reinforcing the importance of handshake integrity in everyday internet communications.


Skills Practiced

  • Packet-level analysis

  • Understanding TCP/IP structure

  • Visualizing the 3-way handshake

  • Data transmission initiation


Flag Captured

THM{TCP_CHATTER}

0
Subscribe to my newsletter

Read articles from Durre Shaffa directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Durre Shaffa
Durre Shaffa