Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

Network Penetration Testing Full Guide for Beginners

Introduction

A network is a group of two or more interconnected systems or devices that can communicate and share resources. These connections allow for the exchange of data, collaboration, and efficient use of hardware and software resources. Networks can range from simple setups like connecting two computers in a home to extremely complex infrastructures like the global internet.

Networking enables applications like email, instant messaging, cloud computing, and file sharing. It also forms the backbone of modern business operations, enabling real-time collaboration, access to centralized databases, and remote access to services. Without networking, our ability to connect and communicate digitally would be severely limited.

Types of Networks

Networks are classified not just by their size, but also by their functional scope, transmission technologies, and the complexity of their architecture. The most common types include LAN (Local Area Network), WAN (Wide Area Network), MAN (Metropolitan Area Network), and PAN (Personal Area Network). A LAN typically spans a single building or campus and offers high-speed connectivity (e.g., 100 Mbps to 10 Gbps). It is managed internally and uses Ethernet or Wi-Fi to connect endpoints like desktops, printers, and servers. LANs often implement VLANs (Virtual LANs) to logically segment traffic and enhance security and performance.

A WAN, on the other hand, connects multiple LANs across large geographic regions using technologies like MPLS (Multiprotocol Label Switching), leased lines, or broadband internet. Organizations use WANs to enable remote site connectivity and cloud access. Advanced WAN setups might use SD-WAN (Software-Defined WAN), which allows centralized management and intelligent routing of network traffic across multiple connection types (e.g., fiber, LTE, satellite), optimizing performance and reducing operational costs.

A MAN is an intermediary solution that spans a metropolitan area such as a city or campus, often leveraging high-bandwidth fiber-optic links like Metro Ethernet. It is commonly used by ISPs and large institutions like universities or city governments to connect buildings or remote offices. MANs are cost-effective when you need to deliver high-speed connectivity without the geographical scale of a full WAN.

PANs (Personal Area Networks) are used for device-to-device communication in a very close proximity—typically within 10 meters. They rely on technologies such as Bluetooth, Zigbee, Infrared (IR), or even near-field communication (NFC). PANs are ideal for wearable devices, IoT gadgets, or tethering smartphones to laptops. In enterprise scenarios, PANs can also be part of larger IoT ecosystems, enabling sensors and smart devices to feed data into cloud platforms.

Additionally, networks can be wired or wireless, each with distinct characteristics. Wired networks provide high throughput and low latency, commonly using Cat6/7 Ethernet cables or fiber optics, while wireless networks (Wi-Fi 6/6E, 5G) offer flexibility and mobility. Based on architecture, networks can be peer-to-peer (P2P), where all nodes are equal, or client-server, where servers provide centralized services to client devices. Advanced deployments may use hybrid models, virtual networks (VLAN/VXLAN), and overlay networks for scalable and secure communication across dynamic environments such as cloud-native or multi-tenant infrastructures.

Components of a Network

A modern network is an ecosystem composed of both hardware and software components, each playing a critical role in ensuring seamless communication, security, and performance. On the hardware side, core components include routers, which operate at Layer 3 (Network Layer) of the OSI model and are responsible for inter-network routing and traffic segmentation. Switches, operating at Layer 2 (and Layer 3 in managed versions), direct traffic within a network based on MAC or IP addresses, offering VLAN support and QoS (Quality of Service) for optimized traffic handling.

Other key hardware includes firewalls (hardware-based) for perimeter defense, modems for converting analog/digital signals (especially in broadband environments), and access points for extending wireless coverage. Backbone infrastructure often uses fiber-optic cables for high-speed links, while Ethernet (Cat6/7) is common in LANs. Patch panels, PoE (Power over Ethernet) injectors, and network interface cards (NICs) are also vital elements in both enterprise and data center networks.

On the software side, the foundation begins with the Network Operating System (NOS), such as Cisco IOS, Juniper Junos, Windows Server, or Linux-based distros like pfSense and VyOS. These systems enable administrators to configure and control network behavior, routing tables, firewall rules, and access control lists (ACLs). Advanced network management software (NMS) like SolarWinds, Zabbix, or PRTG provides real-time performance monitoring, bandwidth analytics, and alert systems to detect anomalies and potential threats.

Security-focused software includes firewall applications, intrusion detection/prevention systems (IDS/IPS), and SIEM (Security Information and Event Management) tools for centralized log analysis. For larger networks, orchestration tools such as Ansible, Puppet, or Cisco DNA Center automate configuration and policy deployment across multiple devices. Furthermore, virtualization technologies like VMware NSX and open-source solutions like Open vSwitch allow for creating virtual network components, enabling scalable, cloud-native infrastructures.

Network Topologies

Network topology refers to the physical or logical layout that dictates how nodes (devices) in a network are interconnected and how data flows between them. Choosing the right topology is critical for network performance, fault tolerance, scalability, and cost-efficiency. Topologies can be implemented in both physical (actual cabling and device connections) and logical (data path and control flow) formats. The most common types are star, bus, ring, mesh, and hybrid, each suited to different environments and objectives.

In a star topology, all devices are individually connected to a central node, such as a switch or hub. This architecture allows for simplified troubleshooting and isolation of devices; however, the central node represents a single point of failure. Despite this, it is the most prevalent design in modern Ethernet-based LANs due to its high manageability and scalability, especially when using intelligent switches with features like STP (Spanning Tree Protocol), VLAN segmentation, and port mirroring.

Bus topology, one of the earliest designs, connects all devices to a single backbone cable using drop lines and terminators. Though cost-effective and easy to deploy in small, static environments, bus networks suffer from limited scalability and are highly susceptible to signal reflection, data collisions, and network congestion—especially without collision detection/control mechanisms like CSMA/CD (Carrier Sense Multiple Access with Collision Detection).

Ring topology links each device to exactly two others, forming a closed loop. Data travels in one direction (or both in a dual-ring setup), with each device acting as a repeater. While it eliminates the need for central hubs and prevents broadcast storms, it introduces latency and complexity due to token-based transmission (used in legacy technologies like Token Ring). Modern equivalents may use logical ring topologies within Metro Ethernet or SONET/SDH networks.

Mesh topology ensures full redundancy by establishing point-to-point links between every pair of devices. In a full mesh, all nodes are directly connected, offering unparalleled fault tolerance and load balancing. Partial mesh optimizes this by connecting only critical nodes redundantly. Mesh topologies are common in backbone networks, military communication systems, and blockchain or peer-to-peer distributed systems, where high availability is mission-critical. However, the exponential growth of links with each added node makes it expensive and complex to manage.

Hybrid topology is the architectural convergence of multiple topologies to meet specific needs. For instance, a network may implement star topologies at the departmental level and interconnect them using a ring or mesh topology in the backbone layer. This design approach provides flexibility, combining the strengths of various configurations while mitigating their individual weaknesses. Enterprise networks, campus networks, and ISPs frequently rely on hybrid models supported by modular switches, SDN (Software Defined Networking), and overlay networks like VXLAN.

With the advent of cloud computing and virtual networking, topologies have evolved to support dynamic, software-defined environments. Virtual topologies like service meshes (e.g., Istio), overlay networks, and microsegmentation allow granular control over data paths, load balancing, and security policies—independent of the underlying physical topology. In these systems, topology is often abstracted and managed programmatically using orchestration platforms like Kubernetes or OpenStack.

Network Protocols

Network protocols are structured sets of rules that determine how data is exchanged between devices across a network. These protocols exist across multiple layers of the OSI model and the TCP/IP stack, governing everything from how bits are transmitted on a wire to how entire applications communicate securely over the internet. Without protocols, networks would lack structure, leading to chaos in communication and incompatibility between systems.


🔌 Layer 1–2: Physical & Data Link Layer Protocols

At the lowest levels, protocols like Ethernet (IEEE 802.3) and Wi-Fi (IEEE 802.11) define how data is physically transmitted—via copper, fiber, or radio waves. For instance:

  • Ethernet: Frames are structured with headers and CRCs; operates over twisted-pair or fiber optic cables.
  • 802.1Q: Used for VLAN tagging in Ethernet frames to segment network traffic logically.
  • MAC protocol: Defines how devices on a shared medium (e.g., wireless) access the channel using CSMA/CA.

📌 Example: In a switched LAN, a VLAN-tagged Ethernet frame allows separation of voice and data traffic, enhancing security and QoS.


🌐 Layer 3: Network Layer Protocols

This layer is responsible for addressing and routing.

  • IP (Internet Protocol): Delivers packets from the source to the destination using IP addresses.
    • IPv4: 32-bit addressing, still widely used (e.g., 192.168.1.1).
    • IPv6: 128-bit addressing, designed to replace IPv4 (e.g., 2001:0db8::1).
  • ICMP: Used for diagnostic tools (ping, traceroute) and error reporting.

📌 Example: When a device is unreachable, ICMP Type 3 (Destination Unreachable) is sent back to the sender.


🚦 Layer 4: Transport Layer Protocols

The Transport layer ensures complete, error-free delivery of data.

  • TCP (Transmission Control Protocol): Reliable, connection-oriented, with features like flow control, congestion avoidance, and packet reordering.
  • UDP (User Datagram Protocol): Unreliable, connectionless, but faster—ideal for VoIP, video streaming, and DNS.

📌 Example: HTTP uses TCP (port 80), while DNS queries often use UDP (port 53) for speed.


🌍 Layer 5–7: Session, Presentation, and Application Protocols

These layers handle the actual services and data applications rely on:

Web & Content Protocols:

  • HTTP: The protocol for browsing the web.
  • HTTPS: Encrypted HTTP using SSL/TLS (port 443).
  • TLS/SSL: Ensures data privacy via encryption and certificate-based authentication.

📌 Example: When you visit https://github.com, your browser initiates a TLS handshake to encrypt all subsequent communication.

File Transfer Protocols:

  • FTP: Sends files over TCP (ports 20/21), but not secure.
  • SFTP: Secure version using SSH.
  • TFTP: Lightweight, uses UDP (often for booting network devices).

📌 Example: Network switches often use TFTP to download firmware images during startup.

Email Protocols:

  • SMTP: Sends emails between servers.
  • IMAP/POP3: Retrieves emails to clients (e.g., Gmail, Outlook).
  • SPF/DKIM/DMARC: Protect against email spoofing and phishing.

📌 Example: An organization’s SMTP server can be configured with DKIM to digitally sign outgoing emails and protect brand identity.

Domain Name Resolution:

  • DNS: Resolves domain names to IP addresses.
  • DNSSEC: Adds integrity by digitally signing DNS data.
  • Anycast DNS: Routes requests to the nearest operational server to reduce latency.

📌 Example: Google's 8.8.8.8 DNS service is backed by Anycast, so users worldwide hit the nearest Google DNS node.

IP Management & Assignment:

  • DHCP: Dynamically assigns IP addresses and configurations to clients.
  • BOOTP: Legacy version of DHCP.
  • IPAM: Used in enterprise networks to manage DHCP/DNS scopes and track IP usage.

📌 Example: In enterprise networks, when a new employee connects their laptop, a DHCP server assigns an IP, default gateway, and DNS configuration.


🛡️ Security & VPN Protocols

  • IPsec: Encrypts IP traffic, often used in VPNs.
  • SSL VPN: Uses HTTPS to tunnel data securely.
  • OpenVPN, WireGuard, L2TP, IKEv2: Popular VPN protocols for remote access and secure tunneling.
  • 802.1X: Network access control used in enterprise environments; often paired with RADIUS servers.

📌 Example: A remote employee connects to the corporate LAN via a VPN using IPsec, encrypting all traffic end-to-end.


📡 Routing Protocols

Used by routers to determine the best path through the network.

  • RIP (Routing Information Protocol): Distance-vector, simple but slow convergence.
  • OSPF (Open Shortest Path First): Link-state, fast and scalable.
  • BGP (Border Gateway Protocol): Core routing protocol of the internet.

📌 Example: ISPs exchange global routing info using BGP, determining how data traverses from a US server to a user in Japan.


🛠️ Management & Monitoring Protocols

  • SNMP: Gathers metrics (CPU, memory, bandwidth) from network devices.
  • NetFlow/sFlow: Analyze traffic patterns.
  • NTP: Synchronizes clocks between devices.

📌 Example: A data center switch uses SNMPv3 to securely report interface utilization to a Zabbix monitoring system.


✅ Summary Table

Protocol Layer Use Case Example Port(s)
TCP/UDP 4 Transport Layer TCP: 80, 443 / UDP: 53
HTTP/HTTPS 7 Web Communication 80, 443
FTP/SFTP 7 File Transfer 20, 21 / 22
DNS/DNSSEC 7 Domain Resolution 53
SMTP/IMAP 7 Email Delivery/Retrieval 25, 143, 587
DHCP 7 IP Address Assignment 67, 68
BGP/OSPF 3 Routing Between Networks 179 / 89
IPsec/WireGuard 3–4 VPN and Secure Communication Varies
SNMP 7 Device Monitoring 161, 162
ICMP 3 Diagnostics/Error Reporting N/A

These protocols don’t work in isolation—they interoperate to form a robust, secure, and efficient communication framework that powers the modern internet, corporate intranets, cloud platforms, and IoT ecosystems.

IP Addressing and Subnetting

IP addressing is a fundamental concept in networking, allowing devices to identify and communicate with one another. There are two major versions of IP addresses: IPv4 and IPv6. IPv4 addresses are 32-bit, usually written as four decimal numbers separated by periods, like 192.168.1.1. IPv6, created to solve IPv4 exhaustion, is 128-bit and represented in hexadecimal, like 2001:0db8:85a3::8a2e:0370:7334.

Each IP address has a network portion and a host portion. For example, in the address 192.168.1.10/24, the /24 indicates that the first 24 bits are the network part. This helps routers determine where to send packets and allows the network to scale and remain organized.


🧮 Subnetting in Depth

Subnetting is the process of dividing a large IP network into smaller, manageable sub-networks (subnets). This segmentation helps in reducing broadcast traffic, improving security by isolating segments, and conserving IP addresses by efficiently allocating them.

Real-world example: Suppose an organization is assigned the block 192.168.10.0/24 (256 IPs). Instead of using all 256 in one big network, they divide it into subnets:

  • IT Department: 192.168.10.0/25 (128 IPs)
  • Sales Department: 192.168.10.128/26 (64 IPs)
  • Admin Department: 192.168.10.192/27 (32 IPs)

This structure provides better control, reduces congestion, and enhances security by isolating internal traffic.


🧰 Command-Line Tools for IP Addressing & Subnetting

On Linux:

  • Use ip addr to display assigned IPs.
  • Use ipcalc 192.168.1.0/24 to calculate subnet masks, broadcast addresses, and usable host ranges.
  • Use ping, traceroute, and netstat for troubleshooting and inspecting connectivity.

On Windows:

  • ipconfig shows current IP configuration.
  • netsh interface ipv4 show addresses can be used to inspect and modify IP settings.
  • ping, tracert, and nslookup are useful for diagnostics and DNS queries.

These tools are crucial for configuring network interfaces, debugging, and validating subnetting schemes.


🖥️ GUI Tools for IP Addressing & Management

For users who prefer graphical interfaces:

  • Advanced IP Scanner (Windows): Scans local networks and identifies active IPs, open ports, and device names.
  • Angry IP Scanner (Cross-platform): A fast and easy tool to ping IPs and detect live hosts.
  • Cisco Packet Tracer: A simulation tool where you can visually design networks, assign IPs, and test communication.
  • SolarWinds IP Address Manager: A commercial enterprise-grade tool for managing large-scale IP address space, subnets, and DNS/DHCP integrations.

These tools simplify subnet visualization and configuration, especially in complex enterprise environments.


🧠 Understanding CIDR Notation

CIDR (Classless Inter-Domain Routing) notation specifies the number of bits used for the network portion. For example:

  • /24 means 255.255.255.0 (256 total addresses)
  • /26 means 255.255.255.192 (64 total addresses)

CIDR allows flexible subnetting by not being limited to classful boundaries. It's essential in both private and public networking, especially for ISP-level routing.


🌐 Public vs Private IP Ranges

Private IPs (used within internal networks and not routable on the internet):

  • 10.0.0.0 – 10.255.255.255
  • 172.16.0.0 – 172.31.255.255
  • 192.168.0.0 – 192.168.255.255

Public IPs are globally routable and must be unique across the internet. Devices with private IPs access the internet through a router or firewall using NAT (Network Address Translation), which maps internal private IPs to a single public IP.


🛠️ Real-World Tools to Practice Subnetting

  • SubnetOnline (subnetonline.com): Provides calculators for subnetting, VLSM, wildcard masks, and more.
  • IPCalc (jodies.de/ipcalc): A detailed online calculator that visualizes subnet distribution.
  • SubnettingPractice.com: Great for solving timed quizzes and subnetting challenges.
  • CyberChef: Offers IP parsing, encoding/decoding, and other manipulation functions in a drag-and-drop web interface.

📝 Key Points to Remember

Concept IPv4 Example IPv6 Example
IP Address 192.168.0.1 2001:db8:abcd:0012::1
CIDR Notation /24 /64
Subnet Mask 255.255.255.0 Typically /64 or higher
Broadcast Addr 192.168.0.255 Not used (IPv6 uses multicast)
Gateway 192.168.0.1 fe80::1 (link-local)

📘 Practical Tips for Admins and Students

  • Use VLSM (Variable Length Subnet Masking) to divide a block into subnets of different sizes.
  • Assign /30 or /31 subnets for point-to-point WAN links.
  • Utilize loopback interfaces with static IPs for router identification and testing.
  • Practice converting between binary, decimal, and CIDR to sharpen subnetting skills.
  • Document subnet assignments to avoid conflicts and ensure clarity.

IP addressing and subnetting are critical skills for network design, security, and scalability. Whether configuring a home router or an enterprise backbone, understanding how to structure address space effectively ensures stability, efficiency, and security. With practice and the right tools, subnetting becomes second nature and an essential part of every network engineer’s toolkit.

Network Security

Network security protects computer networks from unauthorized access, misuse, modification, or destruction. It combines hardware, software, policies, and practices to ensure confidentiality, integrity, and availability of data and resources.

Modern network security includes firewalls, encryption, user authentication, virtual private networks (VPNs), and penetration testing tools to prevent, detect, and respond to threats like malware, phishing, MITM attacks, and DDoS.


🔐 Common Tools & Commands with Flags

🧪 Nmap – Network Mapper

Purpose: Port scanning, OS detection, service enumeration.

Basic Command:

  • nmap
    Scans a host or IP.

Advanced Flags:

  • -sS: TCP SYN scan (stealth)
  • -sV: Detect service version
  • -O: OS detection
  • -A: Aggressive scan (OS + version + script + traceroute)
  • -T4: Timing template for faster scans

Example:

  • nmap -sS -sV -O -T4 -p 1-1000 192.168.1.1

⚙️ Netcat – Network Scripting Tool

Purpose: Port scanning, banner grabbing, backdoor setup.

Basic Command:

  • nc -v

Advanced Flags:

  • -l: Listen mode (server)
  • -n: Don’t resolve DNS
  • -u: UDP mode
  • -p: Local port
  • -z: Zero I/O mode (port scanning)

Examples:

  • nc -zv 192.168.1.1 20-80 — Check open TCP ports
  • nc -lvp 4444 — Listen on port 4444

🛡️ UFW – Uncomplicated Firewall

Purpose: Manage firewall rules (Linux)

Examples:

  • ufw enable — Enables the firewall
  • ufw allow 22/tcp — Allows SSH
  • ufw deny 23 — Blocks Telnet
  • ufw status verbose — Displays full status

🔍 Wireshark – Packet Analysis (GUI)

Purpose: Real-time protocol inspection

Filter Examples:

  • ip.addr == 192.168.1.1
  • tcp.port == 80
  • http.request

Export captured packets for forensic analysis and intrusion investigation.

🌐 Nikto – Web Server Scanner

Purpose: Detect known web server vulnerabilities

Command:

Flags:

  • -Tuning 1234567890abcde — Select test types
  • -Display V — Verbose mode
  • -Format html — Export in HTML

🔒 Hydra – Brute Force Tool

Command:

  • hydra -l admin -P passwords.txt ssh://192.168.1.5

Flags:

  • -l: Login/username
  • -P: Password list
  • -t: Number of parallel tasks
  • -V: Show attempts

🛰️ hping3 – Packet Crafting

Purpose: Simulate DoS, traceroute, firewalk

Command:

  • hping3 -S 192.168.1.1 -p 80 -c 100 -d 120

Flags:

  • -S: SYN packets
  • -p: Target port
  • -c: Count of packets
  • -d: Payload size

💻 Penetration Testing by Port

Port 21 (FTP)

  • Scan: nmap -p 21 -sV --script=ftp-anon 192.168.1.1
  • Brute-force: hydra -l anonymous -P ftp-pass.txt ftp://192.168.1.1

Port 22 (SSH)

  • Check: nmap -p 22 -sV 192.168.1.1
  • Crack: hydra -l root -P rockyou.txt ssh://192.168.1.1

Port 80 (HTTP)

Port 139/445 (SMB)

  • Enum: enum4linux -a 192.168.1.1
  • Connect: smbclient -L //192.168.1.1/ -N

Port 3389 (RDP)

  • Check: nmap -p 3389 --script=rdp-enum-encryption 192.168.1.1

🔍 Penetration Testing on Common Ports

Below are 10 command examples for each major service port. Each section contains 5 basic and 5 advanced commands using popular CLI tools.


📁 FTP – Port 21

Basic FTP Pentest Commands

  1. nmap -p 21
    Simple scan to check if FTP is open.

  2. nmap -sV -p 21
    Detect service and version info.

  3. hydra -l anonymous -P passwords.txt ftp://
    Brute force anonymous login.

  4. ftp
    Try to connect using system FTP client.

  5. telnet 21
    Banner grabbing with Telnet.

Advanced FTP Pentest Commands

  1. nmap --script ftp-anon -p 21
    Check for anonymous login access.

  2. nmap --script ftp-vsftpd-backdoor -p 21
    Scan for vsFTPd backdoor.

  3. msfconsole -x "use auxiliary/scanner/ftp/ftp_version; set RHOSTS ; run"
    Metasploit module for FTP version.

  4. ncrack -u anonymous -P common-pass.txt -p 21
    High-speed cracking.

  5. curl ftp:/// --user anonymous:anonymous
    Access FTP using cURL.


🔐 SSH – Port 22

Basic SSH Pentest Commands

  1. nmap -p 22
    Scan SSH port.

  2. nmap -sV -p 22
    Detect SSH version.

  3. ssh @
    Try to connect using SSH client.

  4. telnet 22
    Basic banner grab (not always successful).

  5. hydra -l root -P rockyou.txt ssh://
    Basic SSH brute-force attack.

Advanced SSH Pentest Commands

  1. nmap --script ssh2-enum-algos -p 22
    Enumerate supported SSH encryption.

  2. ssh -v @
    Verbose mode for connection debug.

  3. msfconsole -x "use auxiliary/scanner/ssh/ssh_version; set RHOSTS ; run"
    Metasploit SSH scanner.

  4. crackmapexec ssh -u user -p password
    Validates credentials via SSH.

  5. patator ssh_login host= user=root password=FILE0 0=rockyou.txt -x ignore:mesg='Authentication failed'
    Modular brute-force testing.


🌐 HTTP – Port 80

Basic HTTP Pentest Commands

  1. nmap -p 80
    Check if port 80 is open.

  2. curl http://
    Check page response.

  3. telnet 80
    Raw HTTP request (GET / HTTP/1.1).

  4. wget http://
    Fetch content via HTTP.

  5. nikto -h http://
    Web vulnerability scanner.

Advanced HTTP Pentest Commands

  1. gobuster dir -u http:// -w common.txt
    Directory brute-forcing.

  2. nmap --script http-enum -p 80
    Enumerate web directories.

  3. whatweb http://
    Fingerprint web technologies.

  4. wpscan --url http://
    Scan for WordPress vulnerabilities.

  5. burpsuite (GUI)
    Manual testing of web forms, cookies, and XSS.


🧱 SMB – Ports 139/445

Basic SMB Pentest Commands

  1. nmap -p 139,445
    Basic check if SMB is exposed.

  2. smbclient -L /// -N
    List SMB shares anonymously.

  3. enum4linux -a
    Full enumeration of SMB.

  4. smbmap -H
    Enumerate shares and permissions.

  5. crackmapexec smb -u "" -p ""
    Null session test.

Advanced SMB Pentest Commands

  1. nmap --script smb-enum-shares,smb-enum-users -p 445
    Full SMB enumeration.

  2. msfconsole -x "use auxiliary/scanner/smb/smb_version; set RHOSTS ; run"
    Metasploit SMB version scanner.

  3. impacket-smbclient :@
    CLI SMB access.

  4. smbclient //target/share -U username
    Authenticated file access.

  5. nmap --script smb-vuln-ms17-010 -p 445
    Scan for EternalBlue vulnerability.


🖥️ RDP – Port 3389

Basic RDP Pentest Commands

  1. nmap -p 3389
    Port scan for RDP.

  2. rdesktop
    Connect via remote desktop.

  3. xfreerdp /v:
    Linux RDP client (GUI support).

  4. ncrack -u admin -P pass.txt -p 3389
    Brute force RDP login.

  5. rdpscan
    Scan for RDP vulnerabilities.

Advanced RDP Pentest Commands

  1. nmap --script rdp-enum-encryption -p 3389
    Detect encryption level.

  2. msfconsole -x "use auxiliary/scanner/rdp/rdp_scanner; set RHOSTS ; run"
    RDP login check.

  3. crackmapexec rdp -u admin -p password123
    Check login access.

  4. nmap --script rdp-vuln-ms12-020 -p 3389
    Detect MS12-020 vulnerability.

  5. xfreerdp /v: /u:admin /p:password /cert-ignore /sec:nla
    Bypass some security checks for testing.


📽️ Penetration Testing Video Guide

Watch this 3-hour ethical hacking and penetration testing course:

Penetration Testing Course in 3 Hours


🧰 Other Advanced Security Tools

Tool Type Interface Usage
Burp Suite Web Proxy GUI Manual + automated web app testing
Metasploit Exploitation Framework CLI/GUI msfconsole for payloads, scanning, reverse shells
OpenVAS Vulnerability Scanner Web GUI Full system scans
Fail2Ban Brute-force protection CLI Bans IPs on multiple login failures
OSSEC Host-based IDS CLI Log analysis, rootkit detection

🛡️ Best Practices

  • Use VLANs and network segmentation
  • Update software and hardware firmware regularly
  • Enable multi-factor authentication
  • Log and monitor using tools like Wazuh, Graylog, or Splunk
  • Apply Zero Trust Architecture in enterprise networks

Network security is not a single tool or method—it's a holistic discipline. Mastering network commands, protocols, services, and defense tools is crucial for defending against real-world threats. Tools like Nmap, Wireshark, Metasploit, and Hydra give professionals deep visibility and control. Pair this with proper security policies and continuous training, and you'll build a strong and resilient infrastructure.

Wireless and Wired Networks

Wired networks use physical cables, like Ethernet, to connect devices. These networks tend to be more stable and offer higher speeds, making them ideal for offices and environments where consistent performance is required. Wired networks are also generally more secure, as physical access is needed to intercept data.

Wireless networks use radio waves (like Wi-Fi) to transmit data without cables. They provide flexibility, especially for mobile devices, but are more prone to interference and security vulnerabilities. Most modern setups use a hybrid network, combining the best of both technologies—wired for core infrastructure, wireless for accessibility.

Network Services

Modern networks offer a wide range of services that enhance usability and manageability. DHCP (Dynamic Host Configuration Protocol) automates the assignment of IP addresses to devices, reducing manual configuration. DNS (Domain Name System) helps in resolving domain names to IP addresses, simplifying user access to websites and services.

Other essential services include NAT (Network Address Translation) for mapping multiple private IPs to a single public IP, QoS (Quality of Service) for prioritizing important traffic like VoIP or video calls, and remote access services for managing systems over the internet. These services make networks more intelligent, efficient, and user-friendly.

Conclusion

In today’s digital landscape, networks are the lifeline of communication and data sharing. They connect billions of devices, enabling everything from social media and streaming to enterprise systems and government operations. A deep understanding of networking concepts is essential for IT professionals, developers, and anyone working with digital systems.

As technology advances, networking continues to evolve with innovations like 5G, cloud networking, and software-defined networking (SDN). Future networks will be faster, more secure, and even more integral to our daily lives. By learning how networks function and how to secure them, individuals and organizations can harness the full potential of connected systems.

About

Network Penetration Testing Full Guide for Beginners is a step-by-step learning resource for understanding network security testing.

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Contributors