Add carp2john hmac extractor script (*BSD Common Address Redundancy Protocol)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
SHA-1 HMAC generated with the pass parameter as secret key, and counter, version, type, vhid, and virtual IP address as the message digest.
Packet format:
| field# | bits | Description |
|---|---|---|
| version | 4 | The version of the CARP protocol.This is statically defined as 2 in the header file /usr/src/netinet/ip_carp.h. |
| type | 4 | The type field defines the type of CARP packet. This value can be 0x01 (advertisement) or 0x02 (leave group), but the latter is only defined in the header file; I have not seen it being used anywhere. |
| vhid | 8 | Virtual host id. |
| advskew | 8 | Advertisement skew. |
| authlen | 8 | Size of Counter field + md field in 32 bit chunks.Statically defined as 7 in the header file. |
| Pad1 | 8 | Unused, must be 0. |
| advbase | 8 | Advertisement interval. |
| cksum | 16 | Checksum for Internet Protocol family headers. |
| counter | 64 | Two counters used for replay detection.(not implemented yet) |
| Md | 160 | SHA-1 HMAC generated with the passparameter as secret key, and counter, version, type, vhid, and virtual IP address as the message digest |
read more:
https://www.giac.org/paper/gsec/4031/carp-free-fail-over-protocol/106433
see also:
https://github.com/jedisct1/UCarp/blob/master/src/carp.c
https://github.com/openbsd/src/blob/master/sys/netinet/ip_carp.c
Scapy already supports it:
https://github.com/secdev/scapy/blob/master/scapy/contrib/carp.py
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the packet layout in /usr/src/netinet/ip_carp.h with the implementations in UCarp's src/carp.c, OpenBSD's sys/netinet/ip_carp.c, and Scapy's scapy/contrib/carp.py. Confirm how the counter, header fields, virtual IP address, and SHA-1 HMAC are represented, then add and integrate the carp2john extractor; done means CARP credentials are accepted in John the Ripper's expected input format.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli, cryptography, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100