The Hive
GitHubLinkedInEmail
  • 🏠Home
  • 🌐RECON
    • 📡Passive (OSINT)
      • ⏩Metadata
      • ⏩Social Platforms
        • Email
        • Tumbler
        • Redit
        • Github
        • Tinder
        • TikTok
        • Snapchat
        • Instagram
        • Facebook
        • Twitter
        • Google
        • LinkedIn
    • 📡Active
      • ⏩Host Discovery / Network Mapping
      • ⏩nmap cheat sheet
      • ⏩masscan cheat sheet
    • 📡Web Recon
      • ⏩Web Server Discovery
      • ⏩Hidden Hosts
      • ⏩Directories & Subdomains
      • ⏩SSL Certs
      • ⏩CMS
      • ⏩WAF Detection
    • 📡Firewall Evasion
  • 📗Web Attacks
    • 🟢Server Side
      • 🟩Authentication Mechanisms
      • 🟩Access Control (Authorization)
      • 🟩Directory Traversal
      • 🟩OS Command Injection
      • 🟩Server-Side Request Forgery (SSRF)
      • 🟩XML External Entity (XXE) Injection
      • 🟩File Upload
      • 🔧SQL Injection
      • 🟩Information Disclosure
      • 🟩Business Logic
    • 🟢Client Side
      • 🟩Cross-site request forgery (CSRF)
      • 🔧Cross-site scripting (XSS)
  • 📒Network attacks
    • 🟡Network Services
      • 🟨Brute Force
      • 🟨DNS
      • 🟨IPv6
      • 🟨FTP
      • 🟨SSH
      • 🟨SMB
      • 🟨SNMP
      • 🟨SMTP
      • 🟨POP3
      • 🟨IMAP
      • 🟨MSSQL
      • 🟨MySQL
      • 🟨MSRPC / RPCbind
      • 🟨LDAP
      • 🟨NTP
      • 🟨NFS
      • 🟨Telnet
      • 🟨WebDAV
      • 🟨RDP
      • 🟨RSIP
      • 🟨Rlogin
      • 🟨VPNs
      • 🟨Echo
      • 🔧RTP
      • 🔧VOIP
        • SIP
    • 🟡Network Devices
      • 🟨IPv6 Attacks
        • Neighbor Impersonation
        • Router Advertisement Flooding
      • 🟨Switch Attacks
        • Cisco Exploitation
        • STP Spoofing
        • VLAN Hopping
        • MAC Flood
      • 🟨Router Attacks
        • Router Exploitation
        • HSRP Hijacking
        • 🔧RIP Spoofing
        • 🔧OSPF Attacks
        • 🔧VRRP MitM
      • 🟨NAC Bypass
        • Captive Portal
        • 802.1X / EAP Bypass
      • 🟨Printer Exploitation
    • 🟡MITM & Poisoning
      • 🟨Bettercap
      • 🟨HTTPS Downgrade / HSTS Bypass
      • 🟨Session Hijackings
      • 🟨Malicious Update
      • 🟨RDP Downgrade
      • 🟨DNS Spoofing
      • 🟨NTP Spoofing
      • 🟨ARP Spoofing
      • 🟨DHCP Poisoning
      • 🟨DHCPv6 Spoofing
      • 🟨SSDP Spoofing
      • 🟨WSUS Spoofing
      • 🟨ADIDNS Poisoning
      • 🟨WPAD Abuse
    • 🟡Wireless Attacks
      • 🟨Protocol Concepts
      • 🟨Basics
      • 🟨Attacks
    • 🟡Sniffing
      • 🟨Wireshark
      • 🟨tcpdump
    • 🟡Denial of Service
  • 📕Red Team
    • 🔴Windows
      • ⭕Security Concepts
        • Windows Security Components
        • Active Directory Components
        • Kerberos
        • Loggon Sessions and Access Tokens
        • Permissions and Access Control
        • Windows Registry
        • Object Management
      • ⭕Physical Attack
      • ⭕Enumeration
      • ⭕Privilege Escalation
        • DLL Hijacking
          • Phantom DLL Hijacking / Replacement
          • Search Order Hijacking ( Preloading )
          • DLL Side-Loading
        • Service Misconfigurations
          • Weak Registry Permissions
          • Insecure Service Executables
          • Insecure Permission
          • Unquoted Service Path
        • Creating a New Service (admin to system)
        • Registry
          • AlwaysInstallElevated
          • AutoRuns
        • Scheduled Tasks
        • Mass Roll-outs
        • Startup Apps
        • Installed Applications
        • Loopback Services
        • Insecure GUI APPs
        • Potatos
        • Printspoofer / SEImpersonate
        • PSEXEC (admin to system)
      • ⭕Credential Dumping
      • ⭕Persistence
        • Invisible Account Forger
        • Add User
        • Scheduled Tasks
        • Run Registry Keys
        • Logon Scripts
        • Screensavers Hijack
        • Powershell Profiles & Modules
        • Service Creation/Modification
        • Shortcut Modification
        • Startup Folder
        • RDP backdoors
        • COM Hijacking
    • 🔴Active Directory
      • ⭕Domain Enumeration
      • ⭕Tools & Frameworks
        • Evil-WinRM
        • CME cheat sheet
        • SharpSploit
        • impacket cheat sheet
        • DeathStar
      • ⭕Exploitation
        • LLMNR Poisoning
        • SMB/NTLM Relay
        • DNS Takeover + LDAP Relay
        • Cracking Hashes
        • Password spraying
        • ADCS + PetitPotam NTLM Relay
        • EternalBlue
        • ZeroLogon
        • MS Exchange ProxyShell
        • MS Exchange ProxyLogon
        • Java JBOSS
      • ⭕Privilege Escalation
        • Token Impersonation
        • DNS Admins
        • AD CS Abuse
        • ACL Abuse
          • GenericAll
          • Write Property
          • Self-membership
          • ForceChangePassword
          • Managed Security Groups
          • Exchange Windows Permissions
        • Group Policy Objects (GPOs)
        • Custom SSPs
        • PrintNightmare
      • ⭕Lateral Movement
        • RDP Password Decryption
        • RDP Session Hijacking
        • headless RDP with SharpRDP
        • Domain Shares
        • SCF File Attacks
        • Pass the Hash / Password
        • Overpass the Hash / Pass the Key
        • Pass The Ticket
        • Kerberosting / AS-REP Rosting
        • Kerberos Delegation
      • ⭕Credential Dumping
        • CredSSP / TSPKG
        • Wdigest Clear Text
        • DPAPI secrets
        • SAM & Registry
        • NTDS.dit & vshadow
        • comsvcs.dll
        • Meterpreter
        • Procdump & LSASS
        • AD User Comments
        • SYSVOL & Group Policy Preferences
        • LAPS Passwords
        • GSMA Passwords
        • HiveNightmare
        • Mimikatz Cheat sheet
        • Other Tools / Techniques
      • ⭕Persistence
        • Certificates
        • DCSync
        • DCShadow
        • Silver Ticket
        • Golden Ticket
        • Skeleton Key
        • WMI
        • PowerShell Remoting
        • Remote Registry
        • Rights Abuse
        • AdminSDHolder
        • DSRM
        • Kerberos Checksum Validation ( MS14-068 )
    • 🔴Linux
      • ⭕Physical Attacks
      • ⭕Enumeration
      • ⭕Privilege Escalation
        • SUID / SGID abuse
        • /etc/shadow & /etc/passwd
        • cron/crontab abuse
        • Sudo Abuse
        • Capabilities Abuse
        • Environment Variables
          • LD_LIBRARY_PATH
          • LD_PRELOAD
        • Shared Object Injection
        • NFS
        • man CE Pager Argument
        • MySQL UDF
        • UDEVD
        • STDIN/STDOUT
        • Unix Socket Exploitation
        • Dirty Pipe
        • Docker
          • SUID Docker
      • ⭕Lateral Movement
        • Infecting Running Processes
        • VIM Config File Keylogger
        • SSH Hijacking
        • Samba Secrets to Domain Admin
        • Hiding Processes
        • Simple User-mode Rootkits
        • Vino VNC Server
      • ⭕Credential Dumping
        • Swap Dump
        • mimipinguin
        • unshadow
        • 3snake
      • ⭕Persistence
        • Startup User File Backdoor
        • PHP Backdoor
        • Apache mod_rootme
        • Startup Service Backdoor
        • xdg Backdoor
        • rootbash SUID
        • apt Backdoor
        • Driver Backdoor
        • Core Pattern
        • dash Backdoor
        • Creating an SUID Binary
        • Systemd netcat bind shell
        • Xinetd UDP portnock
        • openSSL reverse shell
        • motd Backdoor
        • Auth Log Backdoor
        • RSYSLOG Backdoor
        • sshd Backdoor
        • VIM Config Backdoor
        • .bashrc Backdoor
        • Adding a Root user
        • Crontab Reverse Shell
        • SSH persistence password-less
      • ⭕Covering Tracks
    • 🔴Command & Control (C2)
      • ⭕Cobalt Strike
      • ⭕Metasploit
      • ⭕Empire & Starkiller
      • ⭕Covenant
    • 🔴Shells and Payloads
      • ⭕Shell Escape / Interactive Shell
      • ⭕LOL Binaries
      • ⭕msfvenom
      • ⭕SharpShooter & Ivy
      • ⭕Other Payloads
    • 🔴Payload Delivery
      • ⭕Powershell Reflective DLL Load
      • ⭕HTML Smuggling
      • ⭕Office Macros
      • ⭕DDE Auto - Word/Excel
      • ⭕.SLK Excel
      • ⭕XLM Macro 4.0
      • ⭕LNK
      • ⭕embedded OLE + LNK objects
      • ⭕JScript
      • ⭕HTA
      • ⭕VBS
      • ⭕VBA
      • ⭕RTF
      • ⭕REG
      • ⭕MSI / MSIEXEC
      • ⭕IQY
      • ⭕CHM / HHC
      • ⭕SCR
    • 🔴Pivoting
      • ⭕SSH Forwarding
      • ⭕Socat Stealth Port Forward
      • ⭕Socat Reverse Shell Relay
      • ⭕HTTP Tunneling
      • ⭕ICMP Tunneling
      • ⭕DNS Tunneling
      • ⭕Metasploit Pivoting
      • ⭕Cobalt Strike Pivoteing
      • ⭕VPN Tunneling
      • ⭕Other Tools
    • 🔴Exfiltration / File Transfer
      • ⭕Encode / Decode Files
      • ⭕TCP / UDP
      • ⭕DNS
      • ⭕SSH
      • ⭕ICMP
      • ⭕SMB
      • ⭕FTP
      • ⭕HTTP
      • ⭕Other Methods
    • 🔴Password Attacks
      • ⭕Online Attacks
      • ⭕Offline Attack
      • ⭕Word List
      • ⭕Cheat Sheet
    • 🔴Defense Evasion
      • ⭕Basic Tricks
      • 🔧Powershell Tricks
      • ⭕Disabling Defenses
      • ⭕UAC Bypass
      • ⭕Process Migration
      • ⭕Dechaining Macros
      • ⭕VBA Sandbox Evasion
      • ⭕AMSI Bypass
      • ⭕SRP & AppLocker Bypass
      • ⭕GPO Bypass
  • 📘Blue Team
    • 🔵Threat Modeling / Hunting / Intelligence
    • 🔵Linux Hardening
      • 🔹OS Security
        • Update Strategy
        • Service Management
        • Physical Security
        • Grub Hardening
        • Kernel Parameters
        • Process Isolation
      • 🔹Accounts & Passwords
        • Users & Groups
        • Password Security & Sudoers
      • 🔹Access Control & Ownership
      • 🔹File System Security
      • 🔹Integrity Check
      • 🔹Sandboxing
      • 🔹Network
      • 🔹iptables
        • Rule Sets
      • 🔹Service Hardening
        • BIND9
        • vsftpd
        • Nginx
        • Apache
        • SSH
      • 🔹System Audit
      • 🔹Logging
        • auditd
      • 🔹Encryption
    • 🔵Security Architecture
      • 🔹Layered Security
  • 🟪Purple Teaming
    • 🟣Adversary Emulation
  • 🟧programming
    • 🟠C Programming
      • 🔸Basic Structure
      • 🔸GCC Compiler
      • 🔸Preprocessors
      • 🔸Data Types
      • 🔸Type Qualifiers
      • 🔸Pointers
      • 🔸Dynamic Memory Allocation
      • 🔸Loops
      • 🔸Conditional Statements
      • 🔸Functions
      • 🔸Input / Output
      • 🔸Macros
      • 🔸Files
      • 🔸Strings Manipulation
      • 🔸Bit Manipulation
      • 🔸Data Structures
        • Arrays
        • Structures
        • Unions
      • 🔸Abstract Data Types
        • Stack
        • Queue
        • Linked List
          • Singly Linked List
          • Doubly Linked List
      • 🔸Libraries & Linking
      • 🔸Error Recovery
    • 🔧Assembly ( NASM )
      • Intel IA-32 Environment
      • Basic Structure
      • Variables and Data Types
      • Most-used Instructions
      • input / output
  • 🟫Miscellaneous
    • 🟤GNU Screen / tmux
    • 🟤SSH Tricks
    • 🟤Cats
      • netcat
      • ncat
      • pwncat
      • socat
      • 🔧powercat
    • 🟤Curl
    • 🟤Cross-compiling Binaries
Powered by GitBook
On this page
  • Layer 1
  • (Physical Inspection/Access)
  • Wireless (802.11)
  • Wireless (RFID badges)
  • Layer 2 & 3
  • Switches
  • Routers
  • IPv6
  • Layer 7
  • Application Proxy
  • WAF
  • Firewall
  • DMZ
  • DMZ + Active Directory
  • IDS vs IPS Design
  1. Blue Team
  2. Security Architecture

Layered Security

Layer 1

(Physical Inspection/Access)

Threats

  • Rogue Device

  • Bad USB

  • Pentest Dropbox

  • HID Attacks

  • Physical Damage

Mitigations

  • Cabinets

  • Closets

  • Physical Authentication & Authorization

Wireless (802.11)

Threats

  • Dual-homed devices (2 or more interfaces)

  • Protocol Attacks

  • BYOAP (bring your own access point)

Mitigations

  • WIPS (wireless Intrusion Prevention System)

  • Disable Obsolete Protocols (WEP)

  • Disable Flawed Control Mechanisms (WPS)

  • Enable PMF (Protected Management Frames) if possible - available in 802.11w to block spoofing, deauth, disass and replay attacks

  • Guest Management (no auth for guests, internet access only, WPA2-PSK)

  • Station/Client Isolation (clients cant access other clients on the same AP)

  • WPA2 Enterprise (use unique encryption key for each client and authenticate with RADIUS servers)

Wireless (RFID badges)

Threats

  • Cloned Cards/Tags

Mitigations

  • Use cards that support rolling codes (code change on each use) or challenge-response

  • Use protective sleeves if using old RFID cards

Layer 2 & 3

Switches

Threats

  • MAC flooding

  • 802.1Q and ISL Tagging

  • Double Encapsulated 802.Q / VLAN hopping

  • ARP Poisoning

  • Private VLAN attack

  • VLAN Tunneling Protocol Attack

  • Multicast Brute Force

  • Spanning-tree Attack

  • Random Frame Stress

  • Rogue DHCP

  • DHCP Starvation

  • NTP Amplification

  • NTP Spoofing

  • STP Spoofing

  • Sniffing

Mitigations

  • Disable CDP to prevent credential spoofing

  • Setup port security to prevent MAC flood or hardcode system MAC address

  • Disable unused ports, services, protocols, interfaces, etc.

  • Setup MAC limitation and sticky MAC address

  • DHCP Snooping

  • Dynamic ARP Inspection (DAI)

  • ARP IDS (arpwatch)

  • Configure trusted interface for DHCP

  • Use private VLANs

  • use SSHv2

  • Enable logging

  • Use Cisco type 8 or 9 password hashes

  • Configure banner correctly

  • Always use SNMP v3 with secure community strings

Routers

Threats

  • DoS

  • IP spoof

  • IP Source Routing

  • ICMP Flood

  • Smurf Attack

  • Routing Table Poisoning

  • IPv6 Router Advertisement

  • Unauthorized Routing Updates

  • Wormhole Attack (Unauthenticated Tunneling)

Mitigations

  • Cisco Autosecure

  • DISA STIGs

  • CIS Cisco Benchmark

  • Use audit tools (Nipper Studio, nipper-ng)

  • Set logon filters on the outermost external router

  • Block non-routed IPs

IPv6

Threats

  • IPv6 MitM

  • DHCPv6 Takeover

  • Neighbor Impersonation

  • NDP Spoofing

Mitigations

  • Dynamic ARP Inspection

  • Secure Neighbor Discovery

  • Private VLANs

  • Port Security

  • 802.1x

  • Use IPsec if possible

  • Block protocol 41 to prevent IPv6 tunneling (Cisco IOS ACL)

  • Use rogue advertisement (RA) guard

Layer 7

Application Proxy

Forward Proxy : remote access through proxy, hides the identity of client.

  • Web Proxy

    • SSL Inspection

    • Block sites by categories

    • Website whitelisting

    • Authentication

  • SMTP Proxy (spam application)

    • per-email encryption

    • modify/auto-route mail (add custom header/footer or remove attachments)

    • anti-spam/anti-spoof (SPF/DKIM/DMARK)

    • sender authentication

    • rate limiting

    • sender blocking

Reverse Proxy : for security analysis, hides the identity of server (WAF, three-tier model, etc.)

Placement

  • DMZ proxy (between DMZ and internal network)

  • Internal proxy (betwwen clients and internet)

  • VPN access (for remote connection)

  • Cloud proxy (systems directly connect to cloud infrastructure)

WAF

Web Application Firewall (proxy) : strong focus on mitigating OWASP Top 10.

Capabilities

  • SSL offloading (client connects to reverse proxy with SSL/TLS and reverse proxy connects to web server with http)

  • content decoding

  • HTTP attack vector mitigations

  • virtual patching (mitigation without recoding the web app)

  • CAPTCHA & rate limiting

  • add HSTS header

  • error page control

  • dynamic action based on risk level

  • dynamic traffic routing for load balancing

Deployment:

  • Automatic Learning (traffic goes through WAF for a period of time so it can learn the patterns, after learning can flip to deny)

  • manual (all settings are manually tuned, many templates are available based on OS, programming language and back-end database )

Firewall

Internal Network Design

Break up internal network into separate segments based on :

  • Business & regulation requirements

  • Criticality of assets

  • Threats

  • Risk appetite

Segmentation Principles

classify systems and data in different levels (tiers):

  • tier 1 - critical components (DCs, exchange server, etc.)

  • tier 2 - internal systems

  • tier 3 - external facing data-providing systems

gateways are the control points with egress/ingress inspection and ACL.

Best Practices:

  • Define port-based rules first

  • Block geolocations

  • Authenticate all outbound traffics

  • Use both host-based and network-based

DMZ

DMZ is usually implemented in one of these models:

  • Three Legged DMZ Model (Single Firewall) : uses a single firewall with at least three network interfaces to make the architecture that holds a DMZ.

  • Dual Firewall DMZ Model : the DMZ is placed between 2 firewalls and traffix is filtered in both sides.

In case of having multiple systems/servers in the DMZ, its highly recommended to separate them or split them into multiple DMZs (or trust zones).

In DMZ, segmentation is done using VLANs, VRFs or physical separation.

DMZ + Active Directory

In case of using Active Directory connected servers in the DMZ (such as a public website or domain), the DMZ should not be directly connected to primary/root domain controllers. in this scenario, a read-only domain controller (RODC) is placed in DMZ for authentication and authorization.

Services Like LDAP and SMB network shares shouldn't be visible from the DMZ point of view. for better security and easier management, use deferent domains for public-facing and internal use.

IDS vs IPS Design

IPS should be implemented in in-line mode so that all the traffic can pass through and be analyzed.

IDS should be implemented out-of-band with a network tap or port mirroring to prevent speed drop.

PreviousSecurity ArchitectureNextAdversary Emulation

Last updated 2 years ago

📘
🔵
🔹
Secure Proxy Architecture
Logo
Network Design Scenario #2: DMZ DesignNetwork Defense Blog
Logo