🏳️
Bag of Flags
  • Home
  • 2023
    • 🅿️picoCTF 2023
      • money-ware
      • repetitions
      • two-sum
      • ReadMyCert
      • rotation
      • hideme
      • PcapPoisoning
      • who is it
      • Reverse
      • timer
      • Safe Opener 2
      • findme
      • MatchTheRegex
      • SOAP
    • 🐦magpieCTF 2023
      • Space Plan
      • Space Exploration
      • So Meta
      • There is no flag
      • Momma says to play fair
      • Rubis
      • What is the password?
      • Eavesdropper
      • Shredded
      • Missing Flag
      • This outta be large enough right?
      • No Password Here
      • Chocolate Chips with Zero-G
      • Education Comes First
    • 🌴ISSessions CTF 2023
      • Basic Permissions
      • Crack Me
      • File Detective
      • Word Vomit
      • Fileception
      • Coding Time
      • Ghost File
      • CryptoTools1
      • CryptoTools2
      • 1337
      • ROT++
      • RunedMyDay
      • RSA_2
      • The Man Who Sold the World
      • VaultChallenge
      • Lost Media
      • Decontamination
      • Decade Capsule
      • Password in A Haystack
  • 2022
    • 🏁UW CTF S22
      • 0s and 1s
      • simple image
      • Helikopter
      • Meow
      • Google Form
      • Strings, literally
      • WASM
      • Audio
      • Pwn0
      • YATD
      • steg
      • Passwords
      • Vitalik
  • Practice
    • 🧠CryptoHack
      • Introduction
        • Finding Flags
        • Great Snakes
      • General
        • ASCII
        • Hex
        • Base64
        • Bytes and Big Integers
        • XOR Starter
        • XOR Properties
        • Favourite byte
        • You either know, XOR you don't
        • Greatest Common Divisor
Powered by GitBook
On this page
  • Description
  • Some of my Favourite Things
  • Flag
  1. Practice
  2. CryptoHack
  3. General

Favourite byte

Description

For the next few challenges, you'll use what you've just learned to solve some more XOR puzzles. I've hidden some data using XOR with a single byte, but that byte is a secret. Don't forget to decode from hex first. 73626960647f6b206821204f21254f7d694f7624662065622127234f726927756d

Some of my Favourite Things

We are told the data was XORed with a single byte, which is 8 bits. This means we can brute-force all possible bytes, from 00000000 to 11111111 and XOR it with the hex until we get what looks like a flag!

from pwn import xor

HEX = "73626960647f6b206821204f21254f7d694f7624662065622127234f726927756d"

byteString = bytes.fromhex(HEX)
print(byteString)

# 2 ^ 8 = 256
# A byte can represent numbers up to 256
for i in range(256):
    # Get a byte and XOR with the byte string
    xorString = xor(byteString, i)
    print(xorString)

Flag

crypto{0x10_15_my_f4v0ur173_by7e}

PreviousXOR PropertiesNextYou either know, XOR you don't

Last updated 2 years ago

🧠
We can find the flag