Earlier quoted context omitted.
> My other option was to translate it into real assembly I wrote a compiler from emoji-code to amd64 (mostly because I'm more interested in compilers than reversing). It runs quite fast - prints the whole domain in ~1 min. I'd highly recommend it to people who are into assembly, it was a fun exercise.
How did you implement the JUMP_TOP instruction? You need to jump to the x86_64 instructions that correspond to the given emoji index; did you implement a jump table?
Google CTF 2019
131–140 of 140 posts
Re: Google CTF 2019
#132Earlier quoted context omitted.
i ended up using fold. theres also has to be a way to read the ORME.flag by modifying the file permissions but i haven't figured that one out yet.
I bypassed the shell by executing the binary straight from the loader so I was able to do a chmod +r and cat to get it.
Re: Google CTF 2019
#133Earlier quoted context omitted.
Haha, I was gonna try exactly that, but I got too lazy trying to install pypy3 on my shitty centos box. My other option was to translate it into real assembly, but that also seemed like more work that I wanted to put into it.
> My other option was to translate it into real assembly I wrote a compiler from emoji-code to amd64 (mostly because I'm more interested in compilers than reversing). It runs quite fast - prints the whole domain in ~1 min. I'd highly recommend it to people who are into assembly, it was a fun exercise.
Re: Google CTF 2019
#134Dig at Apple from the third stage of the beginners' quest; "Your first thought is "Why does the display stand need to announce its price? And exactly how much does 999 dollars convert to in Xenonivian Bucklets?"
Though it does more (rolls) and actually made by BenQ.
Re: Google CTF 2019
#135Earlier quoted context omitted.
How did you implement the JUMP_TOP instruction? You need to jump to the x86_64 instructions that correspond to the given emoji index; did you implement a jump table?
Yeah, I put labels corresponding to the original IP throughout and used a jump table.
Was your method fast enough to get all three parts of the URL?
Re: Google CTF 2019
#136Earlier quoted context omitted.
Yeah, I put labels corresponding to the original IP throughout and used a jump table.
That's pretty cool! I just transliterated the instructions into C macros; but i didn't bother with the jump tables. The nice thing with this approach is that you can mix vm instructions with c code freely; and get gdb support. I needed that because speeding up via C wasnt enough to decode the full URL and I still needed to do additional reversing. Was your method fast enough to get all three parts of the URL?
Re: Google CTF 2019
#137Earlier quoted context omitted.
> My other option was to translate it into real assembly I wrote a compiler from emoji-code to amd64 (mostly because I'm more interested in compilers than reversing). It runs quite fast - prints the whole domain in ~1 min. I'd highly recommend it to people who are into assembly, it was a fun exercise.
would you mind sharing this? I'd love to check it out :)
Re: Google CTF 2019
#138Earlier quoted context omitted.
I bypassed the shell by executing the binary straight from the loader so I was able to do a chmod +r and cat to get it.
how did you do this? amazing
Re: Google CTF 2019
#139Earlier quoted context omitted.
It's calculating prime numbers which is why it's slow. Now if only I was to work out which prime numbers it wants... :)
have you guys figured it out? I got stuck here too.
"python vm.py program" results in "SyntaxError: Non-ASCII character '\xf0' in file vm.py on line 19, but no encoding declared;"
adding the relevant encoding (# -- coding: utf-8 --) then results in "RuntimeError: Unknown instruction ''\xf0\x9f\x96\x8b\xf0\x9f\x92\xa0\xf0\x9f\x94\xb6\xf0\x9f\x8e\x8c\xf0\x9f\x9a\xa9\xf0\x9f\x8f\x81'' at 370"
I assume debugging the program is part of the challenge? Or is it just supposed to work?
Re: Google CTF 2019
#140Earlier quoted context omitted.
have you guys figured it out? I got stuck here too.
I'm having a hard time even getting it to run. "python vm.py program" results in "SyntaxError: Non-ASCII character '\xf0' in file vm.py on line 19, but no encoding declared;" adding the relevant encoding (# - - coding: utf-8 - -) then results in "RuntimeError: Unknown instruction ''\xf0\x9f\x96\x8b\xf0\x9f\x92\xa0\xf0\x9f\x94\xb6\xf0\x9f\x8e\x8c\xf0\x9f\x9a\xa9\xf0\x9f\x8f\x81'' at 370" I assume debugging the program…