HackTheBox BitsNBytes Challenge
Explore the basics of cybersecurity in the BitsNBytes Challenge on Hack The Box. This easy-level Challenge introduces encryption reversal and file handling concepts in a clear and accessible way, perfect for beginners.
https://app.hackthebox.com/challenges/14
Description
We have intercepted an email sent by a terrorist cell. It contains only an image. Can you compare the modified image to its original and see if it has any meaning?
Exploitation
just xor the images
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env python3
import numpy as np
from PIL import Image
def main():
intercepted = np.array(Image.open('intercepted.png'))
original = np.array(Image.open('original.png'))
result = np.subtract(intercepted, original)
Image.fromarray(result).save('result.png')
if __name__ == '__main__':
main()
and after use zsteg
1
zsteg -a result.png | grep "b1,b,lsb,yx" | cut -d ":" -f2 | tr -d ' "' | head -n1 | base64 -d
Summary
The BitsNBytes Challenge on Hack The Box is an easy-level challenge that focuses on image comparison and steganography. Participants are tasked with comparing a modified image to its original version, using an XOR operation to extract hidden data. After generating the result image, the challenge requires the use of zsteg to analyze and decode the hidden message, revealing the flag. This challenge is a great introduction to image processing, steganography, and basic encryption techniques.