Advertisement

HexaGuard: Mastering the Art of Digital Shadows

🔥 Networking Basics & Anonymity (Proxy, VPN, Tor) Explained for Hackers 🔥

📌 1. OSI Model & TCP/IP Model

📜 OSI Model (7 Layers)

  1. Physical Layer – Bits, cables, wireless signals.
  2. Data Link Layer – MAC addresses, ARP, switches.
  3. Network Layer – IP addresses, routing.
  4. Transport Layer – TCP/UDP, port numbers.
  5. Session Layer – Session establishment (e.g., SSL/TLS).
  6. Presentation Layer – Encryption, data formats (JPEG, MP3, etc.).
  7. Application Layer – HTTP, FTP, DNS, etc.

🌐 TCP/IP Model (4 Layers)

  1. Network Interface – Physical + Data Link layer.
  2. Internet Layer – IP addresses, routing.
  3. Transport Layer – TCP/UDP, port numbers.
  4. Application Layer – HTTP, FTP, DNS, etc.

📌 Important Notes:

  • OSI is theoretical; TCP/IP is practical.
  • TCP/IP combines layers (e.g., No "Presentation" or "Session" layer).

📌 2. IP Addressing (IPv4/IPv6, Subnetting, CIDR)

📌 IPv4 (32-bit, 4 octets)

  • Example: 192.168.1.1
  • Private IP Ranges:
    • 10.0.0.0 – 10.255.255.255
    • 172.16.0.0 – 172.31.255.255
    • 192.168.0.0 – 192.168.255.255

📌 IPv6 (128-bit, 8 blocks)

  • Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
  • Uses hexadecimal.
  • No subnetting needed like IPv4.

📌 Subnetting & CIDR

  • Subnet Mask: Divides network & host.
    • 255.255.255.0/24 (CIDR notation)
    • 255.255.0.0/16
  • CIDR (Classless Inter-Domain Routing): Efficient IP allocation.
    • /24 = 256 IPs (1 network, 254 usable).
    • /30 = 4 IPs (2 usable).
    • /32 = 1 IP (single host).

📌 Commands to Check IP:

bash

ip a # Linux ifconfig # Older Linux/macOS ipconfig # Windows

📌 3. MAC Addresses & ARP

MAC Address (Media Access Control)

  • Unique identifier (48-bit) for network interfaces.
  • Example: 00:1A:2B:3C:4D:5E
  • Can't be routed like IP addresses.

ARP (Address Resolution Protocol)

  • Maps IP to MAC in LAN.
  • Command to check ARP table:
    bash

    arp -a # Windows/Linux/macOS

🔥 Hacking Use-Case: ARP Spoofing (Man-in-the-Middle Attack)

bash

arpspoof -i eth0 -t TARGET_IP -r GATEWAY_IP

📌 4. Ports & Protocols (TCP, UDP, ICMP, etc.)

🔗 Common Protocols

ProtocolPortUsage
TCP-Reliable, connection-oriented
UDP-Fast, connectionless
ICMP-Ping, network diagnostics
HTTP80Web traffic
HTTPS443Secure web traffic
FTP21File transfer
DNS53Domain name resolution
SMTP25Sending email
SSH22Secure shell (remote access)

📌 Checking Open Ports

bash

netstat -tulnp # Linux netstat -ano # Windows

Or using Nmap:

bash

nmap -p- TARGET_IP

📌 5. DNS Resolution (nslookup, dig, host)

DNS (Domain Name System) converts domain names into IPs.

📌 Commands for DNS Lookup

bash

nslookup google.com # Windows/Linux/macOS dig google.com # Linux/macOS host google.com # Linux/macOS

📌 Check all DNS Records:

bash

dig google.com ANY

🔥 Proxy, VPN, and Tor Basics (Anonymity Techniques) 🔥

📌 1. Proxy Servers

A proxy acts as an intermediary between you and the internet.

Types of Proxies:

  1. Forward Proxy – For users accessing the internet.
  2. Reverse Proxy – For servers to protect web apps.
  3. SOCKS Proxy – Handles multiple protocols (SOCKS5 supports UDP).
  4. Transparent Proxy – Invisible to the user.

📌 Using a Proxy (Linux)

bash

export http_proxy="http://proxy_ip:port" export https_proxy="https://proxy_ip:port"

For Nmap Scan via Proxy:

bash

nmap --proxy http://proxy_ip:port -p80 example.com

📌 2. VPN (Virtual Private Network)

A VPN encrypts your internet traffic and routes it through a secure server.

📌 Benefits: ✅ Hides IP address.
✅ Bypasses geo-restrictions.
✅ Encrypts traffic.

📌 VPN Services:

  • NordVPN
  • ExpressVPN
  • ProtonVPN (Free)
  • OpenVPN (Self-hosted)

📌 Check VPN Connection:

bash

curl ifconfig.me # Check your public IP

📌 3. Tor (The Onion Router)

Tor encrypts your traffic through multiple relays, making tracking difficult.

📌 Install Tor on Linux:

bash

sudo apt update && sudo apt install tor -y

📌 Start Tor Service:

bash

tor

📌 Use Tor with Curl:

bash

torsocks curl ifconfig.me

📌 Anonymize Browsing (TOR Browser)


🔥 Conclusion & Hacking Use Cases 🔥

🚀 Mastering networking helps in:
Bug Bounty (Understanding network vulnerabilities).
Penetration Testing (Exploiting network misconfigurations).
Anonymity (Using VPN, Proxy, and Tor for privacy).

🛠 Next Steps

1️⃣ Practice with Wireshark for packet analysis.
2️⃣ Learn MITM attacks (Ettercap, Bettercap).
3️⃣ Explore dark web using Tor safely.

Post a Comment

0 Comments