binhexa (picoCTF 18)

Challenge Author: NANA ATOMBO-SACKEY

Difficulty: Easy

Description

How well can you perform basic binary operations?

Process / Notes

  1. nc into the challenge
  2. Perform math on binary numbers
  3. Binary Number 1 = 10010111
  4. Binary Number 2 = 11100000
  5. Operation = +
  6. Add right to left, anything that adds to 2 gets carried over as a 1 to the left > 101110111
  7. Operation = « on BN1
  8. Shifting everything to the left by 1 > 1011101110 (added a 0 to the end)
  9. Operation = » on BN2
  10. Shift everything to the right by 1 bit > 011100000 was incorrect > 11000 was correct!
  11. Operation = | 12 Stitch them together? Wasn’t that…
  12. The operation ‘OR’? > 11110111 was correct! (If there was a 1 in either position, it was a 1)
  13. Operation = *
  14. Multiply each position? > 10000000? Wasn’t that…
  15. Struggled here for a while. Made an attempt but was going at it with entirely the wrong outlook. Looked up how to do binary multiplication by hand, and had a better result with 1000010000100000
  16. Operation = &
  17. AND? Need both 1’s there to be a 1? > 10000000 was correct!
  18. It says this last answer in hex was the last answer.
  19. I kept trying to hex dump it, but it was really looking for that number to be converted into base 16. Discovered what the final number answer through an online calculator performing the operation for me.

42 minutes 37 seconds to complete

Hints

NONE

Core Lessons

  1. Understand how binary numbers / binary counting works
  2. Understand what each of the operations were asking for - I got lucky with my guesses on a lot of them
  3. Understand that hexadecimal means “base 16 counting” as well as the normal 0-9 and a-f form I’m used to associating with it.