00:00:01.001-->00:00:06.006 >> Uh so with that, uh, Feng Xiao. Good luck >> Hi everyone, thanks for coming. I’m Feng 00:00:12.946-->00:00:19.753 Xiao, a zero year PHD student at the Pennsylvania State University and there’s supposed 00:00:19.753-->00:00:24.758 be- to be another speaker but he can’t come due to some visa problems so I just put his 00:00:27.461-->00:00:32.466 picture here and my stand so we can together to give the presentation to you all. Thank 00:00:35.335-->00:00:40.340 you. Alright, so today, we are going to talk about the new attack. The attack is about uh 00:00:47.447-->00:00:52.953 with this attack, a weak adversary is able to hack the brain of the software defined 00:00:52.953-->00:00:57.958 networks, the SDN controller. Well, here is the difference between the legacy networks and 00:01:01.295-->00:01:07.901 the software defined networks. Uh the legacy network is always vendor dependent, it means the 00:01:07.901-->00:01:14.074 network devices always work independently with predefined functions and we cannot change 00:01:14.074-->00:01:19.079 it anymore. But in SDN, the whole network is treated as two planes, the control plane, the 00:01:21.548-->00:01:26.553 upper layer, and the data plane. So, uh all network functions are now being placed into the brain 00:01:29.957-->00:01:36.763 of the network, the controller and the host and switch this forwarding device are now placed 00:01:36.763-->00:01:41.768 into the data plane. Alright, so this is the difference between the two networks. So, and this 00:01:44.271-->00:01:50.110 new architecture now is widely deployed in production environments with growing 00:01:50.110-->00:01:56.216 communities. On one hand, the open source organizations like Linux foundations are sur- are 00:01:56.216-->00:02:01.154 supporting a large number of SDN projects like the OpenDaylight, Floodlight, Honors, and 00:02:04.524-->00:02:09.529 companies like Huawei, Cisco, also released their commercial products uh uh and their 00:02:12.466-->00:02:17.971 applications. And on the other hand, the growing communica-, the growing community 00:02:17.971-->00:02:24.544 accelerates the replacement of the network infrastructure. For example, the world leading web 00:02:24.544-->00:02:29.549 scale providers such as Google, Microsoft deploying SDN in their data centers. So, the this is 00:02:32.886-->00:02:37.891 how SDN are used today. So when some people are using it, where people consider to hack it? The- 00:02:42.629-->00:02:47.634 the attack and when the attacker can successfully break into uh software defined network just 00:02:50.003-->00:02:55.008 like we connect to the wifi here if it is a software defined network architecture So uh, he 00:02:57.310-->00:03:01.681 will probably target at the controller ‘cause it is the brain of the network. In this 00:03:01.681-->00:03:08.188 talk, we concluded three categories of common attack objectives for attacks on the 00:03:08.188-->00:03:13.193 control planes, the denial of service, data leakage, and network manipulations. And in 00:03:16.096-->00:03:22.402 this tables, some objectives have been achieved by previous researchers and some- some are 00:03:22.402-->00:03:27.407 not. And we discovered that this exist in attacks, for example just like the topology poisoning 00:03:30.277-->00:03:33.980 attacks, our focus- focus on the service logic of controller which means uh, these attacks 00:03:33.980-->00:03:36.183 for example the topology attack- attack. He will attack the topology discover service in the 00:03:36.183-->00:03:41.188 controller to report face to- to report force links and le- li- let the controller make wrong 00:03:52.299-->00:03:57.304 decisions. So, uh, to discover these vulnerabilities, you should be a hacker and an SDN 00:04:04.778-->00:04:10.884 expert. You should know the details of the SDN protocol interactions, the relationship 00:04:10.884-->00:04:15.889 among the service logic. But I think most of us are not SDN expert and we even not so 00:04:19.593-->00:04:24.598 familiar with SDN but it is widely used. So how? Um, so I’m consider if whether I can find a 00:04:28.101-->00:04:33.106 method to hack the software defined network without learning so much about SDM and my attack 00:04:36.510-->00:04:41.515 should be powerful in the best case, it- it should achieve all the object- attack objectives in 00:04:44.217-->00:04:49.222 this table, all of them no matter if it is an existing one or a new one. So how to hack the 00:04:53.927-->00:04:58.932 SDN like a hacker? Well the controllers are software systems, and we both know that 00:05:02.035-->00:05:08.408 the software systems are inherently vulnerable so it is possible that the controller 00:05:08.408-->00:05:14.114 components contain our vulnerabilities. This is cool cause we are hackers and we know 00:05:14.114-->00:05:19.119 how to find this code vulnerabilities right? However, the data plane and the control 00:05:21.621-->00:05:28.094 plane as I mentioned they are decoupled, which means they only communicate with each other with 00:05:28.094-->00:05:34.267 pretty fine protocol interactions. So this architecture make us hard to 00:05:34.267-->00:05:41.241 exploit this code vulnerabilities from the data plane where we are always in. So 00:05:41.241-->00:05:46.246 in this talk, we introduce the custom attack which breaks the border built by the decoupled 00:05:50.717-->00:05:55.722 planes. Uh, unlike previous attacks that focus on the attacking the controller service 00:05:58.491-->00:06:03.463 logic, custom attack can be used to attack all kinds of code vulnerabilities in the 00:06:03.463-->00:06:08.468 controller. So, how to do it? So let’s see, how to conquer the difficulty built by the 00:06:12.205-->00:06:17.210 decoupled two planes. The- the SDN protocols provides some fields to let the switch and 00:06:20.647-->00:06:26.419 network device to custom themselves. Usually the customer field is subscribed by a 00:06:26.419-->00:06:31.424 specific control, specific controller components uh for example, if a switch um, if a 00:06:33.426-->00:06:40.033 switch may send a fault toler- notification message to the control plane and this message 00:06:40.033-->00:06:45.872 will be first collect by a service, we can call it a collecting service maybe. And 00:06:45.872-->00:06:52.279 the service will send the message to the to subscriber, maybe a network monitor 00:06:52.279-->00:06:57.284 component. So this is how the customer field works. So, I’m sorry I’m, my leg- my leg, my 00:07:01.087-->00:07:06.092 hands a little bit tired so maybe Jianwei I’ll put you on the table. Alright, let’s move 00:07:09.262-->00:07:14.267 on. So, there’s a semantic gap built by the customer field. Since the customer field can be 00:07:16.970-->00:07:22.942 totally controlled by the control- by the data plane, by the hacker so any improper 00:07:22.942-->00:07:28.415 treatment of may break the security border of the decoupled control plane and the data 00:07:28.415-->00:07:35.021 plane. Let’s revisit the notification example. The monitor component does know how 00:07:35.021-->00:07:41.861 to pass the notif- notification message however, the collecting service who collect it first, 00:07:41.861-->00:07:47.934 did- does not. So, the collecting service may store the message in the database without 00:07:47.934-->00:07:52.939 any security considerations. If a hacker inject a malicious cycle in into the customer 00:07:55.975-->00:08:02.849 fields, the database will endanger and this is the start of custom attack and it- this is 00:08:02.849-->00:08:07.854 only the start. Alright, and with the custom attack, we can exploit serious vulnerabilities 00:08:11.057-->00:08:16.062 in SDN controller to bring several advanced objectives. For example, we can issue arbitrary 00:08:18.898-->00:08:25.672 SDN commands by calling the exposed network management API or we can read some confidential 00:08:25.672-->00:08:30.677 data with a sql injection or other things. And this is the threat model of the custom 00:08:33.480-->00:08:38.485 attack. First, uh, the hackers don’t have to directly access the network of the controller 00:08:41.121-->00:08:46.126 with which is sometimes separated from the data plane, the- the network devices and he 00:08:49.329-->00:08:55.301 can- he will not need to access any applications in the controllers. Also, the hackers 00:08:55.301-->00:09:01.207 don’t need to hack into the encypt- protocol channel between the control planes and the data 00:09:01.207-->00:09:06.212 planes. What the hacker needs is to, only to perform legitimate protocol interactions with the 00:09:08.815-->00:09:13.820 control plane so a malicious host or switch is enough. Just like we can use a mobile phone 00:09:17.290-->00:09:23.897 you know. Um, however, after attacking, a vulnerable components handling the 00:09:23.897-->00:09:29.969 malicious chris- customer field, we can only introduce limited effect to the network.There are 00:09:29.969-->00:09:36.042 several reasons. First, every single component in the controller runs in separate 00:09:36.042-->00:09:41.047 context. For example just like uh, independent threat so the failure of a single component 00:09:43.116-->00:09:48.121 will not affect availabilities of others. And second, the contr- the critical components 00:09:51.424-->00:09:57.497 are usually specially protect. As a result, it’s it is difficult to abusing this 00:09:57.497-->00:10:02.502 important one if you cannot attack them directly, attack them with these customer fields. 00:10:05.205-->00:10:12.145 So as a result, if we want to do something big, want - we need a more complex attack, a 00:10:12.145-->00:10:17.150 multi-stage exploitation to control more resources in the controller. This is the 00:10:19.319-->00:10:24.324 workflow. The lower part is the data plane where the network host is and switch is. Normally, 00:10:27.227-->00:10:33.233 they cannot directly access the controller because the two networks are always separated 00:10:33.233-->00:10:39.939 but they will always be able to interact with the controller with using the SDN protocols 00:10:39.939-->00:10:44.944 like the Open Flow or other things. So uh, we need several stage. The first stage is the 00:10:48.214-->00:10:53.219 toe-hold stage, this is where we attack the components with customer field. In this step, we 00:10:56.022-->00:11:01.928 will inject our craft payload into the customer field and send them to the control plane where 00:11:01.928-->00:11:08.535 legitimate protocol interactions. After the first exploitations, we can now 00:11:08.535-->00:11:14.908 control a small number of- we can only control a small number of asset in component. To 00:11:14.908-->00:11:19.913 harvest more control plane asset we need a harv- harvest stage. We will need to exploit more 00:11:22.815-->00:11:29.489 vulnerabilities in or- in other components with previous controlled asset. For example, 00:11:29.489-->00:11:34.494 we can- we may launch an http request in the first stage. So, in the second stage, we can 00:11:36.829-->00:11:41.834 leverage this asset to do more things. We may access the rest API to issue some commands. So 00:11:44.637-->00:11:49.642 after we controlling a large number of asset we try to chain them together to achieve ouratt- 00:11:53.713-->00:12:00.420 advanced attack goal. And as you can see, instead of merely attacking the components that 00:12:00.420-->00:12:05.425 handling the customer fields, with this attack model we can now able to exploit all kinds of 00:12:08.161-->00:12:13.166 vulnerabilities to hack more components. Okay, now it’s time for us to hack something real. 00:12:16.469-->00:12:23.176 First, I will show you a video demo. In this demo, we attack a open source controller; it is a 00:12:23.176-->00:12:29.716 popular um, maybe the most popular one, the ONOS and we, the attack effect is we get a 00:12:29.716-->00:12:34.721 remote show from the controller. Okay, uh and the ONOS controller is on a remote machine the one 00:12:39.892-->00:12:44.897 one one and- and our compromised switch is this machine, the one oh eight so- and this is the web 00:12:49.802-->00:12:54.807 component of the ONOS. We can see there is no devices in the controller yet okay. And we can 00:12:59.112-->00:13:04.050 load our framework to attack the ONOS controllers and get a system show from the 00:13:07.587-->00:13:12.592 controllers. Now this is our devices connected. Well, as you can see, we successfully get the 00:13:16.562-->00:13:21.567 system show. Um, yes, so this is uh a exploit chain with smart stage exploitation that works. 00:13:31.310-->00:13:36.315 So how it actually works, let’s next I will give you more details about the, the RC chain. 00:13:39.118-->00:13:45.224 As shown in the picture, our target is the get diagnostic function which read and execute 00:13:45.224-->00:13:50.229 a script from the file system. So to abuse this function, we need to control two assets, to 00:13:52.265-->00:13:57.270 harvest two assets. The first is the script itself, to execute arbitrary commands, we need to 00:13:59.338-->00:14:04.277 inject payloads into the script. However, controlling the script is not enough. We also need to 00:14:07.013-->00:14:12.018 access the rest API that caused the- caused the diagnostic function. As I have mentioned, 00:14:14.987-->00:14:19.992 important components are usually specially protected. So the rest API is protected by by a basic 00:14:23.296-->00:14:29.802 authentication. We need authentication token for this rest API. Let’s check out what 00:14:29.802-->00:14:36.576 assets we can actually control in our first stage. Well, we found a XSS in the web 00:14:36.576-->00:14:43.349 components and as you can see. This vulnerability can exploited by a customer field so now we 00:14:43.349-->00:14:48.354 can control the assets that expose to the XSS such as some network configurations. However, 00:14:51.657-->00:14:56.662 we cannot still directly attack our target function so let’s move on the second stage, the 00:14:59.065-->00:15:04.003 harvest stage. First, let’s try to handle the basic authentication issues. We found 00:15:06.372-->00:15:11.377 that the authentication code can store as plain text at the config file. So as long as we 00:15:13.412-->00:15:19.385 can control and read this file, we can get the token. This means that we need to find a new 00:15:19.385-->00:15:26.058 vulnerability that can read some contents. After several days hard work, we find our fourth 00:15:26.058-->00:15:31.063 zero days in ONOS. It is our XSE. It can be, and it can be exploit by a customer field that 00:15:34.801-->00:15:39.806 we control. As a result, we can read the token to solve the host problem. Now, we can try to 00:15:41.908-->00:15:46.913 control the A- the script asset with the fifth zero day we found in ONOS. It is a past traversal 00:15:49.615-->00:15:56.222 bug in the unzip function. This function is to handle the zip files uploaded from the web 00:15:56.222-->00:16:02.795 component. Remember that in the first stage, we discover XSS vulnerability in the web 00:16:02.795-->00:16:07.800 component. Now we can leverage this attack, this XSS to upload a crack zip file, and then 00:16:11.337-->00:16:16.342 override arbitrary files with any content we want. So finally we control the script. This is 00:16:19.478-->00:16:26.419 the complete attack graph for the exploit chain. We- we use five previously unknown 00:16:26.419-->00:16:32.191 vulnerabilities in three different stage to construct this remote command execution 00:16:32.191-->00:16:37.196 chain. I’m sorry. So, how about the impact of the customer field? We analyzed five popular 00:16:46.105-->00:16:51.110 SDN controllers and they are 54 appli- applications. In total we identi- identify 18 00:16:54.413-->00:16:59.418 vulnerabilities and construct 24 exploit chains and all these exploit chains are involved in 00:17:02.788-->00:17:07.793 two or three stages. This is the impact of this exploit chains. Uh, we all these exploit chains 00:17:11.964-->00:17:16.969 we construct can con- introduce a serious attack effect to the controller. And this tables 00:17:20.339-->00:17:25.344 shows all the zero day we found. We can, as we can see from the last column, every vulnerability 00:17:27.780-->00:17:32.785 can be used to introduce the more than one attack effect. And we found that ONOS has the 00:17:35.555-->00:17:41.861 largests number of vulnerabilities and I think this is because ONOS is very easy to 00:17:41.861-->00:17:46.866 use. We can install any components we want with a simple click. By contrast, hacking the 00:17:49.068-->00:17:56.042 OpenDaylight is very difficult. Uh, to install or debug a component, we need to spend the 00:17:56.042-->00:18:00.980 whole afternoon and usually we found nothing. So we can only found three bugs in the 00:18:03.149-->00:18:08.154 OpenDaylight. So maybe, making your project hard to use can be a great defense. [laughter] Yes, 00:18:11.824-->00:18:16.829 that’s- that’s what I found- a important finding in our research. Okay, that’s all. 00:18:19.031-->00:18:24.036 Thanks for listening. [applause] Okay I forgot him.