Skip to content
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

ASN.1 hex decode #1203

Closed
AK47-2020 opened this issue May 24, 2021 · 0 comments · Fixed by #1465
Closed

ASN.1 hex decode #1203

AK47-2020 opened this issue May 24, 2021 · 0 comments · Fixed by #1465
Labels

Comments

@AK47-2020
Copy link

Describe the bug
This string
311A
3009
0603
550406
1302
554B
310d
300b
0603
55040A
0C04
47434851

decodes as
SET
SEQUENCE
ObjectIdentifier countryName (2 5 4 6)
PrintableString 'UK'
SET
SEQUENCE
ObjectIdentifier organizationName (2 5 4 10)
UNKNOWN(12) 47434851

Line before last, change 0C04 to 0c04

The sequence now decodes as

SET
SEQUENCE
ObjectIdentifier countryName (2 5 4 6)
PrintableString 'UK'
SET
SEQUENCE
ObjectIdentifier organizationName (2 5 4 10)
UTF8String 'GCHQ'

To Reproduce
Steps to reproduce the behaviour or a link to the recipe / input used to cause the bug:

  1. Go to https://gchq.github.io/CyberChef/#recipe=Parse_ASN.1_hex_string(0,32)&input=MzExQQozMDA5CjA2MDMKNTUwNDA2CjEzMDIKNTU0QgozMTBkCjMwMGIKMDYwMwo1NTA0MGEKMEMwNAo0NzQz

Expected behaviour
Is the ASN.1 module only supporting capital letters for lengths in hex?

Cheers,

AK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant