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

Not detecting base32 encoded string #10

Closed
Adamkadaban opened this issue Feb 8, 2021 · 3 comments
Closed

Not detecting base32 encoded string #10

Adamkadaban opened this issue Feb 8, 2021 · 3 comments
Labels
question Further information is requested

Comments

@Adamkadaban
Copy link

I pulled the following string from a CTF:

wvcpRLNKBz2zqpFs9UcrvLAgXjgwyquv4GbW2FXC9Y7ZW4dzkcZk9t7t3vSnjdUDUwBCVDZdj6XZ5xoTr6UXxbag1PrytSVoU5ZzCinrYsMJ7Aac8A8S7cJTmnbSs9PZHgEmRCkMir2WWYygs7SwESfbTV

decoding from base32 and then running the magic flag on it works, but doesn't with the first base32 later. base32 -d doesn't work with it either, but cyberchef does. I assume its because of some issue with the specifics of identifying a base32 string, but not sure.

@mufeedvh
Copy link
Owner

mufeedvh commented Feb 8, 2021

Hey @Adamkadaban,

I found the CTF challenge and the Base32 decoding works just fine.

You know, the tears of one's enemies works lovely in tea. Turns out, there's tons of different bases for tea. In fact, I think I heard Delphine talk about this chef website she used for her tea base combinations...

Oh! Speaking of which, GIANt wants Delphine to make him tea... all he has is the tea leaves and the cup though. Maybe you can help Delphine, since she's really busy with cooking other things?

O53GG4CSJRHEWQT2GJ5HC4CGOM4VKY3SOZGECZ2YNJTXO6LROV3DIR3CK4ZEMWCDHFMTOWSXGRSHU23DLJVTS5BXOQZXMU3ONJSFKRCVO5BEGVSELJSGUNSYLI2XQ32UOI3FKWDYMJQWOMKQOJ4XIU2WN5KTKWT2INUW44SZONGUUN2BMFRTQQJYKM3WGSSUNVXGEU3THFIFUSDHIVWVEQ3LJVUXEMSXK5MXSZ3TG5JXORKTMZRFIVQ=

This was the challenge right? And yes the first encoding is Base32

I just gave it to basecrack and it detected and decoded it correctly:

$ python3 basecrack.py -b O53GG4CSJRHEWQT2GJ5HC4CGOM4VKY3SOZGECZ2YNJTXO6LROV3DIR3CK4ZEMWCDHFMTOWSXGRSHU23DLJVTS5BXOQZXMU3ONJSFKRCVO5BEGVSELJSGUNSYLI2XQ32UOI3FKWDYMJQWOMKQOJ4XIU2WN5KTKWT2INUW44SZONGUUN2BMFRTQQJYKM3WGSSUNVXGEU3THFIFUSDHIVWVEQ3LJVUXEMSXK5MXSZ3TG5JXORKTMZRFIVQ= --magic
[-] Encoded Base: O53GG4CSJRHEWQT2GJ5HC4CGOM4VKY3SOZGECZ2YNJTXO6LROV3DIR3CK4ZEMWCDHFMTOWSXGRSHU23DLJVTS5BXOQZXMU3ONJSFKRCVO5BEGVSELJSGUNSYLI2XQ32UOI3FKWDYMJQWOMKQOJ4XIU2WN5KTKWT2INUW44SZONGUUN2BMFRTQQJYKM3WGSSUNVXGEU3THFIFUSDHIVWVEQ3LJVUXEMSXK5MXSZ3TG5JXORKTMZRFIVQ=

[-] Iteration: 1

[-] Heuristic Found Encoding To Be: Base32

[-] Decoding as Base32: wvcpRLNKBz2zqpFs9UcrvLAgXjgwyquv4GbW2FXC9Y7ZW4dzkcZk9t7t3vSnjdUDUwBCVDZdj6XZ5xoTr6UXxbag1PrytSVoU5ZzCinrYsMJ7Aac8A8S7cJTmnbSs9PZHgEmRCkMir2WWYygs7SwESfbTV
[-] Total Iterations: 5

[-] Encoding Pattern: Base32 -> Base58 -> Base62 -> Base64 -> Ascii85

[-] Magic Decode Finished With Result: rtcp{th4t5_50m3_54lty_t34_1_bl4m3_4ll_th0s3_t34rs}

[-] Finished in 0.0079 seconds

Screenshot from 2021-02-08 23-24-06
Screenshot from 2021-02-08 23-24-18

And got the flag rtcp{th4t5_50m3_54lty_t34_1_bl4m3_4ll_th0s3_t34rs}.

Can you please uninstall the dependencies, reinstall them and try again? Also were you using Python2?

Thank you! 🙌❤️

@mufeedvh mufeedvh added the question Further information is requested label Feb 8, 2021
@Adamkadaban
Copy link
Author

Ah, I think I just didn't copy the initial string correctly. Sorry about that

@mufeedvh
Copy link
Owner

mufeedvh commented Feb 8, 2021

No worries @Adamkadaban, thank you for using the tool! 🙌❤️

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

No branches or pull requests

2 participants