HSRP version 2 - #3005
Merged
Merged
Conversation
e-LF
force-pushed
the
hsrp_v2
branch
3 times, most recently
from
December 9, 2020 23:09
fcca29b to
8e24273
Compare
gpotter2
reviewed
Dec 10, 2020
gpotter2
left a comment
Member
There was a problem hiding this comment.
Thanks for the PR ! It's generally looking pretty good.
A few comments. Not sure about the issue you've pointed out, I will have a look.
e-LF
marked this pull request as draft
December 10, 2020 19:10
e-LF
marked this pull request as ready for review
December 10, 2020 22:12
e-LF
marked this pull request as draft
December 10, 2020 22:13
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3005 +/- ##
==========================================
- Coverage 80.57% 79.78% -0.79%
==========================================
Files 390 372 -18
Lines 96808 96543 -265
==========================================
- Hits 78001 77027 -974
- Misses 18807 19516 +709
🚀 New features to boost your workflow:
|
Member
|
Thanks a lot for the update, this is looking good. You'll probably have to override |
AI-Assisted: no
Member
|
Thanks for the PR ! |
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.
Checklist:
toxor,cd test && ./run_tests_py2, cd test && ./run_tests_py3)Hello.
While experimenting with Scapy I attempted to perform some HSRP attack on Cisco routers, running the version 2 of the protocol.
It failed since it looks like only the version 1 is currentlty supported, so I needed to do some changes.
HSRP v2 has not only the version field set to '2' but also has a slightly different header (e.g IPv6 is supported, some fields have not the same size and order...).
This PR add support for HSRP version 2.
There is a limitation though, about automatically filling the UDP ports when using HSRP v2, according to the version of IP used:
bind_layers(UDP, HSRPv2, dport=1985, sport=1985) # HSRP v2 with IPv4
bind_layers(UDP, HSRPv2, dport=2029, sport=2029) # HSRP v2 with IPv6
If dport / sport are not specified explicitly, 2029 will always be used by default. Since scapy has no way to know which port to chose, the port from the last line will be used. Is there a way to make scapy default to 2029 only if IPv6 is used ?