Əsas məzmuna keçin

Network Security

Network Security Nədir?

Network Security - şəbəkə resurslarını və məlumatları qeyri-qanuni giriş, sui-istifadə və ya oğurluqdan qorumaq üçün tətbiq olunan texnologiya, prosedur və siyasətlər toplusudur.

Əsas Məqsədlər (CIA Triad):

Defense in Depth (Qatlı Müdafiə)

Konsept: Çox qatlı təhlükəsizlik tədbirləri.

Firewall

Funksiya: Şəbəkə traffic-ini monitor və filter etmək.

Firewall Types

1. Packet Filtering Firewall

İş prinsipi: IP, port, protocol əsasında qərar verir.

Nümunə Rules:

# Allow HTTP
ALLOW TCP from ANY to 192.168.1.10 port 80

# Allow HTTPS
ALLOW TCP from ANY to 192.168.1.10 port 443

# Deny all other
DENY TCP from ANY to ANY

2. Stateful Firewall

İş prinsipi: Connection state-ini izləyir.

State Table:

Source IPDest IPSource PortDest PortStateProtocol
192.168.1.58.8.8.854321443ESTABLISHEDTCP
192.168.1.71.1.1.15432253NEWUDP

3. Application Layer Firewall (WAF)

İş prinsipi: HTTP/HTTPS traffic-ini deep inspection.

Qorunma:

  • SQL Injection
  • Cross-Site Scripting (XSS)
  • CSRF attacks
  • Path traversal
  • Malicious file uploads

4. Next-Generation Firewall (NGFW)

Xüsusiyyətlər:

  • Traditional firewall + IPS
  • Deep packet inspection
  • Application awareness
  • SSL/TLS inspection
  • User identity integration
  • Threat intelligence

VPN (Virtual Private Network)

Funksiya: Public network üzərində private və encrypted connection yaratmaq.

VPN Types

1. Site-to-Site VPN

İstifadə: İki və ya daha çox office-i bağlamaq.

2. Remote Access VPN

İstifadə: Remote user-lərin corporate network-ə giriş.

VPN Protocols

IPSec (Internet Protocol Security)

Modes:

  • Transport Mode: Yalnız payload encrypt olunur
  • Tunnel Mode: Bütün packet encrypt olunur

Components:

  • AH (Authentication Header): Authentication və integrity
  • ESP (Encapsulating Security Payload): Encryption + authentication
  • IKE (Internet Key Exchange): Key management

SSL/TLS VPN

Üstünlüklər:

  • Web browser əsaslı
  • No client software (bəzən)
  • Port 443 (firewall-friendly)

WireGuard

Xüsusiyyətlər:

  • Modern, simple
  • Yüksək performans
  • Kiçik codebase
  • Built-in roaming

VPN Topology

Encryption (Şifrələmə)

Symmetric Encryption

Konsept: Eyni açar encryption və decryption üçün.

Alqoritmlər:

  • AES (Advanced Encryption Standard) - 128, 192, 256 bit
  • DES (Data Encryption Standard) - Deprecated
  • 3DES (Triple DES) - Deprecated
  • ChaCha20 - Modern, mobile-friendly

Asymmetric Encryption (Public Key)

Konsept: Public və private key cütü.

Alqoritmlər:

  • RSA - 2048, 4096 bit
  • ECC (Elliptic Curve Cryptography) - Smaller keys
  • Diffie-Hellman - Key exchange
  • DSA (Digital Signature Algorithm)

Hashing

Funksiya: One-way function, fixed-size output.

Alqoritmlər:

  • SHA-256, SHA-384, SHA-512 - Secure
  • MD5 - Broken, don't use
  • SHA-1 - Deprecated
  • bcrypt, scrypt, Argon2 - Password hashing

İstifadə sahələri:

  • Password storage
  • Data integrity
  • Digital signatures
  • Certificate fingerprints

Common Network Attacks

1. DDoS (Distributed Denial of Service)

Məqsəd: Sistemə excessive traffic göndərərək əlçatmazlığa səbəb olmaq.

DDoS Növləri:

Volume-based Attacks

  • UDP Flood
  • ICMP Flood
  • DNS Amplification
  • NTP Amplification

Protocol Attacks

  • SYN Flood
  • Ping of Death
  • Smurf Attack

Application Layer Attacks

  • HTTP Flood
  • Slowloris
  • DNS Query Flood

Müdafiə:

  • Rate limiting
  • Traffic filtering
  • CDN/DDoS protection service
  • Anycast network
  • Overprovisioning bandwidth

2. Man-in-the-Middle (MITM)

Məqsəd: İki tərəf arasında communication-u intercept etmək.

MITM Növləri:

  • ARP Spoofing
  • DNS Spoofing
  • SSL Stripping
  • Session Hijacking
  • Email hijacking

Müdafiə:

  • HTTPS with certificate validation
  • VPN usage
  • Strong authentication (2FA)
  • HSTS header
  • Certificate pinning

3. Port Scanning

Məqsəd: Açıq port və servislər haqqında məlumat toplamaq.

Scan Types:

  • TCP Connect Scan - Full connection
  • SYN Scan - Half-open (stealth)
  • UDP Scan
  • FIN, NULL, Xmas Scan - Stealth scans

Müdafiə:

  • Firewall rules
  • Port knocking
  • IDS/IPS
  • Disable unnecessary services
  • Network segmentation

4. SQL Injection

Məqsəd: Database query-ləri manipulate etmək.

-- Vulnerable code
SELECT * FROM users WHERE username = '$username' AND password = '$password'

-- Attack payload
username: admin' OR '1'='1' --
password: anything

-- Result query
SELECT * FROM users WHERE username = 'admin' OR '1'='1' --' AND password = 'anything'

Müdafiə:

  • Prepared statements/Parameterized queries
  • Input validation
  • Least privilege DB user
  • WAF (Web Application Firewall)
  • Regular security audits

5. Cross-Site Scripting (XSS)

Məqsəd: Malicious script-ləri victim-in browser-ində icra etmək.

XSS Növləri:

  • Stored XSS - Script database-də saxlanır
  • Reflected XSS - Script URL-də olur
  • DOM-based XSS - Client-side JavaScript-də

Müdafiə:

  • Input validation və sanitization
  • Output encoding
  • Content Security Policy (CSP)
  • HttpOnly cookies
  • X-XSS-Protection header

6. Phishing

Məqsəd: Social engineering ilə credentials və ya məlumat oğurlamaq.

Müdafiə:

  • User education və awareness
  • Email filtering
  • Multi-factor authentication (2FA)
  • DMARC, SPF, DKIM
  • Link inspection tools

Intrusion Detection/Prevention Systems

IDS (Intrusion Detection System)

Funksiya: Şübhəli aktivitəti detect və alert edir.

Detection Methods:

  • Signature-based: Bilinən attack pattern-ləri
  • Anomaly-based: Normal davranışdan kənara çıxma
  • Stateful protocol analysis

IPS (Intrusion Prevention System)

Funksiya: Detect + Block.

IDS vs IPS:

FeatureIDSIPS
ActionMonitor + AlertMonitor + Block
PlacementOut-of-bandInline
ImpactNo traffic disruptionCan block legitimate traffic
Response timePassiveActive

Network Segmentation

Məqsəd: Network-u isolated segment-lərə bölmək.

Üstünlüklər:

  • Breach containment
  • Compliance requirements
  • Performance improvement
  • Easier monitoring

Implementation:

  • VLANs
  • Firewalls
  • Access Control Lists (ACLs)
  • Micro-segmentation

Zero Trust Architecture

Prinsip: "Never trust, always verify"

Principles:

  1. Verify explicitly
  2. Use least privilege access
  3. Assume breach

Security Best Practices

1. Network Level

Firewall:

  • Default deny policy
  • Regular rule review
  • Logging enabled
  • Geo-blocking

Segmentation:

  • Separate critical assets
  • DMZ for public services
  • Management network isolation

2. Authentication

Multi-Factor Authentication (2FA/MFA):

Password Policy:

  • Minimum 12 characters
  • Complexity requirements
  • Regular rotation
  • No reuse
  • Password manager usage

3. Encryption

Data in Transit:

  • TLS 1.3 for all communications
  • VPN for remote access
  • SSH for remote management

Data at Rest:

  • Full disk encryption
  • Database encryption
  • File-level encryption

4. Monitoring və Logging

Log Everything:

  • Authentication attempts
  • Configuration changes
  • Network traffic
  • System events

SIEM (Security Information and Event Management):

5. Patch Management

Process:

  1. Vulnerability discovered
  2. Patch released
  3. Test in staging
  4. Deploy to production
  5. Verify

Priority:

  • Critical: 24-48 hours
  • High: 1 week
  • Medium: 1 month
  • Low: Quarterly

6. Incident Response Plan

Network Security Tools

Vulnerability Scanning:

  • Nessus
  • OpenVAS
  • Qualys

Penetration Testing:

  • Metasploit
  • Burp Suite
  • Kali Linux

Network Monitoring:

  • Wireshark
  • tcpdump
  • Nagios
  • Zabbix

IDS/IPS:

  • Snort
  • Suricata
  • Zeek (Bro)

SIEM:

  • Splunk
  • ELK Stack
  • QRadar
  • ArcSight

Compliance və Standards

Frameworks:

  • ISO 27001 - Information security management
  • NIST Cybersecurity Framework
  • CIS Controls
  • PCI DSS - Payment card industry
  • HIPAA - Healthcare
  • GDPR - Data protection (EU)

Əlaqəli Mövzular

  • OSI Model
  • TCP/IP Protocol
  • HTTP/HTTPS
  • DNS Security (DNSSEC)
  • VPN Technologies
  • Encryption Standards
  • Cloud Security
  • Application Security