Penetration Testing
how to calculate hmac for esp packet? Apr 04 2012 09:30AM
Jun Yin (hansyin gmail com)
Hi, I'm trying to craft a esp packet for ipsec test, I try to use
python to create the hmac, I tried this:

>>> key1="11111111111111111111111111111111"
>>> msg="000001340000000b46e66a9853b58a94492be70c535a72d5994c3fe54a7c69e6a43

###this msg string is exactly same as shown in the esp packet(after encryption)

looks like this two hmac calculation are both wrong, after I send the
packet with this hmac value(first 12 byte), wireshark complain the
hmac is wrong:

Authentication Data [incorrect, should be 0x3150EDBE93C020C42F23114E]

Looks like my calculation is wrong, but I don't know where. Anyone
could help? Thanks!!!!

Hans Yin
Email:  hansyin (at) gmail (dot) com [email concealed]
MSN:   hansyin (at) hotmail (dot) com [email concealed]
Skype: hans_yin_vancouver


This list is sponsored by: Information Assurance Certification Review Board

Prove to peers and potential employers without a doubt that you can actually do a proper penetration test. IACRB CPT and CEPT certs require a full practical examination in order to become certified.

[ reply ]


Privacy Statement
Copyright 2010, SecurityFocus