Repository navigation
Add NAT-T Support - #1
Merged
Merged
Conversation
Owner
|
Very nice. Thanks for the PR! |
Contributor
Author
|
@l4rm4nd Very welcome! Thanks for the tool. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
--nat-t/--nattflag that passes--nat-tto everyike-scaninvocation, so IKESS can audit gateways over NAT-T encapsulation (RFC 3947, UDP 4500) as well as the default UDP 500.Motivation
Some environments filter or ignore UDP 500 but expose UDP 4500. A default scan against them reports "No IKE services found" even though a gateway is listening. With this flag, the full IKESS flow can run against 4500: v1/v2 discovery, Aggressive Mode, transforms, and fingerprinting.
Ran into this on external penetration testing engagements where UDP 4500 was detected.
Changes
--nat-t(alias--natt). Off by default, so existing behavior is unchanged.run_command()prepends any extra global ike-scan args (EXTRA_IKESCAN_ARGS) to everyike-scancall. This keeps the change in one place instead of touching each scan function.scan_infogainsnat_t(bool) andudp_port(500/4500).UDP 500orNAT-T (UDP 4500))._natt4500suffix, so a 500 scan and a 4500 scan of the same target don't get mixed up.Notes / limitations
--nat-tdoesn't prove no service is there. The help text says so.ike-scan --nat-tbinds source port 4500 locally. If something on the scanning host already holds that port (e.g. strongSwan/charon, a VPN client), ike-scan will fail to bind.