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

Macstealer responds to two different DHCP offers and get neither #6

Open
pwnf opened this issue Jun 19, 2023 · 2 comments
Open

Macstealer responds to two different DHCP offers and get neither #6

pwnf opened this issue Jun 19, 2023 · 2 comments

Comments

@pwnf
Copy link

pwnf commented Jun 19, 2023

Macstealer performs the EAP and MSCHAPv2 handshake successfully. It then performs a DHCP broadcast and receives two different DHCP offers with a different IP in each offer from the DHCP service. Macstealer proceeds to respond with a DHCP request for each IP address which presumably confuses the DHCP server and the DHCP requests fail.
macstealer
Offer 1: 10.218.144.69
macstealer wireshark1
Offer 2: 10.218.145.10
macstealer wireshark2

One DHCP request is sent for 10.218.144.69 and four DHCP requests are sent for 10.218.145.10.

Note: If I create basic wpa_supplicant.conf file and manually use wpa_supplicant followed by dhclient, I am able to connect and obtain an ip address as expected.

Great research - keen to try this out!

vanhoefm added a commit that referenced this issue Jun 20, 2023
When multiple different DHCP offers arrive, the script would reply to
all of them. This confuses some DHCP servers. Prevent this by only
replying to the first offered IP address.

This should fix #6
@vanhoefm
Copy link
Owner

vanhoefm commented Jun 20, 2023

Thanks for the detailed report and screenshots!

Can you try a patch that I pushed? You can execute:

git fetch --all
git checkout dhcp-fix

Then run the script again as usual.

@pwnf
Copy link
Author

pwnf commented Jun 22, 2023

Hi, appreciate you looking into this but unfortunately I no longer have access to the testing environment. Therefore, I can't conclude whether your patch worked or not. Thanks again.

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

2 participants