Skip to content

Latest commit

 

History

History
71 lines (38 loc) · 1.38 KB

challenge.md

File metadata and controls

71 lines (38 loc) · 1.38 KB

obfuscated.py

  • Published: 04/06/2024 (#4/14 in round)
  • Category: Reverse Engineering
  • Points: 85
  • Author: Mr_MPH

Can you find out the secrets behind this script?

Tip: Wrap in csd{}, you have the flag when the text starts with y

Attachments

Hint

This hint costed 20 points.

Reveal hint

Don't know what to do with the file? - Decompile it.

Don't know how to decode the text? - Cyberchef and the opposite of decoding.

Write-up

Reveal write-up

It is a python bytecode, searching it up tells us it is compiled python

1

Searching for python decompiler we find this

2

Switching the decompiler to uncompyle6 we get this:

3

The variable name gives us a hint:

4

modifying the script a little bit to fix the errors and see what we the original hex was, we can get the hex value:

5

6

unhexing it (as hinted by the bytes.fromhex) gives us this:

7

using the “what is the opposite of base64” hint we can deduce that we encode using base64 (opposite of decoding)

8

after wrapping in csd{}: csd{y0ur3v3rs3d1t789}

Flag: csd{y0ur3v3rs3d1t789}

Write-up by Mr_MPH (link to original)