Feb. 6, 2023, 6:57 a.m. | Karthikeyan Nagaraj

InfoSec Write-ups - Medium infosecwriteups.com

XorXorXor — Hack The Box Crypto Challenge — Writeup| 2023

Hack The Box — XorXorXor Crypto Challenge Writeup | Karthikeyan Nagaraj

Description:

Who needs AES when you have XOR?

Task Files:

Task Files Can be Downloaded Here

File Contents:

challenge.py

#!/usr/bin/python3
import os
flag = open('flag.txt', 'r').read().strip().encode()

class XOR:
def __init__(self):
self.key = os.urandom(4)
def encrypt(self, data: bytes) -> bytes:
xored = b''
for i in range(len(data)):
xored += bytes([data[i] ^ self.key[i % len(self.key)]])
return xored
def decrypt(self, data: bytes) …

box challenge crypto cryptography hack hack the box hackthebox hackthebox-writeup htb-thm writeup

SOC 2 Manager, Audit and Certification

@ Deloitte | US and CA Multiple Locations

Information Security Engineers

@ D. E. Shaw Research | New York City

SOC Cyber Threat Intelligence Expert

@ Amexio | Luxembourg, Luxembourg, Luxembourg

Systems Engineer - SecOps

@ Fortinet | Dubai, Dubai, United Arab Emirates

Ingénieur Cybersécurité Gouvernance des projets AMR H/F

@ ASSYSTEM | Lyon, France

Senior DevSecOps Consultant

@ Computacenter | Birmingham, GB, B37 7YS