Bug 456119 - Networks widget does not reveal correct mac after mac spoofing
Summary: Networks widget does not reveal correct mac after mac spoofing
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Networks widget (other bugs)
Version First Reported In: master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-29 11:14 UTC by Ilab Sentuser
Modified: 2024-12-23 18:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilab Sentuser 2022-06-29 11:14:24 UTC
SUMMARY
The plasma networks widget has an option which shows details about the current connection. Among those details the mac address. If this mac address has been changed, either using a tool like macchanger or the cloning mac option in plasma-nm this mac address change is not reflected on details view, even though the changed mac address is indeed in use.


STEPS TO REPRODUCE
1. Change mac address
2. Reconnect to the network
3. See that the mac address in the Details view always remains as the original one
4. (Optional) Use a tool like wireshark or the command "ip link" and verify that the mac being used is the changed one and not the original.

OBSERVED RESULT
Apparently the widget seems to show only the original mac address and not the current mac address.

EXPECTED RESULT
The mac address to be shown in details view should be the one that is really in use.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Archlinux
KDE Plasma Version: 5.25.2
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5

ADDITIONAL INFORMATION
Comment 1 Ilab Sentuser 2022-06-29 13:27:44 UTC
I was curious and went and checked the source code. It does not appear a bug though, rather made that way intentionally so it should be requested as a feature instead. At least it seems that way by looking at the git code:

wifiSetting->setMacAddress(NetworkManager::macAddressFromString(wifiDev->permanentHardwareAddress()));

In file: https://github.com/KDE/plasma-nm/blob/master/kcm/kcm.cpp

I am not sure if this should be a request or a bug, as it seems intentional but also is a bit counterintuitive.
Comment 2 Bug Janitor Service 2022-08-24 15:34:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-nm/-/merge_requests/148
Comment 3 Nicolas Fella 2022-11-11 16:23:59 UTC
Git commit 7908728eb34c4311b2a2ae9b17e5cdba9f587c18 by Nicolas Fella, on behalf of Ilab Sentuser.
Committed on 11/11/2022 at 16:23.
Pushed by nicolasfella into branch 'master'.

Show current MAC address instead of permanent MAC address in details view

Current behavior is for the details view to show the permanent
MAC address of the card. This currently creates a missunderstanding
in which the user might think that the MAC address in use is, in fact,
the one shown there, while this might not be the case if the
MAC addres has been cloned/changed/spoofed. This leads the user to
believe that the change to his MAC address did not work or to not be
able to recognize his own traffic if he expect to see that MAC on
sniffed traffic for example, and many other scenarios.

NOTE: the current fix is applied only to the wireless device as it I
am unable to test the wired device code block and would refrain from
committing untested code, but it is highly advisable to add those too.

M  +1    -1    libs/models/networkmodelitem.cpp

https://invent.kde.org/plasma/plasma-nm/commit/7908728eb34c4311b2a2ae9b17e5cdba9f587c18
Comment 4 Nicolas Fella 2022-11-11 16:25:25 UTC
Git commit 758c651a29adc64d77c0c6c2eb018b0119b0f16f by Nicolas Fella, on behalf of Ilab Sentuser.
Committed on 11/11/2022 at 16:25.
Pushed by nicolasfella into branch 'Plasma/5.26'.

Show current MAC address instead of permanent MAC address in details view

Current behavior is for the details view to show the permanent
MAC address of the card. This currently creates a missunderstanding
in which the user might think that the MAC address in use is, in fact,
the one shown there, while this might not be the case if the
MAC addres has been cloned/changed/spoofed. This leads the user to
believe that the change to his MAC address did not work or to not be
able to recognize his own traffic if he expect to see that MAC on
sniffed traffic for example, and many other scenarios.

NOTE: the current fix is applied only to the wireless device as it I
am unable to test the wired device code block and would refrain from
committing untested code, but it is highly advisable to add those too.
(cherry picked from commit 7908728eb34c4311b2a2ae9b17e5cdba9f587c18)

M  +1    -1    libs/models/networkmodelitem.cpp

https://invent.kde.org/plasma/plasma-nm/commit/758c651a29adc64d77c0c6c2eb018b0119b0f16f
Comment 5 Nicolas Fella 2022-11-11 16:27:54 UTC
Git commit e109d436a17bf009a050dbe003ecd50d59c2a5de by Nicolas Fella.
Committed on 11/11/2022 at 16:27.
Pushed by nicolasfella into branch 'master'.

Show current MAC for wired connections

Like we do for wireless connections already

M  +1    -1    libs/models/networkmodelitem.cpp

https://invent.kde.org/plasma/plasma-nm/commit/e109d436a17bf009a050dbe003ecd50d59c2a5de
Comment 6 Nicolas Fella 2022-11-11 16:28:15 UTC
Git commit 7dc3b4adae3964c104855b24e9700c3a49b69793 by Nicolas Fella.
Committed on 11/11/2022 at 16:28.
Pushed by nicolasfella into branch 'Plasma/5.26'.

Show current MAC for wired connections

Like we do for wireless connections already
(cherry picked from commit e109d436a17bf009a050dbe003ecd50d59c2a5de)

M  +1    -1    libs/models/networkmodelitem.cpp

https://invent.kde.org/plasma/plasma-nm/commit/7dc3b4adae3964c104855b24e9700c3a49b69793
Comment 7 Ben Cooksley 2024-12-23 18:25:47 UTC
Bulk transfer as requested in T17796