Hacking prerequisites : An introduction to computer networking

Falken Smaze
6 min readDec 2, 2024

--

generated with AI

Why do we need networking for ethical hacking?

Before you jump into the exciting world of computer exploitation, you first need some prerequisites. Basic computer knowledge is one, it kind of goes without saying. However, there is another huge area that needs to be learned before you jump into security and that is computer networking.

If you find yourself in the category of people wondering why they need computer networking knowledge or/and if you want to actually learn the basics of networking required to be an efficient hacker, then you are in the right place.

Hacking is not just about running pre-written tools, or finding an exploit online and running it against an IP, it is about understanding how computer systems communicate, interact and function. Computer networking makes the whole communication process possible — it is the foundation of modern communication and the digital world as you know it. Without good understanding of this technology, you will most likely fail to understand simple concepts,vulnerabilities and others in the cybersecurity field. If you thought understanding and learning at least the basics of computer networking was optional for ethical hacking, you are dead wrong; it is a prerequisite.

So what is a computer network?

In the diagram above we are met with a simple representation of a network.

A network, typically consists of two or more computers that are linked in order to share all sorts of resources. In the case above, we see two desktops, one laptop, a smartphone, a console and a printer, all part of this network.

The two most common types of networks are : LAN (which stands for Local Area Network) and WAN ( Wide Area Network )

Local Area Network (LAN)

A Local Area Network is a network that connects devices within a physical area, such as a house, office, bank, school etc. LANs are designed for high-speed communication over short distances. They use ethernet cables, Wi-Fi, or both.

In the diagram above, the local area network would be everything that’s on the left of the router, meaning the three computers. In a LAN, computers,printers,servers and routers are interconnected to share resources ( like files, applications)

In ethical hacking, LANs are often the first target during a physical penetration test. We can perform something like ARP ( Address Resolution Protocol ) spoofing to intercept communications or test the security of shared resources such as printers and servers. Understanding the structure of a LAN is key to identifying potential vulnerabilities in small, localized networks.

What is a WAN?

A Wide Area Network is a network that spans large areas, connecting multiple networks ( LANs) over vast distances. Unlike a local area network, a WAN links devices and networks across cities, countries and even continents. The easiest and most straight-forward example of a Wide Area Network is the Internet itself. A huge network that continuously shares resources between interconnected devices all across the globe.

They rely on more advanced technology like fiber optics, satellites and leased communication lines, ensuring data is transmitted carefully across long distances.

TCP , UDP & IP

This is arguably one of the most important aspects of networking, at least when it comes to the world of ethical hacking. I am sure if you have been a part , or at least close to some sort of script kiddie community, or if you have a friend who thinks he’s a hacker because he downloaded Wireshark and intercepted an IP address ( a unique identifier for a device on a network ) on Counter Strike, you have most likely heard of how dangerous it could be to have your IP leaked. Well… it’s actually not that bad. But , we’ll get back to that later, first, let’s understand what an IP address is & how it works so that the next time your “hacker” friend calls you up, you’ll be able to explain to him what he’s actually doing.

generated with ai

TCP , which stands for Transmission Control Protocol/Internet Protocol (TCP/IP) is one of the most important and fundamental protocol which enables communication across networks , including the internet.

TCP is a connection-oriented protocol protocol, which ensures data is delivered carefully , accurately and in the correct order. It establish a solid connection through what we call “the three-way handhsake”, here’s where it got its name: ( how a TCP connection looks like )

  1. SYN : The sender requests to establish a connection ( synchronize )
  2. SYN-ACK : The receiver acknowledges the request ( synchronize and acknowledge )
  3. ACK : The sender confirms and the connection is established

Once all these three steps are confirmed, the connection is active and TCP starts to break data into small segments, assigns them sequence numbers and ensures those segments reach their destination. If any segment is lost, it requests retransmission, making it a viable choice for applications that are web browsing based, e-mail orientated, or file sharing based, where data accuracy is vital. In simpler terms, once the three-way handshake has been established, the protocol starts to let the data/information to flow.

Understanding the Transmission Control Protocol is critical in ethical hacking .For instance, SYN floods are a common denial-of-service (DoS) attack that exploit the TCP handshake by overwhelming a target system with incomplete SYN requests. Additionally, tools like Wireshark can be used to analyze TCP traffic, helping us detect suspicious activity, such as packet sniffing or unauthorized data transfers.

UDP

UDP stands for User Datagram Protocol and differs from TCP in the sense that it is a connectionless protocol. It does not guarantee delivery or order, but it as a result, it enhances the speed and possibly efficiency. UDP is commonly used in applications like streaming, gaming, calls, where some data loss is acceptable but delay is not.

Tools like nmap can perform UDP scans to identify open ports on a target system, which is essential for mapping a network’s attack surface. Ethical hackers must understand UDP to find potential vulnerabilities, such as improperly secured open ports that could be exploited by malicious actors.

How TCP and UDP work with IP

Both of these protocols rely on the Internet Protocol (IP) to transport data. The IP handles addressing and routing, ensuring the destination of which packets are sent to is correct. Each IP packets includes a protocol field to tell if it carries either TCP or UDP data.

Conclusion

I know computer networking can look a little bit scary and undesirable for learning, as opposed to something like “the actual hacking part”, but it is something that is needed. In this post, my goal was to introduce you to the world of networking, while not scaring you so much that you will not be back for more, so I’d like to keep it simple here and finish on a good note. Happy learning!

--

--

Falken Smaze
Falken Smaze

Written by Falken Smaze

| ethical hacker; developer; content creator

No responses yet