Merge branch 'revert-c1baaa28' into 'master'
Revert "Merge branch 'master' of http://khuhub.khu.ac.kr/2021-1-capstone-design1/JJS_Project2" To recover deleted file See merge request !2
Showing
1 changed file
with
1 additions
and
133 deletions
| ... | @@ -3,7 +3,7 @@ | ... | @@ -3,7 +3,7 @@ |
| 3 | 연구 목적: 본 연구는 UAV의 운행과정에서 발생 할 수 있는 GPS-Spoofing 공격을 시연해보고 이에 대응 할 수 있는 AGSM을 제작 하고자 합니다. | 3 | 연구 목적: 본 연구는 UAV의 운행과정에서 발생 할 수 있는 GPS-Spoofing 공격을 시연해보고 이에 대응 할 수 있는 AGSM을 제작 하고자 합니다. |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -# px4 toolchain install (Ubuntu 16.04) | 6 | +# px4 toolchain install |
| 7 | 7 | ||
| 8 | 참고 사이트:https://docs.px4.io/master/en/dev_setup/dev_env.html | 8 | 참고 사이트:https://docs.px4.io/master/en/dev_setup/dev_env.html |
| 9 | ``` | 9 | ``` |
| ... | @@ -24,140 +24,8 @@ $ ./QGroundControl.AppImage | ... | @@ -24,140 +24,8 @@ $ ./QGroundControl.AppImage |
| 24 | ``` | 24 | ``` |
| 25 | 25 | ||
| 26 | # GPS-SPoofing 구현 | 26 | # GPS-SPoofing 구현 |
| 27 | - | ||
| 28 | -1. Gps Spoofing : 인공 위성보다 더 강한 신호를 전달하여 위성 신호의 정보를 누락 시키고 외부의 신호를 인식하여 기존의 정보를 변형 | ||
| 29 | -2. FakeGps :기존의 위치 정보와는 다른 가상 위치 정보를 생성 | ||
| 30 | -3. FakeGps는 새로운 가상 정보를 생성할 뿐 드론의 헤딩 정보를 변경하지 않음 | ||
| 31 | -4. 단순히 FakeGps만을 실행 할 경우 기존의 정보를 따라감 | ||
| 32 | -5. failure gps off를 통해 기존 정보를 누락시켜 가상 정보로 헤딩 할 수 있도록 진행함 | ||
| 33 | -6. Failure과 FakeGps를 통해 Gps Spoofing 상황을 구상 | ||
| 34 | - | ||
| 35 | ``` | 27 | ``` |
| 36 | pxh> param set SYS_FAILURE_EN 1 // injection on | 28 | pxh> param set SYS_FAILURE_EN 1 // injection on |
| 37 | pxh> fake_gps start // fake_gps on -> make gps2_raw parameter | 29 | pxh> fake_gps start // fake_gps on -> make gps2_raw parameter |
| 38 | pxh> failure gps off // GPS_RAW_INT off | 30 | pxh> failure gps off // GPS_RAW_INT off |
| 39 | ``` | 31 | ``` |
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 40 | - | ||
| 41 | -# GPS-Spoofing Demo image (영상은 발표자료 참고) | ||
| 42 | - | ||
| 43 | - | ||
| 44 | - | ||
| 45 | - | ||
| 46 | -# AGSM 제작 이론 | ||
| 47 | - | ||
| 48 | - | ||
| 49 | - | ||
| 50 | - | ||
| 51 | -1. 파란색의 두 점을 각각 waypoint1, waypoint2 라고 하였을 때, 두 waypoint를 통하여 기울기를 계산할 수 있다. | ||
| 52 | -2. 계산된 기울기를 통하여 그림과 같이 오차범위에 해당되는 기울기 2개를 추가로 생성한다. | ||
| 53 | -3. 3개의 기울기와 waypoints를 이용하여 회색 영역과 같은 드론의 유효 범위를 지정한다. 만약 드론이 유효 범위 밖에서 지속적으로 머물러 | ||
| 54 | - 있다면 경고메세지를 출력한다. | ||
| 55 | - | ||
| 56 | - | ||
| 57 | -# 두 waypoint의 위치 정보를 통한 기울기 생성 구현 | ||
| 58 | -``` | ||
| 59 | - | ||
| 60 | -void EKF2::calculate_inclination_target() | ||
| 61 | -{ | ||
| 62 | - double x,y; // latitude increment, longitude increment | ||
| 63 | - inclination=new double[int(mission.count)]; // dynamic allocation by waypoints for inclinations | ||
| 64 | - for (int i = 0; i < int(mission.count)-1; i++) { | ||
| 65 | - struct mission_item_s mission_item {}; // struct for current mission | ||
| 66 | - struct mission_item_s next_mission_item {}; // struct for next mission | ||
| 67 | - dm_read((dm_item_t)mission.dataman_id, i, &mission_item, sizeof(mission_item_s)); // get current mission info | ||
| 68 | - dm_read((dm_item_t)mission.dataman_id, i+1, &next_mission_item, sizeof(mission_item_s)); // get next mission info | ||
| 69 | - x=next_mission_item.lat-mission_item.lat; | ||
| 70 | - y=next_mission_item.lon-mission_item.lon; | ||
| 71 | - std::cout.setf(std::ios::fixed); | ||
| 72 | - std::cout.precision(7); | ||
| 73 | - if(x!=0.0){ | ||
| 74 | - inclination[i]=y/x; | ||
| 75 | - } | ||
| 76 | - else | ||
| 77 | - { | ||
| 78 | - inclination[i]=0.0; | ||
| 79 | - } | ||
| 80 | - } | ||
| 81 | -} | ||
| 82 | - | ||
| 83 | -``` | ||
| 84 | - | ||
| 85 | - | ||
| 86 | -# 드론의 mission waypoint(출발지) 위치 저장 코드 | ||
| 87 | -``` | ||
| 88 | - | ||
| 89 | -void EKF2::set_target_gps() | ||
| 90 | -{ | ||
| 91 | - std::cout.unsetf(std::ios::fixed); | ||
| 92 | - for (size_t i = 0; i < mission.count; i++) { | ||
| 93 | - struct mission_item_s mission_item {}; // struct for current mission | ||
| 94 | - if(int(mission.current_seq)==int(i)){ // get waypoint info which is same as current sequence | ||
| 95 | - dm_read((dm_item_t)mission.dataman_id, i, &mission_item, sizeof(mission_item_s)); | ||
| 96 | - target_lat=int32_t(mission_item.lat * long(pow(10,7))); // change number of digits lat degrees 10e-7 | ||
| 97 | - target_lon=int32_t(mission_item.lon * long(pow(10,7))); // change number of digits lon degrees 10e-7 | ||
| 98 | - target_alt=int32_t(mission_item.altitude * long(pow(10,4))); // change number of digits lon degrees 10e-4 | ||
| 99 | - } | ||
| 100 | - } | ||
| 101 | - | ||
| 102 | -} | ||
| 103 | -``` | ||
| 104 | - | ||
| 105 | - | ||
| 106 | -# 현재 드론의 위치와 mission waypoint 사이의 기울기 생성 코드 | ||
| 107 | -``` | ||
| 108 | - | ||
| 109 | -double EKF2::calculate_inclination_current(gps_message gps_msg) // gps_msg contains current gps info | ||
| 110 | -{ | ||
| 111 | - double x,y; // latitude increment, longitude increment | ||
| 112 | - double check_inclination=0; // current inclination initialized zero | ||
| 113 | - x=target_lat-gps_msg.lat; | ||
| 114 | - y=target_lon-gps_msg.lon; | ||
| 115 | - if(x!=0.0){ | ||
| 116 | - check_inclination=y/x; | ||
| 117 | - } | ||
| 118 | - std::cout.setf(std::ios::fixed); | ||
| 119 | - std::cout.precision(7); | ||
| 120 | - return check_inclination; // calculated inclination | ||
| 121 | -} | ||
| 122 | - | ||
| 123 | -``` | ||
| 124 | - | ||
| 125 | -# 목적지간 기울기와 현재 비행 중 기울기 비교 | ||
| 126 | -``` | ||
| 127 | - | ||
| 128 | -void EKF2::check_inclination(double check) // get current inclination from calculate_inclination_current | ||
| 129 | -{ | ||
| 130 | - double origin=inclination[int(mission.current_seq)-1]; // inclination between current mission's starting point and end point | ||
| 131 | - std:: cout << "(origin : "<<origin<<" | check : "<<check<<")"; | ||
| 132 | - if(origin-1<=check && check <= origin+1) // compare two inclination | ||
| 133 | - { | ||
| 134 | - std::cout<<"\t--- Good moving"<<std::endl; // subtracting isn't over 1 then good flight | ||
| 135 | - warning_count=0; // reset warning count 0 | ||
| 136 | - } | ||
| 137 | - else | ||
| 138 | - { | ||
| 139 | - std::cout<<"\t--- Bad moving"<<std::endl; // subtracting is over 1 then bad flight | ||
| 140 | - warning_count++; // increasing warning count | ||
| 141 | - } | ||
| 142 | -} | ||
| 143 | - | ||
| 144 | -``` | ||
| 145 | - | ||
| 146 | -# AGSM을 이용한 GPS-SPoofing 탐지 (영상은 발표자료 참고) | ||
| 147 | - | ||
| 148 | - | ||
| 149 | - | ||
| 150 | - | ||
| 151 | -# Reference | ||
| 152 | -[1] QGroundControl User Guide, Dronecode, 2021.04.26. 접속,https://docs.qgroundcontrol.com/master/en/index.html | ||
| 153 | - | ||
| 154 | -[2] PX4 Autopilot User Guide Introduction, PX4 Autopilot 2021.06.14. 접속, https://docs.px4.io/master/en/ | ||
| 155 | - | ||
| 156 | -[3] 조승민, “드론 보안에 적용된 암호기술 현황”, 정보보호학회지 vol.30-2, 2020.4 | ||
| 157 | - | ||
| 158 | -[4] A. Koubâa, "Micro Air Vehicle Link (MAVlink) in a Nutshell: A Survey," in IEEE Access, vol. 7, pp. 87658-87680, 2019 | ||
| 159 | - | ||
| 160 | -[5] 류해원, 최성한, 하일규, “드론 운용의 보안 위협과 대응 방안", 한국정보처리학회, 2018.10 | ||
| 161 | - | ||
| 162 | -[6] 서진범, “GPS 스니핑을 이용한 안티 드론 알고리즘”, 한국정보통신학회, pp. 63 –66, 2019.05.23 | ||
| 163 | - | ... | ... |
-
Please register or login to post a comment