chore(i18n): finish translating code comments and scripts to English
CI / Format and clippy (push) Successful in 1m13s
CI / Dependency audit (push) Successful in 13s
CI / Tests (Linux) (push) Successful in 1m35s
Release / Create release (push) Successful in 7s
CI / Check desktop app (Linux) (push) Successful in 3m19s
Release / CLI (linux-aarch64) (push) Successful in 1m3s
Release / CLI (linux-x86_64) (push) Successful in 1m28s
Release / Desktop app (linux-aarch64) (push) Successful in 7m16s
Release / Desktop app (linux-x86_64) (push) Successful in 10m17s
Release / Desktop app (windows) (push) Successful in 4m54s
CI / Format and clippy (push) Successful in 1m13s
CI / Dependency audit (push) Successful in 13s
CI / Tests (Linux) (push) Successful in 1m35s
Release / Create release (push) Successful in 7s
CI / Check desktop app (Linux) (push) Successful in 3m19s
Release / CLI (linux-aarch64) (push) Successful in 1m3s
Release / CLI (linux-x86_64) (push) Successful in 1m28s
Release / Desktop app (linux-aarch64) (push) Successful in 7m16s
Release / Desktop app (linux-x86_64) (push) Successful in 10m17s
Release / Desktop app (windows) (push) Successful in 4m54s
Completes the English-only standardization for code, comments, scripts and CI templates (UI/CLI-facing strings stay bilingual pt-BR/en, untouched). Covers the remaining crates/, apps/gui/ui/ and apps/gui/src-tauri/ comments, .gitea/ workflow and template comments, .githooks/ hooks, and the scripts/ source comments for the files already renamed in a prior commit (check.sh, generate-logo.py, install-hooks.sh). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VAyr8d7HuAdUGB6aA5xmDD
This commit is contained in:
1 parent
bf059fd0bc
commit
55e19a8e5b
59 files changed
+935
-879
No files matched your search
@@ -1,6 +1,6 @@
|
||||
//! Integração: beacon + probe + handshake completo passando pelo caminho
|
||||
//! público de agregação (`ScanTable`), verificando que AP, cliente e
|
||||
//! handshake são detectados de ponta a ponta.
|
||||
//! End-to-end integration test: ingests beacon, probe, and 4-way handshake
|
||||
//! frames into `ScanTable` and verifies AP, client, handshake, and live CCMP
|
||||
//! data frame decryption.
|
||||
|
||||
mod common;
|
||||
|
||||
@@ -10,7 +10,7 @@ use sabia_core::scan::ScanTable;
|
||||
fn detects_ap_client_and_handshake_end_to_end() {
|
||||
let mut table = ScanTable::new();
|
||||
|
||||
// RSN com AKM PSK (2) para que a rede apareça como WPA2-PSK.
|
||||
// Include an RSN IE with PSK AKM (2) so the AP is classified as WPA2-PSK.
|
||||
let beacon = common::beacon_frame(common::ap(), "RedeTeste", 6, &[2]);
|
||||
table.ingest(&common::radiotap_wrap(&beacon, 2437, -35));
|
||||
|
||||
@@ -58,7 +58,7 @@ fn detects_ap_client_and_handshake_end_to_end() {
|
||||
fn hidden_ssid_beacon_is_marked_hidden() {
|
||||
let mut table = ScanTable::new();
|
||||
|
||||
// SSID vazio = rede oculta.
|
||||
// Empty 0-length SSID IE = hidden network.
|
||||
let beacon = common::beacon_frame(common::ap(), "", 11, &[2]);
|
||||
table.ingest(&common::radiotap_wrap(&beacon, 2462, -60));
|
||||
|
||||
@@ -67,11 +67,11 @@ fn hidden_ssid_beacon_is_marked_hidden() {
|
||||
assert!(aps[0].hidden);
|
||||
}
|
||||
|
||||
/// Depois que a senha de uma rede WPA2/CCMP é conhecida (quebrada), o
|
||||
/// tráfego de dados do cliente cujo handshake foi capturado passa a ser
|
||||
/// decifrado em tempo real pelo pipeline de ingestão — e a identidade
|
||||
/// (aqui, o IP de origem, que exercita o parser de IPv4 por trás do LLC)
|
||||
/// aparece mesmo com o bit "Protected" ligado.
|
||||
/// Once a WPA2/CCMP handshake has been cracked, subsequent protected QoS Data
|
||||
/// frames from that station are decrypted on the fly using its derived TK to
|
||||
/// populate client identity fields (such as its IPv4 address).
|
||||
///
|
||||
///
|
||||
#[test]
|
||||
fn decrypts_ccmp_traffic_once_password_is_known_and_fills_client_identity() {
|
||||
use sabia_core::crack::{compute_ptk, derive_pmk};
|
||||
@@ -91,8 +91,8 @@ fn decrypts_ccmp_traffic_once_password_is_known_and_fills_client_identity() {
|
||||
let station_str = sabia_core::dot11::mac_to_string(&common::sta());
|
||||
table.set_password(&bssid_str, &station_str, password);
|
||||
|
||||
// A TK derivada pelo pipeline tem que bater com a calculada à parte, com
|
||||
// os mesmos nonces fixos (0xaa/0xbb) que handshake_radiotap_frames usa.
|
||||
// The pipeline-derived TK must match the TK computed directly from the same nonces.
|
||||
//
|
||||
let anonce = [0xaa; 32];
|
||||
let snonce = [0xbb; 32];
|
||||
let pmk = derive_pmk(password, ssid);
|
||||
@@ -107,16 +107,16 @@ fn decrypts_ccmp_traffic_once_password_is_known_and_fills_client_identity() {
|
||||
"TK deveria ser derivada ao quebrar a senha"
|
||||
);
|
||||
|
||||
// Monta um quadro QoS Data, STA->AP, protegido, com CCMP header (PN=1,
|
||||
// ExtIV ligado) e cifra um payload LLC/SNAP+IPv4 "na mão" — o CTR do
|
||||
// CCMP é simétrico, então usar decrypt_data pra cifrar é válido aqui.
|
||||
// Build a protected STA->AP QoS Data frame (CCMP PN=1, ExtIV=1) carrying an
|
||||
// encrypted LLC/SNAP + IPv4 packet.
|
||||
//
|
||||
let llc_ipv4 = {
|
||||
let mut v = vec![0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00];
|
||||
let mut ip = vec![
|
||||
0x45, 0x00, 0x00, 20, 0x00, 0x00, 0x00, 0x00, 64, 17, 0x00, 0x00,
|
||||
];
|
||||
ip.extend_from_slice(&[192, 168, 1, 50]); // origem privada
|
||||
ip.extend_from_slice(&[192, 168, 1, 1]); // destino
|
||||
ip.extend_from_slice(&[192, 168, 1, 50]); // private source IPv4
|
||||
ip.extend_from_slice(&[192, 168, 1, 1]); // destination IPv4
|
||||
v.extend_from_slice(&ip);
|
||||
v
|
||||
};
|
||||
@@ -124,22 +124,22 @@ fn decrypts_ccmp_traffic_once_password_is_known_and_fills_client_identity() {
|
||||
let mut to_cipher = Vec::new();
|
||||
to_cipher.extend_from_slice(&ccmp_header);
|
||||
to_cipher.extend_from_slice(&llc_ipv4);
|
||||
to_cipher.extend_from_slice(&[0u8; 8]); // placeholder pro MIC, ignorado
|
||||
to_cipher.extend_from_slice(&[0u8; 8]); // 8-byte MIC placeholder
|
||||
let ciphertext = sabia_core::ccmp::decrypt_data(&expected_tk, &common::sta(), 0, &to_cipher)
|
||||
.expect("cifra via CTR simétrico");
|
||||
|
||||
let mut body = Vec::new();
|
||||
body.extend_from_slice(&ccmp_header);
|
||||
body.extend_from_slice(&ciphertext);
|
||||
body.extend_from_slice(&[0u8; 8]); // MIC cifrado — não conferido na decriptação
|
||||
body.extend_from_slice(&[0u8; 8]); // trailing 8-byte MIC
|
||||
|
||||
let mut frame = Vec::new();
|
||||
let fc: u16 = 0x0088 | 0x0100 | 0x4000; // QoS Data, to_ds, protected
|
||||
frame.extend_from_slice(&fc.to_le_bytes());
|
||||
frame.extend_from_slice(&0u16.to_le_bytes()); // duration
|
||||
frame.extend_from_slice(&common::ap()); // addr1 = BSSID
|
||||
frame.extend_from_slice(&common::sta()); // addr2 = transmissor (estação)
|
||||
frame.extend_from_slice(&common::ap()); // addr3 = destino (irrelevante aqui)
|
||||
frame.extend_from_slice(&common::sta()); // addr2 = transmitter (station)
|
||||
frame.extend_from_slice(&common::ap()); // addr3 = destination
|
||||
frame.extend_from_slice(&[0u8; 2]); // sequence control
|
||||
frame.extend_from_slice(&[0u8; 2]); // QoS control, TID 0
|
||||
frame.extend_from_slice(&body);
|
||||
@@ -163,11 +163,11 @@ fn decrypts_ccmp_traffic_once_password_is_known_and_fills_client_identity() {
|
||||
fn pmkid_only_handshake_is_detected_and_crackable() {
|
||||
let mut table = ScanTable::new();
|
||||
|
||||
// Beacon com SSID visível, para que o handshake herde o SSID via hint.
|
||||
// Beacon with visible SSID so the PMKID handshake inherits the SSID hint.
|
||||
let beacon = common::beacon_frame(common::ap(), "RedePmkid", 11, &[2]);
|
||||
table.ingest_at(&common::radiotap_wrap(&beacon, 2462, -60), 1);
|
||||
|
||||
// Handshake via PMKID (só msg1, sem msg2/snonce).
|
||||
// PMKID-only handshake (message 1 with PMKID KDE, no message 2).
|
||||
let (m1, _m2) = common::handshake_frames("RedePmkid", "outra-senha", 2, true);
|
||||
let f1 = common::frame_with_eapol(true, common::ap(), common::sta(), common::sta(), &m1);
|
||||
let ev = table.ingest_at(&common::radiotap_wrap(&f1, 2462, -55), 20);
|
||||
|
||||
Reference in new issue
Block a user