Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncated L2CAP attack misalignment between script and paper #30

Open
mantegna10 opened this issue Feb 7, 2023 · 2 comments
Open

Truncated L2CAP attack misalignment between script and paper #30

mantegna10 opened this issue Feb 7, 2023 · 2 comments

Comments

@mantegna10
Copy link

According to the White Paper:

If the total length of the packet (i.e. LL Length) has
a value lower than L2CAP Length + 4 for a valid payload,
then the truncated bytes are copied beyond the underlying
reception buffer.

In the example (fig. 6 of the white paper) the L2CAP Length is set to 3, while LL Length is 5 (5 < 3+4) and the L2CAP reception buffer is overflown by two bytes (i.e. L2CAP Length+4−LL Length)

Trying to execute:
DA14580_exploit_att_crash.py
at line 139, the bytes to send are set to:
length_req = BTLE('7083329a02070000040010edea874aac'.decode('hex')) # att

In the packet above the L2CAP Length is set to 0 and LL Length to 7 (LL Length > L2CAP Length + 4). This is not in accordance with what stated in the paper (See Wireshark capture in the attachment).
Wireshark_capture_L2CAP

I've tried to change the script, but I'm not able to calculate the CRC.
Thanks for the support.

@Matheus-Garbelini
Copy link
Owner

Matheus-Garbelini commented Feb 7, 2023

Hi @mantegna10 I believe there was some swap by mistake on the scripts name for variants of this attack.
You can see the truncated l2cap here:

Note that the exact attack vector triggers a crash on DA14580, but not on DA14680, hence why it was added as non-compliance test for DA14680.

@alereds94
Copy link

Hi @Matheus-Garbelini, I have experienced the same issue.

I think the source problem is some mismatch on the table:
https://github.com/Matheus-Garbelini/sweyntooth_bluetooth_low_energy_attacks#available-ble-exploits

where the Truncated L2CAP (CVE-2019-17517), whose theoretical fundament is explained in Section 6.3 of the white paper, is associated with the script DA14580_exploit_att_crash.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants