Wow, I wasn't expecting so many people to come today. So, hi everyone. My name is Kevin Figueroa. I've been in the computer security industry for seven years now. I've consulted at numerous financial institutions and different media companies. So, our talk today is going to be on VLAN and Layer 2 attacks and why they're still relevant today. I'm going to hand it over to my brother right now so he can introduce himself. Hi, my name is Mark Figueroa. I'm the founder and senior security consultant at MAF Consulting Inc. You can check out my bio on DEF CON.org. Thanks for coming. So, the reason why we chose to do this research was because many of the things that we've done in the past is because these small and mid-sized businesses are still using older type of equipment and also because misconfigurations. But this slide right here shows that there was a report last year by CSI and FBI survey report that showed there was 19 different attacks that estimated at $66.9 million. Out of those 19 different attacks, nine of those attacks could possibly be of Layer 2. So, on this slide, this is the type of equipment we used. We used 3,600 routers, 2,600 routers, 2,900 catalyst switches, 3,505 catalyst switch, 4,006 catalyst switch, and some Wi-Fi equipment. We'll go through the different type of attacks that we went through, but as for the tools that we used, I'll give a brief rundown of the name of the tools and how we did it. And what they do. SCAPI is a packet generating program, really, really good packet generating program. It has many other functionalities, but we chose to use it as for doing packet generation. Yesenia is an attack tool to attack different type of protocols against the network. MacOF sends random Mac generation to different type of switches. We also used TCP Dump and Eat the Real, aka Wireshark, to do our packet sniffings, and Cain and Abel to capture username and passwords. We also used Eatercap in order to do our ARP spoofing. So, on this slide right here is a portion of our little lab. I got my little... Oh. Okay, so over here, these are two 3600 Cisco routers. We have two 2900 Catalyst switches, and this big one down here is the 4006 Catalyst switch. A lot of this equipment we got, and astonishingly, from dumpster diving, and also some loaners that we got from different companies, but I'm going to pass it over to my brother so he can explain exactly how we got all this equipment. So, the first thing, 90% of our equipment was given to us by Fortune 500 companies. When looking for equipment, you want to look from within your company. Make sure you're best friends with your NOC team, your network manager, because they're the ones who usually throw away their equipment. Credulous is... Yeah. Credulous is another great way to get equipment. On there, they have a link called Curbside, which they advertise that they're going to put equipment like routers, switches, and servers out on the street at a certain time, and you can go over there and just pick it up. Another thing, what I like about Craigslist is the PIX firewall that I purchased was only $100, and the thing was, I went to the gentleman's house, told him to boot it up, run some configs on it, reboot. If you go to eBay, you view pictures, and then when they send it to you, like I bought a Switch, it came to me shattered, so never again. Almost forgot. If you want to see the rest of our lab, you could go to securityresearchlab.ning.com. It has all of our equipment, from PIX firewalls, to routers, to servers, everything. Is Layer 2 attacks out of date? Some people say no, some people say yes. When my brother came to me with this research, I was like, why are we even looking at Layer 2 attacks? It's about four years old. I don't want to look at this. Let's look for zero days and new vulnerabilities that come out, and he's like, wait, wait one second, man. Just look at the research I presented, and then I see these small and mid-sized companies that are still vulnerable to these attacks. That's it. Well, many of us have heard by now that an attack occurred in the beginning of June against Metasploit.com. And our poison attack redirected traffic to a known Chinese website, right over here. Right here. So when you went to Metasploit.com, it redirected to Sunware.com, which then pointed and gave an example here, showing. And the Adidas slogan says it best, impossible is nothing. When you are a target, you will be attacked. And that's why we have, right here, Metasploit.com. Metasploit.com being a target. The problem is that, lately, more and more security teams focus on the current threat, and the older styles of attacks are being pushed to the back burner and being overlooked. And every month, there's new vulnerabilities, as you guys know, that come out every month from Firefox, Microsoft, everything. So back to the basics. ARP attacks. Skillful hackers lie, well, both to machines. And to hackers. And to people. Social engineering involves tactics like posing as a company employee. Lying to machines involves lots of different techniques. ARP poisoning is an effective way to intercept, sniff, hijack DOS network connections. It is the most effective way of hijacking sessions because it allows the attacker to see incoming and outgoing communication, as you're going to see in later slides coming up. But I wanted to make a point. That on bullet point three here, H.D. Moore stated that the other 250 servers of the ISP that was hosting the other 250 servers were still vulnerable after Metasploit fixed their issue. So it's two things. Either they didn't care about the other 250 servers, or they just said those other 250 servers can't be attacked. Either way, I wouldn't host my website with them. So, I'm going to go ahead and do that. So, here you see a simple diagram of ARP's proofing. Corporate executives and managers still think that this attack can't happen to them. Until they're on the front cover of the Wall Street Journal, or any other media outlet like Security Focus, and then they say, oh shit, I should have did it. I should have fixed it. But by then it's too late. You're already on the unemployment line, and you're looking for a new job. Now, you could easily perform this attack with Eatercap. The attack is not going to happen. The attacker will spoof server B. Server A, when he sends traffic over to the attacker, the attacker will intercept it and then redirect the traffic over back to server B. Now, all right, the fun begins. ARP attack demo. Most people could show this easily with Eatercap, but since we're in Las Vegas, the show capital of the world, we're going to perform this and simulate this attack and perform this live. So, we need a volunteer in the audience, preferably a girl, yeah, and especially that likes money, because that's what we're doing here. We're giving away money. Nobody wants money. And now... There you go. Come over here. Come up. All right. We got a brave soldier. We got a brave one here. Sit right here. Sit right here. Sit right here. Sit right here. Sit right here. Sit right here. Sit right here. Sit right here. It's all right. What's your name? It's Lisa. Lisa. We have Lisa. Give Lisa a round of applause again. All right. So, remember that last diagram we did? Sure. The last diagram. She is server B. I am server A. And this gentleman right here is the evil one. He's the attacker. So, I have some confidential data. Ten dollars. That's it. And I'm going to transfer it over to her. Here you go. Reach that. that. Oh, he just ARP spoofed you. He snatched your tag. Oh, man, you're going to let him do that? But you know what he's going to do? He's going to be nice, because he's going to redirect and forward the traffic, forward the traffic and give her $5. All right, so now I'm going to send $100 your way, the big money. And this is going to have all the credit cards from HR, all the information, social security numbers, all the important stuff. So now you can have this. Oh, couldn't get it. Couldn't get it. And he's going to switch the traffic and forward it on to you. Negative, negative at the crowd tables tonight. So give a round of applause. You got some money. Thank you. So I'm going to start. How do we mitigate these risks? Non-changing ARP entries, please don't waste your time, it's unmanageable, too time-consuming. DHCP snooping, we cover it on some later slides, but ARP Watch, it's an open source software that monitors a network for ARP activity. It generates a log of IP address, MAC address pairings, along with a timestamp when the pairing was seen on the network. And plus, it's free. And if it's free, it's all me. So switches maintain a list called cam tables that maps individual MAC addresses on the network to a physical port on the switch. This enables it to only send data out the physical port where the recipient compute is located. In a typical MAC flooding attack, the switch is flooded in packets. Each containing different source MAC addresses. The intention is to consume the limited memory set aside on the switch to store the MAC addresses in the cam tables. And this is where you see right here, the yellow is the cam tables. Now the result of the attack causes the switch to go into a state called failed open, which you can see incoming and outgoing traffic, and it's broadcasted to all ports instead of the correct port. And here, you see a regular switch sending data from P1 to P2. And on the right-hand side, you see where the attacker sends the traffic on, floods the cam tables. And now when P1 sends data over to P2, the attacker as well gets it as well. So I chose MAC-OF. Oh, I'm sorry, Kev. We chose MAC-OF. Thank you. We switched with random MAC addresses, causing the switch to fail open in repeating mode. This is when you should be running your sniffer. Now, this attack is as easy as opening up a terminal, typing in MAC-OF, and then you start flooding the network with those packets. The result of the last slide caused the switch to bleed out, in which all incoming packets are broadcasted onto the switch, as with the hub. Such different programs like Wireshark. And the one that we used, Cain and Abel, capture sensitive data from other computers like unencrypted passwords, emails, instant messaging, conversations, which would not be accessible if the switch was operating normally. Now, the mitigation of MAC flooding and cam tables is the same as ARP attack. So more advanced switches, such as Nortel or Cisco, can be used. It gives you the opportunity to set up protection against the attack, limiting the MAC addresses to a dedicated port. You can also set up a policy that if the MAC address appears on the network, it shuts it down, the fault is to shut down the port, write a log, and email the admin. Now it's up to the admin to do what he needs to do to mitigate the issue. Now, the DHCP starvation attacks. We're going to talk about the DHCP starvation attacks. This works by broadcasting DHCP requests with spoof MAC addresses. This is easily achieved with programs like Yesenia or Gobbler. If enough requests are sent, the network attacker can exhaust the address space available to the DHCP servers. Here you see Yesenia broadcast DHCP requests with spoof MAC addresses to exhaust the DHCP server IP pool. And you could just launch the attack. Hit a radio button that comes up, and then you see the request being sent on the network. It's as easy as point and click. So here you see the result of the DHCP starvation attack. The Microsoft DHCP server crashes, and the attacker can implement the rogue server, and then route all the traffic through the attacker. And this is scary, because if this happens at 2 o'clock in the morning, you're going to have to restart this server. And I don't know an admin at 2 o'clock in the morning that's dedicated to go on, log in, and restart the servers. So DHCP demo time. Now like we said, we're in Vegas, and we're not going to do this on screen. We're going to make everybody a participant here. So we're going to be the DHCP servers. The chips that we got from the Riviera are the IP addresses. So you guys got to request them. But I see this guy right here. I see them requesting. Who's requesting? OK. Hold on. Hold on. Just request them. Raise your hand. Oh, but I see this guy Maximus over here. Don't worry about that. So we got this guy Maximus here, this hacker right here. He decides to open up Yesenia. And he's going to run a DHCP starvation attack. Now. When he raises his hand, the DHCP starvation attack is going to start occurring. So raise your hand. Raise your hand. Raise your hand. Raise your hand. Raise your hand. So now. he just ran the attack there's no more IP addresses we don't got no more IP addresses here but as you can see my brother's walking off stage and he is the rogue server so he's handing out IP addresses right now and now who wants to request more IP addresses well he's supplying them you ran out alright hurry up hurry up we only got 50 minutes man alright so now what we gonna do everybody who received the chip the $100 chips we was just giving out no the other ones those are Riviera chips we just we just gave out $100 chips right now come up and get your money come up and get your money seriously the people that I gave out the chips anybody want your real money anybody want real money the first set of chips was real the $100 chips come up and get your money now look at the attack works right he's the rogue server the default gateway is over here fellas the default gateway go ahead give out the chips yup so all all the chips that's exactly what happens the rogue server alright DHCP snooping monitors and restricts DHCP requests DHCP snooping monitors and restricts DHCP requests and again if you guys got the capital make sure make sure you buy better switches and better equipment pony up the cash so the most obvious risk is associated with CDP is information leakage CDP communicates amongst one another via clear text and unauthenticated by claiming to be a phone an attacker can reserve some electrical power denying other valid devices from receiving power from the switch another CDP attack that is still relevant is a vulnerability in Cisco IOS 12.1 and 12.2 which handle CDP announcements you can consume all the device memory available memory by sending large amounts of CDP neighbor announcements to the device so here we ran a test on this attack we were running Cisco IOS version 12.0 and it was vulnerable to the denial of service attack while residing on the same network segment as a targeted device we flooded the device with CDP neighbor announcements to consume all available memory and cause the device to crash and here you see the memory allocation over and over and this is when we ran the attack up here now we had to restart that switch for it to start working again now not much could be said about CDP attack except turn the shit off if you don't need it turn it off the question arises is why CDP is enabled on a network on the first place IP phones are very popular in today's network so CDP is used to order in order to determine the actual power of the device I know it uses skinny as well so STP attack the idea of STP attack is to fool a network composed of several switches by forcing all switches to forward packets to the attacker machine in order to do this the attacker must send a BPDU packet advertising the root bridge to the switch where the attacker is connected to here are some of the attacks that you could run on STP now here you see Yesenia sending a configuration BPDU DOS attack and also you could use Yesenia to claim the root role which is up here this radio button here once you run the root attack Yesenia sends a BPDU every two seconds with the same priority as the current root bridge but with slightly numerically lower MAC addresses which ensures victory in the root bridge election process STP mitigation you can disable STP STP is not needed in a loop-free network STP is not needed in a loop-free network another thing is you can enable root guard the root guard feature ensures that the port on which root guard is enabled is a designated port and here are some examples that you can run on a Cisco switch so thanks guys I'm going to turn it over to my brother Kevin let's go so the next attack that we're going to speak about is multicasting and brute force now once again I know that newer switches prevent this from happening but like I said at the beginning of the slide these attacks were meant for older switches like 3600s and 2600s so the way this attack works is by sending a storm of layer 2 multicasting frames out to switch so the way this attack works is by sending a storm of layer 2 multicasting frames out to switch one of the things that we noticed the most once we did this was of course a denial of service attack but it also leaked other frames into other VLANs so one of the ways that we know to combat this is of course upgrade your equipment but due to the fact that the economy is so bad there isn't a lot of budgets for companies in order to want to go and do these upgrades so they suffer the consequences another thing is to make sure that you put ingress filters on your VLANs to try to prevent leakage going into those other type of VLANs the next attack that we tried out was the VLAN trunking protocols VTP as we know that VTP is a proprietary Cisco protocol and it was meant to make sure that the VLAN trunking protocols make administrators life a hell of a lot easier but at the same time that it made their life easier it made us hackers a lot easier to break into their network using this type of attack as my brother explained and you've seen in the earlier slides that Yesenia is a point and click program my mother's right here in the front I can easily show her how to run this attack yeah mama one of the things that I like about Yesenia is that it's easy to run this attack how I could easily add a VLAN onto a switch by using this type of protocol now I know that most of you are wondering why is Donald Trump's picture at a hacker conference who said that? come up here right now you see I was going to come out and give you money for that nice answer you see I was going to come out and give you money for that nice answer but because he used me as a bitch you know that's totally cool have a seat man so once again yeah if you use this type of protocol chances are and you get attacked using this protocol chances are your boss is going to come in and say you're fired you know but if you do have to use this protocol make sure that you use MD5 hashes and also in combination with it like a password so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack so it makes it a bit easier to run this attack via a switch from switch to switch and there was a router in the middle of course that traffic is going to be passed over through layer three so putting that aside for one second i just want to speak about scappy a couple of months ago a friend of mine's introduced me to this program i really got addicted to this program and the reason why i got so addicted to this program was because it is so powerful in order to generate your own type of packets and manipulate your own packets the way you feel so at the same time a couple of months ago as i got introduced to this i had a client and i was i was browsing the internet i came across this picture and i was like wow this is the way the client is pretty much set up so down in lower manhattan they had a pop and it In midtown Manhattan, they had their central office, and they had satellite offices throughout the United States. So they asked me to come in and check out configurations, do some pen testing and stuff. So what I did was I jacked a laptop into this switch right here. Of course, there's a firewall, but I wasn't gonna do any graphics on it. So I jacked into this switch right here and used Wireshark and also TCP dump and snort. And as I started capturing traffic, I started capturing 802.1Q packets. Now, how many people out here use Wireshark? Okay, so you know if you capture a packet on 802.1Q, you click that little down and it's gonna show you the VLAN ID numbers. So using SCAPI, you can start manipulating your packet to do other things, and I'll show you later on in the next slide. So first, in order to mitigate this type of attack, the best thing to do is set up access lists correctly. God knows how many times access lists are misconfigured, and it's very, very important to set those up. So the next piece is the VLAN hopping portion of this. Of course, in order to do VLAN hopping, you would need to know the VLAN ID. And again, using SCAPI, you can easily set up SCAPI to do two 802.1Q packets inside one packet. So going back to that other picture that I showed you, I'll just try to break it down a little bit. This was the switch that I jacked into, this was me, and I started capturing information about HR, their DMZ, and other different type of departments. So I was really, really curious if this VLAN hopping stuff was gonna work. So I was like, okay, let me go and use SCAPI. Lo and behold, I got into HR and a lot of HR information. I was able to view a lot of HR information, a lot of accounting information, and stuff that I should have never been able to see. So the way to mitigate this type of stuff, is make sure you disable your trunk ports. Auto trunking, sorry, excuse me. Disable auto trunking. And also, sorry, I'm getting a little nervous now, I don't know why. Also, make sure that any ports that are not used on a switch, disable them. Because if not, you're gonna, and you have, say, if you have auto trunking enabled, and there's a port that's not being used, they can easily switch that trunk port over to that port not being used, and there goes your miscommunication and misconfiguration, and you can do really bad things to it. So the last piece to this three-part was the double encapsulation. Like I said before, all VLANs carry that VLAN number and VLAN ID. So most of the information about the VLAN is inside that 802.1Q packet. That also ensures that information going from one VLAN to another isn't dropped or lost, and knows the exact direction in which way it's going. So right here, is a little diagram of me using SCAPI. I wanted to put more commands and stuff, but I didn't want to chew up a lot of time. So over here was where I was at. This is a packet, and I decided to put these two 802.1Q packets. So right here was the original VLAN, and this was a VLAN that I spoofed. So right here was the original VLAN, so as you can see, I went, I sent out this traffic, these two, a packet with two 802.1Q packets. It wind up going over to this switch. The switch strips the first 802.1Q packet, sends it off to the second switch, and the second switch believes that that came from this first switch. So then it let me bypass, and that's how I was able to attack the HR department. And I don't know why this doesn't happen often. So a good way to ensure that this type of attack doesn't happen is ensure that native VLANs aren't assigned to any ports. Another way is to force all traffic to carry only one 802.1Q packet. is the vmps vqp now i don't know why people still use this this makes a network really really easy to go and attack it and the reason why it makes it quite easy is because the information being passed to the vmps server is over udp and clear text so of course if you're running any sniffer programs and stuff you're totally able to see the information and launch different type of attacks from here and one of the ways that vmps sends over the information is by vqp so a good way to mitigate this type of attack is take your vqp and make sure it's on an out of bandwidth out of band basis or don't use it at all and if you do have to use it that means you have the resources and a budget in order to monitor this stuff to prevent different type of attacks from happening so last but not least is our conclusion to this there are a lot of different ways in order to go and prevent these type of attacks from happening but most importantly and i want to all use to keep in mind is that i know these attacks are dating back to 1999 and 2000 but if they're dating back to those dates then why are they still happening today especially to different isp companies and things that everyone's seen out on the news so one of the good ways to go and prevent and which is really important is this bullet point right here make sure that you take your snmp and take the community screen string and you make sure that that is like a pat a root password you want to protect that because i see that a lot of different type of attacks could happen using this so in conclusion i'm going to hand it over to my brother and let him close up any of any comments or anything that he wanted to see a moment a big announcement you're gonna miss a big announcement about a party but go ahead it's all right it's okay you'll be back but uh we launched a website around two or three weeks ago called the security research lab and it's basically for the community it's almost a social networking site only for security Go up, sign up, and the first 1,000th person is going to get a real big chunk of money, not this dollar stuff. So that's a prize we're giving out. Another thing, on our website, you could definitely take a look at the presentation, update it. And my brother put out a 200-page paper, 105-page paper. We're going to post that up on that website as well. And you could definitely e-mail us at MAFconsultant or K&T. And any questions, or we could take this to the breakout room. I'm not too sure, but Kev, do you have any more? Not at all. Does anybody have any questions? Oh, by the way, wait, wait, whoa, whoa, whoa. Penthouse party tonight. All right? Penthouse party. My boy here, we flew him down from New York, DJ G, Bo the Pro. So we have a DJ. We got the DJ equipment. A lot of liquor. I know you have a lot of chicks over there that do. Make sure you invite all your girls. Exactly. Make sure you invite all of them. Hello? Gentleman that had their hand raised, you said you had a question? Yeah. Thanks. Listen, the guy that's saying, my man, if my mother's here, man, calm down with your language. If not, you can wait for me afterwards, you know? Easy, killer. But also, pertaining back to the DMZ stuff, yeah, quite easy and stuff. All right. Any other questions? No. See you at the penthouse. I know, I know.