SlideShare a Scribd company logo
Abhash Kumar Jha
WiFi
Cracking
TABLE OF
CONTENTS
Introduction &
Basics
Deauth Attack and
Fake AP
01
02
03
04
05
Gaining Access-WEP
Gaining Access –
WPA(WPS)
Gaining Access-
WPA2
Introduction and
Basics
01
Network Basics
A network is nothing but a number of devices connected together sharing data and
resources!
 All devices (wired or wireless) achieve this using same principle:
 One device acts as a server and server contains data which is shared between
connected devices
 In most Wi-Fi devices , server is a router and the shared data is the INTERNET!
 All devices have a MAC address.
 Each Packet has the source MAC address and Destination MAC Address.
Changing MAC address
Wireless Modes
There are eight modes that 802.11 wireless cards can operate in: Master (acting as an
access point), Managed (client, also known as station), Ad hoc, Repeater, Mesh, Wi-Fi
Direct, TDLS and Monitor mode.
However we are only going to talk about 2 modes :
 Managed Mode : Here our Wi-Fi card acts like a client i.e. Only directed packets are received by
our card.
 Monitor Mode : Here our Wi-Fi(NIC) card will sniff all the packets near it
(whether directed to it or not.)
Sniffing using airodump-ng
 Airodump-ng is a program that is a part of aircrack-ng package, it's a
packet sniffer that allows us to capture all the packets that are in our
Wi-Fi card range. We can also scan all Wi-Fi networks around us and
gather info about them.
 Using Airodump-ng:
> airmon-ng start [interface]
> airodump-ng [mon_interface]
Lets see how we can compact our view to only our target.
For instance, I only want to view BMSCE_Hostel
> airodump-ng –channel [CH] --bssid [BSSID] –write [filename] [interface]
De-auth Attack and
Fake AP creation
02
De-auth Attack
This attack is used to disconnect any device from any network within our range even if network
is protected with a key.
 Hacker send deauthentication packets to the router pretending to be target
machine(by spoofing its MAC address)
 At the same time , the hacker send packets to the target machine (pretending to be
router) telling it that it needs to re-authenticate itself.
 We’ll be using a tool called aireplay-ng.
> aireplay-ng –deauth[number of packets] –a [AP’s BSSID] [INTERFACE]
--To de-authenticate all clients in a specific network
> aireplay-ng –deauth[number of packets] –a [AP’s BSSID] –c [target’s BSSID] [INTERFACE]
--To de-authenticate a specific client in a specific network
Creating a Fake AP(honeypot)
Fake Access Point are made usually open to attract more number of people and sniff packets in between.
To accomplish this , we will need two Networks card:
1. NIC1 – One connected to internet (can be wired also)
2. NIC2 – Other to broadcast the AP.
Gaining Access-WEP
03
 WEP is an old encryption , but it is still used in some networks.
 It uses an algorithm called RC4.
Each packet is encrypted at the AP and then is decrypted at the client.
 WEP ensures that each packet has a unique key stream by using a 24-bit
random Initializing Vector (IV) , this IV is contained in text as plain text.
 Now what do you think is the flaw in this encryption?
24-bit is a very short number and in a busy network , we can get 2 packets with same IVs.
Then we can use aircrack-ng to determine the key stream and WEP key using statistical attacks.
Now , there are two cases which would occur:
 Basic Case : Traffic of network is high i.e. large number of packets
are transferred between sender and receiver.
 Idle AP : The network is shallow , there is no exchange of packet
whatsoever. Or no clients are connected to it.
Tackling the Basic Case:
This is a easy one to handle, we can just run airodump-ng to log all the traffic from target network:
> airodump-ng –channel [CH] --bssid [BSSID] –write [filename] [interface]
Ex: airodump-ng –channel 6 –bssid 11:22:33:44:55:66 –write out wlan0mon
At the same time , we shall use the aircrack-ng to try and crack the key using the capture file
> aircrack-ng [filename]
Ex: aircrack-ng out01.cap
The Idle AP case
In this case , we have to inject packets into the traffic in order to force the router to
create new packets with new IVs.
But before we can inject any packet into the traffic, we have to authenticate our Wi-Fi
card with AP as APs’ ignore any request that are not associated with it.
This can be done easily by aireplay-ng:
If the fakeauth is successful , the value under AUTH column will change to “OPN”.
> aireplay-ng --fakeauth 0 –a[target MAC] –h [our MAC] [interface]
Now that we have authenticated with the AP,we can use a method called
• ARP Request Reply
ARP Request Reply
 In this method , after authenticating with target AP, we will wait for an ARP Packet.
 We will capture this packet and inject this packet again into the traffic
 This will force the AP to generate a new packet with new IV.
 This process is repeated until number of IVs captured is sufficient to crack the key.
> aireplay-ng --arpreplay –b [target MAC] –h [our MAC] [interface]
Gaining Access :
WPA(WPS)
04
WPS(Wi-Fi Protected Setup)
 WPS is a feature that allows users to connect to WPS enabled networks , using a WPS push
button or by clicking on WPS functionality.
 Authentication is done using a 8 digit long pin,
 This is relatively a very small number and can be brute forced i.e. can be guessed.
 A tool called reaver can then recover WPA/WPA2 key from the pin.
We are going to use a tool called wash to scan all the WPS enabled network nearby:
> wash –i [interface]
Steps:
As mentioned before reaver tool is used to get WPS PIN and can also find WPA PSK(will
explain in coming slides)
> reaver –b [target BSSID] –c [channel] –i[interface]
Gaining Access-
WPA/WPA2
05
 In WPA,each packets is encrypted with a unique temporary key, this means no. of data
we collect is irrelevant.
THIS IS A PROBLEM !
 Before trying to access a WPA/WPA2 Network ,we essentially need to know how they work.
 When client(Supplicant) establishes a successful connection with an AP(Authenticator), To
encrypt and share keys, a 4-way handshake takes place!
Key Terminologies:
 MSK (Master Session Key): The master session is the first key which is generated either from
802.1X/EAP.
 GTK (Group Temporal Key) : Group temporal key is used to encrypt all broadcast and multicast traffic
between an access point and multiple client devices. GTK is the key which is shared between all client
devices associated with 1 access point. For every access point, there will be a different GTK which will be
shared between its associated devices.
 GMK (Group Master Key) : Group master key is used in a 4-way handshake to create GTK discussed
above. GTK is generated on every access point and shared with the devices connected to this AP.
 PTK(Pairwise Transient Key): Pairwise transit key is used to encrypt all unicast traffic
between a client station and the access point. PTK is unique between a client station
and access point. To generate PTK, client device and access point need the following
information.
PTK = PRF (PMK + Anonce + SNonce + Mac (AA)+ Mac (SA))
 PMK(Pairwise Master Key): Pairwise master is key generated from master session
key (MSK).It is used to generate PTK.
4-WayHandshake
Message-1 Message-2
Message-3
Full -
Conversation
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 information that can help us crack the password is the
handshake packets.
• Every time a client connects to the AP , a 4-way handshake occurs as explained.
• By capturing the handshake , we can use aircrack to launch a word list attack against the
handshake.
Capturing a Handshake
Handshake packets are sent every time a client associates with target AP.
1. Start airodump-ng on target AP
2. Wait for a client to connect to AP. But do we have that much time? I mean
think for a network where no new clients will likely to connect to it for days ,
years in some cases.
Do we know something which can help???
>airodump-ng –channel[CH] –bssid[BSSID] –write[filename] [interface]
> aireplay-ng --deauth [number of packets] –a[AP MAC] –c [target MAC] [interface]
De-auth attack!!
We can de-authenticate a connected client for a short amount of time so that
it will connect back automatically to AP
Creating a wordlist
You can either download a wordlist from the internet(I’ll be sharing links 🧐 )
OR you can create your own wordlist by using a tool called crunch.
> ./crunch [min] [max] [characters = lower|upper|numbers|symbols] –t [pattern] –o [file]
Ex: ./crunch 6 8 123456!”$* -t a@@@@b –o wordlist
Now that we have created the wordlist , only thing left is using aircrack-ng to crack the key.
Aircrack-ng combines the password in wordlist with AP-name (ESSID) to compute the
Pairwise Master Key(PMK) and compare it with handshake .
>aircrack-ng [Handshake file] –w [wordlist]
Ex- aircrack-ng handshake01.cap –w listpass
THANK YOU

More Related Content

What's hot

Message Authentication
Message AuthenticationMessage Authentication
Message Authentication
Ram Dutt Shukla
 
Mitm(man in the middle) ssl proxy attacks
Mitm(man in the middle) ssl proxy attacksMitm(man in the middle) ssl proxy attacks
Mitm(man in the middle) ssl proxy attacks
JaeYeoul Ahn
 
Cracking Wep And Wpa Wireless Networks
Cracking Wep And Wpa Wireless NetworksCracking Wep And Wpa Wireless Networks
Cracking Wep And Wpa Wireless Networksguestf2e41
 
Lecture 3b public key_encryption
Lecture 3b public key_encryptionLecture 3b public key_encryption
Lecture 3b public key_encryption
rajakhurram
 
Information and data security cryptography and network security
Information and data security cryptography and network securityInformation and data security cryptography and network security
Information and data security cryptography and network security
Mazin Alwaaly
 
5. message authentication and hash function
5. message authentication and hash function5. message authentication and hash function
5. message authentication and hash function
Chirag Patel
 
Introduction of dmvpn
Introduction of dmvpnIntroduction of dmvpn
Introduction of dmvpn
E-Lins Technology Co. Ltd.
 
HMAC authentication
HMAC authenticationHMAC authentication
HMAC authentication
Siu Tin
 
Evolving HTTP and making things QUIC
Evolving HTTP and making things QUICEvolving HTTP and making things QUIC
Evolving HTTP and making things QUIC
Natasha Rooney
 
Kipp Berdiansky on Tcp syn flooding and ip spoofing attacks
Kipp Berdiansky on Tcp syn flooding and ip spoofing attacksKipp Berdiansky on Tcp syn flooding and ip spoofing attacks
Kipp Berdiansky on Tcp syn flooding and ip spoofing attacks
Kipp Berdiansky
 
AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...
AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...
AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...
Amazon Web Services
 
Wireless Attacks
Wireless AttacksWireless Attacks
Wireless Attacks
primeteacher32
 
MACs based on Hash Functions, MACs based on Block Ciphers
MACs based on Hash Functions, MACs based on Block CiphersMACs based on Hash Functions, MACs based on Block Ciphers
MACs based on Hash Functions, MACs based on Block Ciphers
Maitree Patel
 
Solving HTTP Problems With Code and Protocols
Solving HTTP Problems With Code and ProtocolsSolving HTTP Problems With Code and Protocols
Solving HTTP Problems With Code and Protocols
Natasha Rooney
 
Ch9
Ch9Ch9
TLS Perf: from three to zero in one spec
TLS Perf:  from three to zero in one specTLS Perf:  from three to zero in one spec
TLS Perf: from three to zero in one spec
Natasha Rooney
 
Distribution of public keys and hmac
Distribution of public keys and hmacDistribution of public keys and hmac
Distribution of public keys and hmac
anuragjagetiya
 
Public Key Encryption & Hash functions
Public Key Encryption & Hash functionsPublic Key Encryption & Hash functions
Public Key Encryption & Hash functions
Dr.Florence Dayana
 

What's hot (20)

Message Authentication
Message AuthenticationMessage Authentication
Message Authentication
 
Mitm(man in the middle) ssl proxy attacks
Mitm(man in the middle) ssl proxy attacksMitm(man in the middle) ssl proxy attacks
Mitm(man in the middle) ssl proxy attacks
 
Mikro tik
Mikro tikMikro tik
Mikro tik
 
Cracking Wep And Wpa Wireless Networks
Cracking Wep And Wpa Wireless NetworksCracking Wep And Wpa Wireless Networks
Cracking Wep And Wpa Wireless Networks
 
Lecture 3b public key_encryption
Lecture 3b public key_encryptionLecture 3b public key_encryption
Lecture 3b public key_encryption
 
Information and data security cryptography and network security
Information and data security cryptography and network securityInformation and data security cryptography and network security
Information and data security cryptography and network security
 
5. message authentication and hash function
5. message authentication and hash function5. message authentication and hash function
5. message authentication and hash function
 
Introduction of dmvpn
Introduction of dmvpnIntroduction of dmvpn
Introduction of dmvpn
 
HMAC authentication
HMAC authenticationHMAC authentication
HMAC authentication
 
Evolving HTTP and making things QUIC
Evolving HTTP and making things QUICEvolving HTTP and making things QUIC
Evolving HTTP and making things QUIC
 
Network Security Lec5
Network Security  Lec5Network Security  Lec5
Network Security Lec5
 
Kipp Berdiansky on Tcp syn flooding and ip spoofing attacks
Kipp Berdiansky on Tcp syn flooding and ip spoofing attacksKipp Berdiansky on Tcp syn flooding and ip spoofing attacks
Kipp Berdiansky on Tcp syn flooding and ip spoofing attacks
 
AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...
AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...
AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...
 
Wireless Attacks
Wireless AttacksWireless Attacks
Wireless Attacks
 
MACs based on Hash Functions, MACs based on Block Ciphers
MACs based on Hash Functions, MACs based on Block CiphersMACs based on Hash Functions, MACs based on Block Ciphers
MACs based on Hash Functions, MACs based on Block Ciphers
 
Solving HTTP Problems With Code and Protocols
Solving HTTP Problems With Code and ProtocolsSolving HTTP Problems With Code and Protocols
Solving HTTP Problems With Code and Protocols
 
Ch9
Ch9Ch9
Ch9
 
TLS Perf: from three to zero in one spec
TLS Perf:  from three to zero in one specTLS Perf:  from three to zero in one spec
TLS Perf: from three to zero in one spec
 
Distribution of public keys and hmac
Distribution of public keys and hmacDistribution of public keys and hmac
Distribution of public keys and hmac
 
Public Key Encryption & Hash functions
Public Key Encryption & Hash functionsPublic Key Encryption & Hash functions
Public Key Encryption & Hash functions
 

Similar to Wifi cracking

Wireless Security null seminar
Wireless Security null seminarWireless Security null seminar
Wireless Security null seminar
Nilesh Sapariya
 
Dos on 802.11 and other security issues ( Case Study )
Dos on 802.11 and other security issues ( Case Study ) Dos on 802.11 and other security issues ( Case Study )
Dos on 802.11 and other security issues ( Case Study )
Shrobon Biswas
 
04-post-connection-attacks.pdf
04-post-connection-attacks.pdf04-post-connection-attacks.pdf
04-post-connection-attacks.pdf
xasako1838
 
Wi-Foo Ninjitsu Exploitation
Wi-Foo Ninjitsu ExploitationWi-Foo Ninjitsu Exploitation
Wi-Foo Ninjitsu Exploitation
Prathan Phongthiproek
 
Exploiting WiFi Security
Exploiting WiFi Security Exploiting WiFi Security
Exploiting WiFi Security
Hariraj Rathod
 
Wi-Fi Security Presentation.pptx
Wi-Fi Security Presentation.pptxWi-Fi Security Presentation.pptx
Wi-Fi Security Presentation.pptx
Mairajuddeen
 
A tutorial showing you how to crack wifi passwords using kali linux!
A tutorial showing you how to crack wifi passwords using kali linux!A tutorial showing you how to crack wifi passwords using kali linux!
A tutorial showing you how to crack wifi passwords using kali linux!
edwardo
 
Fundamentals of network hacking
Fundamentals of network hackingFundamentals of network hacking
Fundamentals of network hacking
Pranshu Pareek
 
Cracking WEP Secured Wireless Networks
Cracking WEP Secured Wireless NetworksCracking WEP Secured Wireless Networks
Cracking WEP Secured Wireless NetworksHammam Samara
 
Workshop on Wireless Security
Workshop on Wireless SecurityWorkshop on Wireless Security
Workshop on Wireless Securityamiable_indian
 
Sheetal - Wirelesss Hacking - ClubHack2008
Sheetal - Wirelesss Hacking - ClubHack2008Sheetal - Wirelesss Hacking - ClubHack2008
Sheetal - Wirelesss Hacking - ClubHack2008ClubHack
 
Aircrack
AircrackAircrack
Aircrack
Nithin Sathees
 
Aircrack
AircrackAircrack
Netcat - 101 Swiss Army Knife
Netcat - 101 Swiss Army KnifeNetcat - 101 Swiss Army Knife
Netcat - 101 Swiss Army Knife
n|u - The Open Security Community
 
Netcat 101 by-mahesh-beema
Netcat 101 by-mahesh-beemaNetcat 101 by-mahesh-beema
Netcat 101 by-mahesh-beemaRaghunath G
 
Wireless lan security(10.8)
Wireless lan security(10.8)Wireless lan security(10.8)
Wireless lan security(10.8)
SubashiniRathinavel
 
Wireless hacking
Wireless hackingWireless hacking
Wireless hacking
arushi bhatnagar
 
Hacking wireless networks
Hacking wireless networksHacking wireless networks
Hacking wireless networks
Sahil Rai
 
4 wifi security
4 wifi security4 wifi security
4 wifi securityal-sari7
 

Similar to Wifi cracking (20)

Wireless Security null seminar
Wireless Security null seminarWireless Security null seminar
Wireless Security null seminar
 
Dos on 802.11 and other security issues ( Case Study )
Dos on 802.11 and other security issues ( Case Study ) Dos on 802.11 and other security issues ( Case Study )
Dos on 802.11 and other security issues ( Case Study )
 
04-post-connection-attacks.pdf
04-post-connection-attacks.pdf04-post-connection-attacks.pdf
04-post-connection-attacks.pdf
 
Wi-Foo Ninjitsu Exploitation
Wi-Foo Ninjitsu ExploitationWi-Foo Ninjitsu Exploitation
Wi-Foo Ninjitsu Exploitation
 
Exploiting WiFi Security
Exploiting WiFi Security Exploiting WiFi Security
Exploiting WiFi Security
 
Wi-Fi Security Presentation.pptx
Wi-Fi Security Presentation.pptxWi-Fi Security Presentation.pptx
Wi-Fi Security Presentation.pptx
 
A tutorial showing you how to crack wifi passwords using kali linux!
A tutorial showing you how to crack wifi passwords using kali linux!A tutorial showing you how to crack wifi passwords using kali linux!
A tutorial showing you how to crack wifi passwords using kali linux!
 
Fundamentals of network hacking
Fundamentals of network hackingFundamentals of network hacking
Fundamentals of network hacking
 
Cracking WEP Secured Wireless Networks
Cracking WEP Secured Wireless NetworksCracking WEP Secured Wireless Networks
Cracking WEP Secured Wireless Networks
 
Workshop on Wireless Security
Workshop on Wireless SecurityWorkshop on Wireless Security
Workshop on Wireless Security
 
Sheetal - Wirelesss Hacking - ClubHack2008
Sheetal - Wirelesss Hacking - ClubHack2008Sheetal - Wirelesss Hacking - ClubHack2008
Sheetal - Wirelesss Hacking - ClubHack2008
 
Hacking Cisco
Hacking CiscoHacking Cisco
Hacking Cisco
 
Aircrack
AircrackAircrack
Aircrack
 
Aircrack
AircrackAircrack
Aircrack
 
Netcat - 101 Swiss Army Knife
Netcat - 101 Swiss Army KnifeNetcat - 101 Swiss Army Knife
Netcat - 101 Swiss Army Knife
 
Netcat 101 by-mahesh-beema
Netcat 101 by-mahesh-beemaNetcat 101 by-mahesh-beema
Netcat 101 by-mahesh-beema
 
Wireless lan security(10.8)
Wireless lan security(10.8)Wireless lan security(10.8)
Wireless lan security(10.8)
 
Wireless hacking
Wireless hackingWireless hacking
Wireless hacking
 
Hacking wireless networks
Hacking wireless networksHacking wireless networks
Hacking wireless networks
 
4 wifi security
4 wifi security4 wifi security
4 wifi security
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 

Wifi cracking

  • 1.
  • 3. TABLE OF CONTENTS Introduction & Basics Deauth Attack and Fake AP 01 02 03 04 05 Gaining Access-WEP Gaining Access – WPA(WPS) Gaining Access- WPA2
  • 5. Network Basics A network is nothing but a number of devices connected together sharing data and resources!  All devices (wired or wireless) achieve this using same principle:  One device acts as a server and server contains data which is shared between connected devices  In most Wi-Fi devices , server is a router and the shared data is the INTERNET!  All devices have a MAC address.  Each Packet has the source MAC address and Destination MAC Address.
  • 7. Wireless Modes There are eight modes that 802.11 wireless cards can operate in: Master (acting as an access point), Managed (client, also known as station), Ad hoc, Repeater, Mesh, Wi-Fi Direct, TDLS and Monitor mode. However we are only going to talk about 2 modes :  Managed Mode : Here our Wi-Fi card acts like a client i.e. Only directed packets are received by our card.  Monitor Mode : Here our Wi-Fi(NIC) card will sniff all the packets near it (whether directed to it or not.)
  • 8. Sniffing using airodump-ng  Airodump-ng is a program that is a part of aircrack-ng package, it's a packet sniffer that allows us to capture all the packets that are in our Wi-Fi card range. We can also scan all Wi-Fi networks around us and gather info about them.  Using Airodump-ng: > airmon-ng start [interface] > airodump-ng [mon_interface]
  • 9.
  • 10. Lets see how we can compact our view to only our target. For instance, I only want to view BMSCE_Hostel > airodump-ng –channel [CH] --bssid [BSSID] –write [filename] [interface]
  • 11. De-auth Attack and Fake AP creation 02
  • 12. De-auth Attack This attack is used to disconnect any device from any network within our range even if network is protected with a key.  Hacker send deauthentication packets to the router pretending to be target machine(by spoofing its MAC address)  At the same time , the hacker send packets to the target machine (pretending to be router) telling it that it needs to re-authenticate itself.  We’ll be using a tool called aireplay-ng. > aireplay-ng –deauth[number of packets] –a [AP’s BSSID] [INTERFACE] --To de-authenticate all clients in a specific network > aireplay-ng –deauth[number of packets] –a [AP’s BSSID] –c [target’s BSSID] [INTERFACE] --To de-authenticate a specific client in a specific network
  • 13.
  • 14. Creating a Fake AP(honeypot) Fake Access Point are made usually open to attract more number of people and sniff packets in between. To accomplish this , we will need two Networks card: 1. NIC1 – One connected to internet (can be wired also) 2. NIC2 – Other to broadcast the AP.
  • 15.
  • 17.  WEP is an old encryption , but it is still used in some networks.  It uses an algorithm called RC4. Each packet is encrypted at the AP and then is decrypted at the client.  WEP ensures that each packet has a unique key stream by using a 24-bit random Initializing Vector (IV) , this IV is contained in text as plain text.  Now what do you think is the flaw in this encryption? 24-bit is a very short number and in a busy network , we can get 2 packets with same IVs. Then we can use aircrack-ng to determine the key stream and WEP key using statistical attacks. Now , there are two cases which would occur:  Basic Case : Traffic of network is high i.e. large number of packets are transferred between sender and receiver.  Idle AP : The network is shallow , there is no exchange of packet whatsoever. Or no clients are connected to it.
  • 18. Tackling the Basic Case: This is a easy one to handle, we can just run airodump-ng to log all the traffic from target network: > airodump-ng –channel [CH] --bssid [BSSID] –write [filename] [interface] Ex: airodump-ng –channel 6 –bssid 11:22:33:44:55:66 –write out wlan0mon At the same time , we shall use the aircrack-ng to try and crack the key using the capture file > aircrack-ng [filename] Ex: aircrack-ng out01.cap
  • 19.
  • 20. The Idle AP case In this case , we have to inject packets into the traffic in order to force the router to create new packets with new IVs. But before we can inject any packet into the traffic, we have to authenticate our Wi-Fi card with AP as APs’ ignore any request that are not associated with it. This can be done easily by aireplay-ng: If the fakeauth is successful , the value under AUTH column will change to “OPN”. > aireplay-ng --fakeauth 0 –a[target MAC] –h [our MAC] [interface]
  • 21. Now that we have authenticated with the AP,we can use a method called • ARP Request Reply
  • 22. ARP Request Reply  In this method , after authenticating with target AP, we will wait for an ARP Packet.  We will capture this packet and inject this packet again into the traffic  This will force the AP to generate a new packet with new IV.  This process is repeated until number of IVs captured is sufficient to crack the key. > aireplay-ng --arpreplay –b [target MAC] –h [our MAC] [interface]
  • 23.
  • 24.
  • 25.
  • 27. WPS(Wi-Fi Protected Setup)  WPS is a feature that allows users to connect to WPS enabled networks , using a WPS push button or by clicking on WPS functionality.  Authentication is done using a 8 digit long pin,  This is relatively a very small number and can be brute forced i.e. can be guessed.  A tool called reaver can then recover WPA/WPA2 key from the pin.
  • 28. We are going to use a tool called wash to scan all the WPS enabled network nearby: > wash –i [interface] Steps:
  • 29. As mentioned before reaver tool is used to get WPS PIN and can also find WPA PSK(will explain in coming slides) > reaver –b [target BSSID] –c [channel] –i[interface]
  • 31.  In WPA,each packets is encrypted with a unique temporary key, this means no. of data we collect is irrelevant. THIS IS A PROBLEM !  Before trying to access a WPA/WPA2 Network ,we essentially need to know how they work.  When client(Supplicant) establishes a successful connection with an AP(Authenticator), To encrypt and share keys, a 4-way handshake takes place!
  • 32. Key Terminologies:  MSK (Master Session Key): The master session is the first key which is generated either from 802.1X/EAP.  GTK (Group Temporal Key) : Group temporal key is used to encrypt all broadcast and multicast traffic between an access point and multiple client devices. GTK is the key which is shared between all client devices associated with 1 access point. For every access point, there will be a different GTK which will be shared between its associated devices.  GMK (Group Master Key) : Group master key is used in a 4-way handshake to create GTK discussed above. GTK is generated on every access point and shared with the devices connected to this AP.
  • 33.  PTK(Pairwise Transient Key): Pairwise transit key is used to encrypt all unicast traffic between a client station and the access point. PTK is unique between a client station and access point. To generate PTK, client device and access point need the following information. PTK = PRF (PMK + Anonce + SNonce + Mac (AA)+ Mac (SA))  PMK(Pairwise Master Key): Pairwise master is key generated from master session key (MSK).It is used to generate PTK.
  • 38. 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 information that can help us crack the password is the handshake packets. • Every time a client connects to the AP , a 4-way handshake occurs as explained. • By capturing the handshake , we can use aircrack to launch a word list attack against the handshake.
  • 39. Capturing a Handshake Handshake packets are sent every time a client associates with target AP. 1. Start airodump-ng on target AP 2. Wait for a client to connect to AP. But do we have that much time? I mean think for a network where no new clients will likely to connect to it for days , years in some cases. Do we know something which can help??? >airodump-ng –channel[CH] –bssid[BSSID] –write[filename] [interface] > aireplay-ng --deauth [number of packets] –a[AP MAC] –c [target MAC] [interface] De-auth attack!! We can de-authenticate a connected client for a short amount of time so that it will connect back automatically to AP
  • 40.
  • 41.
  • 42. Creating a wordlist You can either download a wordlist from the internet(I’ll be sharing links 🧐 ) OR you can create your own wordlist by using a tool called crunch. > ./crunch [min] [max] [characters = lower|upper|numbers|symbols] –t [pattern] –o [file] Ex: ./crunch 6 8 123456!”$* -t a@@@@b –o wordlist
  • 43. Now that we have created the wordlist , only thing left is using aircrack-ng to crack the key. Aircrack-ng combines the password in wordlist with AP-name (ESSID) to compute the Pairwise Master Key(PMK) and compare it with handshake . >aircrack-ng [Handshake file] –w [wordlist] Ex- aircrack-ng handshake01.cap –w listpass
  • 44.

Editor's Notes

  1. IPTABLES ARE FIREWALLS IN LINUX which may prevent us to create internet route or forward packet to our system(hacker)!
  2. wlan0mon – interface in monitor mode
  3. 0 means only one fakeauth packet.
  4. ARP packets are the one which translates IP address to MAC address
  5. The password used here is weak but if there is a strong combination time elapsed for brute-forcing would be more.
  6. WPA and WPA2 works on same handshake principle except that WPA2 uses CBC-AES encryption while WPA uses RC4 algorithm for encryption.
  7. EAPOL - Extensible authentication protocol over LAN