start	end	text
600	3920	Hey, what's up? I'm Jason. It's great to be here.
3920	6900	I'm super passionate about Voice over IP security.
6960	7980	This is Arjun.
10860	13300	I'm going to tell you... I'm going to start off with a quick little story.
13300	15820	And it's the reason why I like Las Vegas so much.
16300	18260	We were here last month.
18260	22080	Viper spoke at SansPenTest Summit on Voice over IP pen testing.
22380	28500	And only in Las Vegas do I get taken up onto the stage
28500	30040	of Cirque du Soleil's Humanity.
31780	35660	And little did I know that they were going to try and take off my pants.
36540	37480	The girls.
37480	39680	That's not a bad thing when girls want to take off your pants.
39680	42940	But lucky for me, I wasn't wearing any underwear.
43120	44760	So I kind of escaped that part.
44760	46380	Lucky for the audience as well.
47000	49100	So I was telling the Sans guy this story.
49100	51540	And it was kind of funny because they nicknamed me Commando.
51540	56540	And it was Paul Asadorian with Paul.com security.
56540	57880	I hope he's in the room.
57880	60340	But anyways, Paul.
60340	62080	So he called me Commando.
62080	64080	So I think that's going to be my new handle now.
64080	64940	Commando.
74570	79810	So Paul, wherever you are, I want you to know that I'm going Commando for this talk.
79810	81450	In your honor.
82610	84170	So let's get started here.
84170	86210	We've got a lot of stuff to talk about.
86210	89790	I'm going to go really fast at the beginning on the overview of UC.
89790	92230	And then we've got three really cool demos to do.
92230	95990	We're going to talk about an intro to some of this video stuff that we're talking about.
95990	100950	And if you guys stick around to the end, the last ten minutes, we're going to have some awesome really cool pen testing stuff.
101050	104230	Lessons learned and tricks that we learned here a few weeks ago.
108340	111720	So VIPER stands for Voice over IP Exploit Research.
111800	117240	And really all we are is we're a highly specialized pen test firm dedicated towards UC and Voice over IP.
117360	124260	We do structural research on generic implementation of VOIP and finding vulnerabilities in VOIP protocols.
124260	128180	But it's basically penetration testing and then our research around this.
128860	132040	We built a real production enterprise network.
132040	134060	It's basically Cisco of I and Microsoft.
134160	136800	And what we do is we go in and we do the pen test with the customer.
136880	138480	We learn more about the configuration.
138480	139800	We recreate it in our lab.
139800	143600	And then we're even more effective in our pen test and our research feeds into that.
144340	146040	So obviously this is Arjun here.
146040	146920	I'm Jason.
146940	148440	We're VIPER team members.
149100	151400	This is our lab actually in Dallas.
151400	154020	And like I said, we have a Cisco network IPS.
154020	156860	We do all types of VOIP exploits through the network IPS.
157280	162840	We have like Cisco of I and Microsoft phones and video phones and so forth.
163520	165260	So UC definitions.
165780	172420	At first it was the first marketing buzzers was a converged convergence, which was voice and data over the same pipe.
172460	173420	I added that.
173420	176780	My definition of unified communication is just adding video into that.
176780	180500	And we also have presence as well.
182200	184220	So this is just a simple slide.
184320	185800	Why do we do what we're doing here?
185800	188880	We're publishing these free assessment tools for education and awareness.
188880	194260	Because we believe that the only way to show people that VOIP attacks are for real is to actually demonstrate it to them.
194260	196500	And the way you do that is you use security tools.
196760	201940	We enable security professionals to test the network to show the customer the risk of VOIP.
202060	208300	And we also enable VOIP owners, like people deploying VOIP, to test the network themselves so they can see the risks.
208300	213800	Because they're really the ones that have to make the risk decision if their risk tolerance level will accept that risk.
215260	218360	So let's look at some real-world business examples.
218360	220200	And we're talking about IP video here.
221300	227260	So private IP video calling between users, like the CEO calling the CFO.
228140	230140	Telepresence or video conferencing.
230460	233500	IP video surveillance, which we're going to take a close look at.
233500	235820	Then there's these video streaming applications.
235820	239620	And it's really interesting to study these.
240280	244680	And we welcome you guys to come to us if you've seen stuff, because all this stuff is new in the market.
244680	246940	And we're just now seeing this come out.
251270	253830	Okay, so here's a business case.
253830	259250	We're just taking a quick look at what is driving these video rollouts.
259890	264510	So saving money, going green, not having to save on travel costs.
265710	271190	Wachovia, as a result of their telepresence solution, cost cuts.
272290	275950	And then IP video surveillance, we're kind of taking a look at these video analytics applications
276510	285150	that you can do user-driven analysis, automated, on DSPs and coprocessors that are on the video surveillance cameras.
287090	296890	Okay, on the IP video streaming applications, we have America's team, the Dallas Cowboys.
297130	300090	Brand new stadium, awesome.
300310	304390	And we've got a lot of stuff in the press about the Dallas Cowboys.
304390	306190	They have an all IP video network.
306190	309170	It's this new Cisco Stadium Vision technology.
309390	311530	Cisco's partnered up with the Dallas Cowboys.
311530	318750	And supposedly every single IP TV, the video boards and everything, all has an IP address.
318750	321710	So what does that mean for us? A lot of fun.
322930	332250	Now the Cisco Stadium Vision is like targeted revenue streams where they can customize the whole view of all the IP phones and all the IP TVs.
332270	338710	They can customize that for whatever the event is, if it's like a Cowboys game or if it's like a concert and so forth.
340510	344750	The two 60-yard long HDTV video boards are the largest in the world.
345330	348510	$40 million, they're manufactured by Mitsubishi.
350170	352730	Yankee Stadium is also doing this as well.
353590	354990	Toronto Blue Jays.
357010	360710	Okay, let's take a look at some example UC attacks.
365000	370120	Now we're looking at is the video replay attack where we can replay...
370120	371680	Thank you, Coop.
372560	373680	Appreciate that.
373680	377900	What's your blog website again? Heycoop.com?
377900	379720	Check it out. Good guy.
380340	387860	Video replay, we can do a video replay against an IP video surveillance system by placing a safe video stream and creating the blind camera.
388740	391720	And then while the bad guys are sneaking in and doing the bad stuff.
391720	395140	We can also... we've actually seen some people do this.
395780	401020	We can record the CEO in the middle of like a conversation.
401140	408080	We had one guy use UC sniff to do this and he showed his CEO that he had recorded the live conversation.
408080	409480	But you can actually replay that.
409480	418120	So imagine if like in the middle of an important conference call, there's like a previous conference call from two weeks ago and the CEO is like saying the same thing.
418380	419640	A little strange.
424080	428880	Okay, IP video hijack. We're calling this video interception, video denial of service.
428880	432620	So we're intercepting the video and then we're replaying whatever we want.
432620	440080	Whether it be replaying a previous like AVI or taking a random AVI clip and playing it against the target video session.
442060	445320	And then we have the video eavesdropping example that we just talked about.
449890	450850	Okay.
452590	455390	I want to do like an overview of UC sniff.
455390	457870	UC sniff is our next generation VoIP sniffer.
458170	463330	And I want to walk through like what's the progression of UC sniff and what's happened with UC sniff.
463430	470290	First of all, there's no other security software that can decode G722 audio codec automatically.
470350	478810	If people try and use Wireshark and Ettercap when they're doing their VoIP sniffing in a pen test, you're limited because you can't actually reconstruct G722.
478810	487450	This is the first security tool that does G722, which is the new codec that's showing up in all the new AVI and Cisco networks.
488190	502090	Also, UC sniff, the very first, we released this right after TorCon, combines a man-in-the-middle art poisoning, automatic VLAN hop, and auto constructs forward and reverse into a single WAV file for both G711 and G722.
502090	503730	All of this done automatically.
504470	507750	Another thing is we have a target mode that we introduced.
507750	509190	And we've done this in a pen test.
509190	512250	We can actually intercept Cisco Unity voicemail passwords.
512250	514130	We can steal voicemail passwords.
514290	517850	And we do that by intercepting the skinny keypad button messages.
518510	525170	So the design of UC sniff is a little different because we basically combine the signaling and the media together.
525170	530850	We don't actually start eavesdropping on the RTP media until we've detected that a call has started via the signaling.
530850	535030	So we use SCCP or SIP to detect that that's started.
535030	538790	Then we close down the RTP dissector after we know that the call has ended.
538970	544650	The result of this design is we can tell who is calling, not just random IP streams.
545370	555870	We can actually, if you see the screenshot here, we can reconstruct who's tied into the corporate directory, like the CEO is calling someone else.
556690	560650	And in security testing, the reason why we did this is time is money with pen testing.
560650	565850	And I don't want to spend a lot of time trying to search through WAV files and so forth, trying to find what I'm looking for.
566690	574370	So another new feature of UC sniff, the very first feature with 1.0, was we actually mimic the entire behavior of the phone,
574370	579290	and this is the phone on the left, to download the corporate directory, and we load it into memory of the tool.
579290	586170	So we're actually targeting corporate VoIP users based on their name or their directory entry in the corporate directory.
587430	592790	Now, UC sniff 2.0, when we released this February, is the first ever IP video sniffer.
592910	595350	So there's no other tool out there doing that right now.
595390	600750	We decode the H.264 video codec, which Arjun is going to go into in detail.
601470	604330	So we didn't stop there. We're going to keep on going on this.
604490	611270	April 2009, we released another version that could eavesdrop on Microsoft OCS IM conversations.
611270	614270	Because they use the SIP subscribe message.
614310	619130	We have support now for Avaya SIP as well. We stress tested that in our lab.
619250	622410	We've actually enhanced the ARP poisoning with Unicast ARP requests.
622410	626770	We're going to talk about that in a second. And now we have support for G711 ALOG codec.
627550	631070	So the gratuitous ARP thing is really, really, really cool stuff.
631370	636410	We actually were researching and we found that like these nice 7985 video IP phones,
638470	642810	that we couldn't actually ARP poison them unless we sat there with UCSIP for 10 minutes.
642810	646050	So we designed like Unicast ARP requests, which actually speeds it up.
646050	650330	Now we can do ARP poisoning like immediately. We just hit a button and they're ARP poisoned.
650430	654210	We found the same thing with Avaya IP phones. They actually don't advertise a feature.
654210	658970	But you cannot ARP poison Avaya phones at all unless you use Unicast ARP requests.
660630	665310	But also we ran into a problem because the unified IP phones have a GARP disabled feature,
665310	669490	which we're going to talk about here at the end. And that really kind of stymied us in a lot of things.
669910	672750	So UCSIP 3.0, I'm going to get into this in a second.
673470	678670	We have a GUI now. We have a Windows port. We have Windows VLAN support, thanks to Arjun.
678790	685370	We're working on a real-time video monitor where you can actually like eavesdrop live and see like both ends of the reverse and forward video.
685910	689450	We actually built Cisco UCM 7.0 and 7.1 support.
689490	693790	That was not even like... it didn't work at all in the old versions of UCSIP.
693790	697470	So we're going to release this in a second. All the new deployments are 7.0, 7.1.
697470	702510	And then we have GARP disablement bypass. I'm going to run out of time here.
702850	706710	GARP disabled is the feature that I was telling you about.
710510	719230	Okay, so GARP disabled is basically preventing us from ARP poisoning the connection from the phone to the network.
719230	724190	We can still do the network to the phone, but when this feature... and this is the default now in new deployments.
724390	729550	So you're basically... unless the phones are on the same VLAN, we're going to get to a second how we defeated that.
729810	733350	But basically, no successful ARP poisoning means no man-in-the-middle condition.
733610	739790	And we can only get the downstream connection coming from a remote VLAN into the phone.
739790	746530	But we can't get any of the... we can't reconstruct the entire media, especially for the phone going to the network in a default config.
748650	755270	So basically, we devised a new feature, and what we did is we're going to beat the race condition on the phone.
755370	765250	Because we can actually predict when GARP is disabled, what happens is the phone will send an ARP request as soon as the two RTP peers, right?
765250	772130	So as soon as the phone... let's say that both phones are on the same VLAN, they're going to send an ARP request right before the RTP media starts.
772130	777330	So we can actually... we've actually programmed UCSIF to look for a message called start media transmission,
777750	782050	which is basically the server telling the phone who the remote RTP peer is, right?
782050	788610	So when that happens, then we know we can actually construct our own spoofed Unicast ARP reply packet,
788610	793050	and we can actually flood both phones, and so that's how we're winning the race condition.
793050	795170	We actually ARP poison the phones that way.
795950	802930	So this is the entire process here, and it's the new feature, it's dash dash GARP disablement bypass,
802930	805530	and that's going to be released with UCSIF 3.0.
806370	811350	So, but with this though, if both phones are on the same VLAN, we can definitely reconstruct the media,
811350	813590	because we can use this feature to beat them.
813590	820130	But the phones, they only send ARP requests when they boot up and talk to the server,
820130	824770	so like when they're talking to remote peers, we can't defeat that right now.
824770	828450	But that's another story, we actually can, but we're going to get into that later.
829230	835010	So, like I just said, we can't, we can only get unidirectional if it's remote peers in another VLAN.
835730	837750	Okay, ready Arjun?
840530	843950	Hello guys, I'm going to talk about the UCSIF development,
843950	847930	and show you a demonstration of IP video eavesdropping using UCSNF.
848010	852030	So UCSNF GUI, we developed it using the juice libraries.
852030	857010	So juice is a C++ class library for developing cross-platform applications.
857030	860750	So it's really good for creating highly specialized user interfaces,
860750	863710	and for handling graphics and sound.
864070	868130	So it's really easy to create a GUI application using the juicer,
868130	871730	because the juice libraries come with an application called juicer,
871730	875290	and it also has some sample demo applications.
875630	880110	So why we selected juice libraries for developing the GUI?
880110	884410	We needed a cross-platform C or C++ application,
884410	889190	so that UCSNF GUI looks the same way in Mac, Linux, and Windows.
889190	894250	So we are working, we are currently working on porting UCSNF to Mac.
896050	898110	So UCSNF Windows port.
898110	902710	So we ported the UCSNF Linux code to Windows using the MinGW.
902710	906010	So MinGW stands for Minimalist GNU for Windows.
906010	910890	So basically it ports all the GNU GCC and the GNU binutils
910890	913670	for development of native Windows applications.
914270	917090	So creating a voice VLAN interface on Windows.
917090	921330	So actually creating a voice VLAN interface on Linux is pretty easy and straightforward,
921330	924790	but on Windows we have to follow the toughest procedures
924790	928370	by developing two network drivers.
928370	932650	So we have to develop an NDIS protocol driver and an intermediate driver
932650	935450	using the Windows driver development kit.
935450	941230	So we will be releasing these two drivers as a separate package along with UCSNF.
942130	943870	So what is NDIS?
943870	947850	So NDIS is a Windows network driver interface specification.
947990	957410	So we use the NDIS protocol driver for querying and setting the .1Q tag on the Ethernet interface.
957410	963570	So we can also use the NDIS protocol driver for sending and receiving
963570	965610	raw Ethernet packets on Windows.
965610	971050	It can be used like WebNet, but it's like more programming than using WebNet.
972630	974690	So installing NDISProt.
974690	978470	So we use the open source tool for installing NDISProt.
978470	980030	So it's called Prot Install.
980030	983830	You can see a screenshot of NDISProt getting installed.
985550	987970	So starting the NDISProt service.
987970	990610	So you just need to execute net start NDISProt.
990610	993270	So the NDISProt is installed as a service.
993270	995930	So just started from the Windows command prompt.
996070	1002170	So all the steps will be automated before we officially release UCSNF.
1003030	1004890	So the IAM driver.
1004890	1007490	So what does the IAM driver do actually?
1007490	1011910	So it creates the actual virtual interface for both the wired and the wireless connection.
1011930	1015030	So this virtual interface will be tagged with the voice VLAN ID.
1015030	1017550	And the interface will be a part of the voice VLAN.
1019880	1022080	So installing IAM driver.
1022080	1030260	So we added the support for installing and uninstalling the IAM driver on the open source NDISProt tool.
1030880	1032680	So here's the interesting thing.
1032680	1035100	Decoding video support on UCSNF.
1035100	1039760	So UCSNF decodes the H.264 content from the RTP payload format.
1039780	1044480	So this decoder is compliant with the RFC 3984,
1044480	1049400	which is the specification for the RTP payload format for H.264 video codec.
1049400	1056720	So then UCSNF creates a raw H.264 file format using the decoded H.264 contents.
1056720	1061900	But this video file is only playable using VLC and MPlayer and it does not have any audio.
1061900	1063640	It's only a video only file.
1063740	1068900	So if you have configured UCSNF with FFmpeg library support,
1068900	1073440	UCSNF adds an AVI container to the video files that it creates.
1073440	1078360	And it also muxes audio and video together using the FFmpeg libraries.
1078360	1084380	So this AVI file can be played using any famous or well-known media players,
1084380	1086840	including Windows Media Player.
1087420	1091780	Here's a screenshot of the new UCSNF GUI, just an overview.
1093760	1096300	Here's a very cool animation.
1098830	1102310	So here's a cool animation that shows how UCSNF works.
1102310	1104310	It's pretty simple and very basic.
1104350	1109330	So all you need to do is unplug the phone from the Ethernet wall,
1109330	1110670	plug in UCSNF.
1111350	1114650	UCSNF uses CDP, it's a Cisco Discovery Protocol,
1114650	1119650	for finding the VLAN ID and for creating a VLAN interface.
1120010	1123810	Then it uses DHCP to get an IP address in the voice VLAN.
1124950	1127850	Then it ARP scans and ARP poisons the voice VLAN.
1129110	1131310	So at this point, UCSNF is a middleman.
1131330	1136350	It receives all the traffic from the network and forwards it to the right destination clandestinely.
1137090	1142510	So for any active call that comes through, UCSNF stores the media to a media file
1142510	1144810	and then it forwards it to the right destination.
1145270	1147610	This is how pretty much UCSNF works.
1148390	1153210	So now I'm going to show you a demonstration of IP video use dropping using UCSNF.
1153210	1156210	The targets are the two Cisco 7985 phones.
1157530	1159610	Let me start UCSNF.
1171120	1173020	This is UCSNF.
1173020	1179160	So I'm selecting the interface to VLAN ARP and to SNF the WIPE traffic.
1185600	1188840	I would start the ENDISPORT service if I were to do that.
1197510	1199870	We're going to need a volunteer here in a second.
1214320	1216300	I'm selecting the man in the middle mode.
1216320	1218520	So there is an option to VLAN ARP.
1218960	1224840	So there are like three ways to VLAN ARP, by spoofing CDP or by SNFing CDP or by specifying the VLAN ID.
1224840	1228760	So spoofing CDP is the fastest way to learn the VLAN ID and to VLAN ARP.
1228760	1231200	So I want to download the corporate directory.
1231660	1237400	So in a Cisco network, MAC address of the phone is the authentication token for downloading the corporate directory.
1237640	1245080	So you can get the MAC address of the phone from a small label on the back of the phone or from the network configuration settings if the screen is unlocked.
1245080	1247140	So I have memorized the MAC address.
1261240	1263260	So there are two man in the middle modes.
1263260	1265900	Number one is the learning mode and the second is the target mode.
1265900	1271700	So in learning mode, UC-SNF ARP poisons all the hosts in the network and then it eavesdrops on every phone call.
1271700	1277480	But in target mode, we can target like specific users and then eavesdrop only on phone calls to and from that user.
1277480	1284880	We recommend using the target mode because the network impact is really low during penetration testing or security assessment.
1284880	1287780	So Jason is going to talk more on this after the demo.
1289300	1292080	So I'm enabling Unicast ARP Request Poisoning.
1292600	1294440	I'm starting UC-SNF.
1294440	1300140	So it has discovered the VoIP VLAN which is 200 and it's waiting for an IP address.
1300320	1305020	It has downloaded the TFTP configuration file for the MAC address specified.
1305020	1307440	It has also downloaded the corporate directory.
1309040	1310960	So here's the directory list.
1311000	1313980	It's the same as you can browse through the phone.
1314340	1315620	Here's the host list.
1315920	1318580	It's the active calls tab. There are no current active calls.
1318780	1324200	Here's the media files tab, which shows the current media files in the current working directory.
1324200	1326780	So UC-SNF has a built-in audio player.
1326860	1331640	We are also working on a video player as a plug-in.
1332100	1333760	Here's the targets list.
1335100	1338120	So we need a volunteer to make a video call with Jason.
1380360	1384960	So there you go. UC-SNF has created like three media files.
1384960	1387900	So number one is the bi-directional audio stream.
1387900	1389200	Let me play that.
1401180	1402540	It's not playing.
1403880	1406420	It's playing, but it's not...
1409520	1411500	Let me play the video files.
1420620	1424820	Here's the forward direction video file from the calling phone to the call party.
1433860	1434900	There you go.
1436520	1443250	Thanks, man.
1443670	1447550	We're going to put it up on YouTube later on tonight, so UC-SNF up there.
1451010	1453810	Here's the reverse direction video file.
1461900	1464540	I think the audio driver is messed up. It's not working.
1472950	1477130	So there you have it. First video eavesdropping, you know, duly written.
1530240	1535120	Give us one second. We're just getting back set up here so we can jump on to the next one.
1542580	1546000	So what we have here is we're going to be talking about VideoJack next.
1546000	1550540	And VideoJack is our IP video interception and replay tool.
1550540	1552580	It's like hijacking IP video.
1552580	1555100	And it's basically like a cousin tool of UC-SNF.
1555100	1558440	It has man-in-the-middle feature supports.
1558580	1560420	And what we're using is one of our...
1560420	1563220	We're going to be targeting unidirectional video streams.
1563660	1567120	Looks like it has a problem, so you're going to have to...
1575880	1581560	Okay, so VideoJack was released February 2009 along with the UC-SNF video support.
1581560	1585320	It's a free assessment tool hosted on SourceForge.
1585320	1586740	And you can go download it right now.
1586740	1590780	But we're about to release this new version of VideoJack here right after DEF CON.
1590780	1595280	But it is this first security assessment tool to support H.264.
1595280	1599240	Even before UC-SNF, we were using VideoJack all the time.
1599240	1604620	We first started targeting the two 7095 Cisco unified video phones.
1604620	1608720	And now we just moved into the realm of video surveillance security.
1608720	1615600	So we're going to be talking about this 1080p high-definition video surveillance camera, Cisco 4300 series camera.
1642680	1643540	Okay.
1644540	1651880	So the new features of VideoJack is it can replay an AVI file in a continuous loop.
1651900	1658140	It can do a targeted video DOS against a random AVI file that we select, which is essentially the same attack.
1658140	1663840	But we can actually also take a raw H.264 file and replay it against the phones.
1663840	1666560	So we're working on getting that going against the surveillance camera.
1668180	1673650	Can you talk about this while I work on this?
1674350	1678850	So I'm just going to talk about some trivial challenges we face while developing VideoJack.
1678850	1682370	So number one is finding a valid H.264 RDP stream.
1682390	1689490	It is very easy to find a H.264 RDP stream if we can intercept the signaling on the session being negotiated.
1689490	1696230	But what happens is initially the session and the signaling gets negotiated at the very beginning.
1696230	1699730	And it does not happen very frequently once the session is established.
1700150	1718310	So particularly in the case of IP video surveillance camera, the media could be streamed to the destination for days without having any signaling taking place.
1718310	1723170	So we thought how to find a valid media RDP stream without any signaling.
1723170	1732050	So we came up with a module that intelligently detects a media stream just by looking at the IP and the UDP parameters,
1732050	1740370	and the RDP version, and the RDP payload type, and the SSRC, and also the monotonically increasing sequence number and timestamp values.
1740530	1745250	So we do this for a periodic interval of 15 to 20 packets.
1745250	1753670	And if the RDP packet matches any one of the RDP streams, we try to map it to a valid RDP stream.
1759570	1774010	So here is a screenshot of a sample capture of a session getting established between an IP video camera and a monitoring endpoint.
1774010	1780870	So here you can see RTSP and STP, which exchanges the session and the codec parameters.
1780970	1784430	And here is also the H.264 RDP media codec.
1786830	1790810	So H.264 payload format and fragmentation.
1791050	1794950	There are like four types of H.264 RDP payload formats.
1794950	1798170	Number one is the single network abstraction layer unit.
1798170	1800130	Number two is the fragmentation unit.
1800130	1804350	Number three is the single-time aggregate packets and multi-time aggregate packets.
1804350	1813510	So what a H.264 client does is, if the H.264 payload size exceeds the MTU, the payload will be fragmented at the H.264 level.
1813510	1817630	So these H.264 formats are called FUA or FUB.
1817690	1824290	But some H.264 clients, like the Cisco Videophones, they do not handle this FUA or FUB packets.
1824290	1825470	They just drop it.
1825470	1831030	So for a VideoJack attack to work successfully against this 1785 phones,
1831030	1836790	we automatically convert the FU type payload to a single NALU type payload.
1836930	1843970	And then we also fragment it at the IP level so that it works perfectly.
1843970	1849830	So this feature of VideoJack makes sure VideoJack works against every H.264 video client.
1849830	1859990	So VideoJack also uses the FFmpeg libraries to convert the AVI and the raw H.264 file format to an RTP media stream.
1860010	1868250	So the converted RTP media stream will be initialized with the original RTP streams, SSRC, payload type,
1868250	1874090	increased sequence and timestamp values, and spoof source IP and UDP port of the valid source sender.
1882640	1889940	So just an overview of VideoJack. It's 100.4. I just pinged it. You should be able to connect to it.
1903200	1910380	So we're reconnecting to the surveillance camera. And this is actually a Cisco ActiveX control web application.
1910380	1914580	And it basically streams over RTP. So this is not like HTTP that we're doing here.
1914580	1918640	We're actually streaming over RTP negotiated via RTSP.
1920940	1927200	Looks like we're going to come up here. It's okay.
1928180	1931120	So let's just talk a quick overview of VideoJack.
1931320	1935240	We're selecting right now a one-way video stream that we're targeting.
1935700	1943700	We start the attack. And as soon as we start, we're black-holing the valid RTP packets from the valid IP phone.
1943840	1947440	Then we select the AVI or the H.264 file.
1947440	1953020	And then we're using LibNet to reconstruct the H.264 RTP packet.
1953020	1957660	We use the SSRC, the timestamp values, and other values of the drop packet.
1957660	1964240	So basically it's a very intelligent attack. We're taking everything of the valid drop packet and we're recreating it.
1964240	1968140	But we're putting our own custom H.264 payload in there.
1968540	1972300	The video interception, like I said, can be a replay or a random movie clip.
1972300	1977700	And then we target the video device and send it at the destination RTP port.
1980430	1983250	So here's a little animation to kind of show this.
1983490	1988950	First off, on the network, we have the streams, the valid H.264 stream.
1988950	1992290	The VideoJack attacker has to have physical access to the port.
1992370	1994790	Now this could be at a physically remote location.
1994790	1999470	And there's a misconfiguration where the VLANs... a member of the same VLAN where the video network is.
1999590	2002770	So once... he basically does the ART poisoning attack.
2002770	2004550	He creates the man-in-the-middle condition.
2004550	2008710	Now the packets are going through the attacker, but the attacker is just silently forwarding this on.
2008710	2010290	He's not doing anything at this point.
2010290	2014550	Then when he hits the button to start the attack with whichever file he chooses,
2014550	2019270	then what happens is he's actually dropping that packet, he's constructing his own packet,
2019270	2021510	and thus the attack works that way.
2024560	2026560	Okay, here's our target right up here.
2026560	2032420	It's kind of hard to see right here, but it's a beautiful little new 4300 series IP surveillance camera.
2033920	2035680	It's a 1080p, high definition.
2035680	2039040	We bought it from a Cisco video surveillance reseller.
2039040	2041460	It uses RTP for port negotiation.
2041760	2045640	It does support security features, like it supports encryption, SRTP.
2045640	2047580	By default, it's not enabled.
2048000	2050480	And it supports 802.1X as well.
2050540	2054240	So like I said, we're using the web application to stream it over.
2060150	2061990	So here's for our demo here.
2063710	2065930	Now to get us in the mood for this...
2072070	2074290	I have to play this for a second.
2095110	2099130	Okay, so they basically took the Fabergé egg.
2099130	2102330	And it was the type of attack that we're going to demonstrate here.
2102330	2105530	Here's our Fabergé egg, the little water bottle over here.
2109100	2110840	Okay, let's give this demo a try.
2131640	2133480	Ah, it works. All right.
2133960	2135800	Let's start VideoJack.
2136340	2139660	So first thing we're going to do is we're going to capture the safe video stream.
2147740	2150880	So we use UC-SNF to capture the safe video stream.
2151860	2153340	Are we running Wireshark?
2153340	2158280	So we're also going to run Wireshark and we're going to capture into a PCAP the traffic with Wireshark.
2158280	2161200	We have to sample the traffic for about 20 seconds.
2163040	2165360	So we're going to need another volunteer.
2175950	2179510	So on this other laptop, on the attacker laptop, we're capturing this.
2187360	2192420	So this is like a real surveillance camera here. It's watching the Fabergé egg right over there.
2193040	2194000	Can you get it?
2194480	2196720	Okay, let's stop it.
2196720	2201540	Okay, so UC-SNF has finished its work. Let's hope that we captured a good video stream.
2202520	2203220	blah.pcap
2212080	2217500	Okay, Arjun saved off. We're VideoJack teammates here. We saved off blah.pcap.
2217500	2220680	So right now I'm going to create, I'm going to use a tool called VideoSnarf,
2220680	2225240	which is a new tool that we're introducing that basically takes as input an offline PCAP
2225240	2230500	and it basically detects all the video and audio streams and outputs them into separate files.
2230500	2234340	So if you're like a network administrator and you have a monitor span session
2234340	2238580	and you want to actually see all the video and audio going, you can use VideoSnarf.
2238580	2240460	And we're going to release this in a little bit too.
2240500	2242440	Also, you can use like Ettercap and Wireshark.
2242440	2246120	If you don't want to use UC-SNF, you can use VideoSnarf, Ettercap, and Wireshark.
2254570	2256630	Okay, so we've detected a couple streams here.
2267020	2272280	Now we're using FFmpeg to convert the H.264 raw file into an AVI file.
2272720	2276780	So can I get like a volunteer? Let's try and get a girl this time.
2277780	2278980	Any girls?
2280560	2281820	Anyone? Anyone?
2282800	2285200	Oh, we do have a girl. She's coming up. All right.
2286900	2288140	Round of applause.
2291830	2294510	Okay, you're going to be like the person stealing the egg.
2295470	2297730	Don't do anything until we tell you exactly what to do.
2297730	2299710	So go right over here.
2301350	2303030	So FFmpeg is doing its work.
2306130	2308510	And we're ready to start the VideoJack attack.
2316200	2321600	Okay, so why don't you like put your hand like here and just like show that... put it in the water.
2321600	2325960	Now you can see her hand. You can see that like a video surveillance camera would like capture that.
2325960	2327120	So move your hand out.
2327980	2330400	Okay, now move out a little bit. There you go.
2330900	2331500	Okay.
2332580	2334540	So VideoJack has detected a stream.
2338580	2339960	We select Other.
2340360	2342100	We're going to do a looping attack.
2342420	2346000	And we're going to select replay.avi. Now watch the screen here.
2348060	2352760	I don't know if you guys noticed anything. Maybe for a split second there, there was a problem with the AVI file.
2352760	2354920	But now go ahead and reach in and take the water bottle.
2356400	2358480	Nothing. Let's stop the attack.
2360760	2363000	Water bottle is gone.
2363420	2366060	Let's try it one more time. So put the water bottle back.
2366840	2367480	Okay.
2373610	2375050	Replay.avi.
2377710	2381630	So the water bottle was almost pushed in the same direction. Now remove the water bottle.
2382410	2383750	And keep it out.
2384290	2385890	Now watch. Stop the attack.
2386210	2387630	Water bottle gone.
2388310	2390770	Okay. There's VideoJack.
2392390	2393510	Thank you.
2393610	2396150	Actually, you can have the water bottle as a present.
2397010	2398130	Okay, go ahead.
2399730	2401610	So here's the last demo.
2401610	2408850	I'm going to show a VideoJack attack by playing a movie clip on an active video conversation against the Cisco 7985 video phones.
2409150	2410910	I'm going to use VideoJack.
2411170	2413050	This time I'm going to VLAN hop.
2437840	2440540	I'm enabling Unicast ARP Request Poisoning.
2440640	2442200	So, yeah, it's ready to go.
2443560	2445300	Let me make a video call.
2455360	2457460	We're actually reading the output.
2457800	2462840	So I press F to find an active video stream.
2462840	2466500	So I find one from the extension 8000 to the extension 8001.
2466500	2467980	I select the video stream.
2467980	2471800	Now I can do a very precision attack by attacking either one of the two phones.
2471800	2474800	I'm going to attack the phone with the extension 8000.
2475600	2477100	It's the phone on the left.
2479600	2481780	So it's a 7985 model.
2481820	2483500	I'm just going to do a one-time attack.
2483500	2487680	I'm playing the movie clip Italian Job.
2489540	2490820	There you go.
2500380	2501800	I'm stopping it.
2501800	2503880	So I'm going to target the next extension.
2504080	2505780	It's 8001.
2505860	2507160	It's the same procedure.
2514580	2515620	There you go.
2516340	2518900	So I could have played like a prerecorded video conversation,
2518980	2520880	a prerecorded H.264 video file,
2520880	2524200	or any dirty movie on an active video conversation.
2524460	2526140	It's funny when you say dirty movie.
2529260	2530300	Thanks, man.
2530360	2533140	So imagine the impact of this at like a...
2533140	2535160	I mean, basically you have to monetize this attack,
2535160	2539420	and I don't believe attackers attack for no good reason other than graffiti,
2539420	2541860	but you could do this at like an entertainment venue,
2541860	2544240	like a very high-profile event.
2546940	2549240	Okay, so let's jump on to the end here,
2549240	2552160	the exciting VoIP pen testing lessons learned.
2558770	2561710	Okay, so I've been using UCSF this way,
2561710	2563430	doing on-site pen testing for a while,
2563430	2565490	and it's something I've been meaning to tell a lot of people.
2565490	2567510	I never run UCSF in learning mode.
2567510	2569190	I always run it in target mode.
2569230	2571070	And one of the problems you run into is like
2571070	2572430	when you're doing the pen test,
2572430	2575210	you want to target like a remote IP phone,
2575210	2577490	but you really don't know the IP address of the phone.
2577490	2579830	So what you can do is you can take a hub in an environment
2579830	2581210	where you're doing your pen testing,
2581210	2583470	and you can share the hub with the attacker's laptop,
2583470	2587170	and you can pick up and find any user in the corporate directory,
2587170	2589470	and you basically call that user,
2589470	2592390	and then you use Wireshark attached to the hub,
2592390	2594910	and you find the IP address of the remote phone.
2594910	2596350	It's not something you really think of,
2596350	2597810	but it's very effective,
2597810	2601170	because normally when you're plugged into the Ethernet switch port,
2601170	2603690	there's really not a way you can find the remote IP phone,
2603690	2606750	unless you kind of finagle yourself like this way.
2606750	2608390	So I find the IP address,
2608390	2611790	and I create this file targets.txt on the phone,
2611790	2613990	within UCSF working directory.
2613990	2617650	And then I specify UCSF in targeted user mode.
2617650	2620010	And what it does is we select from a menu,
2620010	2621230	we select the user.
2621810	2623830	UCSF takes care of the front end for you.
2624610	2627810	And now it's extremely low risk of service impact,
2627810	2629570	because all we're doing is targeting the traffic
2629570	2631770	between that phone and the rest of the network.
2631770	2633290	So if something crashes,
2633670	2636830	it's not going to impact rest of all the IP phones on the network.
2636830	2638850	So it's a very silent, effective attack,
2638850	2640090	and this is the way I recommend it.
2640090	2643510	So it's kind of like a little tips and tricks that we learned running UCSF.
2644530	2646270	Okay, now this is really, really cool.
2646270	2648450	This is like I'm saving the best for the last.
2648490	2649770	How much time do we have?
2650530	2653030	Okay, so we were engaged,
2653030	2655510	and there was a Viper security consultant that was in Europe
2655510	2657290	just a couple weeks ago.
2657290	2661950	And basically they had, it was a UCM 7.1 brand new deployment.
2661950	2664070	They had gratuitous ARP disabled.
2664410	2667030	Now I've actually talked to Cisco PSIRT about this.
2667030	2668710	I've already communicated this.
2668710	2672270	This is not something that can't be protected against.
2672270	2673770	So it's something that can be remediated
2673770	2676310	by just turning on security features.
2676490	2679190	But we couldn't intercept skinny keypad messages,
2679190	2681270	and they had the GARP disabled feature on.
2681370	2684030	So the GARP disabled looks exactly like this.
2684030	2684750	Perfect.
2685670	2687730	GARP disabled was no.
2687890	2690310	And I talked about this before, what this means.
2690390	2693750	This means I can't get any messages from the phone to the network.
2693750	2695650	So I can't get the media from the phone to the network,
2695650	2698330	and I can't get anything that the user dials.
2698330	2701130	And it's really nice to be able to steal voicemail passwords.
2701970	2703470	So what did we know?
2703470	2705730	We had to figure out a way to defeat this.
2705850	2710310	We knew that GARP enabled is a setting that's managed server side.
2710310	2715650	We also knew that the Cisco Unified phone downloads the configuration file via TFTP,
2715650	2718190	which tells the IP phone how to configure itself.
2718190	2722090	So basically this configuration file was everything that the phone used,
2722090	2724550	that it parses and it learns how to configure itself.
2725470	2728630	And it's only downloaded when the phone boots up.
2728670	2732070	Could there be a way for us to force this IP phone to download this configuration file?
2732070	2733490	This is what we figured out.
2733750	2735890	We figured out a method to do this with UCCIF.
2735890	2739190	We call it the TFTP man-in-the-middle modification attack.
2739310	2742270	What we do is we immediately start.
2742270	2743530	We target the phone.
2746530	2748230	We create targets.txt.
2748230	2753210	We launch UCCIF with the new feature that we created for UCCIF, which we're about to release.
2754390	2756970	First off, what we do is we drop keepaliveac messages.
2756970	2760050	Now this is a heartbeat mechanism between the phone to the server.
2760050	2762330	But we can't intercept what's from the phone to the network,
2762330	2765150	but we can intercept the return traffic back to the phone.
2765150	2768590	So we start blocking the keepaliveac message from the server to the phone,
2768590	2770270	no matter where the server is.
2770830	2774450	Now all of a sudden what the phone will do is it will think that it's lost registration.
2774450	2777010	So it will try and re-register to the server.
2777210	2782130	When it does this, it actually does a tftp.get for its configuration file.
2782130	2783070	Well, guess what?
2783070	2788650	When it does a tftp.get, the return traffic, we can add a tftp.dissector.
2788650	2791650	So we capture the UDP stream on the way back.
2791650	2796070	And all we do is look for and intercept that gratuitous ARP setting.
2796070	2801590	So we take it from whatever its setting is 1, and we change that to 0, to GARP enabled.
2802430	2804630	So then UCCIF does its work.
2806090	2811310	And Cisco, the phone, downloads, finishes parsing the file, and now it has the new configuration.
2811910	2813210	GARP enabled, yes.
2814810	2817590	So this all happens in less than 30 seconds.
2817590	2822010	If the user is watching the phone, they might be able to catch it, but they might not think anything of it.
2822050	2825470	And all you have to do is wait until the users go home for the day.
2825650	2828210	And you target each phone, pick it off one by one.
2828350	2833630	And when they arrive for work the next morning, they have gratuitous ARP enabled on all the phones in the environment.
2833890	2837910	We can add new features onto this when we come up with new ideas.
2837990	2839710	So we basically pwn the phone.
2839710	2841790	We can change anything on the phone we want to.
2841790	2847630	I'm going to show a quick... and like I said, you can totally remediate this following Cisco security best practices.
2847930	2852170	Now I'm going to show one little quick video of this actual attack.
2856830	2858590	Oh, it just started actually.
2859250	2860390	There we go.
2863780	2866160	Okay, so I'm going to the phone right now.
2866180	2869080	And I'm finding its IP address, 200.6.
2869320	2872640	And then I'm going to its device configuration.
2876620	2878400	And gratuitous ARP is no.
2878400	2880640	We're just verifying that on the phone.
2880960	2884060	And then we go to UCSTIFF and we launch with the new feature.
2884600	2886360	We select the targeted phone.
2886700	2888180	UCSTIFF ARP scans.
2888180	2889480	It's VLAN hopped.
2889900	2891340	Now it's listening for traffic.
2891340	2894840	It's listening for that keepalive.ac message.
2896240	2899140	It's the most important part of the con.
2905770	2907170	So it takes a second here.
2914600	2918400	See, dropping the keepalive.ac, all of a sudden the phone loses registration on the left.
2924070	2928830	Now the phone is actually going out via TFTP and getting the new configuration file.
2928830	2931970	We're going to intercept the return traffic from the server.
2932090	2935910	The CERD file coming from the server to the IP phone.
2936410	2939810	In a couple seconds here, it's going to...
2942140	2945340	Watch the phone, it's going to turn...
2945340	2948820	And we just, on the right, just modified the setting.
2948840	2950120	Now we go into the phone.
2950120	2951660	It's re-registered.
2955490	2957030	And new configuration.
2957030	2958230	Gratuitous ARP enable.
2965530	2967250	I guess that's really it.
2967450	2968610	Great time being here.
2968610	2969510	Thanks for everything.
2969510	2971070	And we'll be in the Q&A room.
2971070	2972230	It's room 104.
2972330	2973990	We'll be there for about 20 minutes.
