Tags: reverse
Rating:
1. Check the .exe file $ file i\ am\ a\ code\ with\ some\ impurities.exe i am a code with some impurities.exe: UTF-8 Unicode (with BOM) text, with CRLF line terminators
2. Open the .exe file in any editor.
3. Google the piece of code from the file.
4. Find out that it is a G2 language for machines.
5. Find where we can execute the code: https://ncviewer.com/ https://nraynaud.github.io/webgcode/
6. See that the result is similar to binary code, but it's difficult to read.
7. Clear the code: remove #, $.
8. Execute the clear code.
9. Now we see binary code: 00100011 00100100 01011111 00101011 01100110 01000000 01111000 00100110 01011111 01100011 01110110 01101001 00100101 01000000 01101000 01100010 01110110 00100011 01101000
10.Convert it to string: #$_+f@x&_cvi%@hbv#h
11. Pass the string to the executable "useme". Program does not return anything, but before the return from function: .text:00005574CADB5577 call _Z5usemeNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
12. Now we can see the converted string: n0_g1rl5_d3p4rtm3nt
Flag: VishwaCTF{n0_g1rl5_d3p4rtm3nt}.