**Networking Basics and Linux Fundamentals

This lesson introduces fundamental networking concepts and Linux basics crucial for red team pentesting. You'll learn about IP addresses, ports, common network protocols, and how to navigate and interact with Linux systems. This will lay the groundwork for understanding how systems communicate and how to begin assessing their security.

Learning Objectives

  • Define and differentiate between IP addresses, subnets, and gateways.
  • Identify common network ports and the services associated with them.
  • Understand basic Linux commands for navigation, file manipulation, and process management.
  • Explain the role of the command line interface (CLI) and its importance in pentesting.

Text-to-Speech

Listen to the lesson content

Lesson Content

Networking Fundamentals

Networks connect devices together to share resources. The Internet Protocol (IP) is the language networks use to talk. Let's explore some key concepts:

  • IP Addresses: Think of them as unique addresses for devices on a network (like your home address). There are two main types: IPv4 (e.g., 192.168.1.1) and IPv6 (a newer, more complex type).
  • Subnets: Networks can be divided into smaller groups called subnets. This helps organize and manage devices.
  • Gateways: The gateway is like a door that lets your network connect to other networks, including the Internet.
  • Ports: Think of ports as virtual doors on a computer that let different services communicate. Each port has a number (e.g., port 80 for HTTP, port 443 for HTTPS).
  • Protocols: Protocols are sets of rules that govern communication. Examples include:
    • TCP (Transmission Control Protocol): Reliable, connection-oriented (like a phone call).
    • UDP (User Datagram Protocol): Unreliable, connectionless (like sending a postcard).
    • HTTP/HTTPS (Hypertext Transfer Protocol/Secure): Used for web browsing.
    • DNS (Domain Name System): Translates domain names (like google.com) to IP addresses.

Example: When you type "google.com" in your browser:
1. Your computer asks a DNS server for the IP address of google.com.
2. The DNS server replies with something like 142.250.186.142.
3. Your computer sends an HTTP request (over port 80) or HTTPS request (over port 443) to that IP address.

Linux Fundamentals

Linux is a popular operating system used in cybersecurity. The command-line interface (CLI) is how you interact with it.

Here are some basic commands:

  • pwd (Print Working Directory): Shows your current location.
  • ls (List): Lists files and directories in your current location.
  • cd (Change Directory): Moves you to a different directory. Example: cd Documents.
  • mkdir (Make Directory): Creates a new directory. Example: mkdir new_folder.
  • rmdir (Remove Directory): Removes an empty directory. Example: rmdir new_folder.
  • rm -r (Remove Recursively): Removes a directory and all its contents. Use with caution! Example: rm -r directory_to_remove.
  • touch (Create File): Creates a new, empty file. Example: touch new_file.txt.
  • cat (Concatenate): Displays the contents of a file. Example: cat new_file.txt.
  • nano or vim (Text Editors): Opens a text editor to modify files.
  • ifconfig or ip addr: (Network Interface Configuration) Displays information about your network interfaces and IP addresses (used on some distributions, ip addr is increasingly common).
  • ping: Sends packets to a host to test network connectivity. Example: ping google.com.
  • whoami: Displays your current username.
  • sudo: Executes a command with elevated privileges (requires a password, typically).
  • ps: Lists running processes. Example: ps aux will show all processes.
  • kill: Terminates a process. Requires the process ID (PID) from ps. Example: kill 1234 (where 1234 is the PID).
Progress
0%