Start with Rui Ondo. Hello everyone I'm really excited to talk here. So thank you for listening to me and in this presentation I'm going to talk about weird application using multi-threading for analyzing huge PCAP files. This is a tool which takes full advantage of multi-core processor and achieve high performance improvement. Actually is there anyone in this room that thinks that Wireshark is a little bit slow? No? The design goal of this tool is kind of multi-threaded Wireshark with automated deduction. So I guess multi-threading can be one of the new frontier for packet inspection. Okay. Sorry. My name is Rui Ondo. I'm working in governmental organization. So I'm not weird. So my talk is divided in four parts. At first I would like to talk about the current catastrophic situation of traffic analysis. The funny thing here is that we have too many packets to be inspected. However, for the problem to have the solution we have more packets. This is kind of really helpless situation. I'll tell you what later. And the second one is the main part. When you build a tool for analyzing using massive threads you have some selections. How to combat code into a concurrent version. The selection of futures and containers and synchronization mechanisms such as mutex, lock-free, and something like that. And the third part is a demo and experimental result. Simply stated, speedup is a ratio of parallel execution time to serial execution time. So, I'll show you the comparison. Then, let me conclude this talk. This slide shows the catastrophic situation as everyone already knows. Internet traffic is increasing at an exponential rate. However, there are too few professionals. Sorry. Sorry. I was so excited to forget what's going on. Thank you. Thank you. Huge traffic imposes a great burden on security researchers and analysts. But traffic explosion is not similar to the hacking or exploit. Because hacking and exploit will be finished within several minutes. But this is not the case of traffic explosion. Unfortunately, traffic explosion keeps exploding like an accident of nuclear power plant. In my case, in my laboratory, I have 200 to 300 raw files to be stored in the server to be inspected. Well, during this 20 minutes presentation, 3 to 5 gigabytes of file is stored to be inspected. This is really a helpless situation for me. So, automation is really important for me and everyone in the audience. But, from my experience, open source data mining tool does work in many cases. Because in the world of advertisement and marketing, commercial tool is not going to find people trying to hide behind these to make things more worse, open source data mining tool simply ignore people trying to hide and assume behavior is a part of everyone else. So, I would like to emphasize that packet dump is the last resort. And how to find source to be trusted. And machine this one million versus one trillion machine learning has table property. I tell you what, if machine learning doesn't work on the data set comprising one million training data set, what is needed? What is needed is much more bigger set. This is unexpected because if machine learning failed to fail in the data set comprising one million training data set, the intuitive conclusion is that it doesn't work at all. But according to this paper, all we need is much more bigger packets. So, the situation is very curious, isn't it? So, Astra has four features. At first, Astra should be run on commodity workstations and laptops. It can run with reasonable computing resources. Because GPU and crafting system such as Spark is still expensive and high cost and sometimes And more importantly, Astra uses which is really old programming style. When writing a program and choosing appropriate level of abstraction is really important. Usually, hardly anyone misses the old programming method except hackers. What we are copying here is the real-world packet stream which is huge, not nice, not organized in regular pattern and unfortunately unpredictable. So, flexibility is important. If you use assembly language for analyzing malware binaries. So, ROS and MPI expose the control of parallel computing at lowest level. But, at the lowest level, we don't have libraries, containers. And schedules. So, you have to implement these utilities in full scratch by yourselves. Like the era of 1980s or 1990s. I guess this field can be one of the new frontier for packet inspection. As a result, Astra is compact but powerful. Actually, Astra has about 100 lines of code but can process about 75 million packets in 200 to 400 minutes. These two intuitively simple. Astra takes two steps. Reduction using task decomposition and clustering data decomposition. As you know, reduction takes a collection of data and reduce it to single scalar body. And the clustering is a task of grouping data in the same group in such a way that data in the same group is more similar than to those in other groups. And the important thing here is reduction passes container to clustering. The container is a really important key in this two-stage processing. A container is a class template of C++ and the future selection are almost all anomaly detection of packet based on futures. There are many research efforts and futures could be many. But the important thing here is to find a proper representation for reducing massive pickup file. We use this representation in the middle of this slide key value and we use two structures. This is a little bit complicated. Please see the source code in the detail. And let me talk more about containers. Containers is a really important point for multithreading. You have three options. First one is STL. STL is an old basic and regular programming style. But STL is not concurrent friendly. So it is a standard practice to wrap up a lock around STL to make them safe for concurrent access. And the second one Second one is Intel TBB. It's an excellent library but Intel TBB provides highly concurrent container. But highly concurrent container is sometimes high cost. It takes longer time. And I guess this one is mainly for scientific computation. So unfortunately what everyone here is doing is not like science computation. So the data is not well organized and unpredictable. So in this case TBB is not suitable I guess. And the third one is emerging technology of Thrust. Thrust is a C++ template library for GPU. By using Thrust you can write a code to perform reduce scan and something like that. Accelerated by GPU. But unfortunately, as far as I know, there's no plan to implement hash table associated container in GPU. So I guess it will be time to be common for packet inspection. I guess this could be a future work. This slide is a main architecture of Arthur. If you have a case when the computation time on individual pca file is variable and unpredictable you would be better served by task decomposition. Specifically if you have a case the amount of computation time will vary. Dynamic scheduler will be best. And here as with dynamic scheduler of task decomposition load balancing is important to take into consideration. You have to implement scheduler by yourself. Please see the upper side of this slide. This is a shared container which is queue. Dynamic scheduler involves setting up the shared container which holds data and arrow threads to pull out tasks. When the previous task is completed. So you should protect shared container so that the thread can be assigned correctly and task should not lost through some corruption of shared container. OK. Let me show about experimental result. To put it simply the speed up here is the ratio of parallel computing time to sequential computing time. And scalability. So what is scalability? I think scalability is a measure of how much speed up the program get as you add more and more core and thread. With I guess this kernel tuning is proper I don't know exactly but with proper tuning of Linux kernel Azure can 75 million packets with 500 threads in about 287 minutes. To tell the truth there are some rules to be improved because the size of shared container is not proper. Rock intention and context switching occur too much so but I guess it's reasonable that can process more than 7 million packets in several hours. I would like to skip the attack detected in detail because some issues of power of data set. So instead let me show you a demo. First of all binary is compiled according to the configuration of number of threads. And reduction step one sorry it's too fast so I can't step two and building binaries for clustering. Clustering has 5 to 7 dimensions and data is truncated for this demo which is too short. Do you know what's going on? Sorry I don't know what's going on. Because machine learning is too fast. Machine learning relies on so huge data set and processing speed is so fast. So machine learning might solve problem. We cannot expect it to solve in a way such that we don't fully understand. So demo is too fast. So I cannot talk about it. So let me conclude this talk. I have talked about a little bit weird application which is called Astra using For coping with real-world pickup stream which is huge not nice and sometimes evil flexibility is needed just like you should use assembly language for malware binaries. But using row thread and MPA takes advantages of retrieved full performance of multiple processors. And Pthread can expose the control of parallel computing at the lowest level. But unfortunately or not we should implement everything libraries, containers, schedules which is really exciting for me. And as a result offer maximum flexibility. So as a result Astra is compact but powerful. Astra has thousands of code and can process more than 70 million packets and 200 to 5 million sorry 200 to 200 to 5 minutes. For future work Astra must be speedy up because there's room to improve OK configure the size of containers and applying TBB and GPU and I really recommend this merge threading for packet inspection. It's really exciting. This can be one of the new frontiers for packet inspection. So thank you for everyone. That's all. Thank you for listening.