The Target & Threat Context
Picture this: a mid-sized FinTech company, let's call them "SecurePay Solutions." They handle millions of financial transactions daily, process sensitive customer data, and are under constant regulatory scrutiny (think PCI DSS, GDPR, SOX – the whole alphabet soup). Our engagement was a full-scope red team exercise. The primary objective? Demonstrate the potential for lateral movement from a typical user compromise to their crown jewels: the production database servers, application logic, and API gateways.
Their network architecture, on paper, looked pretty solid. They had a decent firewall (FortiGate), modern Cisco Catalyst switches, and a well-defined VLAN segmentation strategy:
VLAN 10: User Workstations (Windows 10, Office 365, standard business apps) -192.168.10.0/24VLAN 20: Guest Wi-Fi (heavily restricted internet access) -192.168.20.0/24VLAN 30: Voice over IP (VoIP phones, IP PBX) -192.168.30.0/24VLAN 40: Servers (internal services, AD, DNS, file shares) -192.168.40.0/24VLAN 100: Production Servers (databases, core application logic, payment processing) -192.168.100.0/24
The core production servers on VLAN 100 were running RHEL 8, hosting PostgreSQL databases, Java Spring Boot applications, and Nginx reverse proxies. These were the systems that, if compromised, would lead to catastrophic data breaches, service outages, and regulatory nightmares. Access to VLAN 100 was supposed to be strictly controlled, only accessible from specific jump boxes on VLAN 40, and with multi-factor authentication for administrative access. No direct access from VLAN 10 or VLAN 30 was permitted.
Our initial foothold was achieved through a targeted spear-phishing campaign. One of the finance department employees, bless their heart, clicked on a malicious link, leading to a workstation compromise on VLAN 10. Standard stuff. From there, we established persistence and began our internal reconnaissance. We knew getting from VLAN 10 to VLAN 100 directly would be tough due to firewall rules. We needed a pivot point, an overlooked pathway. And that's when our eyes landed on the humble, forgotten VoIP phone, quietly humming away on each user's desk, connected via a pass-through port to their workstation.
The stakes were incredibly high. A successful breach of VLAN 100 wouldn't just be a red team win; it would be a stark, painful lesson for SecurePay Solutions about the real-world implications of "isolated" networks that aren't truly isolated. This is where the story gets spicy.
Corrected Configuration for a User/VoIP Port:
interface GigabitEthernet0/1
description User PC and VoIP Phone
switchport mode access
switchport access vlan 10
switchport voice vlan 30
switchport nonegotiate
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
switchport port-security mac-address sticky
spanning-tree portfast
spanning-tree bpduguard enable
!
! Explanation of changes:
! - switchport mode access: Explicitly sets the port to access mode, preventing trunk negotiation.
! - switchport nonegotiate: Disables DTP on this port, even if it were in dynamic mode (belt & suspenders).
! - switchport port-security: Enables port security.
! - switchport port-security maximum 2: Allows only two MAC addresses (one for the PC, one for the VoIP phone).
! - switchport port-security violation restrict: If more than 2 MACs are detected, packets from unknown sources are dropped, but the port remains up.
! - switchport port-security mac-address sticky: Dynamically learns MAC addresses and adds them to the running configuration.
! - spanning-tree portfast: Speeds up port transition to forwarding state for end-devices.
! - spanning-tree bpduguard enable: Prevents unauthorized devices from injecting BPDU frames, which could disrupt STP.
This configuration ensures that the port will *never* form a trunk, it will only allow traffic for VLAN 10 (untagged) and VLAN 30 (tagged), and it will only permit a maximum of two MAC addresses. Any attempt to introduce a third device or force a trunk negotiation will be blocked or cause the port to shut down (depending on the violation mode).