Barbara Liskov (born November 7, 1939 as Barbara Jane Huberman) is an American computer scientist who has made pioneering contributions to programming languages and distributed computing. Her notable work includes the development of the Liskov substitution principle which describes the fundamental nature of data abstraction, and is used in type theory (see subtyping) and in object-oriented programming (see inheritance). Her work was recognized with the 2008 Turing Award, the highest distinction in computer science. - Wikipedia Entry
Chal: Return the flag back to the 2008 Turing Award Winner
Author: Josh
Tags: forensics
We get some compiled python bytecode for this challenge. We can decompile this code, sadly pycdc struggles with some opcodes. But luckily enough, the important part is visible:
$ pycdc BarbaraLiskov.pyc
# Source Generated with Decompyle++
# File: BarbaraLiskov.pyc (Python 3.11)
Unsupported opcode: POP_JUMP_FORWARD_IF_FALSE
import base64
def secret_code():
obfuscated_string = '492d576f6e2d412d547572696e672d4177617264'
return bytes.fromhex(obfuscated_string).decode('utf-8')
def validate_input(user_input):
Error decompyling BarbaraLiskov.pyc: vector::_M_range_check: __n (which is 1) >= this->size() (which is 1)
When converting the secret code to ascii it gives us:
bytes.fromhex("492d576f6e2d412d547572696e672d4177617264")
b'I-Won-A-Turing-Award'
With this we can run the script and retrieve the flag:
$ python BarbaraLiskov.pyc
Enter the digital code >>> I-Won-A-Turing-Award
chctf{u_n3v3r_n33d_0pt1m4l_p3rf0rm4nc3,_u_n33d_g00d-3n0ugh_p3rf0rm4nc3}
Flag chctf{u_n3v3r_n33d_0pt1m4l_p3rf0rm4nc3,_u_n33d_g00d-3n0ugh_p3rf0rm4nc3}