-
Notifications
You must be signed in to change notification settings - Fork 2.3k
pcap2john: Add SNMPv3 parser #5783
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
Conversation
This adds support for extracting SNMPv3 USM hashes. The parser handles both authentication-only (authNoPriv) and authentication with privacy (authPriv) modes. Hashes are printed in $SNMPv3$ format, with authProto set to 0 to allow John to try both MD5 and SHA1. If the authProto is known the 0 can be changed to 1 (MD5) or 2 (SHA1). This is not done automatically. Signed-off-by: Albert Veli <[email protected]>
Since I was assisted by ChatGPT-4o when writing this I asked about licensing and it responded with the following suggestion for licensing information. This code is my original contribution, written with assistance from It may still need some refactoring. Does it support all formats that snmp_fmt_plug.c supports? Can the SNMP plugin crack the (optional) encryption password too? This only extracts the authentication password hash. |
Thank you for your contribution @AlbertVeli! I intend to take a closer look a bit later. |
@AlbertVeli What input files did you test this with? I notice that comments in @kholia How did you create those test vectors? Is there possibly already an extraction tool that @AlbertVeli has missed?
We actually prefer our cut-down BSD license where possible, please see Seeing the commit history for Maybe we should collect the copyright statements and list them in the script itself (one line per person) and group them by license (most are our cut-down BSD), but I see one contribution is GPLv3 (unfortunately). |
I created this pull request with the samples: openwall/john-samples#39 |
@AlbertVeli Thank you for the samples. Are you OK with us using our cut-down BSD license for your contribution? |
Yes, of course. I was just worried about how the ChatGPT contribution would affect the license. But I rewrote most of what it suggested anyway. |
I think the content of Personally, I don't care much about under what specific free software license my contribution is. I would prefer any reasonable default, depending on the code I touched. If this project is primarily using BSD, then consider my code also as BSD. |
and statements made by exploide and Albert Veli in #5783
Thank you very much @AlbertVeli and @exploide. I've added the copyright+license statements to the script itself, as follows:
There was also one minor commit by @magnumripper 4d4745a for Python 3 compatibility, but I felt it's too minor to necessarily add a copyright statement. Similarly, my addition of the comment above is too minor. Finally, @jfoug's work to combine the scripts into one was perhaps a more significant effort, and could be copyright worthy, but he didn't seem to think so? He also didn't suggest a license. |
This adds support for extracting SNMPv3 USM hashes. The parser handles both authentication-only (authNoPriv) and authentication with privacy (authPriv) modes.
Hashes are printed in$SNMPv3$ format, with authProto set to 0 to allow John to try both MD5 and SHA1. If the authProto is known the 0 can be changed to 1 (MD5) or 2 (SHA1). This is not done automatically.