Skip to content

Commit

Permalink
aarch64-gnu + CSA sequence increment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragnt committed Aug 16, 2024
1 parent 4df32a0 commit 79e332b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ jobs:
bin: angryoxide
name: angryoxide-linux-armv7hf-musl.tar.gz

- os_name: Linux-aarch64-gnu
os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
bin: angryoxide
name: angryoxide-linux-aarch64-gnu.tar.gz

toolchain:
- stable

Expand All @@ -75,7 +81,18 @@ jobs:
mkdir -p "$TARGET"
./bootstrap/bootstrap-ubi.sh
"$HOME/bin/ubi" --project cross-rs/cross --matching musl --in .
if: matrix.platform.cross
if: matrix.platform.cross && !contains(matrix.platform.target, 'gnu')

- name: Install cross (gnu)
id: cross-nix-gnu
shell: bash
run: |
set -e
export TARGET="$HOME/bin"
mkdir -p "$TARGET"
./bootstrap/bootstrap-ubi.sh
"$HOME/bin/ubi" --project cross-rs/cross --matching musl --in .
if: matrix.platform.cross && contains(matrix.platform.target, 'gnu')

- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
members = ["libs/libwifi", "libs/libwifi_macros", "libs/pcap-file"]

[workspace.package]
version = "0.8.27"
version = "0.8.28"
authors = ["Ryan Butler"]
description = "80211 Attack Tool"
license = "GPL"
Expand Down
3 changes: 2 additions & 1 deletion src/attack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ pub fn csa_attack(oxide: &mut OxideRuntime, beacon: Beacon) -> Result<(), String
if !oxide.config.notx {
// Send 5 beacons with decreasing counts
for count in (0..6).rev() {
let frx = build_csa_beacon(beacon.clone(), new_channel.into(), count);
let sequence = beacon.header.sequence_control.sequence_number + (6 - count as u16);
let frx = build_csa_beacon(beacon.clone(), new_channel.into(), count, sequence);
let _ = write_packet(oxide.raw_sockets.tx_socket.as_raw_fd(), &frx);
oxide.status_log.add_message(StatusMessage::new(
MessageType::Info,
Expand Down
5 changes: 2 additions & 3 deletions src/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -722,12 +722,11 @@ pub fn build_probe_response(
rth
}

pub fn build_csa_beacon(beacon: Beacon, new_channel: u32, count: u8) -> Vec<u8> {
pub fn build_csa_beacon(beacon: Beacon, new_channel: u32, count: u8, sequence: u16) -> Vec<u8> {
let mut rth: Vec<u8> = RTH_NO_ACK.to_vec();

let mut frx = beacon.clone();
frx.header.sequence_control.sequence_number =
beacon.header.sequence_control.sequence_number + 1;
frx.header.sequence_control.sequence_number = sequence;
frx.station_info
.data
.push((37u8, vec![0u8, new_channel.try_into().unwrap(), count]));
Expand Down

0 comments on commit 79e332b

Please sign in to comment.