Projects STRLCPY wifi_db Commits ab5ad620
🤬
  • ■ ■ ■ ■ ■
    README.md
    1 1  # wifi_db
    2 2  Script to parse Aircrack-ng captures into a SQLite database, get handshakes (in 22000 hashcat format) and extract MGT identities.
    3 3  
     4 +```
     5 + _ __ _ _ _
     6 +__ __(_) / _|(_) __| || |__
     7 +\ \ /\ / /| || |_ | | / _` || '_ \
     8 + \ V V / | || _|| | | (_| || |_) |
     9 + \_/\_/ |_||_| |_| _____ \__,_||_.__/
     10 + |_____|
     11 + by r4ulcl
     12 +```
     13 +
    4 14  ## Install
    5 15  
    6 16  ### From [DockerHub](https://hub.docker.com/r/r4ulcl/wifi_db) (RECOMMENDED)
    skipped 60 lines
    67 77  ```
    68 78  
    69 79  
     80 +
    70 81  ## Usage
    71 82  
    72 83  ### Scan with airodump-ng
    skipped 60 lines
    133 144  
    134 145  TODO
    135 146  
     147 +## Database
     148 +
     149 +wifi_db contains several tables to store information related to wireless network traffic captured by airodump-ng. The tables are as follows:
     150 +
     151 +
     152 +- `AP`: This table stores information about the access points (APs) detected during the captures, including their MAC address (`bssid`), network name (`ssid`), whether the network is cloaked (`cloaked`), manufacturer (`manuf`), channel (`channel`), frequency (`frequency`), carrier (`carrier`), encryption type (`encryption`), and total packets received from this AP (`packetsTotal`). The table uses the MAC address as a primary key.
     153 +
     154 +- `Client`: This table stores information about the wireless clients detected during the captures, including their MAC address (`mac`), network name (`ssid`), manufacturer (`manuf`), device type (`type`), and total packets received from this client (`packetsTotal`). The table uses the MAC address as a primary key.
     155 +
     156 +- `SeenClient`: This table stores information about the clients seen during the captures, including their MAC address (`mac`), time of detection (`time`), tool used to capture the data (`tool`), signal strength (`signal_rssi`), latitude (`lat`), longitude (`lon`), altitude (`alt`). The table uses the combination of MAC address and detection time as a primary key, and has a foreign key relationship with the `Client` table.
     157 +
     158 +- `Connected`: This table stores information about the wireless clients that are connected to an access point, including the MAC address of the access point (`bssid`) and the client (`mac`). The table uses a combination of access point and client MAC addresses as a primary key, and has foreign key relationships with both the `AP` and `Client` tables.
     159 +
     160 +- `WPS`: This table stores information about access points that have Wi-Fi Protected Setup (WPS) enabled, including their MAC address (`bssid`), network name (`wlan_ssid`), WPS version (`wps_version`), device name (`wps_device_name`), model name (`wps_model_name`), model number (`wps_model_number`), configuration methods (`wps_config_methods`), and keypad configuration methods (`wps_config_methods_keypad`). The table uses the MAC address as a primary key, and has a foreign key relationship with the `AP` table.
     161 +
     162 +- `SeenAp`: This table stores information about the access points seen during the captures, including their MAC address (`bssid`), time of detection (`time`), tool used to capture the data (`tool`), signal strength (`signal_rssi`), latitude (`lat`), longitude (`lon`), altitude (`alt`), and timestamp (`bsstimestamp`). The table uses the combination of access point MAC address and detection time as a primary key, and has a foreign key relationship with the `AP` table.
     163 +
     164 +- `Probe`: This table stores information about the probes sent by clients, including the client MAC address (`mac`), network name (`ssid`), and time of probe (`time`). The table uses a combination of client MAC address and network name as a primary key, and has a foreign key relationship with the `Client` table.
     165 +
     166 +- `Handshake`: This table stores information about the handshakes captured during the captures, including the MAC address of the access point (`bssid`), the client (`mac`), the file name (`file`), and the hashcat format (`hashcat`). The table uses a combination of access point and client MAC addresses, and file name as a primary key, and has foreign key relationships with both the `AP` and `Client` tables.
     167 +
     168 +- `Identity`: This table represents EAP (Extensible Authentication Protocol) identities and methods used in wireless authentication. The `bssid` and `mac` fields are foreign keys that reference the `AP` and `Client` tables, respectively. Other fields include the identity and method used in the authentication process.
     169 +
     170 +
    136 171  ## Views
    137 172  
    138  -- ProbeClients: It shows the complete information of the users with their probes
     173 +- `ProbeClients`: This view selects the MAC address of the probe, the manufacturer and type of the client device, the total number of packets transmitted by the client, and the SSID of the probe. It joins the `Probe` and `Client` tables on the MAC address and orders the results by SSID.
    139 174  
    140  -- ConnectedAP: It shows the information of the clients connected to the APs. With this view you can easily filter by scope and check connected clients.
     175 +- `ConnectedAP`: This view selects the BSSID of the connected access point, the SSID of the access point, the MAC address of the connected client device, and the manufacturer of the client device. It joins the `Connected`, `AP`, and `Client` tables on the BSSID and MAC address, respectively, and orders the results by BSSID.
    141 176  
    142  -- ProbeClientsConnected: Displays the list of poor users connected to WiFi networks. This is useful to check the problems of users connecting to networks in the scope.
     177 +- `ProbeClientsConnected`: This view selects the BSSID and SSID of the connected access point, the MAC address of the probe, the manufacturer and type of the client device, the total number of packets transmitted by the client, and the SSID of the probe. It joins the `Probe`, `Client`, and `ConnectedAP` tables on the MAC address of the probe, and filters the results to exclude probes that are connected to the same SSID that they are probing. The results are ordered by the SSID of the probe.
    143 178  
    144  -- HandshakeAP: Show the APs, client file and hashcat hash for each handshake in the Handshake table
     179 +- `HandshakeAP`: This view selects the BSSID of the access point, the SSID of the access point, the MAC address of the client device that performed the handshake, the manufacturer of the client device, the file containing the handshake, and the hashcat output. It joins the `Handshake`, `AP`, and `Client` tables on the BSSID and MAC address, respectively, and orders the results by BSSID.
    145 180  
    146  -- IdentityAP: Show the APs, client and Identity for each identity its table
     181 +- `HandshakeAPUnique`: This view selects the BSSID of the access point, the SSID of the access point, the MAC address of the client device that performed the handshake, the manufacturer of the client device, the file containing the handshake, and the hashcat output. It joins the `Handshake`, `AP`, and `Client` tables on the BSSID and MAC address, respectively, and filters the results to exclude handshakes that were not cracked by hashcat. The results are grouped by SSID and ordered by BSSID.
     182 +
     183 +- `IdentityAP`: This view selects the BSSID of the access point, the SSID of the access point, the MAC address of the client device that performed the identity request, the manufacturer of the client device, the identity string, and the method used for the identity request. It joins the `Identity`, `AP`, and `Client` tables on the BSSID and MAC address, respectively, and orders the results by BSSID.
     184 +
     185 +- `SummaryAP`: This view selects the SSID, the count of access points broadcasting the SSID, the encryption type, the manufacturer of the access point, and whether the SSID is cloaked. It groups the results by SSID and orders them by the count of access points in descending order.
    147 186  
    148 187  ## TODO
    149 188  
    skipped 44 lines
  • ■ ■ ■ ■ ■ ■
    wifi_db.py
    skipped 14 lines
    15 15  # import nest_asyncio ; nest_asyncio.apply() ->
    16 16  # Fix RuntimeError: This event loop is already running”
    17 17   
     18 +def banner():
     19 + print('''
     20 + _ __ _ _ _
     21 +__ __(_) / _|(_) __| || |__
     22 +\ \ /\ / /| || |_ | | / _` || '_ \
     23 + \ V V / | || _|| | | (_| || |_) |
     24 + \_/\_/ |_||_| |_| _____ \__,_||_.__/
     25 + |_____|
     26 + by r4ulcl
     27 +''')
    18 28   
    19 29   
    20 30  def main():
    skipped 179 lines
    200 210   
    201 211   
    202 212  if __name__ == "__main__":
     213 + banner()
    203 214   main()
    204 215   
Please wait...
Page is in error, reload to recover