Skip to content

List adapters in other network compartments - #855

Open
cicku wants to merge 1 commit into
nmap:masterfrom
cicku:adapter-compartments
Open

List adapters in other network compartments#855
cicku wants to merge 1 commit into
nmap:masterfrom
cicku:adapter-compartments

Conversation

@cicku

@cicku cicku commented Sep 11, 2026

Copy link
Copy Markdown

GetAdaptersAddresses() only returns interfaces in the caller's own compartment, but this adapter lives elsewhere. Patching with GAA_FLAG_INCLUDE_ALL_COMPARTMENTS.


Fixes #854

@guyharris

Copy link
Copy Markdown
Contributor

So you can capture on interfaces from other compartments by passing the device name to -i in TShark or tcpdump-built-for-Windows or selecting the devices in Wireshark?

@cicku

cicku commented Sep 11, 2026

Copy link
Copy Markdown
Author

I think so. Hijacked and sent fake packets, here is what it looks now:

image
image

@cicku

cicku commented Sep 11, 2026

Copy link
Copy Markdown
Author

Rigorously speaking:

  • tshark -i always work without this patch.
  • tshark -D does not list that adapter unless the patch is effective.
  • Wireshark does not list that adapter unless the patch is effective.

@guyharris

Copy link
Copy Markdown
Contributor
  • tshark -i always work without this patch.

...assuming you can determine the device name, of course. That's one thing tcpdump -D/tshark -D will do for you, but, without this change....

(I asked because in various UN*Xes' compartment/namespace/etc. mechanisms, it may take some extra work to get at foreign network interfaces. It sounds as if that's not true in Windows.)

@cicku

cicku commented Sep 12, 2026

Copy link
Copy Markdown
Author

(I asked because in various UN*Xes' compartment/namespace/etc. mechanisms, it may take some extra work to get at foreign network interfaces. It sounds as if that's not true in Windows.)

Yes, then this change is still necessary. WIN32 API isn't my favorite, but this one happens to satisfy without too much additional handling.

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

Successfully merging this pull request may close these issues.

wsl vEth device is not shown

2 participants