Network 板


LINE

http://www.itarchitect.com/article/NMG20030305S0007 Although many networkers have come to think of switches with Virtual LAN (VLAN) capabilities as security mechanisms, this mindset can result in serious security problems. It's true that VLANs make it possible to isolate traffic sharing the same switch or even groups of switches. But switch designers had something other than security in mind when they added this form of isolation to their products. VLANs work by filtering and limiting broadcast traffic. Unfortunately, they rely on software and configuration to do this, not the physical isolation that security advocates like to see. In the last couple of years, some firewalls have become VLAN-aware, meaning that policies can be created to match a packet to a particular VLAN based on its tags. While VLAN-aware firewalls add a lot of flexibility to Web hosting sites, these tags that firewalls rely on aren't designed with security in mind. Devices other than switches can create VLAN tags, which can easily be added to packets to fool the firewall. How exactly do VLANs work? What, if any, security advantages do VLANs hold? And if you do decide to use VLANs as part of your security architecture, how can you minimize their weaknesses? In this column, we'll examine these and other questions related to VLAN security. PARTITIONS The term "switch" denotes a device that switches network traffic between interfaces called ports. But not too long ago, LAN switches were called bridges. Even today, IEEE standards pertaining to switches inevitably use the term "bridge." Bridges are used to connect segments of the same LAN-that is, a local network that doesn't require routing. The bridge software learns which ports connect to which network devices by examining the source Media Access Control (MAC) addresses in the packets that it receives. At first, the bridge distributes all the packets to every port. But over time, the bridge learns to send packets out the correct interface by building spanning trees, tables that map MAC addresses to ports, via an algorithm developed for choosing the right interface and avoiding loops. By sending packets out on a single port, the bridge reduces network traffic. Think of a bridge as a highway that connects different roads but only passes necessary traffic between those roads. Although bridges reduce overall network traffic, making networks more efficient, they still need to send broadcast packets to all ports. Just as in any LAN, broadcasts mean just that: a message broadcast to all systems. Address Resolution Protocol (ARP) packets are an example of broadcast messages. As bridge hardware grew more capable, with an increasing number of ports and the addition of management software, a new feature appeared: You could partition a bridge, splitting it into multiple, virtual bridges. When split in this manner, broadcasts are limited to only those ports associated with the virtual bridge and its VLAN, as opposed to going to every port. Limiting broadcasts to a VLAN doesn't, in itself, seem to prevent a system on one VLAN from hopping to another VLAN-that is, contacting a system on the same bridge, but a different VLAN. But remember that ARP broadcasts are used to acquire the MAC address associated with a particular IP address; without the MAC address, systems can't communicate with one another on the same network. Routers and layer-3 switches support passing traffic between VLANs. Overtime, some began to consider switches as security devices rather than networking devices. Switches do make sniffing traffic destined for other systems more difficult (but not impossible). And they also produce a software-based isolation between VLANs, though that isolation is imperfect at best. A document from Cisco Systems's Web site (see Resources) describes two scenarios in which packets can hop VLANs-that is, pass between two VLANs on the same switch. In the first scenario, systems establish TCP/IP communications on the same VLAN; then the switch is configured so that one of the switch's ports now belongs to a different VLAN. Communications continue between the two systems because each has the MAC address of the other in its ARP cache, and the bridge knows which destination MAC address is directed to which port. In the second scenario, someone wishing to hop VLANs manually enters a static ARP entry for the desired system. This requires that the person learn the MAC address of the target system, perhaps through physical access to that system. The problems described in these scenarios can be alleviated by using switch software that removes the information necessary for passing packets between VLANs. In higher-end Cisco switches, separate spanning trees exist for each VLAN. Other switches either have similar features or can be configured to filter the bridging information available to members of each VLAN. Given the relative dearth of information about the issue, hopping VLANs within a single switch doesn't seem to pose a serious problem. TRUNKING Multiple switches can share the same VLANs through configuration and the tagging of packets exchanged between switches. You can configure a switch so that a port acts as a trunk-an interface that can carry packets for any VLAN. When packets are sent between switches, each packet is tagged based on 802.1Q, the IEEE standard for passing VLAN packets between bridges. The receiving switch removes the tag and forwards the packet to the correct port or, in the case of a broadcast packet, the correct VLAN. These four-byte 802.1Q tags are added to Ethernet headers right after the source address. The first two bytes contain 81 00, the 802.1Q Tag Protocol Type. The last two bytes contain a possible priority, a flag, and 12 bits for the VLAN Identifier (VID). VIDs can range from 0 to 4095, but both 0 and 4095 are reserved values. The default value for the VID is 1; this is also the default value for unassigned ports in a switch configured with VLANs. According to Cisco's default configuration for its switches, trunking is designated as "desirable," and a port can negotiate trunking if it discovers that another switch is connected to that port. By default, a trunk port belongs to VLAN 1, which is called its native VLAN. But administrators can assign trunk ports to any VLAN, and putting them into a VLAN of their own is a good idea. In 1999, David Taylor posted information to BugTraq about tests he'd run using Cisco switches in an attempt to force packets to hop VLANs (see Resources). Taylor first used VLAN tagging to hop VLANs within a single switch, without success. The VLAN tags really have no purpose except for carrying VLAN information between switches, and they're ignored if presented on non-trunk ports. But when Taylor used two switches, he could force packets to hop VLANs under certain conditions. Just as in the previously mentioned example from Cisco documentation, the MAC address of the target system had to be known in advance. The other key condition was that the initiating system-the "attacker"-must belong to the same VLAN as the trunk used to connect the switches. In Taylor's first attempt, the attacker and the trunk were both in VLAN 1, and the target in VLAN 2. -- ╴╴╴╴╴╴╴╴╴ telnet://ucd.twbbs.org 无情谷 ▌ █ ▌ █ ▕ 无情谷 ▃▃▃▃ ▃▇▃ ▃▇▃ ▃▇▃ ▃▃▃▃  ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ =====> [作者: liwei 来至 UCD.TWBBS.ORG] --



※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.111.84.233







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:e-shopping站内搜寻

TOP