SlideShare une entreprise Scribd logo
1  sur  189
Télécharger pour lire hors ligne
Advanced	
  Wi-­‐Fi	
  Security	
  
  Penetra3on	
  Tes3ng	
  
     Vivek	
  Ramachandran	
  
  h=p://www.securitytube.net	
  	
  
    vivek@securitytube.net	
  	
  


               ©SecurityTube.net	
  
Vivek	
  Ramachandran	
  



    B.Tech,	
  ECE	
              802.1x,	
  Cat65k	
                    WEP	
  Cloaking	
           Caffe	
  La=e	
  A=ack	
  
   IIT	
  Guwaha3	
               Cisco	
  Systems	
                      Defcon	
  15	
                Toorcon	
  9	
  




Media	
  Coverage	
  
                              MicrosoP	
  	
                    Trainer,	
  2011	
             Wi-­‐Fi	
  Malware,	
  2011	
  
  CBS5,	
  BBC	
  
                          Security	
  Shootout	
  
                                                 ©SecurityTube.net	
  
In-­‐Person	
  Trainings	
  




          ©SecurityTube.net	
  
SecurityTube.net	
  




       ©SecurityTube.net	
  
SecurityTube	
  Online	
  Cer3fica3ons	
  




              Students	
  in	
  50+	
  Countries	
  	
  




                         ©SecurityTube.net	
  
Backtrack	
  5	
  Wireless	
  Penetra3on	
  Tes3ng	
  




h=p://www.amazon.com/BackTrack-­‐Wireless-­‐Penetra3on-­‐Tes3ng-­‐Beginners/dp/1849515581/	
  	
  




                                           ©SecurityTube.net	
  
Why	
  is	
  Wireless	
  Security	
  Important?	
  

                               •    Seamless	
  mobility	
  
                               •    Ubiquitous	
  
                               •    Mass	
  adop3on	
  
                               •    Integrated	
  into	
  all	
  
                                    devices	
  
                                      –  Laptops	
  
                                      –  Phones	
  
                                      –  Embedded	
  Devices	
  
                               •  Connects	
  to	
  Internet	
  
                      ©SecurityTube.net	
  
Wireless	
  Security	
  Challenges	
  

               •  How	
  do	
  you	
  protect	
  
                  something	
  you	
  can’t	
  see?	
  
                  J	
  
               •  Extends	
  beyond	
  boundary	
  
                  walls	
  	
  
               •  Mobile	
  clients	
  
               •  Difficult	
  to	
  locate	
  a=acker	
  
               •  Passive	
  a=acks	
  can	
  be	
  
                  done	
  from	
  miles	
  away	
  

                ©SecurityTube.net	
  
Wireless	
  Gear	
  

                                                                        A=acker	
  


         Vic3m	
  




                                    Access	
  Point	
  

                                                                            External	
  Card	
  



Smartphone	
  
                      •    2	
  Laptops	
  
                      •    1	
  Smartphone	
  
                      •    1-­‐2	
  Access	
  Points	
  
                      •    1-­‐2	
  External	
  Wireless	
  Cards	
  
                                     ©SecurityTube.net	
  
External	
  Wireless	
  Card	
  

            •  Alfa	
  Networks	
  AWUS036H	
  USB	
  based	
  card	
  

            •  Already	
  integrated	
  into	
  Backtrack	
  

            •  Allows	
  for	
  packet	
  sniffing	
  

            •  Allows	
  for	
  packet	
  injec3on	
  

            •  Maximum	
  adver3sed	
  output	
  at	
  1	
  Wa=	
  

            •  We	
  will	
  use	
  this	
  in	
  all	
  our	
  experiments	
  

            •  Current	
  Retail	
  Price	
  at	
  $37	
  on	
  Amazon	
  
               h=p://www.amazon.com/Alfa-­‐802-­‐11b-­‐
               Wireless-­‐Original-­‐9dBi/dp/B001O9X9EU	
  	
  


             ©SecurityTube.net	
  
SoPware	
  Setup	
  




•  Run	
  Backtrack	
  in	
  VirtualBox	
  
•  Load	
  the	
  Lab	
  Files	
  on	
  it	
  



                                 ©SecurityTube.net	
  
Understanding	
  Wireless	
  Sniffing	
  

•  Concept	
  similar	
  to	
  wired	
  side	
  sniffing	
  
•  Put	
  the	
  wireless	
  interface	
  into	
  “monitor”	
  
   mode	
  
    –  Akin	
  to	
  wired	
  side	
  “promiscuous”	
  mode	
  
•  On	
  BT	
  tools	
  are	
  inbuilt	
  
•  Will	
  use	
  Airmon-­‐NG	
  to	
  put	
  the	
  card	
  into	
  
   monitor	
  mode	
  


                                   ©SecurityTube.net	
  
Lab	
  Session:	
  Simple	
  Sniffing	
  

•  Start	
  sniffing	
  on	
  the	
  air	
  
•  Use	
  wireshark	
  to	
  see	
  the	
  packets	
  




                                ©SecurityTube.net	
  
Surprise!	
  Wi-­‐Fi	
  Sniffing	
  is	
  more	
  
                   complicated	
  
•  WLANs	
  can	
  operate	
  in	
  3	
  different	
  frequency	
  
   ranges	
  
    –  2.4GHz	
  (802.11b/g/n)	
  
    –  3.6GHz	
  (802.11y)	
  
    –  4.9/5.0GHz	
  (802.11a/h/j/n)	
  
•  Each	
  of	
  these	
  ranges	
  is	
  divided	
  into	
  mul3ple	
  
   channels	
  	
  
•  Every	
  country	
  has	
  allowed	
  channels,	
  users	
  and	
  
   maximum	
  power	
  levels	
  
•  However,	
  wireless	
  card	
  can	
  be	
  configured	
  to	
  
   disregard	
  these	
  policies	
  

                                 ©SecurityTube.net	
  
802.11b/g/n	
  Channels	
  




•    Source:	
  Wikipedia	
  
                                          ©SecurityTube.net	
  
Difference	
  between	
  Wired	
  and	
  Wireless	
  
                 Sniffing	
  	
  
•  Key	
  difference	
  with	
  wired	
  
    –  Concept	
  of	
  channels	
  and	
  bands	
  in	
  wireless	
  
    –  Wireless	
  Card	
  can	
  only	
  be	
  on	
  one	
  channel	
  at	
  a	
  
       7me	
  
    –  Cannot	
  sniff	
  on	
  all	
  channels	
  and	
  bands	
  at	
  the	
  
       same	
  3me	
  
    –  Wireless	
  Card	
  needs	
  to	
  be	
  capable	
  of	
  opera7ng	
  
       in	
  the	
  given	
  range	
  :	
  a?b?g?n?h?	
  
•  Alfa	
  Network	
  card	
  operates	
  in	
  b/g	
  
                                     ©SecurityTube.net	
  
Lab	
  Session:	
  Sniffing	
  and	
  Channel	
  Hopping	
  

  •  Use	
  airodump-­‐ng	
  u3lity	
  to	
  cycle	
  through	
  the	
  
     different	
  channels	
  
  •  Locate	
  different	
  wireless	
  networks	
  over	
  the	
  air	
  
  •  View	
  the	
  packets	
  in	
  Wireshark	
  




                                 ©SecurityTube.net	
  
A	
  Simple	
  Wireless	
  Network	
  
 Vic3m	
  Laptop(s)	
  
                                                                         A=acker	
  Laptop	
  
                                                                         	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  +	
  
                                                                         	
  	
  	
  	
  Alfa	
  Card	
  




                                                   Access	
  Point	
  

Smartphone	
  
                          Internet	
  



                                   ©SecurityTube.net	
  
Understanding	
  WLAN	
  Packets	
  Types	
  

•  3	
  types	
  of	
  packets:	
  
    –  Management	
  	
  
    –  Control	
  
    –  Data	
  
•  Subtypes	
  exist	
  for	
  each	
  of	
  the	
  above	
  
•  Full	
  details	
  available	
  in	
  IEEE	
  Specifica3on	
  
h=p://standards.ieee.org/about/get/802/802.11.html	
  	
  




                                      ©SecurityTube.net	
  
Packet	
  Sub-­‐Types	
  




   Source:	
  IEEE	
  802.11-­‐2007	
  Standard	
  
                 ©SecurityTube.net	
  
Understanding	
  the	
  Access	
  Point	
  

•  Access	
  Point	
  is	
  configured	
  with	
  an	
  SSID	
  	
  
•  This	
  SSID	
  acts	
  as	
  a	
  network	
  name	
  for	
  discovery	
  
•  Clients	
  search	
  for	
  this	
  access	
  point	
  or	
  network	
  
   using	
  this	
  SSID	
  
•  Access	
  Point	
  sends	
  out	
  broadcast	
  frames	
  
   called	
  Beacon	
  Frames	
  to	
  announce	
  its	
  
   presence	
  
•  Clients	
  use	
  this	
  to	
  show	
  available	
  wireless	
  
   networks	
  list	
  

                                 ©SecurityTube.net	
  
Demo	
  

•  Start	
  Wireshark	
  and	
  capture	
  Beacon	
  Frames	
  
•  Analyze	
  various	
  important	
  header	
  fields	
  in	
  the	
  
   Beacon	
  Frame	
  
•  Iden3fy	
  things	
  like	
  SSID,	
  Encryp3on,	
  Channel	
  
   etc.	
  




                               ©SecurityTube.net	
  
TaDa!	
  Pwning	
  Beacon	
  Frames	
  

•  Anyone	
  can	
  create	
  and	
  transmit	
  beacon	
  
   frames	
  
•  All	
  clients	
  will	
  list	
  that	
  as	
  a	
  new	
  access	
  point	
  
•  We	
  will	
  use	
  MDK	
  on	
  BT4	
  to	
  do	
  this	
  

Demo	
  Time!	
  



                                      ©SecurityTube.net	
  
What	
  did	
  we	
  learn?	
  

•    Spoofing	
  802.11	
  frames	
  is	
  simple	
  
•    No	
  protec3on	
  mechanism	
  available	
  
•    Seems	
  similar	
  to	
  TCP/IP	
  spoofing	
  
•    We	
  will	
  use	
  this	
  “insecurity”	
  over	
  and	
  over	
  
     again	
  in	
  a=acks	
  




                                   ©SecurityTube.net	
  
Objec3ve	
  

•  To	
  understand	
  how	
  AP	
  and	
  Clients	
  
   communicate	
  

•  Strip	
  down	
  to	
  the	
  packet	
  level	
  

•  Understand	
  details	
  with	
  Wireshark	
  



                                  ©SecurityTube.net	
  
Demo	
  Time!	
  

•  Create	
  an	
  open	
  authen3ca3on	
  and	
  no	
  
   encryp3on	
  based	
  AP	
  with	
  SSID	
  “SecurityTube”	
  
•  Connect	
  a	
  client	
  to	
  it	
  
    –  Laptop	
  
    –  Smartphone	
  
•  Collect	
  all	
  the	
  packets	
  using	
  Wireshark	
  
    –  Ensure	
  your	
  card	
  is	
  also	
  on	
  the	
  same	
  channel	
  
•  Analyze	
  the	
  flow	
  

                                      ©SecurityTube.net	
  
Client	
  –	
  AP	
  Connec3on	
  Packets	
  




Source:	
  IEEE	
  Standard	
     ©SecurityTube.net	
  
AP-­‐Client	
  State	
  Machine	
  




              ©SecurityTube.net	
  
Terminology	
  
•  STA	
  –	
  STA3on	
  (Wireless	
  Client)	
  

•  BSS	
  –	
  Basic	
  Service	
  Set	
  (set	
  of	
  nodes	
  communica3ng	
  with	
  
   each	
  other)	
  
     –  Infrastructure	
  BSS	
  (AP	
  and	
  Clients)	
  
     –  Independent	
  BSS	
  (Ad-­‐Hoc	
  Clients)	
  

•  ESS	
  –	
  Extended	
  Service	
  Set	
  (set	
  of	
  connected	
  BSSs)	
  

•  BSSID	
  –	
  Basic	
  Service	
  Set	
  Iden3fier	
  
     –  Infrastructure	
  BSS	
  (MAC	
  address	
  of	
  AP)	
  
     –  IBSS	
  (Randomly	
  Chosen	
  MAC	
  address)	
  

•  DS	
  –	
  Distribu3on	
  System	
  (connects	
  APs	
  in	
  an	
  ESS)	
  
                                            ©SecurityTube.net	
  
BSS	
  

Infrastructure	
  BSS	
                                           Independent	
  BSS	
  (Ad-­‐Hoc)	
  




                                                            BSSID	
  =	
  Random	
  MAC	
  chosen	
  by	
  
      BSSID	
  =	
  MAC	
  of	
  AP	
  
                                                              First	
  Client	
  in	
  Ad-­‐Hoc	
  Mode	
  

                                          ©SecurityTube.net	
  
ESS	
  
BSS	
  1	
                             BSS	
  2	
  




                    DS	
  




               LAN/WAN	
  


               ©SecurityTube.net	
  
WLAN	
  Packet	
  Header	
  

       Frame	
       Dura3on/	
     Address	
     Address	
          Address	
      Sequence	
     Address	
      QoS	
        Frame	
         FCS	
  
       Control	
        ID	
           1	
           2	
                3	
          Control	
        4	
        Control	
      Body	
  




                                                              Presence	
  Depends	
  on	
  Packet	
  Type	
  /	
  Sub	
  Type	
  



       Frame	
       Dura3on/	
     Address	
     Address	
          Address	
      Sequence	
     Address	
      QoS	
        Frame	
         FCS	
  
       Control	
        ID	
           1	
           2	
                3	
          Control	
        4	
        Control	
      Body	
  




Bytes	
   2	
              2	
          6	
           6	
                6	
              2	
            6	
           2	
      0	
  to	
          4	
  
                                                                                                                               2312	
  4	
  


                                                                         ©SecurityTube.net	
  
Frame	
  Control	
  Field	
  
    Frame	
         Dura3on/	
          Address	
           Address	
             Address	
          Sequence	
               Address	
          QoS	
           Frame	
       FCS	
  
    Control	
          ID	
                1	
                 2	
                   3	
              Control	
                  4	
            Control	
         Body	
  



   2	
  Bytes	
  


                                               Bits	
  
     2	
          2	
         4	
             1	
                1	
             1	
                 1	
              1	
                   1	
                  1	
           1	
  

Protocol	
        Type	
      Sub	
         To	
  DS	
     From	
  DS	
     More	
  Frag	
       Retry	
            Power	
            More	
  Data	
         Protected	
     Order	
  
                             Type	
                                                                                 Mgmt.	
                                     Frame	
  




                                                                                         ©SecurityTube.net	
  
Protocol	
  
     2	
       2	
         4	
         1	
                1	
             1	
                 1	
           1	
            1	
              1	
           1	
  

Protocol	
     Type	
      Sub	
     To	
  DS	
     From	
  DS	
     More	
  Frag	
       Retry	
         Power	
     More	
  Data	
     Protected	
     Order	
  
                          Type	
                                                                          Mgmt.	
                          Frame	
  




      •  Default	
  to	
  “0”	
  value	
  
      •  May	
  change	
  when	
  a	
  major	
  revision	
  happens	
  
         incompa3ble	
  with	
  the	
  previous	
  version	
  

                                                                                  ©SecurityTube.net	
  
Type	
  and	
  SubType	
  
     2	
       2	
         4	
         1	
                1	
             1	
                 1	
           1	
            1	
              1	
           1	
  

Protocol	
     Type	
      Sub	
     To	
  DS	
     From	
  DS	
     More	
  Frag	
       Retry	
         Power	
     More	
  Data	
     Protected	
     Order	
  
                          Type	
                                                                          Mgmt.	
                          Frame	
  




      •  Type	
  –	
  Management,	
  Control	
  and	
  Data	
  
         Frames	
  
      •  Sub-­‐Types	
  in	
  each	
  

                                                                                  ©SecurityTube.net	
  
To	
  and	
  From	
  DS	
  
     2	
                 2	
      4	
               1	
               1	
             1	
                  1	
              1	
                1	
             1	
         1	
  

Protocol	
           Type	
       Sub	
         To	
  DS	
      From	
  DS	
     More	
  Frag	
        Retry	
            Power	
      More	
  Data	
     Protected	
     Order	
  
                                 Type	
                                                                                   Mgmt.	
                           Frame	
  




             To	
  DS	
            From	
  DS	
                                                                    Interpreta7on	
  

                 0	
                        0	
                                                STA	
  to	
  STA	
  in	
  same	
  IBSS	
  (Ad-­‐Hoc),	
  	
  
                                                                                               Management	
  and	
  Control	
  Frames	
  
                 0	
                        1	
                                               Exi3ng	
  the	
  Distribu3on	
  System	
  (DS)	
  

                 1	
                        0	
                                                                    Entering	
  the	
  DS	
  

                 1	
                        1	
                                  Used	
  in	
  Wireless	
  Distribu3on	
  Systems	
  (WDS)	
  

                                                                                              ©SecurityTube.net	
  
More	
  Frag	
  
     2	
       2	
         4	
         1	
                1	
             1	
                 1	
           1	
            1	
              1	
           1	
  

Protocol	
     Type	
      Sub	
     To	
  DS	
     From	
  DS	
     More	
  Frag	
       Retry	
         Power	
     More	
  Data	
     Protected	
     Order	
  
                          Type	
                                                                          Mgmt.	
                          Frame	
  




      •  Indicates	
  if	
  more	
  fragments	
  of	
  the	
  current	
  
         frame	
  are	
  to	
  follow	
  
      •  Only	
  applica3on	
  to	
  Data	
  and	
  Management	
  
         frames	
  

                                                                                  ©SecurityTube.net	
  
Retry	
  
     2	
       2	
         4	
         1	
                1	
             1	
                 1	
           1	
            1	
              1	
           1	
  

Protocol	
     Type	
      Sub	
     To	
  DS	
     From	
  DS	
     More	
  Frag	
       Retry	
         Power	
     More	
  Data	
     Protected	
     Order	
  
                          Type	
                                                                          Mgmt.	
                          Frame	
  




      •  Indicates	
  is	
  current	
  frame	
  is	
  a	
  retransmission	
  
      •  Applicable	
  to	
  Management	
  and	
  Data	
  Frames	
  
         only	
  

                                                                                  ©SecurityTube.net	
  
Power	
  Management	
  
     2	
       2	
         4	
         1	
                1	
             1	
                 1	
           1	
            1	
              1	
           1	
  

Protocol	
     Type	
      Sub	
     To	
  DS	
     From	
  DS	
     More	
  Frag	
       Retry	
         Power	
     More	
  Data	
     Protected	
     Order	
  
                          Type	
                                                                          Mgmt.	
                          Frame	
  




      •  Indicates	
  if	
  the	
  STA	
  is	
  in	
  Power	
  Save	
  Mode	
  or	
  
         Ac3ve	
  Mode	
  



                                                                                  ©SecurityTube.net	
  
More	
  Data	
  
     2	
       2	
         4	
         1	
                1	
             1	
                 1	
           1	
            1	
              1	
           1	
  

Protocol	
     Type	
      Sub	
     To	
  DS	
     From	
  DS	
     More	
  Frag	
       Retry	
         Power	
     More	
  Data	
     Protected	
     Order	
  
                          Type	
                                                                          Mgmt.	
                          Frame	
  




      •  Indicates	
  to	
  an	
  STA	
  in	
  Power	
  Save	
  mode	
  that	
  
         more	
  data	
  is	
  to	
  follow	
  
      •  Data	
  is	
  queued	
  up	
  on	
  the	
  AP	
  

                                                                                  ©SecurityTube.net	
  
Protected	
  Frame	
  
     2	
        2	
        4	
         1	
                1	
             1	
                 1	
           1	
            1	
              1	
           1	
  

Protocol	
     Type	
      Sub	
     To	
  DS	
     From	
  DS	
     More	
  Frag	
       Retry	
         Power	
     More	
  Data	
     Protected	
     Order	
  
                          Type	
                                                                          Mgmt.	
                          Frame	
  




      •  1	
  indicates	
  that	
  the	
  Frame	
  Body	
  is	
  encrypted	
  
               –  Data	
  frames	
  
               –  Management	
  frames	
  of	
  Type	
  Auth	
  
      •  0	
  indicates	
  no	
  encryp3on	
  
                                                                                  ©SecurityTube.net	
  
Order	
  
     2	
       2	
         4	
         1	
                1	
             1	
                 1	
           1	
            1	
              1	
           1	
  

Protocol	
     Type	
      Sub	
     To	
  DS	
     From	
  DS	
     More	
  Frag	
       Retry	
         Power	
     More	
  Data	
     Protected	
     Order	
  
                          Type	
                                                                          Mgmt.	
                          Frame	
  




      •  Indicates	
  that	
  all	
  received	
  frames	
  must	
  be	
  
         processed	
  in	
  order	
  



                                                                                  ©SecurityTube.net	
  
Dura3on	
  
Frame	
       Dura3on/	
     Address	
     Address	
      Address	
      Sequence	
     Address	
      QoS	
        Frame	
     FCS	
  
Control	
        ID	
           1	
           2	
            3	
          Control	
        4	
        Control	
      Body	
  




 •  Used	
  to	
  set	
  the	
  Network	
  Alloca3on	
  Vector	
  
    (NAV)	
  J	
  
 •  NAV	
  is	
  the	
  minimum	
  amount	
  of	
  3me	
  a	
  STA	
  
    needs	
  to	
  wait	
  before	
  a=emp3ng	
  transmission	
  
 •  Also	
  used	
  in	
  CFP	
  and	
  PS-­‐Poll	
  frames	
  

                                                              ©SecurityTube.net	
  
Address	
  
Frame	
       Dura3on/	
     Address	
     Address	
      Address	
      Sequence	
     Address	
      QoS	
        Frame	
     FCS	
  
Control	
        ID	
           1	
           2	
            3	
          Control	
        4	
        Control	
      Body	
  




 •  Value	
  and	
  Presence	
  depends	
  on	
  Type/Sub-­‐
    Type	
  
 •  Des3na3on	
  Address	
  
 •  Source	
  Address	
  
 •  BSSID	
  

                                                              ©SecurityTube.net	
  
Sequence	
  Control	
  
Frame	
       Dura3on/	
     Address	
     Address	
           Address	
      Sequence	
            Address	
      QoS	
        Frame	
     FCS	
  
Control	
        ID	
           1	
           2	
                 3	
          Control	
               4	
        Control	
      Body	
  




                                                         Fragment	
  
                                                                                Sequence	
  Number	
  
                                                          Number	
  




 •  Sequence	
  number	
  of	
  the	
  packet	
  
 •  Fragment	
  number	
  of	
  the	
  packet	
  



                                                                   ©SecurityTube.net	
  
QoS	
  Control	
  
Frame	
       Dura3on/	
     Address	
     Address	
     Address	
      Sequence	
     Address	
      QoS	
        Frame	
     FCS	
  
Control	
        ID	
           1	
           2	
           3	
          Control	
        4	
        Control	
      Body	
  




 •  Quality	
  of	
  Service	
  Related	
  
 •  In	
  Data	
  Frames	
  



                                                             ©SecurityTube.net	
  
Frame	
  Body	
  
Frame	
        Dura3on/	
     Address	
     Address	
     Address	
      Sequence	
     Address	
      QoS	
        Frame	
     FCS	
  
Control	
         ID	
           1	
           2	
           3	
          Control	
        4	
        Control	
      Body	
  




 •  Contains	
  the	
  data	
  payload	
  
              –  Management	
  frame	
  details	
  
              –  Actual	
  data	
  


                                                              ©SecurityTube.net	
  
FCS	
  
Frame	
       Dura3on/	
     Address	
     Address	
     Address	
      Sequence	
     Address	
      QoS	
        Frame	
     FCS	
  
Control	
        ID	
           1	
           2	
           3	
          Control	
        4	
        Control	
      Body	
  




 •  CRC	
  check	
  over	
  the	
  MAC	
  header	
  and	
  Frame	
  
    Body	
  
 •  Easy	
  to	
  beat	
  J	
  

                                                             ©SecurityTube.net	
  
Sniffing	
  SSIDs	
  




      ©SecurityTube.net	
  
Hidden	
  SSID	
  

•  Turn	
  SSID	
  Broadcas3ng	
  off	
  in	
  Beacon	
  Frames	
  
•  Just	
  monitoring	
  Beacon	
  Frames	
  will	
  not	
  give	
  
   you	
  the	
  SSID	
  
•  A	
  “Security	
  through	
  Obscurity”	
  technique	
  at	
  
   best	
  
•  Can	
  only	
  deter	
  novices	
  
•  Hardly	
  a	
  challenge	
  for	
  the	
  experienced	
  
   wireless	
  hacker	
  

                               ©SecurityTube.net	
  
Pwning	
  Hidden	
  SSIDs	
  

•  Mul3ple	
  Techniques:	
  
     –  Monitor	
  Air	
  for	
  a	
  new	
  Client	
  trying	
  to	
  associate	
  with	
  the	
  
        access	
  point	
  (passive)	
  
     –  De-­‐authen3cate	
  one	
  or	
  all	
  clients	
  and	
  monitor	
  
        reconnec3ons	
  (ac3ve)	
  

•  Basic	
  idea	
  is	
  to	
  force	
  the	
  network	
  to	
  send	
  Probe	
  /	
  
   Associa3on	
  packets	
  

•  These	
  packets	
  contain	
  the	
  SSID	
  even	
  if	
  not	
  present	
  in	
  
   the	
  Beacon	
  frame	
  from	
  the	
  access	
  point	
  

                                             ©SecurityTube.net	
  
Origin	
  of	
  MAC	
  Filters	
  

•  Used	
  in	
  the	
  Wired	
  World	
  
•  Switches	
  and	
  Filtering	
  devices	
  like	
  Firewalls	
  
•  Idea	
  was	
  to	
  have	
  a	
  set	
  of	
  “whitelisted”	
  MAC	
  
   addresses	
  and	
  deny	
  rest	
  
•  Is	
  insecure	
  as	
  MAC	
  address	
  can	
  be	
  easily	
  spoofed	
  
•  Reasonably	
  secure	
  if	
  authorized	
  MAC	
  addresses	
  
   are	
  few	
  and	
  a=acker	
  cannot	
  get	
  physical	
  access	
  
   to	
  the	
  authorized	
  machines	
  to	
  find	
  the	
  MAC	
  


                                   ©SecurityTube.net	
  
Wireless	
  MAC	
  Filters	
  

•  Not	
  a	
  feature	
  in	
  the	
  802.11	
  standard	
  
•  Can	
  add	
  them	
  on	
  the	
  access	
  point	
  (network	
  layer	
  
   filter)	
  
•  Simple	
  way	
  to	
  only	
  allowed	
  whitelisted	
  MACs	
  
•  **	
  Time	
  to	
  Laugh	
  **	
  J	
  J	
  J	
  
    –  MAC	
  addresses	
  are	
  visible	
  in	
  plain	
  text	
  in	
  the	
  WLAN	
  
       header	
  
    –  We	
  simply	
  need	
  to	
  monitor	
  associated	
  clients	
  and	
  find	
  
       their	
  MAC	
  addresses	
  
    –  Use	
  the	
  MAC	
  when	
  the	
  Client	
  is	
  gone	
  /	
  s3ll	
  present	
  
    –  No	
  defense	
  at	
  all!	
  

                                       ©SecurityTube.net	
  
WLAN	
  Authen3ca3on	
  

•  WLAN	
  Authen3ca3on	
  by	
  itself	
  is	
  not	
  powerful	
  
   at	
  all	
  
•  2	
  types:	
  

   –  Open	
  Authen3ca3on	
  

   –  Shared	
  Authen3ca3on	
  



                              ©SecurityTube.net	
  
Open	
  Authen3ca3on	
  

•  No	
  “actual”	
  Authen3ca3on	
  mechanism	
  at	
  all	
  

•  2	
  packets	
  exchanged	
  between	
  Client	
  and	
  AP,	
  
   and	
  authen3ca3on	
  ends	
  

•  Cases	
  where	
  authen3ca3on	
  may	
  fail	
  
   –  MAC	
  Filtering	
  


                              ©SecurityTube.net	
  
Shared	
  Authen3ca3on	
  




          ©SecurityTube.net	
  
Understanding	
  Shared	
  Authen3ca3on	
  

 •  Challenge	
  is	
  encrypted	
  using	
  the	
  WEP	
  key	
  

 •  WEP	
  uses	
  RC4	
  which	
  is	
  a	
  stream	
  cipher	
  

 •  RC4	
  Keystream	
  is	
  XOR’ed	
  with	
  Plain	
  Text	
  
    challenge	
  and	
  response	
  is	
  returned	
  

 •  We	
  will	
  discuss	
  WEP	
  in	
  detail	
  later	
  

                                    ©SecurityTube.net	
  
Simple	
  Math	
  to	
  nail	
  Shared	
  Auth	
  




X	
  –	
  Plain	
  Text	
  Challenge	
  	
                                          	
  	
  
Y	
  –	
  WEP	
  Keystream	
  
Z	
  –	
  Encrypted	
  Challenge	
  
	
  
Z	
  =	
  X	
  	
  (xor)	
  Y	
  
	
  
Z	
  (xor)	
  X	
  =	
  (	
  X	
  (xor)	
  Y	
  )	
  (xor)	
  X	
  	
  =	
  Y	
  
                               	
  	
  	
  
	
  
	
  	
  
                                                                                               ©SecurityTube.net	
  
Using	
  the	
  Keystream	
  and	
  IV	
  

•  Use	
  for	
  shared	
  authen3ca3on	
  with	
  the	
  AP	
  

•  Can	
  be	
  used	
  to	
  encrypt	
  small	
  packets	
  (128	
  bytes)	
  
    –  Arbitrary	
  injec3on	
  


•  IV	
  and	
  Keystream	
  can	
  be	
  harvested	
  to	
  create	
  a	
  
   table	
  based	
  decryp3on	
  a=ack	
  
    –  Need	
  a	
  lot	
  of	
  SKA	
  tries	
  
    –  Can	
  only	
  decrypt	
  first	
  128	
  bytes	
  of	
  every	
  packet	
  


                                        ©SecurityTube.net	
  
Demo	
  Time	
  

•  Setup	
  AP	
  to	
  use	
  WEP	
  and	
  Shared	
  Key	
  Auth	
  

•  Try	
  connec3ng	
  without	
  knowing	
  the	
  key	
  

•  Sniff	
  the	
  packets	
  and	
  dump	
  the	
  keystream	
  

•  Use	
  this	
  to	
  pwn	
  shared	
  authen3ca3on	
  

                                 ©SecurityTube.net	
  
Hotspot	
  Basics	
  

•  Free	
  /	
  Paid	
  WiFi	
  based	
  internet	
  offered	
  in	
  public	
  
   places	
  
    –  Coffee	
  shops	
  
    –  Airport	
  
•  Typically	
  uses	
  
    –  Open	
  Authen3ca3on	
  
    –  MAC	
  Filtering	
  at	
  3mes	
  
    –  No	
  Encryp3on	
  
         •  Distribu3on	
  of	
  keys	
  would	
  be	
  a	
  nightmare	
  
    –  Can	
  use	
  cap3ve	
  portals	
  for	
  applica3on	
  layer	
  
       authen3ca3on	
  

                                           ©SecurityTube.net	
  
Hotspot	
  A=acks	
  

•  Create	
  an	
  Evil	
  Twin	
  in	
  the	
  vicinity	
  
    –  Same	
  ESSID	
  
    –  Same	
  BSSID	
  (op3onal)	
  
•  Use	
  De-­‐Authen3ca3on	
  a=acks	
  to	
  break	
  Client	
  
   AP	
  Connec3on	
  
•  If	
  Evil	
  Twin	
  has	
  higher	
  signal	
  strength,	
  then	
  
   Client	
  will	
  connect	
  to	
  it	
  


                                    ©SecurityTube.net	
  
A=ack	
  Visualiza3on	
  
                         Client	
  


                                                                     SSID:	
  SecurityTube	
  

     IP	
  Address	
  
                                      De-­‐Authen3ca3on	
  Packets	
  




DHCP	
  
Server	
  
                    A=acker	
  



                                      ©SecurityTube.net	
  
Post	
  A=ack	
  Op3ons	
  
                     Client	
  


                                                                                               SSID:	
  SecurityTube	
  




                                                               1.	
  Relay	
  it	
  to	
  the	
  access	
  point	
  (MITM)	
  




               A=acker	
  

Internet	
  
               2.	
  Relay	
  to	
  Internet	
  Directly	
  
                                                    ©SecurityTube.net	
  
Understanding	
  Clients	
  
    Client	
  



                                                   SSID:	
  default	
  




                                              SSID	
             Creden7als	
  
                                            Default	
                     …	
  
                                         SecurityTube	
                   …	
  
                                         ProtectedAP	
            ********	
  
                                               ….	
                       …	
  



                 ©SecurityTube.net	
  
An	
  Isolated	
  Client	
  




          ©SecurityTube.net	
  
Inconsistent	
  Behavior	
  

•  Different	
  OSs	
  behave	
  differently	
  
   –  Linux	
  
   –  Windows	
  
   –  OS	
  X	
  
•  Difference	
  in	
  Behavior	
  even	
  between	
  SP	
  in	
  
   windows	
  
•  We	
  will	
  take	
  up	
  most	
  common	
  behavior	
  
   –  Client	
  searching	
  for	
  known	
  access	
  points	
  

                                  ©SecurityTube.net	
  
Mul3ple	
  Cases	
  Possible	
  

•  Access	
  Point	
  stored	
  in	
  the	
  PNL	
  or	
  similar	
  could	
  
   have	
  either	
  of	
  3	
  configura3ons:	
  
    –  No	
  Encryp3on	
  
    –  WEP	
  
    –  WPA/WPA2	
  


•  We	
  will	
  deal	
  with	
  each	
  of	
  the	
  them	
  separately	
  


                                  ©SecurityTube.net	
  
Case	
  1:	
  Open	
  Authen3ca3on,	
  No	
  
                     Encryp3on	
  
Vic3m	
                                                       A=acker	
  
                  Probe	
  Request
                                  	
  “S   ecurityTube”	
  


                                                   be”	
  
                                  e	
  “SecurityTu
                 Probe	
  Respons

                     Authen3ca3on	
  Request	
  

                                           ess	
  
                             ca 3on	
  Succ
                     Authen3

                     Associa3on	
  Request	
  
                                               nse	
  
                             ca3  on	
  Respo
                     Authen3
                            Data	
  Exchange	
  
                              ©SecurityTube.net	
  
Fundamental	
  Problem	
  

•  Client	
  cannot	
  authen3cate	
  the	
  access	
  point	
  
•  The	
  SSID	
  all	
  alone	
  is	
  used	
  to	
  decide	
  whom	
  to	
  
   connect	
  to	
  
•  Anyone	
  can	
  set	
  a	
  similar	
  SSID	
  and	
  force	
  a	
  
   client	
  to	
  connect	
  to	
  their	
  access	
  point	
  
•  This	
  is	
  especially	
  true	
  with	
  Hotspot	
  SSIDs	
  as	
  
   they	
  by	
  defini3on	
  are	
  Open	
  Authen3ca3on	
  
   with	
  no	
  Encryp3on	
  

                                   ©SecurityTube.net	
  
Case	
  2	
  and	
  Case	
  3	
  

•  WEP	
  and	
  WPA/WPA2	
  
•  Shared	
  Key	
  Authen3ca3on	
  

•  We	
  will	
  talk	
  about	
  these	
  once	
  we	
  finish	
  the	
  
   encryp3on	
  fundamentals	
  class	
  




                                  ©SecurityTube.net	
  
Opera3ng	
  Frequency	
  Range	
  and	
  
         Regula3ons	
  	
  




                 ©SecurityTube.net	
  
Understanding	
  Transmit	
  Power	
  




                ©SecurityTube.net	
  
EIRP	
  

Effec3ve	
  Isotropic	
  Radiated	
  Power	
  (EIRP)	
  
=	
  Transmi=er	
  Power	
  (in	
  dBm)	
  	
  
	
  	
  	
  	
  +	
  Antenna	
  Gain	
  (in	
  dBi)	
  
	
  	
  	
  	
  -­‐	
  Cable	
  loss	
  (in	
  dBm)	
  
	
  
	
  



                            ©SecurityTube.net	
  
Can	
  this	
  sezng	
  be	
  changed?	
  

•  Yes	
  J	
  	
  We	
  can	
  change	
  our	
  channel	
  (without	
  any	
  driver	
  
   or	
  kernel	
  modifica3ons)	
  to	
  any	
  one	
  of	
  the	
  following:	
  
h=p://git.kernel.org/?p=linux/kernel/git/linville/wireless-­‐regdb.git;a=blob;f=db.txt;hb=HEAD	
  	
  




•  To	
  be	
  used	
  when	
  you	
  are	
  traveling	
  to	
  a	
  new	
  country	
  

•  The	
  card	
  will	
  need	
  to	
  support	
  the	
  channel	
  and	
  max	
  
   transmit	
  power	
  for	
  the	
  country	
  

•  Might	
  be	
  illegal	
  to	
  transmit	
  high	
  power	
  or	
  use	
  other	
  
   channels	
  in	
  your	
  country	
  

                                                              ©SecurityTube.net	
  
Bolivia	
  and	
  Belize	
  to	
  Alfa’s	
  Rescue	
  




                       ©SecurityTube.net	
  
Wireless	
  MITM	
  
                                                                                         SSID:	
  SecurityTube	
  
Internet	
  




                                                                                                Vic3m	
  
                                         Hacker	
  

 Internet	
  
                Wired	
  Connec3on	
  
                                                             SSID:	
  SecurityTube	
  




                                         ©SecurityTube.net	
  
Varia3on	
  1	
  
                                                                    SSID:	
  SecurityTube	
  
Internet	
  




                                                                           Vic3m	
  
                    Hacker	
  


                                        SSID:	
  SecurityTube	
  




                    ©SecurityTube.net	
  
Varia3on	
  2	
  
                                                                               SSID:	
  SecurityTube	
  
Internet	
  




                                                                                      Vic3m	
  
                               Hacker	
  

               GPRS	
  
                3G	
  
                                                   SSID:	
  SecurityTube	
  
                4G	
  




                               ©SecurityTube.net	
  
Our	
  Setup	
  
                                                                                           SSID:	
  SecurityTube	
  
   Internet	
  




                                                                                                  Vic3m	
  
                                           Hacker	
  

Internet	
  
                                                               SSID:	
  SecurityTube	
  
                  SSID:	
  Vivek	
  




                                           ©SecurityTube.net	
  
Understanding	
  the	
  Hack	
  


                                                     Bridge	
  


                                                                                                   Vic3m	
  
                                                 Hacker	
  
                                                            mon0	
  

Internet	
                            eth0	
  

                                                                       SSID:	
  SecurityTube	
  
                 SSID:	
  Vivek	
  




                                                 ©SecurityTube.net	
  
SSL	
  MITM	
  


                                                    Bridge	
  


                                                                                                  Vic3m	
  
                                                Hacker	
  
                                                           mon0	
  

Internet	
                           eth0	
  

                                                                      SSID:	
  SecurityTube	
  
               SSID:	
  Vivek	
  




                                                ©SecurityTube.net	
  
WEP	
  Basics	
  

•  The	
  first	
  encryp3on	
  scheme	
  made	
  available	
  
   for	
  Wi-­‐Fi	
  
•  Flawed	
  from	
  the	
  get	
  go	
  
•  Uses	
  RC4	
  encryp3on	
  algorithm	
  
    –  Symmetric	
  Key	
  Encryp3on	
  
•  Is	
  available	
  on	
  all	
  access	
  points	
  
•  Typically	
  used	
  by	
  home	
  users	
  or	
  
   manufacturing	
  companies	
  

                                  ©SecurityTube.net	
  
WEP	
  Internals	
  
Frame	
       Dura3on/	
     Address	
     Address	
     Address	
      Sequence	
     Address	
      QoS	
        Frame	
     FCS	
  
Control	
        ID	
           1	
           2	
           3	
          Control	
        4	
        Control	
      Body	
  




         Source:	
  IEEE	
  Standard	
                       ©SecurityTube.net	
  
Mul3ple	
  Keys	
  




      ©SecurityTube.net	
  
WEP	
  Step	
  1:	
  Genera3ng	
  the	
  Keystream	
  

   24	
        40	
  /	
  104	
  
    IV	
       WEP	
  Key	
                               RC4	
                                    Random	
  Keystream	
  
                                                       Algorithm	
  
                                                     (KSA	
  +	
  PRGA)	
  
  64	
  or	
  128	
  bit	
  WEP	
  




        •    RC4	
  Basics	
  and	
  Programming	
  a	
  simple	
  RC4	
  Encrypt	
  /	
  Decrypt	
  SoPware	
  
        •    h=p://www.securitytube.net/video/38	
  	
  
        •    h=p://www.securitytube.net/video/79	
  
        •    h=p://www.securitytube.net/video/40	
  	
  
        •    Basics	
  C	
  Programming	
  Required	
  


                                                        ©SecurityTube.net	
  
WEP	
  Step	
  2:	
  Generate	
  Integrity	
  Check	
  
                       Value	
  
   Variable	
  Size	
                                              32	
  bits	
  
                               CRC-­‐32	
  
         Data	
                                                     ICV	
  




                          Data	
                         ICV	
  




                                 ©SecurityTube.net	
  
Step	
  3:	
  Cipher	
  Text	
  Genera3on	
  
                  IV	
  +	
  Padding	
  and	
  key	
  ID	
  	
  


                                                                      IV	
  




                                              XOR	
  
                                                                   Cipher	
  
                                                                    Text	
  




                    ©SecurityTube.net	
  
IEEE	
  Diagram	
  for	
  Encryp3on	
  




                ©SecurityTube.net	
  
WEP	
  Internals	
  
Frame	
       Dura3on/	
     Address	
     Address	
     Address	
      Sequence	
     Address	
      QoS	
        Frame	
     FCS	
  
Control	
        ID	
           1	
           2	
           3	
          Control	
        4	
        Control	
      Body	
  




         Source:	
  IEEE	
  Standard	
                       ©SecurityTube.net	
  
WEP	
  Internals	
  
Frame	
       Dura3on/	
     Address	
     Address	
     Address	
      Sequence	
     Address	
      QoS	
        Frame	
     FCS	
  
Control	
        ID	
           1	
           2	
           3	
          Control	
        4	
        Control	
      Body	
  




         Source:	
  IEEE	
  Standard	
                       ©SecurityTube.net	
  
WEP	
  Decryp3on	
  




       ©SecurityTube.net	
  
Using	
  Wireshark	
  to	
  Decrypt	
  WEP	
  

•  Once	
  we	
  have	
  the	
  WEP	
  key	
  
    –  Legi3mate	
  way	
  
    –  Or	
  crack	
  it	
  J	
  


•  Airdecap-­‐NG	
  can	
  also	
  do	
  the	
  job	
  




                                     ©SecurityTube.net	
  
Broken	
  Beyond	
  Repair	
  
 IEEE	
  WG	
  admiDed	
  that	
  WEP	
  cannot	
     2001	
  -­‐	
  The	
  insecurity	
  of	
  802.11,	
  Mobicom,	
  July	
  2001	
  	
  
hold	
  any	
  water.	
  Recommended	
  users	
       N.	
  Borisov,	
  I.	
  Goldberg	
  and	
  D.	
  Wagner.	
  
         to	
  upgrade	
  to	
  WPA,	
  WPA2	
  
                                                      2001	
  -­‐	
  Weaknesses	
  in	
  the	
  key	
  scheduling	
  algorithm	
  of	
  RC4.	
  
                                                      S.	
  Fluhrer,	
  I.	
  Man3n,	
  A.	
  Shamir.	
  Aug	
  2001.	
  


                                                      2002	
  -­‐	
  Using	
  the	
  Fluhrer,	
  Man3n,	
  and	
  Shamir	
  A=ack	
  to	
  Break	
  WEP	
  
                                                      A.	
  Stubblefield,	
  J.	
  Ioannidis,	
  A.	
  Rubin.	
  


                                                      2004	
  –	
  KoreK,	
  improves	
  on	
  the	
  above	
  technique	
  and	
  reduces	
  the	
  
                                                      complexity	
  of	
  WEP	
  cracking.	
  We	
  now	
  require	
  only	
  around	
  
                                                      500,000	
  packets	
  to	
  break	
  the	
  WEP	
  key.	
  



                                                      2005	
  –	
  Adreas	
  Klein	
  introduces	
  more	
  correla3ons	
  between	
  the	
  
                                                      RC4	
  key	
  stream	
  and	
  the	
  key.	
  
                                                      	
  
                                                      2007	
  –	
  PTW	
  extend	
  Andreas	
  technique	
  to	
  further	
  simplify	
  WEP	
  
                                                      Cracking.	
  Now	
  with	
  just	
  around	
  60,000	
  –	
  90,000	
  packets	
  it	
  is	
  
                                                      possible	
  to	
  break	
  the	
  WEP	
  key.	
  



  ©	
  AirTight	
  2007                 	
  	
                     ©SecurityTube.net	
  
WEP	
  Cracking	
  

•  Different	
  A=acks	
  using	
  different	
  logic	
  
•  Oldest	
  one	
  is	
  finding	
  “weak	
  IVs”	
  which	
  reveal	
  
   informa3on	
  about	
  the	
  WEP	
  key	
  
•  Once	
  you	
  can	
  collect	
  a	
  large	
  number	
  of	
  weak	
  IVs,	
  
   you	
  can	
  crack	
  the	
  WEP	
  key	
  
•  Weak	
  IVs	
  are	
  not	
  uniformly	
  distributed	
  in	
  the	
  IV	
  
   space	
  
•  A	
  Weak	
  IV	
  is	
  key	
  dependent	
  
•  This	
  is	
  the	
  reason	
  why	
  it	
  takes	
  some	
  3me	
  

                                    ©SecurityTube.net	
  
Cracking	
  WEP	
  –	
  the	
  script	
  kiddie	
  way	
  J	
  

   •  Techniques	
  
      –  Passive	
  Way	
  (Wait	
  …	
  wait	
  …	
  wait)	
  
           •  Advantage	
  –	
  Undetectable	
  
           •  Use	
  Direc3onal	
  Antenna	
  
           •  Decrypt	
  traffic	
  once	
  cracked	
  
      –  Ac3ve	
  Way	
  (Pa3ence	
  is	
  not	
  your	
  virtue)	
  
           •  Replay	
  a=acks	
  
                –  S3mulate	
  the	
  network	
  to	
  send	
  encrypted	
  data	
  packets	
  	
  
           •  ARP	
  Replay	
  
                –  ARP	
  Request,	
  sends	
  ARP	
  Response	
  



                                              ©SecurityTube.net	
  
ARP	
  Replay	
  Step	
  1:	
  Capture	
  ARP	
  Packets	
  

                                                                                                       Access	
  Point	
  
       Authorized	
  
         Client	
  




                            Silence	
  is	
  Golden	
  J	
                         A=acker	
  




•    How	
  does	
  the	
  A=acker	
  Iden3fy	
  the	
  ARP	
  Packets?	
  Aren’t	
  they	
  all	
  encrypted?	
  
•    ARP	
  packets	
  are	
  of	
  a	
  fixed	
  unique	
  size,	
  easy	
  to	
  iden3fy	
  even	
  if	
  encrypted	
  
•    Capture	
  ARP	
  Request	
  packets	
  using	
  encrypted	
  packet	
  size	
  and	
  Des3na3on	
  MAC	
  address	
  
•    Replay	
  them	
  blindly,	
  and	
  see	
  if	
  the	
  network	
  responds	
  back!	
  
•    If	
  yes,	
  then	
  we	
  found	
  ourselves	
  Winner	
  J	
  J	
  


                                                            ©SecurityTube.net	
  
ARP	
  Replay	
  Step	
  2:	
  Replay	
  Packets	
  to	
  AP	
  
  A=acker	
                                                       Access	
  Point	
  
                        Encrypted	
  ARP
                                        	
  Packet	
  


                                            sp o n s      e	
  
                              d	
  ARP	
  Re
                      Encrypte
                        Encrypted	
  ARP
                                        	
  Packet	
  


                                            sp o       nse	
  
                              d	
  ARP	
  Re
                      Encrypte

                        Encrypted	
  ARP
                                        	
  Packet	
  


                                            sp o       nse	
  
                              d	
  ARP	
  Re
                      Encrypte
                               ©SecurityTube.net	
  
ARP	
  Replay	
  Step	
  3:	
  Collect	
  Packets	
  and	
  use	
  
                    Aircrack-­‐NG	
  




                             ©SecurityTube.net	
  
Its	
  not	
  just	
  the	
  Encryp3on	
  

•  Message	
  Injec3on	
  A=acks	
  
   –  No	
  replay	
  protec3on	
  
   –  Aireplay-­‐NG	
  ARP	
  Replay	
  
•  Message	
  Injec3on	
  
   –  ChopChop	
  a=ack	
  
   –  Caffe	
  la=e	
  a=ack	
  
   –  Fragmenta3on	
  a=ack	
  
   –  Hirte	
  A=ack	
  

                                 ©SecurityTube.net	
  
Message	
  Modifica3on	
  




•  CRC-­‐32	
  is	
  a	
  linear	
  func3on	
  of	
  the	
  message,	
  hence	
  checksum	
  is	
  distribu3ve	
  over	
  XOR	
  
•  Thus	
  we	
  can	
  tamper	
  arbitrary	
  byte	
  loca3ons	
  in	
  the	
  packet	
  and	
  patch	
  the	
  checksum	
  
•  This	
  will	
  be	
  a	
  valid	
  packet	
  accepted	
  by	
  the	
  access	
  point	
  

Original	
  Research	
  Paper:	
  Intercep(ng	
  Mobile	
  Communica(ons	
  

                                                        ©SecurityTube.net	
  
What	
  does	
  this	
  mean	
  for	
  us?	
  



          Encrypted	
  Data	
                             Enc.	
  ICV	
  



                 	
  Data	
                                    ICV	
  

                                XOR	
  

                     	
  RC4	
  Keystream	
  



                                  ©SecurityTube.net	
  
Create	
  a	
  Bit	
  Mask	
  without	
  knowing	
  Plain	
  
                              Text	
  



                               Encrypted	
  Data	
                                        Enc.	
  ICV	
  



                        	
  A=acker	
  Modifica3ons	
  



   ICV	
  Patch	
     =	
  CRC-­‐32	
  of	
  	
          	
  A=acker	
  Modifica3ons	
  




                                                    ©SecurityTube.net	
  
Patching	
  a	
  Valid	
  Packet	
  



         Encrypted	
  Data	
                         Enc.	
  ICV	
  

                          XOR	
  

    	
  A=acker	
  Modifica3ons	
                    ICV	
  Patch	
  

                           ||	
  

   Modified	
  Encrypted	
  Data	
                    Enc.	
  ICV	
  

                Valid	
  Encrypted	
  Packet!	
  

                           ©SecurityTube.net	
  
Behind	
  the	
  Scenes	
  
                  	
  Data	
                                                                         ICV	
  

                                 XOR	
  

                       	
  RC4	
  Keystream	
  


                                   XOR	
  

	
  A=acker	
  Modifica3ons	
                                                                   ICV	
  Patch	
  




   A	
  (xor)	
  B	
  (xor)	
  C	
  	
  =	
  	
  [	
  A	
  (xor)	
  C	
  ]	
  (xor)	
  B	
  



                                    ©SecurityTube.net	
  
A	
  (xor)	
  B	
  (xor)	
  C	
  	
  =	
  	
  [	
  A	
  (xor)	
  C	
  ]	
  (xor)	
  B	
  
                                  	
  Data	
                                   ICV	
  

                                                 XOR	
  

                       	
  A=acker	
  Modifica3ons	
                        ICV	
  Patch	
  



                                                   XOR	
  

                                      	
  RC4	
  Keystream	
  




                                                   ©SecurityTube.net	
  
Modified	
  packet	
  XOR	
  with	
  Keystream	
  
                        	
  Data	
                                     ICV	
  

                                       XOR	
  

             	
  A=acker	
  Modifica3ons	
                         ICV	
  Patch	
  

                                        ||	
  
                                                                  Corrected	
  
                  Modified	
  Data	
  
                                                                     ICV	
  

                                         XOR	
  

                            	
  RC4	
  Keystream	
  
                                            ||	
  

            Modified	
  Encrypted	
  Data	
                         Enc.	
  ICV	
  
                        Valid	
  Encrypted	
  Packet!	
  
                                          ©SecurityTube.net	
  
Repercussions	
  

•  We	
  can	
  modify	
  arbitrary	
  data	
  in	
  a	
  WEP	
  packet	
  
   and	
  patch	
  the	
  ICV	
  
•  This	
  is	
  a	
  valid	
  WEP	
  packet	
  which	
  will	
  be	
  accepted	
  
   by	
  the	
  Access	
  Point	
  /	
  client	
  

•  Caffe	
  La=e	
  a=ack	
  Modifies	
  a	
  Gratuitous	
  ARP	
  
   packet	
  to	
  change	
  it	
  to	
  a	
  ARP	
  Request	
  packet	
  for	
  
   the	
  same	
  host!	
  
•  Host	
  Replies	
  and	
  we	
  collect	
  these	
  packets	
  to	
  
   crack	
  the	
  WEP	
  key	
  


                                     ©SecurityTube.net	
  
A	
  Cup	
  of	
  Caffe	
  La=e	
  served	
  with	
  the	
  WEP	
  
                            key!	
  J	
  




Images	
  copyright	
  Air3ght	
  Networks	
     ©SecurityTube.net	
  
Caffe	
  La=e	
  Details	
  

•  Once	
  the	
  client	
  connects	
  to	
  the	
  fake	
  AP	
  it	
  will	
  
   send	
  out	
  DHCP	
  requests	
  
•  DHCP	
  will	
  3me	
  out	
  eventually	
  
•  Auto-­‐configura3on	
  IP	
  address	
  will	
  kick	
  in	
  
•  Client	
  will	
  send	
  a	
  Gratuitous	
  ARP	
  packet	
  

Let	
  us	
  Verify!	
  


                                    ©SecurityTube.net	
  
© AirTight 2007
Back	
  to	
  the	
  Drawing	
  Board	
  



        Encrypted	
  Data	
                             Enc.	
  ICV	
  



               	
  Data	
                                    ICV	
  

                              XOR	
  

                   	
  RC4	
  Keystream	
  



                                ©SecurityTube.net	
  
Korek’s	
  ChopChop	
  
                                  Encrypted	
  Data	
                                    Enc.	
  ICV	
  


                             Encrypted	
  Data	
                                Enc.	
  ICV	
  


Guess	
     New	
  ICV	
      Accepted	
                                                    Mul3cast	
  Address	
  
00	
        ICV-­‐1	
         No	
  
01	
        ICV-­‐2	
         No	
  
…	
         …	
               …	
  
FA	
        ICV-­‐n	
         Yes!	
  




                                                                             FA	
  
                                  Encrypted	
  Data	
                                    Enc.	
  ICV	
  

                                                     ©SecurityTube.net	
  
ChopChop	
  
                                  Encrypted	
  Data	
                                            Enc.	
  ICV	
  


                             Encrypted	
  Data	
                                        Enc.	
  ICV	
  


Guess	
     New	
  ICV	
      Accepted	
  

00	
        ICV-­‐1	
         No	
  
01	
        ICV-­‐2	
         No	
  
…	
         …	
               …	
  
CD	
        ICV-­‐n	
         Yes!	
  




                                                                             CD	
   FA	
  
                                  Encrypted	
  Data	
                                            Enc.	
  ICV	
  

                                                     ©SecurityTube.net	
  
End	
  Result	
  

•  Decrypt	
  en3re	
  WEP	
  packet	
  byte	
  by	
  byte	
  
•  Can	
  be	
  orchestrated	
  in	
  2	
  modes:	
  
    –  Authen3cated	
  to	
  AP	
  
        •  Packet	
  is	
  replayed	
  by	
  the	
  AP	
  over	
  the	
  air	
  	
  
    –  Unauthen3cated	
  to	
  AP	
  
        •  Some	
  APs	
  send	
  a	
  de-­‐authen3ca3on	
  packet	
  if	
  the	
  WEP	
  
           packet	
  is	
  valid	
  but	
  MAC	
  is	
  not	
  associated	
  
        •  May	
  not	
  work	
  always	
  



                                             ©SecurityTube.net	
  
Understanding	
  Fragmenta3on	
  




              ©SecurityTube.net	
  
LLC	
  Header	
  +	
  Rest	
  




           ©SecurityTube.net	
  
LLC	
  Header	
  is	
  Known	
  




     •  8	
  Bytes	
  of	
  LLC	
  header	
  is	
  known	
  
     •  Ether	
  Type	
  can	
  be	
  ARP	
  /	
  IP	
  typically	
  
     •  Can	
  be	
  guessed	
  from	
  the	
  packet	
  size	
  




                        ©SecurityTube.net	
  
Packet	
  Breakup	
  



                 Encrypted	
  Data	
                             Enc.	
  ICV	
  



    LLC	
               	
  Data	
                                    ICV	
  

8	
  Bytes	
  
                                       XOR	
  

                            	
  RC4	
  Keystream	
  



                                         ©SecurityTube.net	
  
Known	
  Plain	
  Text	
  A=ack	
  



                                   Encrypted	
  Data	
                               Enc.	
  ICV	
  
      XOR	
  

       LLC	
           8	
  Bytes	
                              We	
  can	
  get	
  8	
  bytes	
  of	
  
       ||	
  
                                                                 the	
  Keystream	
  by	
  just	
  
                                                                 XORing	
  the	
  encrypted	
  
RC4	
  Keystream	
     8	
  Bytes	
  
                                                                 packets	
  with	
  the	
  known	
  
                                                                 plain	
  text	
  of	
  the	
  LLC	
  
                                                     ©SecurityTube.net	
  
What	
  do	
  we	
  have	
  now?	
  
RC4	
  Keystream	
            8	
  Bytes	
  of	
  Keystream	
  +	
  Corresponding	
  IV	
  	
  




  4	
              4	
  

Data	
             ICV	
  
                                                                                 4	
              4	
  
                                                                      Encrypted	
  
           X
                                                                                                  ICV	
  
                                                                        Data	
  
           O
           R	
  




RC4	
  Keystream	
  

           8	
                                           ©SecurityTube.net	
  
Fragmenta3on	
  to	
  the	
  Rescue	
  
                     4	
                   4	
                           4	
  
                  Data	
                 To	
  be           	
  	
      Sent	
  




      4	
                                          4	
                                     4	
  
Encrypted	
                              Encrypted	
                                    Encrypted	
  
                ICV-­‐1	
                                              ICV-­‐2	
                        ICV-­‐3	
  
  Data1	
                                  Data2	
                                        Data3	
  


                              •  Up	
  to	
  16	
  fragments	
  can	
  be	
  sent	
  
                              •  Each	
  can	
  carry	
  4	
  bytes	
  of	
  data	
  
                              •  Total	
  64	
  bytes	
  can	
  be	
  injected	
  
                              	
  

                                                    ©SecurityTube.net	
  
Hirte	
  A=ack	
  
•  Uses	
  key	
  concepts	
  from	
  the	
  Caffe	
  La=e	
  a=ack	
  and	
  Fragmenta3on	
  
   a=ack	
  

•  Targets	
  an	
  isolated	
  client,	
  allows	
  associa3on,	
  waits	
  for	
  an	
  ARP	
  
   packet	
  like	
  the	
  Caffe	
  La=e	
  

•  Converts	
  that	
  into	
  an	
  ARP	
  Request	
  for	
  the	
  same	
  client	
  by	
  reloca3ng	
  
   the	
  IP	
  address	
  in	
  the	
  ARP	
  header	
  using	
  fragmenta3on	
  and	
  patches	
  
   ICV	
  using	
  Message	
  Modifica3on	
  flaw	
  

•  Client	
  accepts	
  packet	
  and	
  sends	
  replies	
  

•  GAME	
  OVER!	
  



                                               ©SecurityTube.net	
  
More	
  details	
  




•  Paper	
  detailing	
  fragmenta3on	
  and	
  its	
  advanced	
  use	
  
•  Aircrack-­‐ng	
  website	
  for	
  details	
  on	
  implementa3on	
  




                       ©SecurityTube.net	
  
We	
  need	
  WEP’s	
  Replacement	
  	
  
                      WPA	
                                                             WPA2	
  

•  Intermediate	
  solu3on	
  by	
  Wi-­‐Fi	
  Alliance	
              •  Long	
  Term	
  solu3on	
  (802.11i)	
  
•  Uses	
  TKIP	
  	
                                                  •  Uses	
  CCMP	
  
     •  Based	
  on	
  WEP	
                                                •  Based	
  on	
  AES	
  
•  Hardware	
  changes	
  not	
  required	
                            •  Hardware	
  changes	
  required	
  
•  Firmware	
  update	
                                                	
  




     Personal	
                          Enterprise	
                   Personal	
                        Enterprise	
  

        PSK	
                          802.1x	
  +	
  Radius	
              PSK	
                        802.1x	
  +	
  Radius	
  



                                                        ©SecurityTube.net	
  
How	
  does	
  the	
  Client	
  Know?	
  

•  Beacon	
  Frames?	
  
•  Probe	
  Response	
  Packets	
  from	
  the	
  AP?	
  
•  Can	
  be	
  used	
  to	
  create	
  a	
  WPA/WPA2	
  Honeypot	
  
   as	
  well!	
  
   	
  




                              ©SecurityTube.net	
  
WEP	
  
                 Probe	
  Request-­‐Response	
                    Sta7c	
  
                 	
                                              WEP	
  Key	
  
 Sta7c	
         Authen3ca3on	
  RR,	
  Associa3on	
  RR	
  
WEP	
  Key	
  

                          Data	
  Encrypted	
  with	
  Key	
  




                                  ©SecurityTube.net	
  
WPA:	
  No	
  Sta3c	
  Keys	
  
                       Probe	
  Request-­‐Response	
                       Sta7c	
  
                       	
                                                 WEP	
  Key	
  
 Sta7c	
               Authen3ca3on	
  RR,	
  Associa3on	
  RR	
  
WEP	
  Key	
  

                         Dynamic	
  Key	
  Generated	
  First	
  	
  



                    Data	
  Encrypted	
  with	
  Dynamically	
  Key	
  




                 How	
  are	
  Dynamic	
  Keys	
  Created?	
  




                                          ©SecurityTube.net	
  
WPA	
  Pre-­‐Shared	
  Key	
  


Pre-­‐Shared	
  Key	
  256	
  bit	
  




             PBKDF2	
  




    Passphrase	
  (8-­‐63)	
  




                                        ©SecurityTube.net	
  
PBKDF2	
  

•  Password	
  Based	
  Key	
  Deriva3on	
  Func3on	
  	
  
•  RFC	
  2898	
  
•  PBKDF2(Passphrase,	
  SSID,	
  ssidLen,	
  4096,	
  256)	
  
•  4096	
  –	
  Number	
  of	
  3mes	
  the	
  passphrase	
  is	
  
   hashed	
  
•  256	
  –	
  Intended	
  Key	
  Length	
  of	
  PSK	
  



                              ©SecurityTube.net	
  
Lets	
  “Shake	
  Hands”:	
  4-­‐Way	
  Handshake	
  
Supplicant	
  
                                                                                                                   Authen3cator	
  
                                            Probe	
  Request-­‐Response	
  
                                            	
  
                                            Authen3ca3on	
  RR,	
  Associa3on	
  RR	
  
    Pre-­‐Shared	
  Key	
  256	
  bit	
                                              Pre-­‐Shared	
  Key	
  256	
  bit	
  

                                                               	
                                                 ANounce	
  
                                                   Message	
  1
                                                   ANounce	
  




                                                             ©SecurityTube.net	
  
Message	
  1	
  




    ©SecurityTube.net	
  
4	
  Way	
  Handshake:	
  Message	
  1	
  
Supplicant	
  
                                                                                                                   Authen3cator	
  
                                            Probe	
  Request-­‐Response	
  
                                            	
  
                                            Authen3ca3on	
  RR,	
  Associa3on	
  RR	
  
    Pre-­‐Shared	
  Key	
  256	
  bit	
                                              Pre-­‐Shared	
  Key	
  256	
  bit	
  

                                                               	
  
                                                   Message	
  1
                                                   ANounce	
  
    Snounce	
  
                   PTK	
  




                                                             ©SecurityTube.net	
  
Pairwise	
  Transient	
  Key	
  

PTK	
  =	
  Func3on(PMK,	
  ANounce,	
  SNounce,	
  
Authen3cator	
  MAC,	
  Supplicant	
  MAC)	
  
	
  
-­‐PMK	
  =	
  Pre-­‐Shared	
  Key	
  (Pairwise	
  Master	
  Key)	
  
-­‐ANounce	
  =	
  Random	
  by	
  AP	
  
-­‐SNounce	
  =	
  Random	
  by	
  Client	
  
-­‐Authen3ca3on	
  MAC	
  =	
  AP	
  MAC	
  
-­‐Supplicant	
  MAC	
  =	
  Client	
  MAC	
  

                                ©SecurityTube.net	
  
4	
  Way	
  Handshake:	
  Message	
  2	
  
Supplicant	
  
                                                                                                                   Authen3cator	
  
                                            Probe	
  Request-­‐Response	
  
                                            	
  
                                            Authen3ca3on	
  RR,	
  Associa3on	
  RR	
  
    Pre-­‐Shared	
  Key	
  256	
  bit	
                                              Pre-­‐Shared	
  Key	
  256	
  bit	
  

                                                               	
  
                                                   Message	
  1
                                                   ANounce	
  
    Snounce	
  
                   PTK	
                                 Message	
  2	
  
                                                         SNounce	
  




                                                             ©SecurityTube.net	
  
Message	
  2	
  




    ©SecurityTube.net	
  
4	
  Way	
  Handshake:	
  Message	
  3	
  
Supplicant	
  
                                                                                                                       Authen3cator	
  
                                            Probe	
  Request-­‐Response	
  
                                            	
  
                                            Authen3ca3on	
  RR,	
  Associa3on	
  RR	
  
    Pre-­‐Shared	
  Key	
  256	
  bit	
                                                  Pre-­‐Shared	
  Key	
  256	
  bit	
  

                                                                	
  
                                                    Message	
  1
                                                    ANounce	
  
    Snounce	
  
                   PTK	
                                                                                    PTK	
  
                                                             Message	
  2	
  
                                                             Snounce	
  +	
  MIC	
  
                                                  	
  
                                   Message	
  3
                                                  a3on	
  
Key	
  Installed	
                 Key	
  Install
                                   	
  


                                                                 ©SecurityTube.net	
  
Message	
  3	
  




    ©SecurityTube.net	
  
4	
  Way	
  Handshake:	
  Message	
  4	
  
Supplicant	
  
                                                                                                                       Authen3cator	
  
                                            Probe	
  Request-­‐Response	
  
                                            	
  
                                            Authen3ca3on	
  RR,	
  Associa3on	
  RR	
  
    Pre-­‐Shared	
  Key	
  256	
  bit	
                                                  Pre-­‐Shared	
  Key	
  256	
  bit	
  

                                                                	
  
                                                    Message	
  1
                                                    ANounce	
  
    Snounce	
  
                   PTK	
                                                                                    PTK	
  
                                                             Message	
  2	
  
                                                             Snounce	
  +	
  MIC	
  
                                                  	
  
                                   Message	
  3
                                                  a3on	
  
Key	
  Installed	
                 Key	
  Install
                                   	
  
                                                               Message	
  4	
  
                                                                                                                  Key	
  Installed	
  
                                                               Key	
  Install	
  Acknowledgement	
  
                                                                 ©SecurityTube.net	
  
Message	
  4	
  




    ©SecurityTube.net	
  
Acknowledgements	
  

•  IEEE	
  Standard	
  802.11i-­‐2004	
  




                             ©SecurityTube.net	
  
Dunno	
  the	
  Right	
  Phrase?	
  
Supplicant	
  
                                                                                                                   Authen3cator	
  
                                            Probe	
  Request-­‐Response	
  
                                            	
  
                                            Authen3ca3on	
  RR,	
  Associa3on	
  RR	
  
    Pre-­‐Shared	
  Key	
  256	
  bit	
                                              Pre-­‐Shared	
  Key	
  256	
  bit	
  

                                                               	
  
                                                   Message	
  1
                                                   ANounce	
  
    Snounce	
  
                   PTK	
                                 Message	
  2	
                                      PTK	
  is	
  Derived	
  
                                                         Snounce	
  +	
  MIC	
                               MIC	
  Check	
  Fails	
  


                                                                   n	
  
                                                     DeAuthen3ca3o



                                                             ©SecurityTube.net	
  
Eavesdropping	
  the	
  4	
  Way	
  Handshake	
  
Supplicant	
  
                                                                                                                       Authen3cator	
  
                                            Probe	
  Request-­‐Response	
  
                                            	
  
                                            Authen3ca3on	
  RR,	
  Associa3on	
  RR	
  
    Pre-­‐Shared	
  Key	
  256	
  bit	
                                                  Pre-­‐Shared	
  Key	
  256	
  bit	
  

                                                                	
  
                                                    Message	
  1
                                                    ANounce	
  
    Snounce	
  
                   PTK	
                                                                                    PTK	
  
                                                             Message	
  2	
  
                                                             Snounce	
  +	
  MIC	
  
                                                  	
  
                                   Message	
  3
                                                  a3on	
  
Key	
  Installed	
                 Key	
  Install
                                   	
  
                                                               Message	
  4	
  
                                                                                                                  Key	
  Installed	
  
                                                               Key	
  Install	
  Acknowledgement	
  
                                                                 ©SecurityTube.net	
  
A	
  Quick	
  Block	
  Diagram	
  
                                                                4	
  Way	
  Handshake	
  

                                                                          SNonce	
  
                                                                       	
  ANonce	
  
Pre-­‐Shared	
  Key	
  256	
  bit	
                                     AP	
  MAC	
  
                                                                      Client	
  MAC	
  




        PBKDF2	
  (SSID)	
  



                                                                                            PTK	
  
    Passphrase	
  (8-­‐63)	
  




                                        ©SecurityTube.net	
  
WPA-­‐PSK	
  Dic3onary	
  A=ack	
  
                                                                   4	
  Way	
  Handshake	
  

                                                                               SNonce	
  
                                                                            	
  ANonce	
  
Pre-­‐Shared	
  Key	
  256	
  bit	
                                          AP	
  MAC	
  
                                                                           Client	
  MAC	
  




        PBKDF2	
  (SSID)	
  

                                                                                               PTK	
  


    Passphrase	
  (8-­‐63)	
  



        Dic3onary	
                                             Verify	
  by	
  Checking	
  the	
  MIC	
  
                                        ©SecurityTube.net	
  
Which	
  Packet	
  Do	
  we	
  Need	
  in	
  the	
  
                   Handshake?	
  
•  All	
  Packets	
  have	
  the	
  AP	
  MAC	
  and	
  Client	
  MAC	
  

•  ANonce	
  
    –  Packet	
  1	
  and	
  Packet	
  3	
  

•  SNonce	
  
    –  Packet	
  2	
  
	
  
Answer:	
  (Either	
  All	
  4	
  packets),	
  or	
  (packet	
  1	
  and	
  2)	
  or	
  
(packet	
  2	
  and	
  3)	
  

                                         ©SecurityTube.net	
  
Decryp3ng	
  WPA-­‐PSK	
  Traces	
  

•  Wireshark	
  

•  Airdecap-­‐NG	
  




                       ©SecurityTube.net	
  
Cracking	
  WPA2-­‐PSK	
  

•  Same	
  principles	
  apply	
  
•  As	
  vulnerable	
  as	
  WPA-­‐PSK	
  is	
  if	
  a	
  weak	
  
     passphrase	
  is	
  chosen	
  
•  Nothing	
  extra	
  to	
  discuss	
  
	
  
Demo	
  Time!	
  



                                    ©SecurityTube.net	
  
WPA-­‐PSK	
  Dic3onary	
  A=ack	
  
                                                                                               4	
  Way	
  Handshake	
  

                                                                                                           SNonce	
  
Pre-­‐Shared	
  Key	
  256	
  bit	
                                                                     	
  ANonce	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  (PMK)	
                                          AP	
  MAC	
  
                                                                                                       Client	
  MAC	
  




              PBKDF2	
  (SSID)	
  

                                                                                                                           PTK	
  


       Passphrase	
  (8-­‐63)	
  



               Dic3onary	
                                                                  Verify	
  by	
  Checking	
  the	
  MIC	
  
                                                                    ©SecurityTube.net	
  
PBKDF2	
  

•  Requires	
  SSID	
  
   –  List	
  of	
  commonly	
  used	
  SSIDs	
  
•  Requires	
  Passphrase	
  
   –  Can	
  be	
  provided	
  from	
  a	
  Dic3onary	
  


•  PMK	
  can	
  be	
  pre-­‐computed	
  using	
  the	
  above	
  
	
  


                                   ©SecurityTube.net	
  
Other	
  Parameters	
  in	
  Key	
  Cracking	
  

•  Snonce,	
  Anonce,	
  Supplicant	
  MAC,	
  
   Authen3cator	
  MAC	
  varies	
  and	
  hence	
  cannot	
  
   be	
  “pre-­‐calculated”	
  
•  PTK	
  will	
  be	
  different	
  based	
  on	
  the	
  above	
  
•  MIC	
  will	
  be	
  different	
  as	
  well	
  

Thus	
  these	
  cannot	
  be	
  pre-­‐calculated	
  in	
  any	
  way	
  


                                ©SecurityTube.net	
  
Speeding	
  up	
  Cracking	
  
                                                                                                  4	
  Way	
  Handshake	
  

                                                                                                              SNonce	
  
   Pre-­‐Shared	
  Key	
  256	
  bit	
                                                                     	
  ANonce	
  
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  (PMK)	
                                          AP	
  MAC	
  
                                                                                                          Client	
  MAC	
  



Pre-­‐Calculated	
  List	
  of	
  PMK	
  
for	
  a	
  	
  
1.	
  Given	
  SSID	
  
2.	
  Dic3onary	
  of	
  Passphrases	
                                                                                        PTK	
  




                                                                                               Verify	
  by	
  Checking	
  the	
  MIC	
  
                                                                       ©SecurityTube.net	
  
Pla€orms	
  

•    Mul3-­‐Cores	
  
•    ATI-­‐Stream	
  
•    Nvidia	
  CUDA	
  
•    ….	
  
•    In	
  the	
  Cloud	
  
      –  Amazon	
  EC2	
  




                                 ©SecurityTube.net	
  
Fast	
  Cracking	
  Demo	
  

•  Pyrit	
  
	
  	
  	
  	
  h=p://code.google.com/p/pyrit/	
  	
  



	
  




                                                             ©SecurityTube.net	
  
Stories	
  of	
  a	
  Wandering	
  Client	
  

•  Mul3ple	
  Profiles	
  stored	
  
    –  Open	
  
    –  WEP	
  
    –  WPA/WPA2	
  


•  Tools	
  don’t	
  work	
  properly	
  (WiFish	
  Finder	
  etc.)	
  

•  But	
  lets	
  crack	
  this	
  from	
  the	
  basic	
  principles	
  

                                  ©SecurityTube.net	
  
Exploit	
  All	
  Possibili3es	
  

•  Need	
  SSID	
  with	
  mul3ple	
  configura3ons	
  

•  We	
  need	
  to	
  find	
  the	
  security	
  sezngs	
  first	
  

•  We	
  will	
  fight	
  the	
  ba=le	
  later	
  




                                   ©SecurityTube.net	
  
S3mula3ng	
  a	
  Handshake	
  
Supplicant	
  
                                                                                                                   Hacker	
  
                                            Probe	
  Request-­‐Response	
  
                                            	
  
                                            Authen3ca3on	
  RR,	
  Associa3on	
  RR	
  
    Pre-­‐Shared	
  Key	
  256	
  bit	
                                              Pre-­‐Shared	
  Key	
  256	
  bit	
  

                                                               	
  
                                                   Message	
  1
                                                   ANounce	
  
    Snounce	
                                                                                WPA/WPA2	
  PSK	
  
                                                                                             Dic3onary	
  A=ack	
  
                   PTK	
                                 Message	
  2	
  
                                                         Snounce	
  +	
  MIC	
  




                                                             ©SecurityTube.net	
  
Connec3ng	
  to	
  WPA/WPA2	
  Networks	
  

•  WPA_Supplicant	
  is	
  the	
  de-­‐facto	
  tool	
  
•  Supports	
  tons	
  of	
  op3ons	
  
•  Cross	
  Pla€orm	
  
    –  Linux	
  
    –  Windows	
  
    –  OS	
  X	
  
•  Allows	
  for	
  be=er	
  understanding	
  of	
  process	
  
•  Open	
  source	
  

                               ©SecurityTube.net	
  
Supported	
  EAP	
  Methods	
  




            ©SecurityTube.net	
  
Configura3on	
  File	
  Required	
  

•  Samples	
  available	
  on	
  the	
  tool	
  website	
  
•  Best	
  idea	
  is	
  to	
  use	
  available	
  templates	
  and	
  
   customize	
  




                                  ©SecurityTube.net	
  
WPA-­‐Enterprise	
  

•  Use	
  a	
  RADIUS	
  server	
  for	
  authen3ca3on	
  
•  Different	
  supported	
  EAP	
  types	
  –	
  EAP-­‐MD5,	
  
   PEAP,	
  EAP-­‐TLS	
  etc.	
  	
  
•  De	
  facto	
  server	
  
    –  FreeRadius	
  www.freeradius.org	
  	
  
•  Depending	
  on	
  EAP	
  type	
  used	
  Client	
  and	
  Server	
  
   will	
  need	
  to	
  be	
  configured	
  


                               ©SecurityTube.net	
  
FreeRadius-­‐WPE	
  

•  FreeRadius	
  Wireless	
  Pwnage	
  Edi3on	
  J	
  
•  Created	
  by	
  Joshua	
  and	
  Brad	
  
•  A	
  patch	
  to	
  the	
  FreeRadius	
  code	
  
   h=p://www.willhackforsushi.com/?
   page_id=37	
  	
  




                            ©SecurityTube.net	
  
Key	
  Benefits	
  (ripped	
  from	
  Josh’s	
  site)	
  




   Good	
  news	
  –	
  BT5	
  ships	
  with	
  FreeRadius-­‐WPE	
  
   Bad	
  News	
  –	
  Broken	
  by	
  default	
  
   	
  
   Good	
  news	
  –	
  Easy	
  fix	
  
   	
  
   h=p://redmine.backtrack-­‐linux.org:8080/issues/115	
  	
  
   	
  
   	
  
                                             ©SecurityTube.net	
  
Sezng	
  up	
  FreeRadius-­‐WPE	
  

•  Fixing	
  problems	
  on	
  BT5	
  
•  Recompila3on	
  
•  Basic	
  usage	
  




                               ©SecurityTube.net	
  
Network	
  Architecture	
  

BT5	
  VM	
  




                                     eth1	
  
         FreeRadius-­‐WPE	
  




          eth0	
  



Internet	
  
                            ©SecurityTube.net	
  
EAP-­‐MD5	
  

                                                          AP	
                                                   RADIUS	
  
    Client	
  


   EAP	
  Request	
  Iden3ty	
  



EAP	
  Response	
  Iden3ty	
                                       RADIUS	
  Access	
  Request	
  
                                                                   (EAP	
  Iden3ty	
  Response)	
  



   EAP	
  Request	
  MD5	
  Challenge	
                               RADIUS	
  Access	
  Challenge	
  
                                                                      (EAP	
  Request	
  MD5	
  Challenge)	
  



EAP	
  Response	
  MD5	
  Challenge	
                              RADIUS	
  Access	
  Request	
  
                                                                   (EAP	
  Response	
  MD5	
  Challenge)	
  



   EAP	
  Success	
                                                   RADIUS	
  Access	
  Accept	
  
                                                                      (EAP	
  Success)	
  



                                            ©SecurityTube.net	
  
Sezng	
  up	
  the	
  RADIUS	
  Server	
  

•  Add	
  a	
  username	
  /	
  password	
  in	
  users	
  file	
  
•  Make	
  eap-­‐md5	
  the	
  default	
  EAP	
  type	
  in	
  
   eap.conf	
  
•  Ensure	
  the	
  shared	
  secret	
  is	
  correct	
  for	
  the	
  AP-­‐
   RADIUS	
  server	
  in	
  clients.conf	
  




                                  ©SecurityTube.net	
  
Objec3ve	
  of	
  Lab	
  

•  Observe	
  traffic	
  on	
  wired	
  side	
  between	
  AP	
  and	
  
   RADIUS	
  

•  Observer	
  traffic	
  on	
  wireless	
  side	
  between	
  
   Client	
  and	
  AP	
  

•  Understand	
  and	
  correlate	
  with	
  the	
  theory	
  


                               ©SecurityTube.net	
  
Network	
  Architecture	
  

BT5	
  VM	
  




         FreeRadius-­‐WPE	
               eth1	
  
          +	
  Wireshark	
  1	
  




            Wireshark	
  2	
              mon0	
  



                                 ©SecurityTube.net	
  
EAP-­‐MD5	
  

•  Cannot	
  be	
  used	
  for	
  Wi-­‐Fi	
  as	
  does	
  not	
  support	
  
   key	
  genera3on	
  
•  Does	
  not	
  support	
  mutual	
  authen3ca3on	
  
•  Both	
  plaintext	
  challenge	
  and	
  response	
  goes	
  
   over	
  the	
  air	
  unencrypted	
  
    –  A=acker	
  can	
  obtain	
  both	
  
    –  Launch	
  a	
  dic3onary	
  /	
  educated	
  bruteforce	
  a=ack	
  



                                  ©SecurityTube.net	
  
MD5	
  Mathemagic	
  

Hash	
  =	
  MD5(EAP	
  Response	
  ID	
  +	
  Password	
  +	
  RADIUS	
  
Challenge)	
  
	
  
Available	
  to	
  a=acker:	
  
    –  Hash	
  
    –  Response	
  ID	
  
    –  Challenge	
  

•  Simple	
  equa3on	
  
    –  Keep	
  guessing	
  password	
  3ll	
  the	
  Hash	
  matches	
  


                                    ©SecurityTube.net	
  
WPA/WPA2	
  Enterprise	
  
     EAP	
  Type	
                       Real	
  World	
  Usage	
  

        PEAP	
                                  Highest	
  

      EAP-­‐TTLS	
                                High	
  

      EAP-­‐TLS	
                              Medium	
  

         LEAP	
                                   Low	
  

     EAP-­‐FAST	
                                 Low	
  

          ….	
                                     ….	
  



                       ©SecurityTube.net	
  
PEAP	
  

•  Protected	
  Extensible	
  Authen3ca3on	
  Protocol	
  
•  Typical	
  usage:	
  
    –  PEAPv0	
  with	
  EAP-­‐MSCHAPv2	
  (most	
  popular)	
  
         •  Na3ve	
  support	
  on	
  Windows	
  
    –  PEAPv1	
  with	
  EAP-­‐GTC	
  
•  Other	
  uncommon	
  ones	
  
    –  PEAPv0/v1	
  with	
  EAP-­‐SIM	
  (Cisco)	
  
•  Uses	
  Server	
  Side	
  Cer3ficates	
  for	
  valida3on	
  
•  PEAP-­‐EAP-­‐TLS	
  
    –  Addi3onally	
  uses	
  Client	
  side	
  Cer3ficates	
  or	
  Smartcards	
  
    –  Supported	
  only	
  by	
  MicrosoP	
  


                                          ©SecurityTube.net	
  
Source:	
  Layer3.wordpress.com	
     ©SecurityTube.net	
  
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing
Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing

Contenu connexe

Tendances

CCNA Security 010-configuring cisco asa
CCNA Security 010-configuring cisco asaCCNA Security 010-configuring cisco asa
CCNA Security 010-configuring cisco asaAhmed Habib
 
CCNA Security 011- implementing ios-based ips
CCNA Security 011- implementing ios-based ipsCCNA Security 011- implementing ios-based ips
CCNA Security 011- implementing ios-based ipsAhmed Habib
 
Understanding WiFi Security Vulnerabilities and Solutions
Understanding WiFi Security Vulnerabilities and SolutionsUnderstanding WiFi Security Vulnerabilities and Solutions
Understanding WiFi Security Vulnerabilities and SolutionsAirTight Networks
 
Information Security Lesson 5 - Network Infrastructure - Eric Vanderburg
Information Security Lesson 5 - Network Infrastructure - Eric VanderburgInformation Security Lesson 5 - Network Infrastructure - Eric Vanderburg
Information Security Lesson 5 - Network Infrastructure - Eric VanderburgEric Vanderburg
 
Wi-Fi Security with Wi-Fi P+
Wi-Fi Security with Wi-Fi P+Wi-Fi Security with Wi-Fi P+
Wi-Fi Security with Wi-Fi P+Ajin Abraham
 
How to hack a telecommunication company and stay alive. Sergey Gordeychik
How to hack a telecommunication company and stay alive. Sergey GordeychikHow to hack a telecommunication company and stay alive. Sergey Gordeychik
How to hack a telecommunication company and stay alive. Sergey GordeychikPositive Hack Days
 
CCNA Security - Chapter 3
CCNA Security - Chapter 3CCNA Security - Chapter 3
CCNA Security - Chapter 3Irsandi Hasan
 
WLAN Attacks and Protection
WLAN Attacks and ProtectionWLAN Attacks and Protection
WLAN Attacks and ProtectionChandrak Trivedi
 
wifi-y3dips-stmik_mdp_slides
wifi-y3dips-stmik_mdp_slideswifi-y3dips-stmik_mdp_slides
wifi-y3dips-stmik_mdp_slidesguest1c1a9a
 
Wireless security camera
Wireless security cameraWireless security camera
Wireless security cameraAasheesh Tandon
 
Network Security Through FIREWALL
Network Security Through FIREWALLNetwork Security Through FIREWALL
Network Security Through FIREWALLTheCreativedev Blog
 
44CON @ IPexpo - You're fighting an APT with what exactly?
44CON @ IPexpo - You're fighting an APT with what exactly?44CON @ IPexpo - You're fighting an APT with what exactly?
44CON @ IPexpo - You're fighting an APT with what exactly?44CON
 
Ccna security
Ccna securityCcna security
Ccna securitydkaya
 
Ipfire open source firewall
Ipfire  open source firewallIpfire  open source firewall
Ipfire open source firewallsaing sab
 

Tendances (20)

CCNA Security 010-configuring cisco asa
CCNA Security 010-configuring cisco asaCCNA Security 010-configuring cisco asa
CCNA Security 010-configuring cisco asa
 
CCNA Security 011- implementing ios-based ips
CCNA Security 011- implementing ios-based ipsCCNA Security 011- implementing ios-based ips
CCNA Security 011- implementing ios-based ips
 
Understanding WiFi Security Vulnerabilities and Solutions
Understanding WiFi Security Vulnerabilities and SolutionsUnderstanding WiFi Security Vulnerabilities and Solutions
Understanding WiFi Security Vulnerabilities and Solutions
 
Information Security Lesson 5 - Network Infrastructure - Eric Vanderburg
Information Security Lesson 5 - Network Infrastructure - Eric VanderburgInformation Security Lesson 5 - Network Infrastructure - Eric Vanderburg
Information Security Lesson 5 - Network Infrastructure - Eric Vanderburg
 
Wi-Fi Security with Wi-Fi P+
Wi-Fi Security with Wi-Fi P+Wi-Fi Security with Wi-Fi P+
Wi-Fi Security with Wi-Fi P+
 
How to hack a telecommunication company and stay alive. Sergey Gordeychik
How to hack a telecommunication company and stay alive. Sergey GordeychikHow to hack a telecommunication company and stay alive. Sergey Gordeychik
How to hack a telecommunication company and stay alive. Sergey Gordeychik
 
CCNA Security - Chapter 3
CCNA Security - Chapter 3CCNA Security - Chapter 3
CCNA Security - Chapter 3
 
Wifi Security
Wifi SecurityWifi Security
Wifi Security
 
Wifi Security
Wifi SecurityWifi Security
Wifi Security
 
WiFi Secuiry: Attack & Defence
WiFi Secuiry: Attack & DefenceWiFi Secuiry: Attack & Defence
WiFi Secuiry: Attack & Defence
 
WLAN Attacks and Protection
WLAN Attacks and ProtectionWLAN Attacks and Protection
WLAN Attacks and Protection
 
wifi-y3dips-stmik_mdp_slides
wifi-y3dips-stmik_mdp_slideswifi-y3dips-stmik_mdp_slides
wifi-y3dips-stmik_mdp_slides
 
Wireless security camera
Wireless security cameraWireless security camera
Wireless security camera
 
Network Security Through FIREWALL
Network Security Through FIREWALLNetwork Security Through FIREWALL
Network Security Through FIREWALL
 
44CON @ IPexpo - You're fighting an APT with what exactly?
44CON @ IPexpo - You're fighting an APT with what exactly?44CON @ IPexpo - You're fighting an APT with what exactly?
44CON @ IPexpo - You're fighting an APT with what exactly?
 
Firewall girija ppt
Firewall girija pptFirewall girija ppt
Firewall girija ppt
 
IPCop Firewall
IPCop FirewallIPCop Firewall
IPCop Firewall
 
Ccna security
Ccna securityCcna security
Ccna security
 
Hacker tool talk: kismet
Hacker tool talk:  kismetHacker tool talk:  kismet
Hacker tool talk: kismet
 
Ipfire open source firewall
Ipfire  open source firewallIpfire  open source firewall
Ipfire open source firewall
 

Similaire à Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing

Wi fi pentesting
Wi fi pentestingWi fi pentesting
Wi fi pentestingMihir Shah
 
Chapter 10 wireless hacking [compatibility mode]
Chapter 10 wireless hacking [compatibility mode]Chapter 10 wireless hacking [compatibility mode]
Chapter 10 wireless hacking [compatibility mode]Setia Juli Irzal Ismail
 
Wireless Network security
Wireless Network securityWireless Network security
Wireless Network securityFathima Rahaman
 
Topic 4.0 wireless technology
Topic 4.0 wireless technologyTopic 4.0 wireless technology
Topic 4.0 wireless technologyAtika Zaimi
 
Wireless hacking
Wireless hackingWireless hacking
Wireless hackingMihir Shah
 
Wirless Security By Zohaib Zeeshan
Wirless Security By Zohaib ZeeshanWirless Security By Zohaib Zeeshan
Wirless Security By Zohaib ZeeshanZaibi Gondal
 
wi-fi technology
wi-fi technologywi-fi technology
wi-fi technologytardeep
 
Wi-max Technology PPT
Wi-max Technology PPTWi-max Technology PPT
Wi-max Technology PPTVinay Krishna
 
7256 ccna security_chapter_8_vpn_dl3_oz_20130409031455
7256 ccna security_chapter_8_vpn_dl3_oz_201304090314557256 ccna security_chapter_8_vpn_dl3_oz_20130409031455
7256 ccna security_chapter_8_vpn_dl3_oz_20130409031455ytrui
 
Understanding IT Network Security for Wireless and Wired Measurement Applicat...
Understanding IT Network Security for Wireless and Wired Measurement Applicat...Understanding IT Network Security for Wireless and Wired Measurement Applicat...
Understanding IT Network Security for Wireless and Wired Measurement Applicat...cmstiernberg
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Scienceinventy
 

Similaire à Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing (20)

Wi fi pentesting
Wi fi pentestingWi fi pentesting
Wi fi pentesting
 
Chapter 10 wireless hacking [compatibility mode]
Chapter 10 wireless hacking [compatibility mode]Chapter 10 wireless hacking [compatibility mode]
Chapter 10 wireless hacking [compatibility mode]
 
Wifi- technology_moni
Wifi- technology_moniWifi- technology_moni
Wifi- technology_moni
 
Wireless Network security
Wireless Network securityWireless Network security
Wireless Network security
 
Wireless hacking
Wireless hackingWireless hacking
Wireless hacking
 
Wi fi presentation
Wi fi presentationWi fi presentation
Wi fi presentation
 
Topic 4.0 wireless technology
Topic 4.0 wireless technologyTopic 4.0 wireless technology
Topic 4.0 wireless technology
 
A_Seyedolhosseini_Tir_95_1
A_Seyedolhosseini_Tir_95_1A_Seyedolhosseini_Tir_95_1
A_Seyedolhosseini_Tir_95_1
 
Wireless hacking
Wireless hackingWireless hacking
Wireless hacking
 
Wirless Security By Zohaib Zeeshan
Wirless Security By Zohaib ZeeshanWirless Security By Zohaib Zeeshan
Wirless Security By Zohaib Zeeshan
 
wi-fi technology
wi-fi technologywi-fi technology
wi-fi technology
 
Wi-max Technology PPT
Wi-max Technology PPTWi-max Technology PPT
Wi-max Technology PPT
 
Airheads barcelona 2010 securing wireless la ns
Airheads barcelona 2010   securing wireless la nsAirheads barcelona 2010   securing wireless la ns
Airheads barcelona 2010 securing wireless la ns
 
Wifi
WifiWifi
Wifi
 
7256 ccna security_chapter_8_vpn_dl3_oz_20130409031455
7256 ccna security_chapter_8_vpn_dl3_oz_201304090314557256 ccna security_chapter_8_vpn_dl3_oz_20130409031455
7256 ccna security_chapter_8_vpn_dl3_oz_20130409031455
 
Understanding IT Network Security for Wireless and Wired Measurement Applicat...
Understanding IT Network Security for Wireless and Wired Measurement Applicat...Understanding IT Network Security for Wireless and Wired Measurement Applicat...
Understanding IT Network Security for Wireless and Wired Measurement Applicat...
 
Wi fi security
Wi fi securityWi fi security
Wi fi security
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Science
 
Wi fi technology & wap
Wi fi technology & wap Wi fi technology & wap
Wi fi technology & wap
 
Wlan security
Wlan securityWlan security
Wlan security
 

Plus de nooralmousa

Mr. Bulent Teksoz - Security trends and innovations
Mr. Bulent Teksoz  - Security trends and innovationsMr. Bulent Teksoz  - Security trends and innovations
Mr. Bulent Teksoz - Security trends and innovationsnooralmousa
 
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...nooralmousa
 
Mr. Khalid Shaikh - emerging trends in managing it security
Mr. Khalid Shaikh  - emerging trends in managing it securityMr. Khalid Shaikh  - emerging trends in managing it security
Mr. Khalid Shaikh - emerging trends in managing it securitynooralmousa
 
Mr. Andrey Belenko - secure password managers and military-grade encryption o...
Mr. Andrey Belenko - secure password managers and military-grade encryption o...Mr. Andrey Belenko - secure password managers and military-grade encryption o...
Mr. Andrey Belenko - secure password managers and military-grade encryption o...nooralmousa
 
Mr. Burhan Khalid - secure dev.
Mr. Burhan Khalid - secure dev.Mr. Burhan Khalid - secure dev.
Mr. Burhan Khalid - secure dev.nooralmousa
 
Sudarsan Jayaraman - Open information security management maturity model
Sudarsan Jayaraman  - Open information security management maturity modelSudarsan Jayaraman  - Open information security management maturity model
Sudarsan Jayaraman - Open information security management maturity modelnooralmousa
 
Meraj Ahmad - Information security in a borderless world
Meraj Ahmad - Information security in a borderless worldMeraj Ahmad - Information security in a borderless world
Meraj Ahmad - Information security in a borderless worldnooralmousa
 
Renaud Bido & Mohammad Shams - Hijacking web servers & clients
Renaud Bido & Mohammad Shams - Hijacking web servers & clientsRenaud Bido & Mohammad Shams - Hijacking web servers & clients
Renaud Bido & Mohammad Shams - Hijacking web servers & clientsnooralmousa
 
Ahmed Al Barrak - Staff information security practices - a latent threat
Ahmed Al Barrak - Staff information security practices - a latent threatAhmed Al Barrak - Staff information security practices - a latent threat
Ahmed Al Barrak - Staff information security practices - a latent threatnooralmousa
 
Fadi Mutlak - Information security governance
Fadi Mutlak - Information security governanceFadi Mutlak - Information security governance
Fadi Mutlak - Information security governancenooralmousa
 
Mohammed Al Mulla - Best practices to secure working environments
Mohammed Al Mulla - Best practices to secure working environmentsMohammed Al Mulla - Best practices to secure working environments
Mohammed Al Mulla - Best practices to secure working environmentsnooralmousa
 
Pradeep menon how to influence people and win top management buy0in for ciso
Pradeep menon   how to influence people and win top management buy0in for cisoPradeep menon   how to influence people and win top management buy0in for ciso
Pradeep menon how to influence people and win top management buy0in for cisonooralmousa
 
Nabil Malik - Security performance metrics
Nabil Malik - Security performance metricsNabil Malik - Security performance metrics
Nabil Malik - Security performance metricsnooralmousa
 
Khaled al amri using fingerprints as private and public keys
Khaled al amri   using fingerprints as private and public keysKhaled al amri   using fingerprints as private and public keys
Khaled al amri using fingerprints as private and public keysnooralmousa
 
Hisham Dalle - Zero client computing - taking the desktop into the cloud
Hisham Dalle - Zero client computing - taking the desktop into the cloudHisham Dalle - Zero client computing - taking the desktop into the cloud
Hisham Dalle - Zero client computing - taking the desktop into the cloudnooralmousa
 
Ghassan farra it security a cio perspective
Ghassan farra   it security a cio perspectiveGhassan farra   it security a cio perspective
Ghassan farra it security a cio perspectivenooralmousa
 
Taiye Lambo - Auditing the cloud
Taiye Lambo - Auditing the cloudTaiye Lambo - Auditing the cloud
Taiye Lambo - Auditing the cloudnooralmousa
 

Plus de nooralmousa (17)

Mr. Bulent Teksoz - Security trends and innovations
Mr. Bulent Teksoz  - Security trends and innovationsMr. Bulent Teksoz  - Security trends and innovations
Mr. Bulent Teksoz - Security trends and innovations
 
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
 
Mr. Khalid Shaikh - emerging trends in managing it security
Mr. Khalid Shaikh  - emerging trends in managing it securityMr. Khalid Shaikh  - emerging trends in managing it security
Mr. Khalid Shaikh - emerging trends in managing it security
 
Mr. Andrey Belenko - secure password managers and military-grade encryption o...
Mr. Andrey Belenko - secure password managers and military-grade encryption o...Mr. Andrey Belenko - secure password managers and military-grade encryption o...
Mr. Andrey Belenko - secure password managers and military-grade encryption o...
 
Mr. Burhan Khalid - secure dev.
Mr. Burhan Khalid - secure dev.Mr. Burhan Khalid - secure dev.
Mr. Burhan Khalid - secure dev.
 
Sudarsan Jayaraman - Open information security management maturity model
Sudarsan Jayaraman  - Open information security management maturity modelSudarsan Jayaraman  - Open information security management maturity model
Sudarsan Jayaraman - Open information security management maturity model
 
Meraj Ahmad - Information security in a borderless world
Meraj Ahmad - Information security in a borderless worldMeraj Ahmad - Information security in a borderless world
Meraj Ahmad - Information security in a borderless world
 
Renaud Bido & Mohammad Shams - Hijacking web servers & clients
Renaud Bido & Mohammad Shams - Hijacking web servers & clientsRenaud Bido & Mohammad Shams - Hijacking web servers & clients
Renaud Bido & Mohammad Shams - Hijacking web servers & clients
 
Ahmed Al Barrak - Staff information security practices - a latent threat
Ahmed Al Barrak - Staff information security practices - a latent threatAhmed Al Barrak - Staff information security practices - a latent threat
Ahmed Al Barrak - Staff information security practices - a latent threat
 
Fadi Mutlak - Information security governance
Fadi Mutlak - Information security governanceFadi Mutlak - Information security governance
Fadi Mutlak - Information security governance
 
Mohammed Al Mulla - Best practices to secure working environments
Mohammed Al Mulla - Best practices to secure working environmentsMohammed Al Mulla - Best practices to secure working environments
Mohammed Al Mulla - Best practices to secure working environments
 
Pradeep menon how to influence people and win top management buy0in for ciso
Pradeep menon   how to influence people and win top management buy0in for cisoPradeep menon   how to influence people and win top management buy0in for ciso
Pradeep menon how to influence people and win top management buy0in for ciso
 
Nabil Malik - Security performance metrics
Nabil Malik - Security performance metricsNabil Malik - Security performance metrics
Nabil Malik - Security performance metrics
 
Khaled al amri using fingerprints as private and public keys
Khaled al amri   using fingerprints as private and public keysKhaled al amri   using fingerprints as private and public keys
Khaled al amri using fingerprints as private and public keys
 
Hisham Dalle - Zero client computing - taking the desktop into the cloud
Hisham Dalle - Zero client computing - taking the desktop into the cloudHisham Dalle - Zero client computing - taking the desktop into the cloud
Hisham Dalle - Zero client computing - taking the desktop into the cloud
 
Ghassan farra it security a cio perspective
Ghassan farra   it security a cio perspectiveGhassan farra   it security a cio perspective
Ghassan farra it security a cio perspective
 
Taiye Lambo - Auditing the cloud
Taiye Lambo - Auditing the cloudTaiye Lambo - Auditing the cloud
Taiye Lambo - Auditing the cloud
 

Dernier

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 

Dernier (20)

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 

Mr. Vivek Ramachandran - Advanced Wi-­Fi Security Penetration Testing

  • 1. Advanced  Wi-­‐Fi  Security   Penetra3on  Tes3ng   Vivek  Ramachandran   h=p://www.securitytube.net     vivek@securitytube.net     ©SecurityTube.net  
  • 2. Vivek  Ramachandran   B.Tech,  ECE   802.1x,  Cat65k   WEP  Cloaking   Caffe  La=e  A=ack   IIT  Guwaha3   Cisco  Systems   Defcon  15   Toorcon  9   Media  Coverage   MicrosoP     Trainer,  2011   Wi-­‐Fi  Malware,  2011   CBS5,  BBC   Security  Shootout   ©SecurityTube.net  
  • 3. In-­‐Person  Trainings   ©SecurityTube.net  
  • 4. SecurityTube.net   ©SecurityTube.net  
  • 5. SecurityTube  Online  Cer3fica3ons   Students  in  50+  Countries     ©SecurityTube.net  
  • 6. Backtrack  5  Wireless  Penetra3on  Tes3ng   h=p://www.amazon.com/BackTrack-­‐Wireless-­‐Penetra3on-­‐Tes3ng-­‐Beginners/dp/1849515581/     ©SecurityTube.net  
  • 7. Why  is  Wireless  Security  Important?   •  Seamless  mobility   •  Ubiquitous   •  Mass  adop3on   •  Integrated  into  all   devices   –  Laptops   –  Phones   –  Embedded  Devices   •  Connects  to  Internet   ©SecurityTube.net  
  • 8. Wireless  Security  Challenges   •  How  do  you  protect   something  you  can’t  see?   J   •  Extends  beyond  boundary   walls     •  Mobile  clients   •  Difficult  to  locate  a=acker   •  Passive  a=acks  can  be   done  from  miles  away   ©SecurityTube.net  
  • 9. Wireless  Gear   A=acker   Vic3m   Access  Point   External  Card   Smartphone   •  2  Laptops   •  1  Smartphone   •  1-­‐2  Access  Points   •  1-­‐2  External  Wireless  Cards   ©SecurityTube.net  
  • 10. External  Wireless  Card   •  Alfa  Networks  AWUS036H  USB  based  card   •  Already  integrated  into  Backtrack   •  Allows  for  packet  sniffing   •  Allows  for  packet  injec3on   •  Maximum  adver3sed  output  at  1  Wa=   •  We  will  use  this  in  all  our  experiments   •  Current  Retail  Price  at  $37  on  Amazon   h=p://www.amazon.com/Alfa-­‐802-­‐11b-­‐ Wireless-­‐Original-­‐9dBi/dp/B001O9X9EU     ©SecurityTube.net  
  • 11. SoPware  Setup   •  Run  Backtrack  in  VirtualBox   •  Load  the  Lab  Files  on  it   ©SecurityTube.net  
  • 12. Understanding  Wireless  Sniffing   •  Concept  similar  to  wired  side  sniffing   •  Put  the  wireless  interface  into  “monitor”   mode   –  Akin  to  wired  side  “promiscuous”  mode   •  On  BT  tools  are  inbuilt   •  Will  use  Airmon-­‐NG  to  put  the  card  into   monitor  mode   ©SecurityTube.net  
  • 13. Lab  Session:  Simple  Sniffing   •  Start  sniffing  on  the  air   •  Use  wireshark  to  see  the  packets   ©SecurityTube.net  
  • 14. Surprise!  Wi-­‐Fi  Sniffing  is  more   complicated   •  WLANs  can  operate  in  3  different  frequency   ranges   –  2.4GHz  (802.11b/g/n)   –  3.6GHz  (802.11y)   –  4.9/5.0GHz  (802.11a/h/j/n)   •  Each  of  these  ranges  is  divided  into  mul3ple   channels     •  Every  country  has  allowed  channels,  users  and   maximum  power  levels   •  However,  wireless  card  can  be  configured  to   disregard  these  policies   ©SecurityTube.net  
  • 15. 802.11b/g/n  Channels   •  Source:  Wikipedia   ©SecurityTube.net  
  • 16. Difference  between  Wired  and  Wireless   Sniffing     •  Key  difference  with  wired   –  Concept  of  channels  and  bands  in  wireless   –  Wireless  Card  can  only  be  on  one  channel  at  a   7me   –  Cannot  sniff  on  all  channels  and  bands  at  the   same  3me   –  Wireless  Card  needs  to  be  capable  of  opera7ng   in  the  given  range  :  a?b?g?n?h?   •  Alfa  Network  card  operates  in  b/g   ©SecurityTube.net  
  • 17. Lab  Session:  Sniffing  and  Channel  Hopping   •  Use  airodump-­‐ng  u3lity  to  cycle  through  the   different  channels   •  Locate  different  wireless  networks  over  the  air   •  View  the  packets  in  Wireshark   ©SecurityTube.net  
  • 18. A  Simple  Wireless  Network   Vic3m  Laptop(s)   A=acker  Laptop                            +          Alfa  Card   Access  Point   Smartphone   Internet   ©SecurityTube.net  
  • 19. Understanding  WLAN  Packets  Types   •  3  types  of  packets:   –  Management     –  Control   –  Data   •  Subtypes  exist  for  each  of  the  above   •  Full  details  available  in  IEEE  Specifica3on   h=p://standards.ieee.org/about/get/802/802.11.html     ©SecurityTube.net  
  • 20. Packet  Sub-­‐Types   Source:  IEEE  802.11-­‐2007  Standard   ©SecurityTube.net  
  • 21. Understanding  the  Access  Point   •  Access  Point  is  configured  with  an  SSID     •  This  SSID  acts  as  a  network  name  for  discovery   •  Clients  search  for  this  access  point  or  network   using  this  SSID   •  Access  Point  sends  out  broadcast  frames   called  Beacon  Frames  to  announce  its   presence   •  Clients  use  this  to  show  available  wireless   networks  list   ©SecurityTube.net  
  • 22. Demo   •  Start  Wireshark  and  capture  Beacon  Frames   •  Analyze  various  important  header  fields  in  the   Beacon  Frame   •  Iden3fy  things  like  SSID,  Encryp3on,  Channel   etc.   ©SecurityTube.net  
  • 23. TaDa!  Pwning  Beacon  Frames   •  Anyone  can  create  and  transmit  beacon   frames   •  All  clients  will  list  that  as  a  new  access  point   •  We  will  use  MDK  on  BT4  to  do  this   Demo  Time!   ©SecurityTube.net  
  • 24. What  did  we  learn?   •  Spoofing  802.11  frames  is  simple   •  No  protec3on  mechanism  available   •  Seems  similar  to  TCP/IP  spoofing   •  We  will  use  this  “insecurity”  over  and  over   again  in  a=acks   ©SecurityTube.net  
  • 25. Objec3ve   •  To  understand  how  AP  and  Clients   communicate   •  Strip  down  to  the  packet  level   •  Understand  details  with  Wireshark   ©SecurityTube.net  
  • 26. Demo  Time!   •  Create  an  open  authen3ca3on  and  no   encryp3on  based  AP  with  SSID  “SecurityTube”   •  Connect  a  client  to  it   –  Laptop   –  Smartphone   •  Collect  all  the  packets  using  Wireshark   –  Ensure  your  card  is  also  on  the  same  channel   •  Analyze  the  flow   ©SecurityTube.net  
  • 27. Client  –  AP  Connec3on  Packets   Source:  IEEE  Standard   ©SecurityTube.net  
  • 28. AP-­‐Client  State  Machine   ©SecurityTube.net  
  • 29. Terminology   •  STA  –  STA3on  (Wireless  Client)   •  BSS  –  Basic  Service  Set  (set  of  nodes  communica3ng  with   each  other)   –  Infrastructure  BSS  (AP  and  Clients)   –  Independent  BSS  (Ad-­‐Hoc  Clients)   •  ESS  –  Extended  Service  Set  (set  of  connected  BSSs)   •  BSSID  –  Basic  Service  Set  Iden3fier   –  Infrastructure  BSS  (MAC  address  of  AP)   –  IBSS  (Randomly  Chosen  MAC  address)   •  DS  –  Distribu3on  System  (connects  APs  in  an  ESS)   ©SecurityTube.net  
  • 30. BSS   Infrastructure  BSS   Independent  BSS  (Ad-­‐Hoc)   BSSID  =  Random  MAC  chosen  by   BSSID  =  MAC  of  AP   First  Client  in  Ad-­‐Hoc  Mode   ©SecurityTube.net  
  • 31. ESS   BSS  1   BSS  2   DS   LAN/WAN   ©SecurityTube.net  
  • 32. WLAN  Packet  Header   Frame   Dura3on/   Address   Address   Address   Sequence   Address   QoS   Frame   FCS   Control   ID   1   2   3   Control   4   Control   Body   Presence  Depends  on  Packet  Type  /  Sub  Type   Frame   Dura3on/   Address   Address   Address   Sequence   Address   QoS   Frame   FCS   Control   ID   1   2   3   Control   4   Control   Body   Bytes   2   2   6   6   6   2   6   2   0  to   4   2312  4   ©SecurityTube.net  
  • 33. Frame  Control  Field   Frame   Dura3on/   Address   Address   Address   Sequence   Address   QoS   Frame   FCS   Control   ID   1   2   3   Control   4   Control   Body   2  Bytes   Bits   2   2   4   1   1   1   1   1   1   1   1   Protocol   Type   Sub   To  DS   From  DS   More  Frag   Retry   Power   More  Data   Protected   Order   Type   Mgmt.   Frame   ©SecurityTube.net  
  • 34. Protocol   2   2   4   1   1   1   1   1   1   1   1   Protocol   Type   Sub   To  DS   From  DS   More  Frag   Retry   Power   More  Data   Protected   Order   Type   Mgmt.   Frame   •  Default  to  “0”  value   •  May  change  when  a  major  revision  happens   incompa3ble  with  the  previous  version   ©SecurityTube.net  
  • 35. Type  and  SubType   2   2   4   1   1   1   1   1   1   1   1   Protocol   Type   Sub   To  DS   From  DS   More  Frag   Retry   Power   More  Data   Protected   Order   Type   Mgmt.   Frame   •  Type  –  Management,  Control  and  Data   Frames   •  Sub-­‐Types  in  each   ©SecurityTube.net  
  • 36. To  and  From  DS   2   2   4   1   1   1   1   1   1   1   1   Protocol   Type   Sub   To  DS   From  DS   More  Frag   Retry   Power   More  Data   Protected   Order   Type   Mgmt.   Frame   To  DS   From  DS   Interpreta7on   0   0   STA  to  STA  in  same  IBSS  (Ad-­‐Hoc),     Management  and  Control  Frames   0   1   Exi3ng  the  Distribu3on  System  (DS)   1   0   Entering  the  DS   1   1   Used  in  Wireless  Distribu3on  Systems  (WDS)   ©SecurityTube.net  
  • 37. More  Frag   2   2   4   1   1   1   1   1   1   1   1   Protocol   Type   Sub   To  DS   From  DS   More  Frag   Retry   Power   More  Data   Protected   Order   Type   Mgmt.   Frame   •  Indicates  if  more  fragments  of  the  current   frame  are  to  follow   •  Only  applica3on  to  Data  and  Management   frames   ©SecurityTube.net  
  • 38. Retry   2   2   4   1   1   1   1   1   1   1   1   Protocol   Type   Sub   To  DS   From  DS   More  Frag   Retry   Power   More  Data   Protected   Order   Type   Mgmt.   Frame   •  Indicates  is  current  frame  is  a  retransmission   •  Applicable  to  Management  and  Data  Frames   only   ©SecurityTube.net  
  • 39. Power  Management   2   2   4   1   1   1   1   1   1   1   1   Protocol   Type   Sub   To  DS   From  DS   More  Frag   Retry   Power   More  Data   Protected   Order   Type   Mgmt.   Frame   •  Indicates  if  the  STA  is  in  Power  Save  Mode  or   Ac3ve  Mode   ©SecurityTube.net  
  • 40. More  Data   2   2   4   1   1   1   1   1   1   1   1   Protocol   Type   Sub   To  DS   From  DS   More  Frag   Retry   Power   More  Data   Protected   Order   Type   Mgmt.   Frame   •  Indicates  to  an  STA  in  Power  Save  mode  that   more  data  is  to  follow   •  Data  is  queued  up  on  the  AP   ©SecurityTube.net  
  • 41. Protected  Frame   2   2   4   1   1   1   1   1   1   1   1   Protocol   Type   Sub   To  DS   From  DS   More  Frag   Retry   Power   More  Data   Protected   Order   Type   Mgmt.   Frame   •  1  indicates  that  the  Frame  Body  is  encrypted   –  Data  frames   –  Management  frames  of  Type  Auth   •  0  indicates  no  encryp3on   ©SecurityTube.net  
  • 42. Order   2   2   4   1   1   1   1   1   1   1   1   Protocol   Type   Sub   To  DS   From  DS   More  Frag   Retry   Power   More  Data   Protected   Order   Type   Mgmt.   Frame   •  Indicates  that  all  received  frames  must  be   processed  in  order   ©SecurityTube.net  
  • 43. Dura3on   Frame   Dura3on/   Address   Address   Address   Sequence   Address   QoS   Frame   FCS   Control   ID   1   2   3   Control   4   Control   Body   •  Used  to  set  the  Network  Alloca3on  Vector   (NAV)  J   •  NAV  is  the  minimum  amount  of  3me  a  STA   needs  to  wait  before  a=emp3ng  transmission   •  Also  used  in  CFP  and  PS-­‐Poll  frames   ©SecurityTube.net  
  • 44. Address   Frame   Dura3on/   Address   Address   Address   Sequence   Address   QoS   Frame   FCS   Control   ID   1   2   3   Control   4   Control   Body   •  Value  and  Presence  depends  on  Type/Sub-­‐ Type   •  Des3na3on  Address   •  Source  Address   •  BSSID   ©SecurityTube.net  
  • 45. Sequence  Control   Frame   Dura3on/   Address   Address   Address   Sequence   Address   QoS   Frame   FCS   Control   ID   1   2   3   Control   4   Control   Body   Fragment   Sequence  Number   Number   •  Sequence  number  of  the  packet   •  Fragment  number  of  the  packet   ©SecurityTube.net  
  • 46. QoS  Control   Frame   Dura3on/   Address   Address   Address   Sequence   Address   QoS   Frame   FCS   Control   ID   1   2   3   Control   4   Control   Body   •  Quality  of  Service  Related   •  In  Data  Frames   ©SecurityTube.net  
  • 47. Frame  Body   Frame   Dura3on/   Address   Address   Address   Sequence   Address   QoS   Frame   FCS   Control   ID   1   2   3   Control   4   Control   Body   •  Contains  the  data  payload   –  Management  frame  details   –  Actual  data   ©SecurityTube.net  
  • 48. FCS   Frame   Dura3on/   Address   Address   Address   Sequence   Address   QoS   Frame   FCS   Control   ID   1   2   3   Control   4   Control   Body   •  CRC  check  over  the  MAC  header  and  Frame   Body   •  Easy  to  beat  J   ©SecurityTube.net  
  • 49. Sniffing  SSIDs   ©SecurityTube.net  
  • 50. Hidden  SSID   •  Turn  SSID  Broadcas3ng  off  in  Beacon  Frames   •  Just  monitoring  Beacon  Frames  will  not  give   you  the  SSID   •  A  “Security  through  Obscurity”  technique  at   best   •  Can  only  deter  novices   •  Hardly  a  challenge  for  the  experienced   wireless  hacker   ©SecurityTube.net  
  • 51. Pwning  Hidden  SSIDs   •  Mul3ple  Techniques:   –  Monitor  Air  for  a  new  Client  trying  to  associate  with  the   access  point  (passive)   –  De-­‐authen3cate  one  or  all  clients  and  monitor   reconnec3ons  (ac3ve)   •  Basic  idea  is  to  force  the  network  to  send  Probe  /   Associa3on  packets   •  These  packets  contain  the  SSID  even  if  not  present  in   the  Beacon  frame  from  the  access  point   ©SecurityTube.net  
  • 52. Origin  of  MAC  Filters   •  Used  in  the  Wired  World   •  Switches  and  Filtering  devices  like  Firewalls   •  Idea  was  to  have  a  set  of  “whitelisted”  MAC   addresses  and  deny  rest   •  Is  insecure  as  MAC  address  can  be  easily  spoofed   •  Reasonably  secure  if  authorized  MAC  addresses   are  few  and  a=acker  cannot  get  physical  access   to  the  authorized  machines  to  find  the  MAC   ©SecurityTube.net  
  • 53. Wireless  MAC  Filters   •  Not  a  feature  in  the  802.11  standard   •  Can  add  them  on  the  access  point  (network  layer   filter)   •  Simple  way  to  only  allowed  whitelisted  MACs   •  **  Time  to  Laugh  **  J  J  J   –  MAC  addresses  are  visible  in  plain  text  in  the  WLAN   header   –  We  simply  need  to  monitor  associated  clients  and  find   their  MAC  addresses   –  Use  the  MAC  when  the  Client  is  gone  /  s3ll  present   –  No  defense  at  all!   ©SecurityTube.net  
  • 54. WLAN  Authen3ca3on   •  WLAN  Authen3ca3on  by  itself  is  not  powerful   at  all   •  2  types:   –  Open  Authen3ca3on   –  Shared  Authen3ca3on   ©SecurityTube.net  
  • 55. Open  Authen3ca3on   •  No  “actual”  Authen3ca3on  mechanism  at  all   •  2  packets  exchanged  between  Client  and  AP,   and  authen3ca3on  ends   •  Cases  where  authen3ca3on  may  fail   –  MAC  Filtering   ©SecurityTube.net  
  • 56. Shared  Authen3ca3on   ©SecurityTube.net  
  • 57. Understanding  Shared  Authen3ca3on   •  Challenge  is  encrypted  using  the  WEP  key   •  WEP  uses  RC4  which  is  a  stream  cipher   •  RC4  Keystream  is  XOR’ed  with  Plain  Text   challenge  and  response  is  returned   •  We  will  discuss  WEP  in  detail  later   ©SecurityTube.net  
  • 58. Simple  Math  to  nail  Shared  Auth   X  –  Plain  Text  Challenge         Y  –  WEP  Keystream   Z  –  Encrypted  Challenge     Z  =  X    (xor)  Y     Z  (xor)  X  =  (  X  (xor)  Y  )  (xor)  X    =  Y               ©SecurityTube.net  
  • 59. Using  the  Keystream  and  IV   •  Use  for  shared  authen3ca3on  with  the  AP   •  Can  be  used  to  encrypt  small  packets  (128  bytes)   –  Arbitrary  injec3on   •  IV  and  Keystream  can  be  harvested  to  create  a   table  based  decryp3on  a=ack   –  Need  a  lot  of  SKA  tries   –  Can  only  decrypt  first  128  bytes  of  every  packet   ©SecurityTube.net  
  • 60. Demo  Time   •  Setup  AP  to  use  WEP  and  Shared  Key  Auth   •  Try  connec3ng  without  knowing  the  key   •  Sniff  the  packets  and  dump  the  keystream   •  Use  this  to  pwn  shared  authen3ca3on   ©SecurityTube.net  
  • 61. Hotspot  Basics   •  Free  /  Paid  WiFi  based  internet  offered  in  public   places   –  Coffee  shops   –  Airport   •  Typically  uses   –  Open  Authen3ca3on   –  MAC  Filtering  at  3mes   –  No  Encryp3on   •  Distribu3on  of  keys  would  be  a  nightmare   –  Can  use  cap3ve  portals  for  applica3on  layer   authen3ca3on   ©SecurityTube.net  
  • 62. Hotspot  A=acks   •  Create  an  Evil  Twin  in  the  vicinity   –  Same  ESSID   –  Same  BSSID  (op3onal)   •  Use  De-­‐Authen3ca3on  a=acks  to  break  Client   AP  Connec3on   •  If  Evil  Twin  has  higher  signal  strength,  then   Client  will  connect  to  it   ©SecurityTube.net  
  • 63. A=ack  Visualiza3on   Client   SSID:  SecurityTube   IP  Address   De-­‐Authen3ca3on  Packets   DHCP   Server   A=acker   ©SecurityTube.net  
  • 64. Post  A=ack  Op3ons   Client   SSID:  SecurityTube   1.  Relay  it  to  the  access  point  (MITM)   A=acker   Internet   2.  Relay  to  Internet  Directly   ©SecurityTube.net  
  • 65. Understanding  Clients   Client   SSID:  default   SSID   Creden7als   Default   …   SecurityTube   …   ProtectedAP   ********   ….   …   ©SecurityTube.net  
  • 66. An  Isolated  Client   ©SecurityTube.net  
  • 67. Inconsistent  Behavior   •  Different  OSs  behave  differently   –  Linux   –  Windows   –  OS  X   •  Difference  in  Behavior  even  between  SP  in   windows   •  We  will  take  up  most  common  behavior   –  Client  searching  for  known  access  points   ©SecurityTube.net  
  • 68. Mul3ple  Cases  Possible   •  Access  Point  stored  in  the  PNL  or  similar  could   have  either  of  3  configura3ons:   –  No  Encryp3on   –  WEP   –  WPA/WPA2   •  We  will  deal  with  each  of  the  them  separately   ©SecurityTube.net  
  • 69. Case  1:  Open  Authen3ca3on,  No   Encryp3on   Vic3m   A=acker   Probe  Request  “S ecurityTube”   be”   e  “SecurityTu Probe  Respons Authen3ca3on  Request   ess   ca 3on  Succ Authen3 Associa3on  Request   nse   ca3 on  Respo Authen3 Data  Exchange   ©SecurityTube.net  
  • 70. Fundamental  Problem   •  Client  cannot  authen3cate  the  access  point   •  The  SSID  all  alone  is  used  to  decide  whom  to   connect  to   •  Anyone  can  set  a  similar  SSID  and  force  a   client  to  connect  to  their  access  point   •  This  is  especially  true  with  Hotspot  SSIDs  as   they  by  defini3on  are  Open  Authen3ca3on   with  no  Encryp3on   ©SecurityTube.net  
  • 71. Case  2  and  Case  3   •  WEP  and  WPA/WPA2   •  Shared  Key  Authen3ca3on   •  We  will  talk  about  these  once  we  finish  the   encryp3on  fundamentals  class   ©SecurityTube.net  
  • 72. Opera3ng  Frequency  Range  and   Regula3ons     ©SecurityTube.net  
  • 73. Understanding  Transmit  Power   ©SecurityTube.net  
  • 74. EIRP   Effec3ve  Isotropic  Radiated  Power  (EIRP)   =  Transmi=er  Power  (in  dBm)            +  Antenna  Gain  (in  dBi)          -­‐  Cable  loss  (in  dBm)       ©SecurityTube.net  
  • 75. Can  this  sezng  be  changed?   •  Yes  J    We  can  change  our  channel  (without  any  driver   or  kernel  modifica3ons)  to  any  one  of  the  following:   h=p://git.kernel.org/?p=linux/kernel/git/linville/wireless-­‐regdb.git;a=blob;f=db.txt;hb=HEAD     •  To  be  used  when  you  are  traveling  to  a  new  country   •  The  card  will  need  to  support  the  channel  and  max   transmit  power  for  the  country   •  Might  be  illegal  to  transmit  high  power  or  use  other   channels  in  your  country   ©SecurityTube.net  
  • 76. Bolivia  and  Belize  to  Alfa’s  Rescue   ©SecurityTube.net  
  • 77. Wireless  MITM   SSID:  SecurityTube   Internet   Vic3m   Hacker   Internet   Wired  Connec3on   SSID:  SecurityTube   ©SecurityTube.net  
  • 78. Varia3on  1   SSID:  SecurityTube   Internet   Vic3m   Hacker   SSID:  SecurityTube   ©SecurityTube.net  
  • 79. Varia3on  2   SSID:  SecurityTube   Internet   Vic3m   Hacker   GPRS   3G   SSID:  SecurityTube   4G   ©SecurityTube.net  
  • 80. Our  Setup   SSID:  SecurityTube   Internet   Vic3m   Hacker   Internet   SSID:  SecurityTube   SSID:  Vivek   ©SecurityTube.net  
  • 81. Understanding  the  Hack   Bridge   Vic3m   Hacker   mon0   Internet   eth0   SSID:  SecurityTube   SSID:  Vivek   ©SecurityTube.net  
  • 82. SSL  MITM   Bridge   Vic3m   Hacker   mon0   Internet   eth0   SSID:  SecurityTube   SSID:  Vivek   ©SecurityTube.net  
  • 83. WEP  Basics   •  The  first  encryp3on  scheme  made  available   for  Wi-­‐Fi   •  Flawed  from  the  get  go   •  Uses  RC4  encryp3on  algorithm   –  Symmetric  Key  Encryp3on   •  Is  available  on  all  access  points   •  Typically  used  by  home  users  or   manufacturing  companies   ©SecurityTube.net  
  • 84. WEP  Internals   Frame   Dura3on/   Address   Address   Address   Sequence   Address   QoS   Frame   FCS   Control   ID   1   2   3   Control   4   Control   Body   Source:  IEEE  Standard   ©SecurityTube.net  
  • 85. Mul3ple  Keys   ©SecurityTube.net  
  • 86. WEP  Step  1:  Genera3ng  the  Keystream   24   40  /  104   IV   WEP  Key   RC4   Random  Keystream   Algorithm   (KSA  +  PRGA)   64  or  128  bit  WEP   •  RC4  Basics  and  Programming  a  simple  RC4  Encrypt  /  Decrypt  SoPware   •  h=p://www.securitytube.net/video/38     •  h=p://www.securitytube.net/video/79   •  h=p://www.securitytube.net/video/40     •  Basics  C  Programming  Required   ©SecurityTube.net  
  • 87. WEP  Step  2:  Generate  Integrity  Check   Value   Variable  Size   32  bits   CRC-­‐32   Data   ICV   Data   ICV   ©SecurityTube.net  
  • 88. Step  3:  Cipher  Text  Genera3on   IV  +  Padding  and  key  ID     IV   XOR   Cipher   Text   ©SecurityTube.net  
  • 89. IEEE  Diagram  for  Encryp3on   ©SecurityTube.net  
  • 90. WEP  Internals   Frame   Dura3on/   Address   Address   Address   Sequence   Address   QoS   Frame   FCS   Control   ID   1   2   3   Control   4   Control   Body   Source:  IEEE  Standard   ©SecurityTube.net  
  • 91. WEP  Internals   Frame   Dura3on/   Address   Address   Address   Sequence   Address   QoS   Frame   FCS   Control   ID   1   2   3   Control   4   Control   Body   Source:  IEEE  Standard   ©SecurityTube.net  
  • 92. WEP  Decryp3on   ©SecurityTube.net  
  • 93. Using  Wireshark  to  Decrypt  WEP   •  Once  we  have  the  WEP  key   –  Legi3mate  way   –  Or  crack  it  J   •  Airdecap-­‐NG  can  also  do  the  job   ©SecurityTube.net  
  • 94. Broken  Beyond  Repair   IEEE  WG  admiDed  that  WEP  cannot   2001  -­‐  The  insecurity  of  802.11,  Mobicom,  July  2001     hold  any  water.  Recommended  users   N.  Borisov,  I.  Goldberg  and  D.  Wagner.   to  upgrade  to  WPA,  WPA2   2001  -­‐  Weaknesses  in  the  key  scheduling  algorithm  of  RC4.   S.  Fluhrer,  I.  Man3n,  A.  Shamir.  Aug  2001.   2002  -­‐  Using  the  Fluhrer,  Man3n,  and  Shamir  A=ack  to  Break  WEP   A.  Stubblefield,  J.  Ioannidis,  A.  Rubin.   2004  –  KoreK,  improves  on  the  above  technique  and  reduces  the   complexity  of  WEP  cracking.  We  now  require  only  around   500,000  packets  to  break  the  WEP  key.   2005  –  Adreas  Klein  introduces  more  correla3ons  between  the   RC4  key  stream  and  the  key.     2007  –  PTW  extend  Andreas  technique  to  further  simplify  WEP   Cracking.  Now  with  just  around  60,000  –  90,000  packets  it  is   possible  to  break  the  WEP  key.   ©  AirTight  2007     ©SecurityTube.net  
  • 95. WEP  Cracking   •  Different  A=acks  using  different  logic   •  Oldest  one  is  finding  “weak  IVs”  which  reveal   informa3on  about  the  WEP  key   •  Once  you  can  collect  a  large  number  of  weak  IVs,   you  can  crack  the  WEP  key   •  Weak  IVs  are  not  uniformly  distributed  in  the  IV   space   •  A  Weak  IV  is  key  dependent   •  This  is  the  reason  why  it  takes  some  3me   ©SecurityTube.net  
  • 96. Cracking  WEP  –  the  script  kiddie  way  J   •  Techniques   –  Passive  Way  (Wait  …  wait  …  wait)   •  Advantage  –  Undetectable   •  Use  Direc3onal  Antenna   •  Decrypt  traffic  once  cracked   –  Ac3ve  Way  (Pa3ence  is  not  your  virtue)   •  Replay  a=acks   –  S3mulate  the  network  to  send  encrypted  data  packets     •  ARP  Replay   –  ARP  Request,  sends  ARP  Response   ©SecurityTube.net  
  • 97. ARP  Replay  Step  1:  Capture  ARP  Packets   Access  Point   Authorized   Client   Silence  is  Golden  J   A=acker   •  How  does  the  A=acker  Iden3fy  the  ARP  Packets?  Aren’t  they  all  encrypted?   •  ARP  packets  are  of  a  fixed  unique  size,  easy  to  iden3fy  even  if  encrypted   •  Capture  ARP  Request  packets  using  encrypted  packet  size  and  Des3na3on  MAC  address   •  Replay  them  blindly,  and  see  if  the  network  responds  back!   •  If  yes,  then  we  found  ourselves  Winner  J  J   ©SecurityTube.net  
  • 98. ARP  Replay  Step  2:  Replay  Packets  to  AP   A=acker   Access  Point   Encrypted  ARP  Packet   sp o n s e   d  ARP  Re Encrypte Encrypted  ARP  Packet   sp o nse   d  ARP  Re Encrypte Encrypted  ARP  Packet   sp o nse   d  ARP  Re Encrypte ©SecurityTube.net  
  • 99. ARP  Replay  Step  3:  Collect  Packets  and  use   Aircrack-­‐NG   ©SecurityTube.net  
  • 100. Its  not  just  the  Encryp3on   •  Message  Injec3on  A=acks   –  No  replay  protec3on   –  Aireplay-­‐NG  ARP  Replay   •  Message  Injec3on   –  ChopChop  a=ack   –  Caffe  la=e  a=ack   –  Fragmenta3on  a=ack   –  Hirte  A=ack   ©SecurityTube.net  
  • 101. Message  Modifica3on   •  CRC-­‐32  is  a  linear  func3on  of  the  message,  hence  checksum  is  distribu3ve  over  XOR   •  Thus  we  can  tamper  arbitrary  byte  loca3ons  in  the  packet  and  patch  the  checksum   •  This  will  be  a  valid  packet  accepted  by  the  access  point   Original  Research  Paper:  Intercep(ng  Mobile  Communica(ons   ©SecurityTube.net  
  • 102. What  does  this  mean  for  us?   Encrypted  Data   Enc.  ICV    Data   ICV   XOR    RC4  Keystream   ©SecurityTube.net  
  • 103. Create  a  Bit  Mask  without  knowing  Plain   Text   Encrypted  Data   Enc.  ICV    A=acker  Modifica3ons   ICV  Patch   =  CRC-­‐32  of      A=acker  Modifica3ons   ©SecurityTube.net  
  • 104. Patching  a  Valid  Packet   Encrypted  Data   Enc.  ICV   XOR    A=acker  Modifica3ons   ICV  Patch   ||   Modified  Encrypted  Data   Enc.  ICV   Valid  Encrypted  Packet!   ©SecurityTube.net  
  • 105. Behind  the  Scenes    Data   ICV   XOR    RC4  Keystream   XOR    A=acker  Modifica3ons   ICV  Patch   A  (xor)  B  (xor)  C    =    [  A  (xor)  C  ]  (xor)  B   ©SecurityTube.net  
  • 106. A  (xor)  B  (xor)  C    =    [  A  (xor)  C  ]  (xor)  B    Data   ICV   XOR    A=acker  Modifica3ons   ICV  Patch   XOR    RC4  Keystream   ©SecurityTube.net  
  • 107. Modified  packet  XOR  with  Keystream    Data   ICV   XOR    A=acker  Modifica3ons   ICV  Patch   ||   Corrected   Modified  Data   ICV   XOR    RC4  Keystream   ||   Modified  Encrypted  Data   Enc.  ICV   Valid  Encrypted  Packet!   ©SecurityTube.net  
  • 108. Repercussions   •  We  can  modify  arbitrary  data  in  a  WEP  packet   and  patch  the  ICV   •  This  is  a  valid  WEP  packet  which  will  be  accepted   by  the  Access  Point  /  client   •  Caffe  La=e  a=ack  Modifies  a  Gratuitous  ARP   packet  to  change  it  to  a  ARP  Request  packet  for   the  same  host!   •  Host  Replies  and  we  collect  these  packets  to   crack  the  WEP  key   ©SecurityTube.net  
  • 109. A  Cup  of  Caffe  La=e  served  with  the  WEP   key!  J   Images  copyright  Air3ght  Networks   ©SecurityTube.net  
  • 110. Caffe  La=e  Details   •  Once  the  client  connects  to  the  fake  AP  it  will   send  out  DHCP  requests   •  DHCP  will  3me  out  eventually   •  Auto-­‐configura3on  IP  address  will  kick  in   •  Client  will  send  a  Gratuitous  ARP  packet   Let  us  Verify!   ©SecurityTube.net  
  • 112. Back  to  the  Drawing  Board   Encrypted  Data   Enc.  ICV    Data   ICV   XOR    RC4  Keystream   ©SecurityTube.net  
  • 113. Korek’s  ChopChop   Encrypted  Data   Enc.  ICV   Encrypted  Data   Enc.  ICV   Guess   New  ICV   Accepted   Mul3cast  Address   00   ICV-­‐1   No   01   ICV-­‐2   No   …   …   …   FA   ICV-­‐n   Yes!   FA   Encrypted  Data   Enc.  ICV   ©SecurityTube.net  
  • 114. ChopChop   Encrypted  Data   Enc.  ICV   Encrypted  Data   Enc.  ICV   Guess   New  ICV   Accepted   00   ICV-­‐1   No   01   ICV-­‐2   No   …   …   …   CD   ICV-­‐n   Yes!   CD   FA   Encrypted  Data   Enc.  ICV   ©SecurityTube.net  
  • 115. End  Result   •  Decrypt  en3re  WEP  packet  byte  by  byte   •  Can  be  orchestrated  in  2  modes:   –  Authen3cated  to  AP   •  Packet  is  replayed  by  the  AP  over  the  air     –  Unauthen3cated  to  AP   •  Some  APs  send  a  de-­‐authen3ca3on  packet  if  the  WEP   packet  is  valid  but  MAC  is  not  associated   •  May  not  work  always   ©SecurityTube.net  
  • 116. Understanding  Fragmenta3on   ©SecurityTube.net  
  • 117. LLC  Header  +  Rest   ©SecurityTube.net  
  • 118. LLC  Header  is  Known   •  8  Bytes  of  LLC  header  is  known   •  Ether  Type  can  be  ARP  /  IP  typically   •  Can  be  guessed  from  the  packet  size   ©SecurityTube.net  
  • 119. Packet  Breakup   Encrypted  Data   Enc.  ICV   LLC    Data   ICV   8  Bytes   XOR    RC4  Keystream   ©SecurityTube.net  
  • 120. Known  Plain  Text  A=ack   Encrypted  Data   Enc.  ICV   XOR   LLC   8  Bytes   We  can  get  8  bytes  of   ||   the  Keystream  by  just   XORing  the  encrypted   RC4  Keystream   8  Bytes   packets  with  the  known   plain  text  of  the  LLC   ©SecurityTube.net  
  • 121. What  do  we  have  now?   RC4  Keystream   8  Bytes  of  Keystream  +  Corresponding  IV     4   4   Data   ICV   4   4   Encrypted   X ICV   Data   O R   RC4  Keystream   8   ©SecurityTube.net  
  • 122. Fragmenta3on  to  the  Rescue   4   4   4   Data   To  be     Sent   4   4   4   Encrypted   Encrypted   Encrypted   ICV-­‐1   ICV-­‐2   ICV-­‐3   Data1   Data2   Data3   •  Up  to  16  fragments  can  be  sent   •  Each  can  carry  4  bytes  of  data   •  Total  64  bytes  can  be  injected     ©SecurityTube.net  
  • 123. Hirte  A=ack   •  Uses  key  concepts  from  the  Caffe  La=e  a=ack  and  Fragmenta3on   a=ack   •  Targets  an  isolated  client,  allows  associa3on,  waits  for  an  ARP   packet  like  the  Caffe  La=e   •  Converts  that  into  an  ARP  Request  for  the  same  client  by  reloca3ng   the  IP  address  in  the  ARP  header  using  fragmenta3on  and  patches   ICV  using  Message  Modifica3on  flaw   •  Client  accepts  packet  and  sends  replies   •  GAME  OVER!   ©SecurityTube.net  
  • 124. More  details   •  Paper  detailing  fragmenta3on  and  its  advanced  use   •  Aircrack-­‐ng  website  for  details  on  implementa3on   ©SecurityTube.net  
  • 125. We  need  WEP’s  Replacement     WPA   WPA2   •  Intermediate  solu3on  by  Wi-­‐Fi  Alliance   •  Long  Term  solu3on  (802.11i)   •  Uses  TKIP     •  Uses  CCMP   •  Based  on  WEP   •  Based  on  AES   •  Hardware  changes  not  required   •  Hardware  changes  required   •  Firmware  update     Personal   Enterprise   Personal   Enterprise   PSK   802.1x  +  Radius   PSK   802.1x  +  Radius   ©SecurityTube.net  
  • 126. How  does  the  Client  Know?   •  Beacon  Frames?   •  Probe  Response  Packets  from  the  AP?   •  Can  be  used  to  create  a  WPA/WPA2  Honeypot   as  well!     ©SecurityTube.net  
  • 127. WEP   Probe  Request-­‐Response   Sta7c     WEP  Key   Sta7c   Authen3ca3on  RR,  Associa3on  RR   WEP  Key   Data  Encrypted  with  Key   ©SecurityTube.net  
  • 128. WPA:  No  Sta3c  Keys   Probe  Request-­‐Response   Sta7c     WEP  Key   Sta7c   Authen3ca3on  RR,  Associa3on  RR   WEP  Key   Dynamic  Key  Generated  First     Data  Encrypted  with  Dynamically  Key   How  are  Dynamic  Keys  Created?   ©SecurityTube.net  
  • 129. WPA  Pre-­‐Shared  Key   Pre-­‐Shared  Key  256  bit   PBKDF2   Passphrase  (8-­‐63)   ©SecurityTube.net  
  • 130. PBKDF2   •  Password  Based  Key  Deriva3on  Func3on     •  RFC  2898   •  PBKDF2(Passphrase,  SSID,  ssidLen,  4096,  256)   •  4096  –  Number  of  3mes  the  passphrase  is   hashed   •  256  –  Intended  Key  Length  of  PSK   ©SecurityTube.net  
  • 131. Lets  “Shake  Hands”:  4-­‐Way  Handshake   Supplicant   Authen3cator   Probe  Request-­‐Response     Authen3ca3on  RR,  Associa3on  RR   Pre-­‐Shared  Key  256  bit   Pre-­‐Shared  Key  256  bit     ANounce   Message  1 ANounce   ©SecurityTube.net  
  • 132. Message  1   ©SecurityTube.net  
  • 133. 4  Way  Handshake:  Message  1   Supplicant   Authen3cator   Probe  Request-­‐Response     Authen3ca3on  RR,  Associa3on  RR   Pre-­‐Shared  Key  256  bit   Pre-­‐Shared  Key  256  bit     Message  1 ANounce   Snounce   PTK   ©SecurityTube.net  
  • 134. Pairwise  Transient  Key   PTK  =  Func3on(PMK,  ANounce,  SNounce,   Authen3cator  MAC,  Supplicant  MAC)     -­‐PMK  =  Pre-­‐Shared  Key  (Pairwise  Master  Key)   -­‐ANounce  =  Random  by  AP   -­‐SNounce  =  Random  by  Client   -­‐Authen3ca3on  MAC  =  AP  MAC   -­‐Supplicant  MAC  =  Client  MAC   ©SecurityTube.net  
  • 135. 4  Way  Handshake:  Message  2   Supplicant   Authen3cator   Probe  Request-­‐Response     Authen3ca3on  RR,  Associa3on  RR   Pre-­‐Shared  Key  256  bit   Pre-­‐Shared  Key  256  bit     Message  1 ANounce   Snounce   PTK   Message  2   SNounce   ©SecurityTube.net  
  • 136. Message  2   ©SecurityTube.net  
  • 137. 4  Way  Handshake:  Message  3   Supplicant   Authen3cator   Probe  Request-­‐Response     Authen3ca3on  RR,  Associa3on  RR   Pre-­‐Shared  Key  256  bit   Pre-­‐Shared  Key  256  bit     Message  1 ANounce   Snounce   PTK   PTK   Message  2   Snounce  +  MIC     Message  3 a3on   Key  Installed   Key  Install   ©SecurityTube.net  
  • 138. Message  3   ©SecurityTube.net  
  • 139. 4  Way  Handshake:  Message  4   Supplicant   Authen3cator   Probe  Request-­‐Response     Authen3ca3on  RR,  Associa3on  RR   Pre-­‐Shared  Key  256  bit   Pre-­‐Shared  Key  256  bit     Message  1 ANounce   Snounce   PTK   PTK   Message  2   Snounce  +  MIC     Message  3 a3on   Key  Installed   Key  Install   Message  4   Key  Installed   Key  Install  Acknowledgement   ©SecurityTube.net  
  • 140. Message  4   ©SecurityTube.net  
  • 141. Acknowledgements   •  IEEE  Standard  802.11i-­‐2004   ©SecurityTube.net  
  • 142. Dunno  the  Right  Phrase?   Supplicant   Authen3cator   Probe  Request-­‐Response     Authen3ca3on  RR,  Associa3on  RR   Pre-­‐Shared  Key  256  bit   Pre-­‐Shared  Key  256  bit     Message  1 ANounce   Snounce   PTK   Message  2   PTK  is  Derived   Snounce  +  MIC   MIC  Check  Fails   n   DeAuthen3ca3o ©SecurityTube.net  
  • 143. Eavesdropping  the  4  Way  Handshake   Supplicant   Authen3cator   Probe  Request-­‐Response     Authen3ca3on  RR,  Associa3on  RR   Pre-­‐Shared  Key  256  bit   Pre-­‐Shared  Key  256  bit     Message  1 ANounce   Snounce   PTK   PTK   Message  2   Snounce  +  MIC     Message  3 a3on   Key  Installed   Key  Install   Message  4   Key  Installed   Key  Install  Acknowledgement   ©SecurityTube.net  
  • 144. A  Quick  Block  Diagram   4  Way  Handshake   SNonce    ANonce   Pre-­‐Shared  Key  256  bit   AP  MAC   Client  MAC   PBKDF2  (SSID)   PTK   Passphrase  (8-­‐63)   ©SecurityTube.net  
  • 145. WPA-­‐PSK  Dic3onary  A=ack   4  Way  Handshake   SNonce    ANonce   Pre-­‐Shared  Key  256  bit   AP  MAC   Client  MAC   PBKDF2  (SSID)   PTK   Passphrase  (8-­‐63)   Dic3onary   Verify  by  Checking  the  MIC   ©SecurityTube.net  
  • 146. Which  Packet  Do  we  Need  in  the   Handshake?   •  All  Packets  have  the  AP  MAC  and  Client  MAC   •  ANonce   –  Packet  1  and  Packet  3   •  SNonce   –  Packet  2     Answer:  (Either  All  4  packets),  or  (packet  1  and  2)  or   (packet  2  and  3)   ©SecurityTube.net  
  • 147. Decryp3ng  WPA-­‐PSK  Traces   •  Wireshark   •  Airdecap-­‐NG   ©SecurityTube.net  
  • 148. Cracking  WPA2-­‐PSK   •  Same  principles  apply   •  As  vulnerable  as  WPA-­‐PSK  is  if  a  weak   passphrase  is  chosen   •  Nothing  extra  to  discuss     Demo  Time!   ©SecurityTube.net  
  • 149. WPA-­‐PSK  Dic3onary  A=ack   4  Way  Handshake   SNonce   Pre-­‐Shared  Key  256  bit    ANonce                              (PMK)   AP  MAC   Client  MAC   PBKDF2  (SSID)   PTK   Passphrase  (8-­‐63)   Dic3onary   Verify  by  Checking  the  MIC   ©SecurityTube.net  
  • 150. PBKDF2   •  Requires  SSID   –  List  of  commonly  used  SSIDs   •  Requires  Passphrase   –  Can  be  provided  from  a  Dic3onary   •  PMK  can  be  pre-­‐computed  using  the  above     ©SecurityTube.net  
  • 151. Other  Parameters  in  Key  Cracking   •  Snonce,  Anonce,  Supplicant  MAC,   Authen3cator  MAC  varies  and  hence  cannot   be  “pre-­‐calculated”   •  PTK  will  be  different  based  on  the  above   •  MIC  will  be  different  as  well   Thus  these  cannot  be  pre-­‐calculated  in  any  way   ©SecurityTube.net  
  • 152. Speeding  up  Cracking   4  Way  Handshake   SNonce   Pre-­‐Shared  Key  256  bit    ANonce                              (PMK)   AP  MAC   Client  MAC   Pre-­‐Calculated  List  of  PMK   for  a     1.  Given  SSID   2.  Dic3onary  of  Passphrases   PTK   Verify  by  Checking  the  MIC   ©SecurityTube.net  
  • 153. Pla€orms   •  Mul3-­‐Cores   •  ATI-­‐Stream   •  Nvidia  CUDA   •  ….   •  In  the  Cloud   –  Amazon  EC2   ©SecurityTube.net  
  • 154. Fast  Cracking  Demo   •  Pyrit          h=p://code.google.com/p/pyrit/       ©SecurityTube.net  
  • 155. Stories  of  a  Wandering  Client   •  Mul3ple  Profiles  stored   –  Open   –  WEP   –  WPA/WPA2   •  Tools  don’t  work  properly  (WiFish  Finder  etc.)   •  But  lets  crack  this  from  the  basic  principles   ©SecurityTube.net  
  • 156. Exploit  All  Possibili3es   •  Need  SSID  with  mul3ple  configura3ons   •  We  need  to  find  the  security  sezngs  first   •  We  will  fight  the  ba=le  later   ©SecurityTube.net  
  • 157. S3mula3ng  a  Handshake   Supplicant   Hacker   Probe  Request-­‐Response     Authen3ca3on  RR,  Associa3on  RR   Pre-­‐Shared  Key  256  bit   Pre-­‐Shared  Key  256  bit     Message  1 ANounce   Snounce   WPA/WPA2  PSK   Dic3onary  A=ack   PTK   Message  2   Snounce  +  MIC   ©SecurityTube.net  
  • 158. Connec3ng  to  WPA/WPA2  Networks   •  WPA_Supplicant  is  the  de-­‐facto  tool   •  Supports  tons  of  op3ons   •  Cross  Pla€orm   –  Linux   –  Windows   –  OS  X   •  Allows  for  be=er  understanding  of  process   •  Open  source   ©SecurityTube.net  
  • 159. Supported  EAP  Methods   ©SecurityTube.net  
  • 160. Configura3on  File  Required   •  Samples  available  on  the  tool  website   •  Best  idea  is  to  use  available  templates  and   customize   ©SecurityTube.net  
  • 161. WPA-­‐Enterprise   •  Use  a  RADIUS  server  for  authen3ca3on   •  Different  supported  EAP  types  –  EAP-­‐MD5,   PEAP,  EAP-­‐TLS  etc.     •  De  facto  server   –  FreeRadius  www.freeradius.org     •  Depending  on  EAP  type  used  Client  and  Server   will  need  to  be  configured   ©SecurityTube.net  
  • 162. FreeRadius-­‐WPE   •  FreeRadius  Wireless  Pwnage  Edi3on  J   •  Created  by  Joshua  and  Brad   •  A  patch  to  the  FreeRadius  code   h=p://www.willhackforsushi.com/? page_id=37     ©SecurityTube.net  
  • 163. Key  Benefits  (ripped  from  Josh’s  site)   Good  news  –  BT5  ships  with  FreeRadius-­‐WPE   Bad  News  –  Broken  by  default     Good  news  –  Easy  fix     h=p://redmine.backtrack-­‐linux.org:8080/issues/115         ©SecurityTube.net  
  • 164. Sezng  up  FreeRadius-­‐WPE   •  Fixing  problems  on  BT5   •  Recompila3on   •  Basic  usage   ©SecurityTube.net  
  • 165. Network  Architecture   BT5  VM   eth1   FreeRadius-­‐WPE   eth0   Internet   ©SecurityTube.net  
  • 166. EAP-­‐MD5   AP   RADIUS   Client   EAP  Request  Iden3ty   EAP  Response  Iden3ty   RADIUS  Access  Request   (EAP  Iden3ty  Response)   EAP  Request  MD5  Challenge   RADIUS  Access  Challenge   (EAP  Request  MD5  Challenge)   EAP  Response  MD5  Challenge   RADIUS  Access  Request   (EAP  Response  MD5  Challenge)   EAP  Success   RADIUS  Access  Accept   (EAP  Success)   ©SecurityTube.net  
  • 167. Sezng  up  the  RADIUS  Server   •  Add  a  username  /  password  in  users  file   •  Make  eap-­‐md5  the  default  EAP  type  in   eap.conf   •  Ensure  the  shared  secret  is  correct  for  the  AP-­‐ RADIUS  server  in  clients.conf   ©SecurityTube.net  
  • 168. Objec3ve  of  Lab   •  Observe  traffic  on  wired  side  between  AP  and   RADIUS   •  Observer  traffic  on  wireless  side  between   Client  and  AP   •  Understand  and  correlate  with  the  theory   ©SecurityTube.net  
  • 169. Network  Architecture   BT5  VM   FreeRadius-­‐WPE   eth1   +  Wireshark  1   Wireshark  2   mon0   ©SecurityTube.net  
  • 170. EAP-­‐MD5   •  Cannot  be  used  for  Wi-­‐Fi  as  does  not  support   key  genera3on   •  Does  not  support  mutual  authen3ca3on   •  Both  plaintext  challenge  and  response  goes   over  the  air  unencrypted   –  A=acker  can  obtain  both   –  Launch  a  dic3onary  /  educated  bruteforce  a=ack   ©SecurityTube.net  
  • 171. MD5  Mathemagic   Hash  =  MD5(EAP  Response  ID  +  Password  +  RADIUS   Challenge)     Available  to  a=acker:   –  Hash   –  Response  ID   –  Challenge   •  Simple  equa3on   –  Keep  guessing  password  3ll  the  Hash  matches   ©SecurityTube.net  
  • 172. WPA/WPA2  Enterprise   EAP  Type   Real  World  Usage   PEAP   Highest   EAP-­‐TTLS   High   EAP-­‐TLS   Medium   LEAP   Low   EAP-­‐FAST   Low   ….   ….   ©SecurityTube.net  
  • 173. PEAP   •  Protected  Extensible  Authen3ca3on  Protocol   •  Typical  usage:   –  PEAPv0  with  EAP-­‐MSCHAPv2  (most  popular)   •  Na3ve  support  on  Windows   –  PEAPv1  with  EAP-­‐GTC   •  Other  uncommon  ones   –  PEAPv0/v1  with  EAP-­‐SIM  (Cisco)   •  Uses  Server  Side  Cer3ficates  for  valida3on   •  PEAP-­‐EAP-­‐TLS   –  Addi3onally  uses  Client  side  Cer3ficates  or  Smartcards   –  Supported  only  by  MicrosoP   ©SecurityTube.net  
  • 174. Source:  Layer3.wordpress.com   ©SecurityTube.net