Top Banner
Confidential to SEWORKS Copyright ©2014 SEWORKS Inc. All rights reserved. SEWORKS INC. CTO WOWHACKER TEAM [email protected] Dongcheol Hong (hinehong)
71

CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

Aug 14, 2015

Download

Devices & Hardware

CODE BLUE
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

Confidential to SEWORKS Copyright ©2014 SEWORKS Inc. All rights reserved.

SEWORKS  INC.  CTO  

WOWHACKER  TEAM      

[email protected]  

Dongcheol  Hong  

(hinehong)  

Page 2: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

INFORMATION

Drone  aAack  by  malware  and  network  hacking

Page 3: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

3  

Speaker  Bio

•  SEWORKS  Inc.  Chief  Technology  Officer  

-­‐  Develops  the  AnN-­‐Decompiler  and  AnN-­‐Reverse  Engineering  Tool  

for  Android  and  Unity  applicaNons.  

•  WOWHACKER  Admin.  

-­‐  Qualified  for  DEFCON  CTF  hacking  contest  finals  five  Nmes.  

-­‐  Organized  SecuInside,  CodeGate,  ISEC  hacking  contests.  

•  Made  Android  and  Windows  mobile  anNvirus  applicaNons  in  2009.  

•  Presented  on  many  security  conferences  like  SecuInside  and  HITCON.  

3 Dongcheol  Hong  -­‐  SEworks.Inc

Page 4: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

4  

Abstract

•  The  drone  systems  are  used  more  frequently  all  around  the  world.  

•  There  are  possibiliNes  that  the  drone  can  hack  into  other  computers  or  

devices  

•  We  can  infect  a  malware  called  “HSDrone”  to  the  AR.Drone  2.0,  spread  

malware  to  other  drones,  and  control  all  of  them.  

4 Dongcheol  Hong  -­‐  SEworks.Inc

Page 5: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

5  

Drone  hacking

•  Network    

-­‐  RC  :  Radio  controller  

-­‐  WIFI  :  smart  device  

•  Malware  

-­‐  Smart  applicaNon  

-­‐  Drone  executable  file  

•  GPS  or  Gyro  Sensor  jamming  

Page 6: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

NETWORK Drone  aAack  by  malware  and  network  hacking

Page 7: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

7  

RC

•  2.4GHz    3  or  4CH  

•  NEC  format    

-­‐  [Leader  Code][Custom  Code][Data  Code]  

-­‐  Leader  Code:  IniNalizaNon  of  a  signal  

-­‐  Custom  code:  IdenNfy  a  specific  device  

-­‐  Data  code  :  ExecuNon  code  

•  ZigBee  protocol  

Page 8: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

8  

ZigBee

•  One  of  the  sensor  networks  

•  Security  support  

•  encrypNon  :  AES-­‐CCM*  128    

•  Standard  :  802.15.4  

No  Security AES-­‐CBC-­‐MAC-­‐32  ~  128 Message  AuthenNcaNon AES-­‐CTR EncrypNon  Only AES-­‐CCM-­‐32  ~  128 Message  AuthenNcaNon  &  Enc

rypNon

Page 9: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

9  

WIFI

•  Recent  drone  systems  use  WIFI  connecNons,  which  are  now  used  widely  in  

the  today’s  world.  

•  WIFI  connecNon  is  convenient  but  people  need  to  re-­‐consider  about  its  

security.

Page 10: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

INSIDE  THE  AR.DRONE Drone  aAack  by  malware  and  network  hacking

Page 11: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

11  

Network

•  AR.  Drone  uses  WIFI  connecNon.  

Page 12: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

12  

AR.Drone  Controller  

•  AR.  Drone  is  controlled  by  smart  device’s  App.    

Page 13: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

13  

Telnet

•  AR.Drone  runs  a  telnet  daemon.  

Page 14: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

14  

FTP

•  AR.Drone  runs  a  FTP  daemo  

•  Basic  directory  is  /data/video  

Page 15: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

15  

program.elf

•  /bin/program.elf  is  an  important  file.  

•  Motor  will  not  funcNon  if  program.elf  process  is  killed  by  /bin/kk

Page 16: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

16  

Network

•  Network  •  Atheros  chipset  :  ath0

Page 17: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

17  

Processer  informaNon

•  ARM  processer  

Page 18: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

18  

Network

•  drone  has  to  scan  other  drones.  

•  Master  mode  can  not  scan  wireless  networks.  

Page 19: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

19  

Network

•  Ath0  do  not  support  key

Page 20: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

20  

Decompile  on  Android  App

Page 21: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

21  

Serial  connect

•  UART  :  Target  host  pc  communicaNon.    

•  If  drone  does  not  support  pp  or  telnet,  serial  connecNon  has  to  be  used.  

•  It  was  broken  3  Nmes,  because  of  a  wrong  connecNon.    

Page 22: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

22  

Serial  connect

•  Drone  mainboard  is  inside  the  boAom  cover.

RX TX GND 12V

Page 23: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

23  

Pairing

•  AR  Drone  has  a  pairing  system  for  security.    

•  Android  phone  support  pairing  mode.  iPhone  does  not  support.  

•  Default  Pairing  sesng  is  “off”.    

•   

iPhone Android

Page 24: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

24  

Pairing

•  Mac  address  check  

•  mac  address  access  do  not  permit  on  iOS  .  

Page 25: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

25  

Pairing

•  iptables  

Page 26: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

26  

Pairing

Page 27: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

DRONE  MALWARE Drone  aAack  by  malware  and  network  hacking

Page 28: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

28  

AR.  Drone

•  Parrot  AR.  Drone  is  a  commonly  and  widely  used  drone  in  the  world.  

•  Can  be  connected  through  smart  devices.  

•  Can  be  controlled  by  WIFI  connecNon  with  a  smart  device.  

Page 29: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

29  

Development  Environment

AR.  Drone  2.0  two  

GPS    

Beagle  board  

Laptop

Page 30: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

30  

How  to  infect  drone  1

Infect

Drone

Drone  malware

1.  Fake  App  can  infect  drone

2.  AAacker  can  infect  from  smart  device  at  the  drone's  networks  area.

Smart  Device  to  Drone

Page 31: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

31  

How  to  infect  drone  2

Infected  Drone’s  network  area

Impacted  Drone

Normal  Drone

Normal  Drone’s  network  area

Infect

Drone  to  Drone normal  drones  will  be  infected  if  a  infected  drone  enters  to  the  normal  drone’s  network  area.

Page 32: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

32  

AcNvity

Infected  Drone’s  network  area

Impacted  Drone

Normal  Drone

Normal  Drone’s  network  area

1.  Malware  copy  2.  Motor  stop

1.  Copy  and  replicate  itself  2.  Shutdown  3.  Other  working  like  GPS,  DNS  Pharming

Page 33: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

33  

Fake  app

Page 34: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

HOW  TO  INFECT  -­‐  1  FROM  SMART  DEVICE

Drone  aAack  by  malware  and  network  hacking

Page 35: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

35  

Controller  App  modificaNon

•  Recently,  a  lot  of  android  apps  are  modified  by  cracker.  

•  AR.  Drone  2.0  can  be  controlled  by  a  smartphone  app.  

•  Cracker  modifies  the  control  app  and  upload  on  the  internet.  

•  Medium  of  Spread  –  internet,  SMS,  E-­‐mail,  market,  etc.      

•  Drone  is  infected  when  a  person  uses  the  fake  app.

Page 36: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

36  

Controller  App  modificaNon

•  We  can  modify  and  repackage  applicaNons  by  a  freeware  called  Apktool.  

Page 37: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

37  

Controller  App  modificaNon

•  Smali  code  

Page 38: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

38  

Android  malware

•  Using  thread  for  network  communicaNons  

•   AR.  Drone  2.0  IP  is  192.168.1.1

Page 39: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

39  

FTP  upload  1

•  FTP  connecNon  

•  File  copy  

Asset  file

Page 40: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

40  

FTP  upload  2

•  FTP  upload

Page 41: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

41  

Telnet

•  ConnecNon  telnet  

•  Command  

Page 42: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

42  

Malware

•  Inside  of  drone.    

Page 43: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

HOW  TO  INFECT  -­‐  2  DRONE  TO  DRONE

Drone  aAack  by  malware  and  network  hacking

Page 44: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

44  

Mode  change

•  Network  mode  can  be  changed  to  “managed”  using  iwconfig  command.    

Page 45: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

45  

Scanning

•  We  can  scan  other  AR.Drone  and  AP.  

Page 46: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

46  

Scanning

•  Change  network  to  “managed”  mode.  

•  Drone  repeat  scan  to  other  drones  using  fork  funcNon.  

Page 47: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

47  

Connect  to  other  drone

•  Connect  if  other  AR.Drone’s  AP  exists  

Page 48: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

48  

Connect  to  other  drone

•  Drone  succeeds  connecNng  to  another  drone’s  AP  

Page 49: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

49  

Boot

•  Malware  has  to  execute  in  the  boot-­‐up  sequence.

Page 50: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

50  

AcNon

•  Repeat  unNl  the  aAacker  drone  scans  to  other  drones.  

•  Connect  to  AR.Drone’s  AP  if  found.  

•  FTP  upload  itself.  

•  Telnet  connecNon.  

•  Permission  sesng(execute).  

•  boot  sesng.

Page 51: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

51  

FTP  upload  itself

•  FTP  login  to  other  drone.  

•  Upload  itself

Reference  was  Cmdpp  source.

Page 52: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

ACTIVITY Drone  aAack  by  malware  and  network  hacking

Page 53: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

53  

Command

•  HSDrone  connect  socket.  

Page 54: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

54  

Command

•  Make  a  directory  

•  Copy  

•  Permission  sesng  

Page 55: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

55  

Command

•  kk  -­‐  Motor  will  be  stopped.  

•  Change  to  master  

Page 56: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

56  

AT  Commands

•  Drone  command  using  UDP  5556  port  

AT*PCMD_MAG=21625,1,0,0,0,0,0,0<CR>AT*REF=21626,290717696<CR>  

AT*PCMD_MAG=xx,xx,−1085485875,xx,xx,xx,xx.  

Page 57: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

57  

tcpdump

•  Install  tcpdump  on  drone.  

•  We  can  capture  the  network  packet  aper  that.  

•  192.168.1.5  is  controller’s  IP.

Page 58: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

58  

Packet  capture

Page 59: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

59  

ConfiguraNon

•   AlNtude  max  :  drone  can  go  fly  Nll  100000  (which  is  100  meters  from  the  

ground)  

•  We  can  fly  to  some  GPS  locaNon  with  no  obstacle    

         AT*CONFIG=605,"control:alNtude_max","3000"  

         AT*CONFIG=605,"control:alNtude_max",  "100000"

Page 60: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

60  

GPS

-­‐  AR.  Drone  2.0  is  supports  GPS.  

-­‐  If  we  click  a  point  to  GPS  on  the  smart  device,  drone  will  move  to  the  

place  requested.  

-­‐  The  user  can  go  back  to  the  GPS  registered  "home“  by  pressing  the  

"home"  buAon.    

-­‐  Infected  drones  will  come  to  my  real  home  if  there  isn’t  any  obstacle.

Page 61: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

61  

GPS

Page 62: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

62  

DNS  Pharming

No  encrypNon  Default  password

Access  administrator  mode  from  wireless

•  Drones  can  change  some  vulnerable  AP’s  DNS  during  the  fly.  

Page 63: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

63  

DNS  Server  change

•  Can  change  DNS  on  Administrator  mode

Page 64: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

64  

dnsmasq

Page 65: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

65  

dnsmasq

•  /etc/dnsmasq.conf  

•  8.8.8.8  is  Google  DNS  Server

Page 66: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

66  

DNS

Page 67: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

67  

Pharming

Page 68: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

68  

episode1

•  Malware  replicated  itself  like  a  worm  and  somehow  destroyed  bootloader  and  

made  two  drones  brick.  

•  I  tried  serial  communicaNon  using  UART  in  order  to  repair  brick  drones,  but  

devices  was  not  even  able  to  boot  up.  

•  UART  does  not  work  when  UART  ports  are  misconfigured.  I  replaced  once  

because  UART  itself  was  a  problem,  and  replaced  again  because  the  UART  was  

broken  by  wrong  ports.  

•  One  drone  was  bought  in  Korea  and  another  drone  was  bought  in  other  

country.  The  problem  was  that  I  was  able  to  get  a  free  replacement  for  the  

drone  which  was  bought  in  Korea,  but  I  had  to  pay  for  the  drone’s  mainboard  

which  was  bought  outside  Korea,  since  it  does  not  support  any  A/S.  I  paid  

170$  overall.  

Page 69: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

69  

episode2

•  Aper  malware  replicated  itself,  the  network  configuraNon  broke  out.  I  was  

not  able  to  control  the  drone  at  the  end  

•  I  had  to  wait  for  drone  to  drain  its  baAery  since  it  was  out  of  control.      

(drone  works  properly  for  around  10  minutes)

Page 70: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

70  

Result

•  Drone  malware  (HSDrone  that  I’ve  made)  can  spread  through  wireless  

networks.    

-­‐  Smart  Device  to  Drone    -­‐  Drone  to  Drone  

•  Can  control  other  drone  UDP  network  command.      

•  Malware  can  aAack  AP  DNS  Pharming.  

•  Drone  malwares  like  this  one  could  spread  and  aAack  your  computers,  

APs,  smart  devices,  drones,  and  everything  in  the  future.  

•  It  is  dangerous,  drone  has  an  advantage  of  having  physical  distance  for  the  

aAack  to  be  done.  

Page 71: CODE BLUE 2014 : Drone attack by malware and network hacking by DONGCHEOL HONG

Confidential to SEWORKS Copyright ©2014 SEWORKS Inc. All rights reserved.

71  

THANK  YOU