[Reversing] Stack It
The following challenge description has been given:
Below is the file type:
Opening up Ghidra and analyzing the stack_it.bin, below is what we concluded.
The initialized two byte arrays were identified and extracted the hex contents.
Byte array 1:
Byte array 2:
We then XOR them together and got the flag. The following code has been used:
with open("1.txt", "r") as rf:
one = rf.read().strip().split("\n")
with open("2.txt", "r") as rf:
two = rf.read().strip().split("\n")
print("flag{",end="")
for i in range(len(one)):
print(chr(int(one[i],16) ^ int(two[i],16)),end="")
print("}")