00:00:00.133 --> 00:00:05.539 All right. Good afternoon, how's everyone doing? Come on. There 00:00:05.539 --> 00:00:11.545 are bars you know you can get some beers get that excitement 00:00:21.255 --> 00:00:33.967 level up. Our next talk is going to be about gps. Gps used to be 00:00:33.967 --> 00:00:37.771 a big unit and I have one for fishing and took 8 aa batteries 00:00:37.771 --> 00:00:44.111 and now we've got these things everywhere. Gps is more 00:00:44.111 --> 00:00:55.155 important in all of our life and see what we can pull with this. 00:00:55.155 --> 00:01:07.134 Let's give a big hand. >> Thank you everybody. Good afternoon. 00:01:07.134 --> 00:01:16.343 Now we like to share with you our work on gps. [ inaudible ]. 00:01:16.343 --> 00:01:28.522 We come from team focusing on security and hardware security. 00:01:28.522 --> 00:01:35.762 During our research we created devices for defense and attack. 00:01:35.762 --> 00:01:41.702 Defcon 23 we bring some of our tools here to share with you. So 00:01:41.702 --> 00:01:57.784 welcome to visit our booth. I'm Young Quinn and I'm interested 00:01:57.784 --> 00:02:09.529 in -- this is Huang Lin. Key researcher group. Since that 00:02:09.529 --> 00:03:19.499 time she wrote a book on radio which is popular in china. First 00:03:19.499 --> 00:04:10.016 let's watch a film. Interstellar. Sorry. Yeah. >> 00:04:10.016 --> 00:04:19.893 Sorry wait a moment. Sorry. The man is driving our car. He got 00:04:19.893 --> 00:05:32.199 out of control. Today we will share with you simulator story 00:05:32.199 --> 00:05:43.410 about this. Gps attacker. Finally, he control the As we 00:05:43.410 --> 00:05:56.690 all know [applause] thank you. Actually, this is my first time 00:05:56.690 --> 00:06:20.847 I use English to speak. It's too terrible. The car carry out 00:06:20.847 --> 00:06:23.783 frequency 1 thousand 5 hundred 74.52 meg hertz. Gps has signal 00:06:23.783 --> 00:06:29.522 effect for single usage. Execution we applied attack on 00:06:29.522 --> 00:06:40.100 support gps system. We first tried to replay attack. We use 1 00:06:40.100 --> 00:06:49.509 usrp210 plus unfiltered and security. The security is used 00:06:49.509 --> 00:06:55.882 supply power to gps activity antenna. This shows the hardware 00:06:55.882 --> 00:06:59.920 connection. We used them to record the signal in our film. 00:06:59.920 --> 00:07:07.294 In the left picture this recorder system is out of 00:07:07.294 --> 00:07:15.468 ground. Then the signal was replied from the fail to error 00:07:15.468 --> 00:07:23.376 by another hardware named ble-wire. This black one. The 00:07:23.376 --> 00:07:33.353 cellphone nexus 5 replied signal 3d 6. The red picture is gps 00:07:33.353 --> 00:07:38.792 test plus. When application you can see first time as the right 00:07:38.792 --> 00:07:58.611 down corner 15/42, which is gps signal term. X 69 which is the 00:07:58.611 --> 00:08:06.119 corrected time. Now, replay attack prove a very simple 00:08:06.119 --> 00:08:09.022 attack method. We record the gps signal as the new position if 00:08:09.022 --> 00:08:18.098 you want to generate gps signal for any position, it is 00:08:18.098 --> 00:08:32.912 not...let me see if this video can play. Oh, yes. This video is 00:08:32.912 --> 00:09:10.517 very interesting. This star track gps. How to generate 00:09:10.517 --> 00:09:31.671 safety signal. Generate signal to star logo. Sorry. Replay. 00:09:31.671 --> 00:09:51.925 Left in Las Vegas position. Right is Beijing position. 00:09:51.925 --> 00:09:57.564 Finally, this already our star. If you search gps spoofing you 00:09:57.564 --> 00:10:10.076 can find some products which generate gps signal. They are 00:10:10.076 --> 00:10:18.985 not very expensive. $30 --> 000. For example, we have gps 2 which is 00:10:18.985 --> 00:10:30.797 around $6 --> 000. And from an American company provides gps 00:10:30.797 --> 00:10:42.075 enumerator besides msrp also around $5 --> 000. So most of the 00:10:42.075 --> 00:10:52.886 famous lab is mitigation lab from University Texas Austin. 00:10:52.886 --> 00:11:14.774 2012 the team leader gave a talk about how to spoof gps. This 00:11:14.774 --> 00:11:25.351 attracted gps security. In 2014 they successfully did on droid. 00:11:25.351 --> 00:11:42.368 But we are not in mitigation experts. How can we do gps 00:11:42.368 --> 00:11:51.678 spoofing? We have server esrp -- they are all in -- for software 00:11:51.678 --> 00:12:13.666 we searched, the first link tell us about the gps. The second one 00:12:13.666 --> 00:12:20.139 is very good gps researcher, we found most project gps...[ no 00:12:20.139 --> 00:12:31.250 audio ]...this project is now finished. The company is around 00:12:31.250 --> 00:12:43.496 7410. Finally we decided to finish, transmit the code gps 00:12:43.496 --> 00:12:51.571 simulator. Now let me my partner introduced the next bid. >> 00:12:51.571 --> 00:12:57.377 Hello everyone. Okay. Now, let me previously introduce the 00:12:57.377 --> 00:13:02.849 basic principle of gps system. There will be some mythical 00:13:02.849 --> 00:13:12.625 knowledge, it might be boring but we will insert some videos. 00:13:12.625 --> 00:13:18.064 Okay. [ inaudible ]...okay. See this picture. The long curve in 00:13:18.064 --> 00:13:26.372 this picture is the earth's surface. Gps receiver is here. 00:13:26.372 --> 00:13:32.679 Suppose it can see four gps satellites in the sky. The 00:13:32.679 --> 00:13:38.284 signal are transmitted by the satellites at the same time 00:13:38.284 --> 00:13:40.620 t-zero. And the signal goes through different paths and they 00:13:40.620 --> 00:13:44.490 arrive at the receiver. The running time is different 00:13:44.490 --> 00:13:50.763 because the distance that the signal passes is different. All 00:13:50.763 --> 00:14:02.875 those signal with different delays mixed together and 00:14:02.875 --> 00:14:08.114 received by the gps receiver. Now let's see some. Look at the 00:14:08.114 --> 00:14:16.289 first line. Multiplying the delay time and the light speed 00:14:16.289 --> 00:14:23.129 is the length of propagation path. The delayed time equals 00:14:23.129 --> 00:14:29.869 the arriving time minus t zero and equals the receiving time 00:14:29.869 --> 00:14:37.076 applause delayed time minus t zero. T minus means the time of 00:14:37.076 --> 00:14:41.581 the receiver starting to receive. The right part. The 00:14:41.581 --> 00:14:48.187 path length between the satellite and the receiver. The 00:14:48.187 --> 00:14:53.626 position of the satellite is told by the gps message. Okay. 00:14:53.626 --> 00:15:02.468 Now, this sequence has four unknowns. Three dimensions, um, 00:15:02.468 --> 00:15:09.308 position of satellite x, y, z the clock of the receiver which 00:15:09.308 --> 00:16:40.132 is not an accurate clock so it is also unknown in value. Four 00:16:40.132 --> 00:16:50.509 unknowns need [ inaudible ]...[no audio]...in two and 00:16:50.509 --> 00:16:59.285 three...okay. We have introduced the basic principle. Now, let's 00:16:59.285 --> 00:17:02.889 start building the signal. Firstly we need to call the 00:17:02.889 --> 00:17:09.395 data. There are two methods. One is to download the data from 00:17:09.395 --> 00:17:13.165 website. This way you can only get yesterday's data. Another 00:17:13.165 --> 00:17:17.670 method is receiving the lead data from air, you can use an 00:17:17.670 --> 00:17:25.978 open-source program. Sdr to receive the realtime gps signal 00:17:25.978 --> 00:17:36.422 and get the fresh data. This picture shows the received fresh 00:17:36.422 --> 00:17:46.599 data by gnssdr. You may not see clearly enough. Here the time is 00:17:46.599 --> 00:17:58.244 2015, February 18. Because I ran the software at that time. This 00:17:58.244 --> 00:18:11.123 is the code we are using to generate gps signal. It's my lab 00:18:11.123 --> 00:18:16.162 code. The fm data is ready and it's loading. And secondly, the 00:18:16.162 --> 00:18:28.841 program will calculate which satellite is visible in the sky. 00:18:28.841 --> 00:18:38.250 And then thirdly, it generate the telegraph message. Okay. 00:18:38.250 --> 00:18:50.963 This is the code we are using to generate the gps. This picture 00:18:50.963 --> 00:18:54.467 shows the message structure. Two, we need to invert all the 00:18:54.467 --> 00:18:57.069 message fits in the frame structure following the 00:18:57.069 --> 00:18:59.939 specification of gps system. Okay. This part is are the codes 00:18:59.939 --> 00:19:08.681 generating the message, sub frame 1, 2, 5 are generated one 00:19:08.681 --> 00:19:16.288 by one. Now the message is in bit sequences. We need to 00:19:16.288 --> 00:19:24.463 convert to wave form. Spectrum ready. Let's look at the 00:19:24.463 --> 00:19:30.836 principle picture again. We should emulate the multiple 00:19:30.836 --> 00:19:40.479 satellite signal. The software itself must calculate the 00:19:40.479 --> 00:19:44.383 transmission time from every satellite to every receiver. How 00:19:44.383 --> 00:19:50.156 to calculate the transmission time? We could know the 00:19:50.156 --> 00:19:54.460 coordinate the satellite according to the fm data. But 00:19:54.460 --> 00:20:03.969 the satellite keeps moving in the sky and our earth is also 00:20:03.969 --> 00:20:08.941 rotating. So it's not easy to calculate the pathway. Anyway, 00:20:08.941 --> 00:20:14.447 we don't want to go to very deep details here. This function is 00:20:14.447 --> 00:20:18.884 used to calculate the delays for multiply propagation paths and 00:20:18.884 --> 00:20:31.397 combine the signal into one wave form. So finally we generate the 00:20:31.397 --> 00:20:40.773 gps and save to a data file. We will firstly verify by software. 00:20:40.773 --> 00:20:48.881 Verify the signal by the gnssdr software. It's great. The 00:20:48.881 --> 00:20:55.488 latitude and longitude are the same as I set. And then I moved 00:20:55.488 --> 00:21:05.765 to test over air. Transmitter and receiver is running with 00:21:05.765 --> 00:21:09.335 gnssdr software. Right? The signal over air is also correct. 00:21:09.335 --> 00:21:14.173 I can see the position is same as I set. This picture show the 00:21:14.173 --> 00:21:23.783 approximation position in google earth. Here's the location of 00:21:23.783 --> 00:21:32.358 our company. In Beijing. So I start trying to spoof the real 00:21:32.358 --> 00:21:36.529 cell phones, well unfortunately, I failed. [ laughs ]. Which part 00:21:36.529 --> 00:21:46.939 is not perfect? I checked my code for a long time. I didn't 00:21:46.939 --> 00:21:54.947 perfectly model the doopler. That is doopler effect? When the 00:21:54.947 --> 00:22:01.654 signal is far away from you. When the signal source is going 00:22:01.654 --> 00:22:09.962 towards you the wave form will be shorter. So at the serve side 00:22:09.962 --> 00:22:21.240 it simple both the two wave forms. The two phases are 00:22:21.240 --> 00:22:26.979 different. From another view to see this effect, the delay will 00:22:26.979 --> 00:22:31.450 be longer if the satellite moving from the receiver. And 00:22:31.450 --> 00:22:39.592 the delay will be shorter if it's moving toward you. This 00:22:39.592 --> 00:22:46.732 must be smooth. The phase changing will be continuous. We 00:22:46.732 --> 00:22:59.044 try spoofing the cell phones again. Try cell phone again. 00:22:59.044 --> 00:23:05.284 Yes. It's okay now. Look at the signal strength. The signal from 00:23:05.284 --> 00:23:17.563 different satellite have the same signal strength. Is it 00:23:17.563 --> 00:23:21.467 change? Because it's fake gps signal [ applause ] thank you. 00:23:21.467 --> 00:23:29.341 Well, actually, we can also set them differently depends on you. 00:23:29.341 --> 00:23:40.919 Okay. This is the test on Nexis five cell phone. How about 00:23:40.919 --> 00:23:55.834 Samsung 3. The cell phone located at in Tibet actually in 00:23:55.834 --> 00:24:02.107 Beijing actually. How about iPhone 6? We also tested iPhone 00:24:02.107 --> 00:24:07.379 6. The position is lower than other android phones. And 00:24:07.379 --> 00:24:11.817 finally also located at Nunzholake. The interesting is 00:24:11.817 --> 00:24:26.965 if you altar the time auto setting the cell phone clock 00:24:26.965 --> 00:24:35.140 will be set at the time you set. Time is spoofing. So we begin to 00:24:35.140 --> 00:24:44.350 think that...you may find our gps spoofing test, the day we 00:24:44.350 --> 00:24:50.322 set is also February 14, 2015, this is because the sm data is 00:24:50.322 --> 00:24:58.897 set at that date. Can we set any time to this spoofing signal? 00:24:58.897 --> 00:25:04.737 The answer is yes. You can use the data from the old file but 00:25:04.737 --> 00:25:12.644 change the time parameter. So in effect we don't need to download 00:25:12.644 --> 00:25:22.254 or generate the fresh smt file. We use the same one. That's 00:25:22.254 --> 00:25:31.597 okay. So these pictures, this is an example. A cell phone in 00:25:31.597 --> 00:25:37.870 future time. On July 14, we generated a signal for august 00:25:37.870 --> 00:25:45.344 6th, yesterday, right? The date of Defcon 23. Here are the 00:25:45.344 --> 00:25:54.253 screen shots it was changed to a future time. Interesting, right? 00:25:54.253 --> 00:26:00.559 Okay. Now, I think you feel a little bit boring. Here's a 00:26:00.559 --> 00:26:15.140 video. We also tested other devices for example in 00:26:15.140 --> 00:26:23.749 navigation systems in cars. Let's see this video. Yes. This 00:26:23.749 --> 00:26:32.124 is a common car. We transmit the signal by usrp. Now it is 00:26:32.124 --> 00:26:46.705 located in our office area. We start transmitting our signal. 00:26:46.705 --> 00:27:02.054 Yes. Now it found the gps channels and position is fixed. 00:27:02.054 --> 00:27:09.161 Let's see where it is now. [ applause ] thank you. Well, so, 00:27:09.161 --> 00:27:23.442 um, how about other devices with gps positioning function? Well 00:27:23.442 --> 00:27:28.780 the next one. So another spoofing target is drone. Drone 00:27:28.780 --> 00:27:34.686 has auto navigation capability. It can fly to the destination 00:27:34.686 --> 00:27:40.359 people set. Many drones have forbidden area policy. The 00:27:40.359 --> 00:27:47.733 purpose is to risk drone to people or critical people 00:27:47.733 --> 00:27:59.011 facilities. The drone will keep off when it is in a forbidden 00:27:59.011 --> 00:28:05.817 area. So can you imagine the store of what will happen? The 00:28:05.817 --> 00:28:10.255 first vulnerability is bypass drone's no fly zone. The 00:28:10.255 --> 00:28:15.761 forbidden policy can bypass the video shows that the drone was 00:28:15.761 --> 00:28:27.873 at a forbidden location in Beijing, we gave a fake position 00:28:27.873 --> 00:28:44.957 in Hawaii and it was unlocked and can fly out. We give it a 00:28:44.957 --> 00:28:52.164 position then it fly up. Is it too quick? Let's see it again. 00:28:52.164 --> 00:29:01.640 We give it a position in Hawaii, and the drone flies out. [ 00:29:01.640 --> 00:29:08.447 applause ] thank you. Well, the next example is more 00:29:08.447 --> 00:29:20.359 interesting. If the drone is flying in a permitted area and 00:29:20.359 --> 00:29:28.467 we give it a forbidden position, what will happen? Okay. A drone 00:29:28.467 --> 00:29:45.150 is flying. This is the camera's view. We give it a forbidden 00:29:45.150 --> 00:29:49.955 position. It's falling down. Landing. [ applause ] thank you. 00:29:49.955 --> 00:29:54.893 Well, I found in this day there's another presentation by 00:29:54.893 --> 00:30:00.365 Michael Robinson the title of his presentation is knock my 00:30:00.365 --> 00:30:06.938 neighborhood's key drone or flying. They will force to 00:30:06.938 --> 00:30:13.111 commercial drone by sending gps signals. I read his slides this 00:30:13.111 --> 00:30:17.716 morning. And the method he used is to distract the gps signal by 00:30:17.716 --> 00:30:31.229 sending noisy signals. So the method is different with us. 00:30:31.229 --> 00:30:37.769 Let's listen to his presentation too this Sunday. Okay. Simple 00:30:37.769 --> 00:30:45.477 method of gps spoofing. Everyone only needs open-source software 00:30:45.477 --> 00:30:50.716 and sdr hardware such as usrp, and, et cetera. And can realize 00:30:50.716 --> 00:30:54.419 gps spoofing. This attack is very, very low cost. Then how 00:30:54.419 --> 00:31:00.726 about the influence, it can influence the portable devices 00:31:00.726 --> 00:31:08.867 like cell phone, the path tracers, navigation system in 00:31:08.867 --> 00:31:16.775 every convenience can be spoofed including cars, yachts including 00:31:16.775 --> 00:31:23.081 planes. And cellar station and financial trading system can be 00:31:23.081 --> 00:31:33.825 spoofed. We think it's a big risk that everyone needs to 00:31:33.825 --> 00:31:41.867 notice. So how to defend this attack? Usually gps has highest 00:31:41.867 --> 00:31:47.339 priority in the positioning system. Cell phone is spoofed 00:31:47.339 --> 00:31:52.544 even if it has cellar network. So we think at application layer 00:31:52.544 --> 00:31:59.951 we suggest to jointly consider multiple results, cellar 00:31:59.951 --> 00:32:11.830 position and also wifi position. If the device has multimode like 00:32:11.830 --> 00:32:18.036 the lonas it's better to join all the results together. At the 00:32:18.036 --> 00:32:22.641 gps receiver chief level we propose the chief set 00:32:22.641 --> 00:32:28.446 manufacturer to use algorithm to detect spoofing. Professor ta's 00:32:28.446 --> 00:32:32.784 team has published paper on spoofing detection for people 00:32:32.784 --> 00:32:38.356 who are interested can read them as a reference. If we want to 00:32:38.356 --> 00:32:48.533 settle this matter finally with gps message must be updated. For 00:32:48.533 --> 00:32:56.441 example at digital signature to expandable gps telegraph that 00:32:56.441 --> 00:33:02.848 will be finally resolve this problem. So every receiver must 00:33:02.848 --> 00:33:09.654 be firstly checked this signature. Anyway, gps is still 00:33:09.654 --> 00:33:17.996 a great system. This is very low cost and the important is it 00:33:17.996 --> 00:33:25.470 keeps up updating so we believe security issues will be solved 00:33:25.470 --> 00:33:32.510 in the future. I want to thank to guys had who gave me great 00:33:32.510 --> 00:33:53.164 help and my team members. And also jial -- I want to let you 00:33:53.164 --> 00:34:01.239 know that this is not a completed emulator. Secondly, 00:34:01.239 --> 00:34:11.716 thanks to the senior software engineer at apple. He gave me 00:34:11.716 --> 00:34:24.729 very important guidance. Thanks for attention to our 00:34:24.729 --> 00:34:31.836 presentation. >> Thank you [ applause ] >> Any question? Does 00:34:31.836 --> 00:34:37.742 anyone have question? Range? Depends on hardware. If you use 00:34:37.742 --> 00:34:44.516 usrp something like that, although the transmit power is 00:34:44.516 --> 00:34:49.888 very small, the sensitivity of gps signal is very, very low. So 00:34:49.888 --> 00:34:55.860 it's quite easy to make your fake gps strength much higher 00:34:55.860 --> 00:35:04.869 than gps sensitivity. Yeah. >> If there are more questions can 00:35:04.869 --> 00:35:07.806 you line up and use your microphone to ask your question. 00:35:07.806 --> 00:35:11.776 >> I was wondering if you are use to if you see the 00:35:11.776 --> 00:35:16.648 implementation chip has by sending invalidate that would 00:35:16.648 --> 00:35:22.354 potentially use interesting stuff. >> Well I didn't get your 00:35:22.354 --> 00:35:36.468 point. Please simple. >> It's interesting to see how these gps 00:35:36.468 --> 00:35:42.307 receiver respond to data and do various things. >> Offline. 00:35:42.307 --> 00:35:51.549 Okay. Thank you. >> Hi, you mentioned that it, problem can 00:35:51.549 --> 00:35:55.887 be fixed. Can you spoof the gps signal with just capturing and 00:35:55.887 --> 00:36:01.659 playing with time. I think the digital signature is not going 00:36:01.659 --> 00:36:06.598 to fix the problem. What do you think on this? >> You mean the 00:36:06.598 --> 00:36:10.435 anti spoofing method at which layer. >> Because the each 00:36:10.435 --> 00:36:15.340 satellite is transmitting the same thing. You just need to 00:36:15.340 --> 00:36:20.478 play with the time differences and you can adjust the recorder 00:36:20.478 --> 00:36:29.888 and play it to the different time offset and you can still 00:36:29.888 --> 00:36:31.189 spoof even if the digital signature are used. >> Um, well 00:36:31.189 --> 00:36:37.195 you mean at [ inaudible ].... >> Okay. Thank you very much.