Yarilo v0.9.9
WPA2 Decrypter & Packet Analyzer
Loading...
Searching...
No Matches
yarilo::AccessPoint Class Reference

Access Point in a basic service set (BSS) network. More...

#include <access_point.h>

Classes

struct  client_info
 Client information. More...
 
struct  client_security
 Connection security info of a specific client. More...
 
struct  wifi_standard_info
 WiFi standard capabilities for the network. More...
 

Public Types

enum class  NetworkSecurity {
  OPEN , WEP , WPA , WPA2_Personal ,
  WPA2_Enterprise , WPA3_Personal , WPA3_Enterprise
}
 Network security protocol used. A network can support multiple ways to connect and secure data. More...
 
enum class  DecryptionState { DECRYPTED , NOT_ENOUGH_DATA , INCORRECT_PASSWORD , ALREADY_DECRYPTED }
 Current state of decryption. More...
 
enum class  WiFiStandard {
  Dot11A , Dot11B , Dot11G , Dot11N ,
  Dot11AC , Dot11AX
}
 
enum class  Modulation {
  CCK , BPSK , QPSK , QAM16 ,
  QAM64 , QAM256 , QAM1024
}
 
enum class  ChannelWidth {
  CHAN20 , CHAN40 , CHAN80 , CHAN80_80 ,
  CHAN160
}
 

Public Member Functions

 AccessPoint (const MACAddress &bssid, const SSID &ssid, int wifi_channel, Database &db)
 
bool handle_pkt (Tins::Packet *pkt)
 
DecryptionState add_password (const std::string &psk)
 
SSID get_ssid () const
 
MACAddress get_bssid () const
 
int get_wifi_channel () const
 
std::vector< wifi_standard_infostandards_supported () const
 
std::shared_ptr< PacketChannelget_decrypted_channel ()
 
void close_all_channels ()
 
bool send_deauth (const Tins::NetworkInterface &iface, const MACAddress &addr)
 
bool has_working_password () const
 
std::vector< NetworkSecuritysecurity_supported () const
 
bool unicast_decryption_supported () const
 
bool group_decryption_supported () const
 
bool client_decryption_supported (const MACAddress &client)
 
bool protected_management_supported () const
 
bool protected_management_required () const
 
bool protected_management (const MACAddress &client)
 
WPA2Decrypterget_decrypter ()
 
const std::set< MACAddressget_clients ()
 
const std::optional< client_infoget_client (MACAddress addr)
 
const std::optional< client_securityget_client_security (MACAddress addr)
 
uint32_t raw_packet_count () const
 
uint32_t decrypted_packet_count () const
 
std::optional< Recording::infosave_traffic (const std::filesystem::path &save_path, const std::string &name)
 
std::optional< Recording::infosave_decrypted_traffic (const std::filesystem::path &save_path, const std::string &name)
 
void set_vendor ()
 
std::string get_vendor () const
 
std::string get_oid () const
 
std::string supported_security_text () const
 

Detailed Description

Access Point in a basic service set (BSS) network.

Member Enumeration Documentation

◆ ChannelWidth

Enumerator
CHAN20 
CHAN40 
CHAN80 
CHAN80_80 
CHAN160 

◆ DecryptionState

Current state of decryption.

Enumerator
DECRYPTED 
NOT_ENOUGH_DATA 
INCORRECT_PASSWORD 
ALREADY_DECRYPTED 

◆ Modulation

Enumerator
CCK 
BPSK 
QPSK 
QAM16 
QAM64 
QAM256 
QAM1024 

◆ NetworkSecurity

Network security protocol used. A network can support multiple ways to connect and secure data.

Enumerator
OPEN 
WEP 
WPA 
WPA2_Personal 
WPA2_Enterprise 
WPA3_Personal 
WPA3_Enterprise 

◆ WiFiStandard

Enumerator
Dot11A 
Dot11B 
Dot11G 
Dot11N 
Dot11AC 
Dot11AX 

Constructor & Destructor Documentation

◆ AccessPoint()

yarilo::AccessPoint::AccessPoint ( const MACAddress & bssid,
const SSID & ssid,
int wifi_channel,
Database & db )

A constructor which creates the access point based on AP data

Parameters
[in]bssidhwaddr of the network
[in]ssidname of the network
[in]wifi_channelwifi channel for this network

Member Function Documentation

◆ add_password()

DecryptionState yarilo::AccessPoint::add_password ( const std::string & psk)

A method for adding the wifi password key. Decryption of packets requires a 4-way handshake. If the password is present, the user packets will be decrypted using this key.

Parameters
[in]psknetwork key
Returns
State of decryption after the password is applied

◆ client_decryption_supported()

bool yarilo::AccessPoint::client_decryption_supported ( const MACAddress & client)

Get if this client has unicast decryption support

Returns
True if the client supports being decrypted

◆ close_all_channels()

void yarilo::AccessPoint::close_all_channels ( )

Close all channels

◆ decrypted_packet_count()

uint32_t yarilo::AccessPoint::decrypted_packet_count ( ) const

Decrypted packets data count

Returns
count of decrypted data packets in the queue

◆ get_bssid()

MACAddress yarilo::AccessPoint::get_bssid ( ) const

Get this networks BSSID (MAC of the station)

Returns
the BSSID of the network

◆ get_client()

const std::optional< client_info > yarilo::AccessPoint::get_client ( MACAddress addr)
inline

Get info about a client

Returns
Optionally return the information about a client

◆ get_client_security()

const std::optional< client_security > yarilo::AccessPoint::get_client_security ( MACAddress addr)
inline

Get a client's security details

Returns
Optionally return the security information about a client

◆ get_clients()

const std::set< MACAddress > yarilo::AccessPoint::get_clients ( )
inline

Get the available users information

Returns
The map of available clients of the access point

◆ get_decrypted_channel()

std::shared_ptr< PacketChannel > yarilo::AccessPoint::get_decrypted_channel ( )

Get the converted data channel for this network

◆ get_decrypter()

WPA2Decrypter & yarilo::AccessPoint::get_decrypter ( )

Get the decrypter

Returns
The WPA2 decrypter

◆ get_oid()

std::string yarilo::AccessPoint::get_oid ( ) const

Get the OID of the access point

Returns
The OID of the access point

◆ get_ssid()

SSID yarilo::AccessPoint::get_ssid ( ) const

Get this networks SSID

Returns
the ssid of the network

◆ get_vendor()

std::string yarilo::AccessPoint::get_vendor ( ) const

Get the vendor of the access point

Returns
The vendor of the access point

◆ get_wifi_channel()

int yarilo::AccessPoint::get_wifi_channel ( ) const

Get this networks wifi channel

Returns
the wifi channel of the network

◆ group_decryption_supported()

bool yarilo::AccessPoint::group_decryption_supported ( ) const

Get if the network has group decryption support

Returns
True if the network supports being decrypted

◆ handle_pkt()

bool yarilo::AccessPoint::handle_pkt ( Tins::Packet * pkt)

A method for handling incoming packets inside this network, if you don't know if the packet belongs to this network check the bssid

Parameters
[in]pktA reference to the packet

◆ has_working_password()

bool yarilo::AccessPoint::has_working_password ( ) const

Get if the network already has a working psk (one that generated a valid keypair)

Returns
True if one psk already works

◆ protected_management()

bool yarilo::AccessPoint::protected_management ( const MACAddress & client)

◆ protected_management_required()

bool yarilo::AccessPoint::protected_management_required ( ) const

◆ protected_management_supported()

bool yarilo::AccessPoint::protected_management_supported ( ) const

◆ raw_packet_count()

uint32_t yarilo::AccessPoint::raw_packet_count ( ) const

Unencrypted packets count

Returns
count of raw data packets in the queue

◆ save_decrypted_traffic()

std::optional< recording_info > yarilo::AccessPoint::save_decrypted_traffic ( const std::filesystem::path & save_path,
const std::string & name )

Save decrypted traffic

Parameters
[in]directoryin which the recording should live
[in]nameuser-defined filename
Returns
An optional containing some info about the recording.

◆ save_traffic()

std::optional< recording_info > yarilo::AccessPoint::save_traffic ( const std::filesystem::path & save_path,
const std::string & name )

Save all traffic (in 802.11 data link)

Parameters
[in]directoryin which the recording should live
[in]nameuser-defined filename
[in]rawwhether to safe raw traffic
Returns
An optional containing some info about the recording.

◆ security_supported()

std::vector< NetworkSecurity > yarilo::AccessPoint::security_supported ( ) const

Get supported security modes (e.g. WPA2-PSK)

Returns
List of supported security modes

◆ send_deauth()

bool yarilo::AccessPoint::send_deauth ( const Tins::NetworkInterface & iface,
const MACAddress & addr )

Send a deauthentication request via a sender to an addr to kick it off this network

Parameters
[in]ifacenetwork interface to use
[in]addrhardware address of the target device
Returns
True if the packet was sent, False if 802.11w usage was detected on this client

◆ set_vendor()

void yarilo::AccessPoint::set_vendor ( )

Set the vendor of the access point based on the OID.txt file

◆ standards_supported()

std::vector< wifi_standard_info > yarilo::AccessPoint::standards_supported ( ) const

Get standard capabilities

Returns
Available standards and their possible settings

◆ supported_security_text()

std::string yarilo::AccessPoint::supported_security_text ( ) const

◆ unicast_decryption_supported()

bool yarilo::AccessPoint::unicast_decryption_supported ( ) const

Get if the network has unicast decryption support

Returns
True if the network supports being decrypted

The documentation for this class was generated from the following files: