I'd like to welcome everyone to Track 5 at DEF CON. I want to remind everyone in consideration of the other attendees, please turn the ringer on your cell phone off. Thanks. Also, there's been one scheduled change. Track 4, 4 p.m., there's a substitution owning the WAN with ZAN. Hello. I'm glad so many of you showed up. I'm Rafael Marti. I work for a company called Splunk. A lot of you probably have seen the shirts around. I have a few shirts here. I will hand them out during the workshop. At some point, I will tell you when I give them out. You've probably heard of Secqvist.org at this point. I hope. Go check it out. It's a portal I started around security visualization. I'm also the author of Afterglow, if you've seen that tool before, to generate link graphs. I will show that in a little bit. It happens also that I'm the author of the book you see here, Applied Security Visualization, which just came out on Tuesday. The bookstore here had it before I have seen a copy, which was pretty exciting. I'm presenting here with Jan. Yes, I'm Jan Munch. I'm from Switzerland. I'm a senior security analyst with a well-known Swiss pen testing security review company. I'm the father of DAVEX. I initiated the project and engineered the CD. The thing which you're going to see during the workshop, that's the stuff I did. All right. To get the workshop going, you need ISO images. There's a guy down there. He's Martin. He's a colleague at work. He will distribute 30 CDs among the crowd. Please copy those ISO images and the manual which is on the disc onto your hard drive and hand on the CD immediately so that everybody gets a chance to get the image because maybe there are some guys here. Who did not get the chance to download the image? Okay. There's quite a few. All right. So Martin is distributing discs along the aisles. Just pass it on. And to set up... Too much security here. Yeah. All right. The recommended setup is that you use VMware. Run it in there. In the manual in chapter 6.1.1 and 6.1.2, you'll find instructions on how to set up a VM if you don't know how to do it. Then we suggest that you activate networking because the manuals of the tools and tutorials, they're located in the internet. So they're like links on the CD. We'll discuss this later on. And to get to the content, you need internet access. So suggest that this net your VM to the network or even bridge it. Whatever you like. Okay. So what we're going to do, it's kind of an experiment for us and I think DEF CON as well. We want to... We talk a little bit about visualization about the Davix CD itself. And then we have the hands-on analysis, and that's what you need the CDs for so you can start up the live image and do some analysis yourself. During the time that you guys are playing with the capture file we already gave you on the CD, or you download it, we'll roam around a little bit and try to figure out what you guys are up to and if there are any questions or things we can help with. And then we'll probably show some things here. If anyone during the analysis comes up with interesting things they find in the captures or ways to visualize the data, we encourage you to come up here and then show everybody what you did. So while you're doing the analysis, kind of keep track of what you're doing and you can come up here and show people. For people that are going to come up with something that we're going to be impressed with, I have four books here that I'm going to give away. So I encourage you to come up with something interesting. And why does this go blank here? Here we go. All right. So the goal is that you guys get kind of a feeling for how do you visualize security data and how do you operate the data CD itself. Let me ask a few questions. Who has done log analysis before? There's your hand. Oh, wow. Awesome. I think I never had so many hands shown when I asked this. Who visualizes their logs when they analyze them? Oh, not that many. Okay, that's good. I hope after this it's going to be a few more. Has anyone used Davix before? A couple. Okay, cool. Have you heard of Secquiz? A few. All right. So everybody that does visualization of log files, I encourage you to go to Secquiz and submit some example of yours. It's a portal where there's a whole gallery where people submit graphs and ideas of how to visualize log files, so you might get inspired. And if you submit some things, you can inspire other people. All right, so I'm going to hand over to Jan, and he's going to talk a little bit about the CD and how it's organized. All right, so I give you a short introduction to Davix. So first question is, what is Davix? Davix is a live CD which is built on Slack. Maybe some guys of you know, Backtrack is also built on Slack, so we use more or less the same technology which comes from Slack 6. A good thing about Slack is it's very modular. You can have software in packages and organize them pretty easily. It's easy to customize the CD, so if you want to change single files on the CD or in the live system, it can be done really easily. And you cannot just run it from CD and DVD. You can also run it from USB stick if you like. There are instructions on the CD manual where it tells you how to do that. It's actually really copying files and running a batch file, and that's it. And maybe some of you would like to have it installed on a hard drive. You can do that as well. We have included the Backtrack 3 installer. So you can set up like a VM and run everything like a normal Linux. Okay, the CD contains a collection of tools. These are mostly tools for data processing like classical things like Grab, Avica, and Grab, Perl, things like this. And the most important part are the visualization tools. So we've included like 25 or 30, I don't remember the exact number, of tools on the CD. This is actually based on the research Rafi has done for his book. So the tools are the same ones which you can also find in the book version. All right, so the tools are ready to run. So you don't have to compile anything. It's really just start it up and start using the tools. Then the CD comes with a documentation as I just mentioned. There is a quick start guide on how to get things running and how to sort of get things visualizing. There are sort of really basic examples on how to do that. All right, next slide. Why did we build Davix? Well, first of all, there is sort of no free out-of-the-box solution which contains all these tools. And it's quite cumbersome to get running lots of these tools. There are tools which require certain versions of GCC or libraries which are rarely used. So getting things to run can be really difficult. Then there are different runtime environments. There are tools written in Java, in Ruby, in Perl. So you need a huge environment to get the tools working. And we've done all that work for you. So the goals for our project is to have a running environment which is really simple to use so you can start analyzing things without doing much of compilation work and installing stuff. And another thing is you can add stuff easily thanks to Slacks. So you don't waste too much time adding new things. The user interface in Davix is based on KDE. As you see on the right-hand side, this is the start menu of KDE. The top one is sort of the document link. You go there and you get access to the documentation. Then you see three categories. These are called Capture, Process, and Visualize. And this represents the information visualization process. So each of those tabs contain a set of tools which are related to Capture, Processing, or Visualize. So it can be that the tool is in different areas like Afterglow, which is sort of a collection of scripts which allow you to sort of take a TCP dump, make a CVS out of it. That's the processing part. And then you have a part which does the preprocessing for the visualization tools. So like generating dot files for graphics, for example. Okay, then we have additional services. MySQL is installed on the CD, so if you want to do analysis with database, you can do that. Although the space is limited to the memory because everything in DAVX runs within memory, meaning also the file system runs on memory. That means the disk is as large as your memory, actually. And we have Apache on it, so if you need a web server or something, it's there. Let's have a look at the tools which are there. This is just a small set of tools I put here so you get an impression what's on there. First, in the Capture category, there are things like network tools. Of course, Wireshark, most important one, don't miss it. Argus for NetFlows. Snort is installed with Bleeding Edge signatures. Then we have logging things, so you can actually direct syslog to DAVX, and these things get written to file and you can analyze it immediately. And the third thing, we have lots of tools which allow you to grab files from other systems, so like there is FTP, SCP, and all that kind of stuff there. Then we have the processing part. I already mentioned shell tools. So I'll skip that one. Then we have generic processing for Afterglow and LGL, for example. And things like data enrichment. Maybe you would like to have your IP address looked up into a country. Maybe that's interesting for your analysis. So there are tools included on the CD which allow you to do this. Or you can have who is queries and whatever. By the way, who finds the typo gets a T-shirt. . All right, good idea, Rafi. Okay, so let's move on to the visualization thing. There are tools which are particularly specific to network traffic analysis, like EtherApe, and iNetVis. And there are tools which are more of generic use, like Afterglow and our project. Our project, for example, is a statistic analysis suite. There you can analyze any data you like. Let's have a look at the PDF manual next. So it contains a quick start guide. Contains information about setting up the network, like wireless access. Then links to external resources. And probably the most interesting part is all the customizing things, like how to create custom ISO images, creating new modules, or installing things on USB stick or hard drive. The manual is organized the following. You can access it on a global level, like you say, I want to see the whole manual. Or you say, OK, I just want to have a look at a certain chapter in the manual. Or when you look at the tools, like in the example here, you see Cytoscape. When you open up this section, you see the tool on top of it. And then on the bottom, there's a thing called Davix example. This is sort of the quick start example to get things visualizing in Cytoscape, for example. And on the bottom, are the external resources to the tools documentation on the internet. OK. We also have a little disclaimer here. So the manual is not really an introduction into security visualization methodologies. So if you're interested in how the process really works of visualizing things, then we suggest you have a look at Rafi's book. In there, there are detailed use cases about how to do things and how to work with the tools really hands-on with script examples and whatever. So the documentation, the CD, is really a rough thing to get you going. It's not about methodologies and stuff like that. Good. Just a word on customization. So you've seen... So you can see how it works. So when you look on the DVD, they're like different... Folders. There's a folder, for example, called Slacks Modules. In there are all the modules located, which are on Davix. So if you create your own model, you can put that on the ISO in that directory, and it will automatically load. And if you would like to overwrite a single file, maybe there's some config file which doesn't suit your needs, you can do that as well. There's a thing called root copy, and in there you can add your files, your individual files you want to overwrite on the CD. So actually what... How Davix works, actually Slacks works, is it first loads all the modules, and then it copies all the things which are in root copy into the memory file system. So that's a really nice thing to customize. So that's it for me. Raf is there. Thank you very much. All right, so I'm quickly going to talk about very basics of visualizations. You guys get a little bit of a start on how to analyze the capture we gave you. What you see here in this slide is the information visualization process. It's fairly simple. If you start on the left-hand side, the first thing you want to do is you want to kind of define the problem you have, right? You have a certain data set, you have a certain use case, something you want to do with the data you have. It's always good to kind of... to really know what you're after. So if you have a PCAP or a TCP dump capture or something, you might want to figure out what are the communications in there, who is talking, what are the machines on there, what are the services running. Maybe you want to figure out whether there's an attack in there. The second thing is you might want to figure out whether you actually have the data for that use case. So if I want to find attacks, I probably need the packet captures or some IDS log files. If I only have a firewall log file, I'm very restricted in terms of what attacks I can find. The second thing is if you move along with the process, if you have all that data, you might have two gigs of packet captures from your border routers or something. Well, you probably want to start filtering already. You want to figure out what is really necessary to accomplish that use case. So if I'm looking at the border router and I want to see the attacks happening internally in my network, it's probably the wrong data source. If I want to look at things that happen from my internal people towards the outside, I might want to start filtering for just those sessions and not the things that are coming into the network. So that's a way of already reducing the amount of data that you have to look at. The next step is that you have to start normalizing the data or you have to extract the information from the data that you have. For example, if you have the packet captures and you want to look at communications, you want to extract the source IPs and the destination IPs or whatever endpoint information you want. Maybe you want to take the source MAC and the destination MAC. So you have to start pulling those out, and a lot of times what I do is I just write some Perl script or an awk command or something to pull those things out. A lot of times I go and get some parser from somewhere. There's a few of them on seqviz.org if you're interested, or in the Afterglow distribution, there's a few also in there. So I can very easily extract those individual components from the log files that I need. And here, a word of caution. If you're looking at TCP dump traffic, and you're probably going to run into this if you start analyzing the capture we gave you, be aware of the source-destination confusion, meaning that if you look at a TCP dump output and you start doing an awk, for example, so you get the third column, it's always the first IP address that you see in the output, you will end up with communications going from a client to a server and from the server going back. So you will think that those individual nodes talk to each other because what happens is, if you look at the TCP dump output, the soon packet, the session initiation, will come from the client to the server. Now the next line is going to say, now the server talked with the soon act to the client. Now in the capture it looks like both of them are source addresses, but it's really not. The second packet is inversed. So you need to make sure that you turn those around so you're not getting confused who is talking to whom. And for that reason, I usually use parsers that already have that logic built in. There's one in the afterglow distro that's called dcpdump2csv, which uses some heuristics to figure out who is really the server and who is the client to output the right thing. Then once you have the information extracted, you want to visualize it somewhere. So you want to do a visual transformation and generate the first graph. And there you want to think about how does the output have to look. And that can be all kinds of things. It can be that you want to generate a pie chart or a line chart or bar chart. You want to generate the link graph where you actually see nodes and edges connecting it to see who is communicating. And then once you generate the first graph, most of the time, it's going to be not your end product. You're not going to be satisfied. There are probably going to be too many nodes, too many bars. They might not be scaled the right way. You want to add some color. So you want to go through a view transformation and start adding properties to that graph or change it up. And then in the end, you might have certain examples and you want to start interpreting this thing. You want to figure out, is there really an attack in the traffic? Where did it came from? And so on. And that might, again, point you to maybe even restart the whole process and say, well, I have other things I need to know now. All right. Let's talk about data formats quickly so that you can actually start using these visualization tools on the CD. Unfortunately, there's not a standard data format that all of these visualization tools are using. Some of them use CSV files, so comma-separated values, where you have, like, IPS, comma, port, comma IP, comma something. So it's just comma-separated values. And you have to sometimes transform your data input into this format. And there is, again, in the Afterglow distribution, I have a lot of parsers that take, like, a snort alert log and convert it into a CSV file. Then one tool is using a TM3 format. This is the tree map tool from Ben Schneiderman, which the data format here is slightly different from a CSV or a TSV file by adding the name of the field or the data element and the data type. So you see the first column gives it a name. That's an arbitrary name you want to give it. And the second one is a data type. The tree map tool needs this because it treats integers different than strings, and it treats it different from floats or timestamps. So you need to give it the data type also. A lot of times I just start out with using either strings for everything or ports are going to be integers, but I'm not going to be very specific about how I categorize those. So usually strings and integers are enough. Then there is another interesting format. It's a dot format, which is basically a description of link graphs. So a link graph has nodes and edges connecting the nodes. The dot description you see here is basically defining all the individual nodes. It says there's a node A, there's a node B. And you can give it certain properties. You can say node A is color green or B has maybe a gradient on it or maybe another label or something. And then you define the edges. You say these are the nodes that are connected. And that's really what this complicated-looking format here is. And I will show you in a second how to generate them automatically. Then some other tools are using maybe GML. There's other GraphML. There's other data formats that some of these tools are using. And you might end up having to convert one to the other and to the next one. So I don't have automatic converters for everything, but most of the things are fairly simple to do. Let's look at an actual example here. So if you're using Afterglow and you want to generate things like the one on the right-hand side there. It's very small, but I think you get the idea with nodes and edges. What you do first, you have some data source, something that generates the data. Then you parse it, basically extracting the fields that you want from the data. And in this case, you generate a CSV file. Now, if you have your data, for example, in a database, you can just run a MySQL command and extract the columns that you want and generate a CSV output. So at least you have the input to start with. Or if you take a TCP dump, then use something that pulls out the fields you want. And then you're ready to use Afterglow and now Afterglow takes those descriptions here. I have an example here where there's a user name and then an activity this user executed. So there's this guy, aatherui, executed a ping. Or aana accessed some patents. So you just have these two column inputs, and now you can translate them with Afterglow into a graph description. And this on the right-hand side here is this dot description. So you don't have to write the complicated structure of the dot file yourself. And figure out how to actually do it correctly. But Afterglow is transforming that automatically. And while doing the transformation, you can also give it a configuration file that adds certain properties to the nodes and edges. So you can say, if the IP address is in this subnet, then make it green. If it's in that subnet, make it orange. If the port number is above 1024, make it dark blue. If it's below 1024, make it light blue. So once the graph is generated, you see right away certain properties in the data. And then if you run this through GraphVis, it will generate a graph that looks like this, where you have the four users and the four activities associated with them. It's a fairly boring example here, but I think it gets the point across. So let's take a very quick example analysis of an actual data set that I went through. In my book, I cover exactly this example. And when I introduced the section, I was saying, well, I don't really like to analyze worms because it's so easy to find worms in your network. There's so much traffic they generate, it's really boring. So I tried to mix it up a little bit and said, well, let's at least look at an interesting data set. And I had the opportunity to work with a cell phone carrier where they were interested in finding worms in the cell phone network. And what they have are these call detail records that you see here, and they look really ugly. And a lot of these entries, I don't even know what they mean. There's, like, numbers in here. I have no clue what they are, but I don't need to. I just want to know who is sending multimedia messages, pictures, maybe even files, around. So I might send someone or you an image, an MMS message, and that generates one of these MMS CDRs. And I'm just interested in the phone numbers, and this is the fifth and the sixth column there, the ones that are bold. That are the phone numbers that we're communicating in this instance. So what I do now is I just look at the CDR records, and I use awk to extract the fifth and the sixth element of that data set. That's all I need. I need the phone numbers. What I want to do then is I want to actually generate a link graph that shows me the caller, then the message, and then the callee. So who was sending the message to whom. And if I do this, you get something like this. And this is fairly horrible in terms of the quality you get here. Let me try this. Never try something you haven't tried before. The Mac is going to come back. Here we go. I'm not sure if this helps. That does. Here we go. So what you see, the quality is really horrible in this picture, but I think you can see what had happened. You see all these communications. So the yellow nodes were sending a message to the white nodes. And that's what you expect. I might send an image to someone, and they might send another one to someone else. So I'm just one of these yellow ones. There's some people that communicate a little more and some a little less. Now, if you look down here, there is one of these kind of stars showing up or these snowflakes or something. Now, first I was like, oh, this is interesting. Someone sends a lot of messages. And this was in a fairly short amount of time. So like, let's see who this is. And it turned out those are service numbers. You can send a text message to some service, a service number requesting like a background image or a ringtone or something. And that's absolutely legitimate traffic. So we started excluding all those because we just kind of generated a list of known service numbers. And what happened then is I got a graph like this. I'm going to go back into presentation mode again. I still ended up with some of the service numbers here, probably. You probably want to look what they are. But I also found this pattern on the top right here where you find long chains of messages. So one message traveling from one person to another. That person sends the same message. And I know it's the same one because I look at the size and the content type of them. So these go to multiple people and then they fan out again and it generates this huge kind of chain in here. It is really, really hard to algorithmically find this. You can do it. You can generate spanning trees and calculate them and figure out whether there are any of these long chains in there. But in the end, you probably have to go back. If you find one of those chains, figure out what it was exactly and then regenerate it again and exclude and include. This way is very, very quick. It took me a very, very short amount of time to figure out what's going on in here. All right. So let's get you started here. Okay, now it's time for analysis. So your turn, actually. So are there any people here who do not got the CD? Does everybody got the ISO image now? So please hand on the CDs to those people who haven't got the image yet. And to people that don't have a laptop, if you just have the CD, maybe that helps too. I don't know. Take it home. Okay. So now the PCAP file is located in slash root slash davix. Oh, that's the name of the file. So the file is in the slash root directory called davix-workshop-captures.pcap. If there are guys who do not have the DEF CON image, then probably they should copy the ISO image from somebody else. It's the easiest thing to do. All right. Then I guess Rafi's turn. Yeah, so let's just hammer away. If you have questions, either yell, or it's probably going to end up in chaos, but you already have a question. . You could. You can download the ISO from the Internet, but it's quicker if you have the CD. . . So there are two versions, the official release and the DEF CON 16 ISO. So they're both downloadable from our website. That's davix.secviz.org. And you can also find links in the DEF CON forum. . Pardon? So only the DEF CON dash... the davix-defcon16 image has the capture in it. The regular davix image doesn't. We made an extra image for this. Okay, this gentleman in the first row. . So the question is whether we have any performance numbers of how long it takes to generate any of these visualizations. No, I don't. It depends on a lot of things. It depends on the machine you're running this on, right? It depends on how... what the entropy is in your data, for example. So, for example, if you're looking at a PCAP file and there's 100,000 different source addresses, that's much different than if there are only 100 different ones. Then it depends on the tool you're using. If you're using Afterglow, I can guarantee you it's probably slower than if you use anything else because it's just a dumb Perl script that keeps a lot of state. The bigger the file it gets, there's probably exponential growth in the runtime. I try to optimize things with caches and so on, but it's not a commercial product. I don't have time to optimize it more. Feel free to do it. But the other tools, I don't have any control over them either. So every tool is going to vary, and it varies on the data types you have and all that. So, sorry, I have no idea. So maybe if you're kind of stuck and you're like, well, where do I start? There's a couple hints here. The first thing is probably you run some kind of a TCP dump on your data, right? It's a PCAP file. I mean, if you're really lead, you probably can use the hex editor and go in there and do some magic. I can't, so I'm using TCP dump to do the protocol interpretation for me and get an ASCII output, right? So you can run that over it, and you get some ASCII output of the communications. You could also run Snored on it and have the rules trigger on it, for example, visualize that somehow. You can... The TCP dump to CSV Perl file, you can just run it. It's in the path. You pipe the TCP dump output into it, and it will actually do the parsing. If you look at the file quickly on the top, it will show you how to run the command. You need to run TCP dump with certain parameters. I think there's like four Ts and minus E, and then L something. I don't remember. But look in there to get the correct command so it actually parses the output. Then if you run afterglow.pl minus H, you get the help from afterglow. It's fairly simple to run it. You don't really need any command line parameters if you don't want to do anything special. There's also... There's a few Perl tools on there that I hacked together. They're horrible quality, but they get the job done. So if you want to generate a bar chart, for example, if you just have basically a one-column output, you just pipe that into bar.pl, and it generates a PNG file of a bar chart of the top 10, or I think you can even control whether it shows all of them or not. Are there any other questions? Okay, let's get started. So for those without a laptop, this is going to get really boring right now. I will try to probably just hook up Devics here, and those who want to watch, I'm going to just generate some graphs and if you want to yell and say, hey, do this, please go ahead. Everyone else who finds something, just come up and show it. I see Greg is already frantically working on some stuff. I hope it's actually related to this. So you have to compete with Greg, who is, by the way, the author of security visualization of the book by No Starch Press, the black one with the green image on the cover. He plucked me, I plucked him. I will get an image on here officially also. Okay. So if there are any people who do not have the Devics image yet, please get it from someone who has the CD. Has somebody got the image on the USB stick? There's some CD ROM drive less user. So I was, when we were preparing for, just half an hour ago before the talk, I was trying to look at the capture quickly and find some things to look at, and I wanted to know how to run one of the tools, and Jan caught me looking in the book to figure out actually how to run one of my own tools. I can't even remember how to run them. I had to look in the book. So this might happen again that I might have to use, might have to use the book to do something here. Oh, and Jan is playing tricks on me. I like this. This is the Swiss keyboard layout. Oh, this is going to be great. Can I help you? So if you want to change language, you can do it on the bottom part here. I like the challenge. Let's leave it. Really? Shall I put it to French or something? No. Well, I might actually remember how that looks. I used to type on a Swiss keyboard all the time back in the day. What was I going to do here? Interesting. There's this key on here. It's called Alt-G-R. I wonder who came up with that. Okay, so no such file directory. Here it is. This is what I've said before. I'm going to try to, I was trying to find the command line parameters I need for tcpdump to csv. I love not using my laptop. It's going to be much more efficient here. All right. This is lame. Sorry. Is it shift? Okay. All right. So I'm going to read the capture file. What is it called? Devics. And for those who want to see how that looks, let's get this bigger. So everyone's seen pcapout, but before in tcpdump, all right, so now we've got to extract something. The easiest way probably, and you know what? Minus OVI. tcpdump to csv. What kind of shell is this? . . . This is weird. All right. This is going to be really funny. . How do you do that? Is that wrong? . Oh. I don't want to do that. I want to have it big. . I know it's not installed. . . . Let's just use that one. If I can now actually copy and paste. . Wow. Then we need to do this here again. . All right. Here we go. We're going to get somewhere. . Now, the cool thing here is that I just say I want to see the SIP and the DIP. So the source IP and destination IP. And just to verify what we get here, we do a head of minus 10. So I have CSV output at source and destinations. This is kind of boring so far. But then I want to see a bar chart from this. And I need to give it an output file. And then, oh, wow, this capture is too big. So what I usually do is I just cap it somewhere here to, let's say, 2000. You've got to start somewhere. And if we use this GQ view on here, for example, to look at the file. So this is the first. Oops, that's not it. That's not it. It's this one. Boo. This is nice, too, right? So now at least we see. No, we don't see. This is not what I wanted. Okay. Who can tell me what I did right now? No. What is this output here? It's a bar chart. Great. It's the count by source IP. That's really what I wanted to do, but it's not. I can't hear you. You raised your hand, but you're not seeing it. Oh. Frequency of connections. I like it. What size are you? What size? Double XL. Double XL. All right. So maybe that's... Maybe I'll do this because I didn't really sleep that much the last few days, so... I think I was doing... I thought I was doing okay today, but apparently I'm not. So this one here is actually for the sources, right? So I have four sources in there, and remember that tcpdump to csv parser actually takes care of the source-destination confusion. So it will take... These are all the clients. It's not necessarily the IPs that are in there. They're the ones that show up in the first column of the tcpdump output. So you could do the same with the destinations and maybe with the services. Let's do that quickly. I usually like to see what services are running on the network. So that's called sport. By the way, who can tell me how I know these or how I figure out what these field names are that I'm typing in there? Like sip, dip, sport, deport, timestamp, whatever. Where do I find them? . Someone here was saying something. They're in the beginning of the Perl script. They're in the beginning of the Perl script. Eric, what kind of... Do you want a shirt? What size? Excel. Excel? Got to wear this around Microsoft, though. Yeah, so if you want to know them, go and look at the source of tcpdump to csv in there. You will see them. So if you look at the destination ports now... Let me see. I need to refresh this. Here we go. So you see there's mostly HTTP traffic. There's some proxied stuff here. And then I have two interesting ones. So this is probably already a finding that someone could have uncovered here that there's two interesting port numbers going on in here. By the way, I'm going to give a book away for the person who's going to tell me what this capture file is. Where does it come from? If someone can nail it on exactly where and which one? . Who's that capture flag first? Is that Trey? All right. Did you already get a book? Did you already get a book? No? I'll get you one. And the person that can tell me what year that was is going to get the second book. . What's that? . 8888? It might be. Not necessarily. If you can look at the capture, you can find out, right? Just by the port, you might not know. . Actually, I'm pretty sure it wasn't. The year? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . months, then I will believe you, but I believe there was another service running, which was actually something really weird. But you guys should investigate that. Just by looking at the port numbers, you might not always, a lot of times you don't know really what the traffic is, right? You can see a port 888 traffic, but you can run anything over that. And if you actually look at this traffic, let's just do that. Let's see whether this is actually Tomcat traffic. So what I'm doing is I'm using a capital A here, which does, I will show you what that does in a second here, if I find the pipe again here. It gets you ASCII output. Now, what do I do, or why is this not useful right now? Anyone? BSD filter? Sure. But why is the ASCII output not really useful right now? I like that. So I'm not capturing the full packet right now. By default, the capture length or the output it gets is, what is it, 68 bytes? Something like that. What is your size? What size do you want? Medium? All right. So what you have to do is do a minus S, and I always confuse which one it is. That was not it. It's just a small one. So here now, you actually see some of the traffic. You see here, application, octet stream. It looks really weird to me. You could probably try to extract just the traffic. It's an ASCII part. System.runtime. This looks Java-like or something. Or .net. So that wouldn't be a Tomcat, I guess. There's some get URLs in here. User agents, curl. There was a wiki running there, apparently. Open wiki. So I need to take the other suggestion over there. I need to filter just 8-to-8 traffic. Most of it looks kind of funky, lambda core database, connect to log in. So did any of my play capture the Flac 2004. So you guys don't know what this is. I can't barely remember what it was. But maybe someone find some by looking at the captures and it's going to tell me later what it was about. I'll leave that open for now. This is kind of interesting. You can go through here and figure out what these things are and you see some text in here from the responses probably. But if we want to continue visualizing, that's really why we're here. Another thing that I usually do as one of the first things when I look at a capture, I look at an afterglow graph and you can probably tell I have done this before. Not on Jan's keyboard, obviously. That looks sort of boring. What I did is I just sourced destination communications. I see who is talking to whom. No caller, nothing. I see that there is this one machine here, 4160, that goes to all these different IP addresses. Then there's some other thing going on up here. There's a little more traffic. These two machines here obviously for some reason are talking to each other. Let's add some color here, I guess. That might be interesting. How I go about that is let me find sample.properties. Jan, that's another tool to add. Locate. That might be nice. If you guys have suggestions on what to do on Davix and things that you're missing, Jan loves getting suggestions. Okay. It doesn't mean he's going to implement them. User, local, share. Let me do this. Share afterglow sample.properties. Does this read IIS logs? Does it read IIS logs? Is it actually? It actually... Yeah, the commerce log. It's actually a little separated. What you can do is you just... If you have a file that... They're space separated. They're space separated. Okay. What you can do is you can use an awk command to extract the columns that you want, and then format it as a comma in the output to do that. Here is a sample property file from afterglow where it basically colors the individual nodes. I can... I can have individual assignments for the source node, the event node, and the destination node. Right now what I did, the graph before only had two nodes, the source and the destination node. In that case, the event node here wouldn't matter, but a lot of times you have three column output, so source, destination, destination port, for example. Then you can address all these three types of node individually. What I'm doing here is I say, well, it's yellow if the first field... There's an array called field. That's implicitly there in the property file that you can address. If you say $field 0, you can put a regular expression here. This is really just Perl code here. I say, if it's 192.168 anything, then I want to color it yellow. If it's in the 10 subnet, it's green yellow, light yellow 4. If it's the 172.16 space, and red otherwise. Yeah? I think a good feature would be just to support like that. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. So, we don't have to the . Yeah. The suggestion would be that support different data inputs. With the parsers that are on there you can actually quickly look at them probably that might make sense here. I guess they're probably user local share bin. Oh, user local bin. Yes. Yes. Yes. Let me see, star, two, C, three, hello to the Agneta. There, that's not, that's not the audio. We're speaking encrypted here. Some people can decode, but some can't, but that's on purpose. So. It's roughly 13. So these are the parsers that are in there. So I have a parser for Argus, IPFW, PF, snort, alert logs, and tcpdump. Actually, this looks like there's a couple missing. I might have other ones, but. I'll show you. Is anybody writing parsers that go to some sort of centralized structure security event format, like IDMVF, or whatever that open event format is on my marketplace these days? Or do you regard that even as a useful? So gentleman is asking whether there is a way, whether we support a common event format or something with all these tools. So keep in mind, these tools are not controlled by us, we just bundle them on the CD, that's it, right? So we don't really control what kind of input they take, and different tools have slightly different requirements in terms of how data has to look, so a node, or graph, for example, needs to have nodes and edges that are connected and need to have properties and so on, whereas a bar chart doesn't need that. We could probably have parsers that go from generic formats to a common format, and then you just have parsers for the common format. Well, have you guys seen those MSRC guys running around with the guns with the marshmallows? Have you seen them? No? They had this, like, fight going on yesterday with marshmallow guns. I would actually shoot you if I had one because you mentioned IDMEF. For those who don't know what IDMEF is, it's an intrusion detection message exchange format, which is a standard for intrusion detection systems to log in a common way. I think there's an extension for Snort to do that. I have very strong feelings about that format, as you can tell. We're actually working on another standard right now called CEE, Common Event Expression. It's one of those horrible acronyms from MITRE. They have everything from CVs. It's CW. It's CCE. It's CEE. It's CME. I'm not making them up. CPE. It's horrible. But CEE, Common Event Expression. We hope that we're going to address the shortcomings of IDMEF and come up with a decent standard. Anyways, no, we don't have parsers from all the formats to a common format. This is something that commercial tools are trying to do. If you buy it, a SIM, for example, they have all kinds of parsers. And they spend a lot of time and money maintaining those things because the sources change, right? Like, I don't know, Snort might change their log format. At some point, someone decides that the syslog output needs to have another field in there. Well, you have to change your parser to support it. Every update, and Pixis, for example, they, every message needs a different parser. Every message looks different. So you have to have these, like, slews of regular expressions or some way of parsing that thing. That's really not what I have time and I'm not really in the mood to do that. I'm encouraging you guys to submit the parsers you have on Secqviz. There's a section of parsers where you can submit some parsers. And I think Michael Rash is unfortunately not here anymore, but he submitted some for IP Tables, I believe. So there is a place where you can collect them. Put your things up there. I put mine up there. You can have them. If you contribute some, maybe someone else is going to benefit. You can also use Splunk. This is going to be, hopefully, my only plug for Splunk today. But Splunk is free if you use it up to 500 megabytes a day. So you can go download it, use it. And there are field extractions. They're sort of like parsers, but not really, that will help you extract the individual fields that you need. So there's a few there. So these are some of the ones that are on the CD. Actually, the tcpdump, snort alert. It's the ones I mentioned, I think. That's the ones. Yeah, if you have more, we'll bundle them. I mean, we're happy to do that. Now I lost track where I was before. Oh, I did, sorry. I did, good. All right. Where was I? I was at, oh, here. So what I was going to do here, I actually know a little bit of something about this capture. I wish I had, let me just do this. You guys feel free interrupting me again if you have anything you want to say or share or ask. Can you repeat that, please? The capture from an OpenBSD or? OpenVMS. OpenVMS. No. What was it? . No, I don't think the captures were from OpenVMS. No, I'm pretty sure it wasn't. So if you look at this file again that I generated earlier, there was some structure in here. So maybe to tell you a little more about this capture file, the capture was, maybe I have to explain a little bit of how capture flag works. Who doesn't know how capture flag works here? Hands up for those who don't know how it works. One person. Thank you. There's probably 90% here who don't. I'm assuming. Who wants to explain how it works? Anyone? Wow. It's great to have an interactive crowd. All right. Who dares to explain how it works and comes up here and can have another book? The person who wants to just come up. Come up here. You fight whoever is first. He has to put his shoes on first. That's the advantage of being in the first row. All right. Okay. So there's a bunch of teams. Each team is supposed to compromise the other team's servers while maintaining their own server. And each server has services on it that have a flag. So it could be a website where, you know, their picture of their flag is on the web page. The ones I've watched before, they had, like, they had a mud, I think it was a pearl mud. So you'd connect to the mud and one of the rooms in the mud would have the flag and you could view it. And if you could hack the mud, then you could change the flag. And, you know, all these services would be running on the service, like, well, it depends on which year it is. But all these servers, services running and, you know, if you can break into Telnet or SSH or whatever, you know, crack their password, then you change one of the flags. So the longer you own the flags, the more points you get. And, of course, you lose points if your flags are captured. And there's a knock and they monitor everything and keep track of what's going on. And they record all the TCP dumps so that people can look at them later. What do you know about the network set up? Anything? Which year? 2004. The idea is always fairly similar. Do you know anything about it? I know there's each team gets a Class C. I've got 192, whatever. It's actually class. Yeah. It's a C. Yes, you're right. Sorry. And there's a router in the, like, a Cisco router in the middle, I believe, a bunch of 100 megabit or gig switches. Yeah. So, all right. Thank you for being very brave. I'm going to explain some more. You're welcome. I'm going to explain a little more. So, as the gentleman said, there's eight teams. Each has a C class. And it's kind of important to see or you can see that in the capture here. 192, 168, four is one team. Seven is another one. Five is another one. So you see here, what team was this capture taken from? I don't need the name. But come on. Can you even read the labels here? Four. Four. Right. So, the gateway of the team is, I have to be careful. So, each team can capture their own data. And whoever runs the game, like Ken Shoto or whoever, they could capture everything. But obviously, the teams can't. So, this capture has taken a team four that I was playing on. We had two server, dot one and dot two. That was, I think, the year that they screwed us all over and gave us Windows machines to protect and to keep up a new hack. I was playing on the Unix Linux team. And we brought all the Unix operating systems, all the latest patches, everything with us. We were ready for any kind of Unix flavor. They gave us Windows. We went to the room and started downloading Windows patches over some weird link because we didn't trust the networks here. It took us forever to get the patches. And we actually ended up getting one of my friends from my previous employer and said, hey, you know Windows. You can come and administer that for us, please. We were all these Unix geeks. We had no clue what we were doing. So, obviously, we didn't do too well in that game. So, if you look a little more here. So, these are two servers. And there seems to be this one machine, 4.160, that connects out to the other teams. So, this is one of our attackers generally trafficking to other teams. So, he's attacking those machines. Now, the interesting thing is all the traffic coming into the network comes from one IP address. The teams don't see who is actually connecting to the network. They don't know what team is attacking them right now. And even worse, you don't know what the score bot is coming along or not. So, Ken Shoto or whoever organized the team, they run a score bot to figure out whether your services are up. So, you don't know what is attack traffic versus actually legitimate score bot traffic. Because otherwise, you could just run a firewall and block that stuff. You can actually, what we did was we tried to do some analysis on the captures and figure out if there's anything in there that indicates. . . Whether the score bot comes along or not. And that's every year people try to do that. This year here, it was fairly simple. And this is maybe something someone is going to find out. If not, I might lift a secret later. Anyway, so we have to structure here a little bit of what happened. This might be interesting to use that knowledge in your further analysis. What else we can now do is... . . I'm actually working on this one here. So, what I really want to do is I want to color my servers differently, right? So, if it's four dot one. Let's do this here. One or actually two. Then I want to make it yellow. And actually, let's just comment these guys out. . . . . Ah, yeah, okay. What do you want? Green? What's that? I'm missing a backslash? Where? Here. I'm telling you, it's a real challenge typing on a Swiss keyboard in VI. Because I think the developers of VI actually had US keyboard layouts in mind. They put the shortcut keys that you need a lot, like, I don't know, pound or dollar in there. In Swiss keyboard, you have, like, Alt-G-R-3 for a pound. Why do you, bitch? It's your choice. Yeah, but then I don't remember the US layout. I'd have to do it blind. . . . . . . . . Someone get me one of those guns. Please, seriously. . . . Here. This was the command I ran earlier. What I'm doing here is I'm just adding this property file with minus C, right? Let's see what happens if I do this. And actually, I think this is just an old habit that I put things into temp. All right. So now, ta-da, we have green nodes. And this is not what I wanted. No one caught the mistake on my regular expression. Seriously. . . Even more obviously, guys. Here we go. And we only did sources right now. So we could probably change that too, instead of calling up source. Did you get that? Why it didn't work before? It was kind of fast, but. . . I didn't put the dollar in the end here. . . I have to stop the regular expression there. Otherwise, it's everything that starts with a 1 or a 2, which is a lot of addresses. So now it changed the color source to be everything. And now everything is red or green. Now what I want to also do is probably I want to have per team, actually let's do this, blue. So now we could go and code kind of every team as a different color. I'm just going to, whatever, I'm going to want to do one. You get the idea. Did I catch one that wasn't in there? Five? What's wrong here? Is that right? What am I doing wrong? Let's refresh again. Oh, wait. Is there anything wrong here? No, I didn't miss the dollar, because I want all the fives. There is a five, right? There's one? Oh, me neither. Yeah, five. NVI is here? All right. I'm learning . I like this. What is NVI? No color? That color red over on it. . Whatever. I like VI. . Um. . No. . . It shouldn't really matter, but. . So what does color red affect? It's basically first match wins, right? So the most specific should be first. So I color all the fours. And then I color the fives with blue. And then the rest would be red. . Yes, I do. . Oh, are you missing an F on the blue line? . . . . . . . . . . . . . . . . I really don't see it. . . It could be because. . Yeah, that might actually be it. . . . . . . No! I don't like that. I give up. All right, next. What else do we want to do here? Let's generate one. Anyone come up with anything yet? Anything interesting they want to share already? Or want me to do? Anyone want me to do something specific here? The question is what format of snort log would I write? I would probably do an alert log because I have a snort alert to CSV converter. So if you run snort minus capital L, capital A full over your capture, we can probably... You're really pushing me here a little bit, which is kind of okay. Let's just try this. So please correct me if anyone... Yeah, well... Man. Didn't I say dash? Babin, can you read? Why don't you come into first row here? You can actually read it. Oh. That was? Exactly that? I haven't seen... Actually, Marty's not here. He's traveling. Otherwise... Oh, yeah. You need to tell me to do something. All right. Let's do that. It works for you? I've got a dash read. Oh, okay. That might actually work. Ah, here we go. Whoa. So let's just capture this into a file. To snort. Wow, there were a lot triggering. What is in here? This is not the output I want. This is TCP dump type output. Um... Um... Okay. Um... Um... . . . All right. All right. Interesting. Oh, here we go. Ta-da. Empty. Yeah, there. All right, here we go. Oh, here comes this challenge again with the keyboard. I love it. How do you? Here. Starting with a pound. I'm going to kill that. Oh, maybe not. Actually, that's not what I wanted to do. A comma dot S, doom-de-doom, space include, slash include. All right. That wasn't bad. And then we want to do this. Oh, yeah, great. This is going to take a bit. I really want to do that, because different rules need different, I guess, variables. And so I just enabled all the rules, and one of them asks for SH ports. No? No? Yeah. Yeah. Yeah. But was it really complaining about that? I think it was complaining actually about something else. It was like Etsy snorts rules bleeding boot cc excluded on our rule type. There's something wrong with that file. Rules bleeding. Rules bleeding. Let's see. So the question is whether we can change the edges to kind of encode the amount of traffic that was submitted. The problem is that yes, you could. You can change the color of the edge right now. So if you say color.edge, you can change that. You cannot change the thickness because GraphVis doesn't support that. If you have any other tool that you read the dot file with, you could change the thickness of the edges. But Afterglow doesn't support it right now because I'm kind of going with the feature set of GraphVis. But if you send me an email and say, hey, but look, this tool here takes dot files and it does edge thickness, then I will add the feature to Afterglow. But I get that question a lot. Unfortunately, I don't know why GraphVis doesn't support it. Maybe it's just hard to deal with all the thick edges and then scaling them down. I don't know why. Yeah. The graph would get messy. I agree. But sometimes it's really useful, especially if you scale it right. It's really nice to see that you have this one big pipe with a lot of traffic going on. I usually, I try to use color a little bit, but I got it. Gee, this guy is good. Is that what you're looking for? Yes. Oh, this is great. All right. All right. What did you do? Well, not really magic. I just called the original config files. I copied back the original one and put the capture into it, and that's it. All right. I've defeated. Okay. So now what we can do is var log alert, and then run it through. Snort alert to CSV. I hope this works. It might not, because the format might have changed. No, it does, yes. So we can now, well, SIP div is not going to be interesting, because we already saw the communications, right? We took the TCP dump output. We know who's communicating. We probably want to take the name and the SIP, maybe? Yeah. Let's see whether that works. Yes. All right. So then, so what we do, what I want to do is just see what sources triggered what signatures, right? I mean, one way is to use active load to do this, I guess. Neto minus tgif minus o test.gif. Okay. Interesting. All right. So we have a few signatures being triggered. You know, I don't like this. Sorry. Just kind of preference. So you see that 401 triggered a few signatures here. It's a little messy, the graph. It's kind of overlapping stuff here. But there was a scan nmap from 4-1-52, which I probably expect. This is one of my attackers running this scan against someone. Let's actually see who it was directed to. So what we can do then is say SIP div name. No more minus t here, because we have three columns coming in. Now we see that, where's the other guy? Here. 1-2-2. It's communicating. He's communicating with 7-2, and he generated all these different signatures. So that's probably fine. My attacker here is attacking this 7-2 machine here. Then we have one of the servers talking to another one, and he's using or he's triggering some signatures. That's actually fairly interesting, because it could mean that 4-1, one of the servers was compromised and now attacks the other internal machine. That's probably something to investigate. It might be that, because it's captured flags, that these servers are already kind of vulnerable, so that the communication of one machine with the other was already kind of funky and triggers these snort signatures. Actually, the next step would be to go in and figure out why these things have triggered, right? Which is always a really cumbersome task, but unfortunately you have to do it. But even more interesting seems, actually, you know what? I was lying earlier. 4-1 is the gateway. 2 and 3 are the servers. So the attacks came in to each of the servers. Sorry. I guess the other graph looked a little different. I didn't see that there was traffic coming from 4-1 to both of these machines. So that's one thing to look at. The problem here is that it's not really useful to look at this, right? Because there's so many attacks coming in. You know there are attacks. And they just come from this one IP. Maybe you can then go back and figure out what exact packets were they, and see whether you can find any kind of identifier that shows whether this is scoreboard traffic or attack traffic. So maybe you see something funky in the attacks that you then can use as a filter later to filter the traffic. But it's not necessarily even that these are real attacks now, because just because I have some null bytes in there doesn't mean it's an attack. Because the scoreboard could just do something really funky, or the flags could actually trigger it or something. So during the game we actually didn't really... We had a snort box running, but I don't think it was useful. Right? Anyways, I guess this gives you an idea of how to run stuff into snort and look at it. Maybe you'll find some more stuff in there if you're digging a little bit. But I was going to do something else actually. Let me go back here. What I wanted to do is really generate this graph here and see who was accessing what ports. So let's see. We should probably change our file here to reflect my misinterpretation. So I'm going to just do... Two or three are the servers, right? So I'm going to do this. And do this again. You guys are awfully quiet. Did you find anything yet? Is that right? I think... No. Four. Two or three. Here we go. This is right. Dum de dum de dum. One. Yeah. This looks about right. So now the gateway is one. Then this was one of my servers. It doesn't show up in communications here, which is kind of interesting actually. And then you see the ports again. And we already did the bar chart earlier. So we kind of know what ports are showing up here. But at least now you see that this guy here accessed this machine on this high network. This is a port number that might actually just be outgoing traffic. And I might not have enough captures to figure out what's the source and destination. So if we would actually go into the traffic right now, this is probably a response to this port and not a communication going out. So this might actually be a source port instead of destination port. But because I'm running heuristics on what is the source, what is the server, and what's the client, I might not have enough information to figure that out. So it just assumes... The communication went that way. So that might just... I think that's probably a false positive there. But this gives you a little bit of another impression of what's going on. What I usually do also is I make the edge lengths a little smaller. If you do 1.3 or something like that, it's a little more compact. So the graph renders a little different. So that's just something I like to do. All right. I want to show you some stuff in terms of using Neato. The things we just did are like static pictures. So maybe you want to explore the graph in an interactive way. So instead of calling Neato and generating a PNG or whatever, you can call L Neato. So this gives you an interactive display. So you can actually drag around nodes. So if there is some cloud and you want to clear it up, you can just drag stuff around. You can... Like... Drop nodes. When you are on a node, you can say D. It's really... It's not easy to use. You need to get to the manual to do it. So you can delete nodes. And... Relay out everything without the nodes we just deleted. So if you sort of see things which you say, okay, that's normal, just delete the nodes and relay out. So maybe you get a clearer display. There is also a thing when you do... Right click on the window, you can activate the bird's eye view. See, this is a small representation of the graph. So now you can sort of like zoom in in the big one with a big or capital Z. And now you can sort of click into the bird's eye view to sort of browse around the image. So this can be helpful. The problem I found out, is when you have really huge graphs, it doesn't really work out anymore pretty good. So... It's a nice feature. There are also other tools. So maybe you're into eye candy. There's a tool called iNetVis, which does a 3D visualization. So we have here a cube, which you can drag around. And... The different X... Uh... Dimensions are like... The green line are the ports from 0 to 65535. Then you have the blue and the red line, which represent the source and the destination address. So now we can run the capture file in this view. So there must be some other GUI. Let's search for it. All right, so... This is the main view. To organize stuff. So let's open our capture file. Browse to the location where it's located. Open it up. All right, so now it's loading. There's some warning. Just click it away. And now... We could run it in real time. Like, we could go here and press play. So now the capture file is running. You see this on the bottom left of the cube window. And now you see the different, uh... Welts coming up. So these are the connections which are being visualized here in the cube. We can sort of fasten up things. Like, oh, 10 times fast. Or we could say, okay, let's just head at the end. So we move the slider at the top here. And then everything should get sort of visualized. So now everything is sort of one line. Probably it's not one line. Sort of just one system attacking another and on all parts. So probably we have to sort of modify the display to not cover the whole internet space, but just to cover the space of the CTF game. So you can do this with, uh... with view plotter settings. And here you can define the range, uh... of the different dimensions. So it's somewhere in there. In 192, 168, something. I'll take a net mask of 20. And I do the source. Dimension. Also 20. I accept these changes. There's some warning. Go away. All right. So now we have just a view of the traffic within that range we've just defined. So the nice thing about this is you not just only see, uh... vertical scans, meaning that a system scans a particular system on all ports, but you can also see things like a horizontal scan where... where the scanner just hits one port, like port 80, but through a huge range of IP addresses. So you'll notice this here in these graphs pretty fast. . There are limits. I don't know how far it goes, but there are limits. . There are also tools on the disk which allow you to, uh... sort of cut files up. So if you have a TCP dump file which is really huge and crashes iNetVS, you just cut the file up. There are things like EditCap on the disk. And we'll probably add other tools like TCP slice, I think it's called, to the disk in the next version. You can also do things with EtherApe, which allows you to view the traffic sort of in a circle. So let's open our capture file here once again. Say OK. And now it's sort of going through live mode. You see how the traffic develops. . The tool is nice if you do online, sort of you have live traffic you want to look at, into it right now. Then this is really helpful. But like postmortem, as we do it here, it's not very interesting because you cannot slide through the dimension time. So you say OK, let's see it in what happens in 15 minutes. So all the nodes here are sort of put in a circle. And each of these lines here represents a connection between those IPs. And the color represents the intensity of the traffic. And on the left hand side you see which protocols are in the traffic. Sort of to get an overview what's there. I think the color is actually encoding the protocol, isn't it? I think you can even change that if there's a tab that shows the color assignment. Yeah, that's right. So there must be some setting here. So you can color the things as you like it. Did anyone find anything interesting or any graphs? . . . You can do it live if you like. Just come up. . . . No, I'm curious. You're in for a book. Eric, do you actually know how to operate a Linux machine? Yes. I can stumble my way through it. I make the phone picker. I'm not going to say who he works for. Otherwise people won't see anything. So let's see. Font, enlarge. Now you're making me remember the whole syntax again. We'll help. We're nice guys. Oh, I made it smaller again. I hate it. I'm sort of challenged here. On your own laptop? Yeah. Alright, so I'm ready. Oh, here we go. Anyone else? Anyone else? Three, three, three, forty-two. Hold on, just source traffic. Okay. So three, three, three, three. That's service? Jake, help me. That was... It was not MUD. MUD was 8888. .NET. Oh, that's right. .NET. No, that was 8888, I think. Then three, three... We just looked at it. Which port did I look at when we saw that .NET stuff? I can't remember. But there was a weird .NET service running. And then the other one was the MUD thing we looked at. The text you saw and the minus A on tcpdump was actually from that that you also mentioned. Here, help me out with the tcpdump. Yeah, right. Where you could kind of teleport from one room to the other and steal the flags. What were the switches? tcpdump. Oh, tcpdump? Lower the switches that you were using. Maybe we should install an alias for that. I actually wrote a shell script online. Actually, just before when I prepared for the talk, I started a little shell script that generates the most important graphs. It just runs through the same capture, generates a bar chart of the source, destination, services, and then a connection graph. I'll do the same thing. I'm going to publish mine first. I just saved mine in the script. Here. Do you want to do it on everything? No, that's good enough. Do you want to parse it? No, that's good. This is VI. Oh, you're not in VI right now. I'm in VI mode. Oh. Just hit enter? Very sure. This is... This is not an English keyboard. Could you give me... Could you throw me a bone here? Set mine as omex. That wouldn't help me. So, are there any questions in the meantime? Everything clear? Yeah, that's the one that I was... What about chigobi? What are the graphs? No, it's a manual. Where should I put it? I don't know. Which one? This one up here on the one. Okay. Yeah, so, it's just a dot block. This is just... The pictures you see in the manual, these are really simple things from data that came along with the tools. So this is not really security related data you see there. So it's just a sample how to use the application. What would you use for chigobi for? So, if I remember correctly, I'm trying to find it in a book. Here. I was saying I have to peek. Basically, it's a tool that helps you generate bar charts, scatter plots, parallel coordinates, just a whole bunch of different types of graphs. The interesting thing about this tool is that if you have a certain data input, you can say, generate me a bar chart of the source IPs, and then generate me one of the destination IPs, and then show me a parallel coordinate where I have both of them and maybe also the destination port. Now, these three graphs will all be linked together. So if I select one of the source and one of the graphs, it will update the others with your selection. So you will see what machines this source has talked to. And all of them will update at the same time. So you can use different views on the data to figure out what's going on in there. This is actually a really, really powerful paradigm that you have these linked views. There's also a concept called dynamic queries where you can do on the fly investigations and drill downs and everything updates in real time. So if you start filtering for a certain source address, for example, you get rid of everything else, and right away it's there. So you do kind of a visual investigation or dynamic query, as it's called, to look at what the data is really about. That helps a lot to very quickly see this source is connected to all these machines and then on these ports and maybe you want to then pivot back to see what port these other machines are connected to. It's just a very easy way to play around with the data. There are commercial tools. One that I was allowed to use also for the book and I know pretty well by now is called Advisor. That's kind of the commercial end of G-Gobi. I think Mondrian also is a similar tool that has linked views. It's really powerful to do analysis in there. I did one analysis on botnets that I describe in the book where I use Advisor just because I couldn't find any open source tool that would actually do the job. Otherwise, everything that you find in the book is all done with open source tools. I think that was the only analysis I used actually, something you have to pay for. What does it cost? I have no idea. I think it's fairly expensive. It's a BI tool, so business intelligence and they like to charge for what they have. To be fair, it's a really commercial tool. It has a lot of features. It has different data inputs you can take. It's fairly powerful. The price is definitely justified. Unfortunately, no one came up with an open source variant yet that's good or even better. It wasn't very interesting when I only took the first 2,000 records, so I parsed the entire file, which is like 100,000 records, but it takes forever for GOB to parse that entire file. This is where a lot of the visualization tools, even commercial ones, they have problems with large data and GGOBI specifically, they have to put everything into memory so they support dynamic queries. If I click on a certain bar, a source address, they need to know what destinations are linked to that. There are things in data mining with the OLAP cubes and whatnot. This is not an OLAP or this is not a data warehouse where you actually run something very powerful underneath. This is just putting it into memory and probably using some really horrible data structures. Yes. It actually kind of jumped out on this visualization. I was having trouble getting it to show... It appears to only be showing... It appears to not be showing all the IP addresses. I was having trouble getting this tool to... One of the other things is these tools are all different to operate and GGOBI I think is fairly horrible too. At first I was really excited because this appeared to show a lot of activity on port 3333, but then I was a little bit less excited. Now we can open a second one. This is a scatterplot matrix where you have... Let's see... Here is the... I have this... I have a presentation on this. Most of the visualization tools have... They don't really follow good principles. One here is just label the freaking axes. You know what? This is actually a problem of how we generated the data. I should not even blame the tool. In this case, the tool expects the first row to be the name of the column. I think the first one just says 3333. I guess the tool does it. It actually does show the axes labels. I guess we just infer it. This is the source address here. You see the distribution over... That doesn't make sense. I don't even know what this would show. This one here shows source addresses and then ports going that way. That would make sense. If we edited that CSB file and put a header row in... Yes. Every tool does it different. You don't know. You have to know that the first one has to be the label. For other tools, it's even worse because you have to do many transformations. One of the worst ones was probably Parvis, I think, which is a parallel coordinate display. What you have to do is translate all your data input from zero to one. You have to scale it all in. If you have IP addresses, that might work. You can probably have a mapping. But what if you have strings? How do you map them in? You have to have a hash table or something to map them in. That was horrible. That's why I ended up not using that tool much. I think now I just saw a posting on setquist.org. Someone posted in the last couple of days some parallel coordinate visualization tool. I still have to look at it, but that might actually finally be one that we can use. I think we're short of being done here. Does anyone else want to share some last thoughts with us? I'm going to switch this over to my laptop again to kind of conclude. Anyway, anything else? The question is, or the comment was first that this is very network focused or event focused. Whether I gave or we gave any thought to binary analysis, and this is actually perfect leeway into this here. Greg, here's the image, Greg. The book and what I normally do, I'm really focusing on time series data, everything you can associate a timestamp with. That's the network traffic logs, that's maybe configuration files, all kinds of IT data. You can associate a timestamp with. Greg, who's sitting over there, if you don't know him, he's working a lot on doing binary analysis. In his book also, he's showing a few tools, one of them, which is the tool he wrote, that he can use to analyze binary captures. I guess for forensic investigations, you would run a memory dump in there, for example. Greg's presentation is probably something you should look at if you're interested in that. He showed how you can go through memory dumps and visually figure out what's going on in there, which was very interesting. That was that. Any other? Any other final comments? Yes? Which one? Oh, Backtrack 3 has a new visualization tool in it? I guess you have to talk to Max. Apparently there's a new in Backtrack 3, there's a new web crawler that visualizes some of the traffic. It's a data miner and data graphing exploration. I forget the name of it. Post on Secquist. Just make an entry here. Something cool in Backtrack. People can go there and see it, so we all get the feedback. Okay. Anything else? . . . DCB dumps supports that so that it can send PCAPPs to a remote station? . Wireshark. I haven't played that. . Can any of these tools handle IFTTT? Yes. There's a few on there that are actually kind of interesting. One is called Realtime Graph or RTG from Philippe. That might even be wrong. I'm a French guy. He wrote Scoppy also. It's on the CD or it's on Davix. Check that out. You can actually run... What I did is I wrote just a bash script for a while loop, and I pumped the TCP dump traffic in there. I think I submitted that on cyclist.org. If you go and poke around in there, I actually show the little script you use. You can add new nodes on the fly, and it does these 3D kind of link graphs and just adds new ones. They get a little messy. That's why I think I reset it after a certain time, but that's kind of cool. I used to run that in the background on my machines as a screen saver. That's kind of interesting. You can also... What I do sometimes is run... Again, it's just a while loop. You can run a while loop and pipe 2,000 lines of TCP dump into a file and then run Afterglow over that and just generate an image every 2,000 packets or whatever the number you're comfortable with. Then use some GQ view, for example, that updates automatically when there's a new file so you see the traffic at every instant in time. You will notice that you will actually recognize the pattern of normal traffic. I was able... I ran it at work, and again, it's a screen saver, and I was able to see when someone or when my machine did something weird because the pattern just looked completely different. There's some other tools that do real-time traffic also. I think we have to wrap up here. If you're really fast, I have about five t-shirts left if you want one. Eric definitely gets to book. Didn't I give you one already? Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. That's good. We're going to hook up Eric's display as the final slide. Thanks, everyone, for coming. I hope this was a little useful. It was an experiment to run this at DEF CON as a workshop hands-on. I know it's not the same as running a training where everybody knows they have to bring their laptop and do this, but I hope it was a little fun for you. I enjoyed it. Thanks.