I Like It

Rev
40
549

Now I like dollars, I like diamonds, I like ints, I like strings. Make Cardi like it please.

/problems/2019/i_like_it

ダウンロードしたファイルをobjdumpコマンドで逆アセンブルします。
$ objdump -s -D -M intel i_like_it >aaa.txt
最初の入力値は”okrrrrrrr”と比較しています。
  4007ff: be a1 09 40 00        mov    esi,0x4009a1 #okrrrrrrr
  400804: 48 89 c7              mov    rdi,rax
  400807: e8 64 fe ff ff        call   400670 <strcmp@plt>
次の入力値は2つの整数値で足して136、掛けて3783になる数値で1つ目の数値のほうが小さいものです。したがって39と97です。
  40086e: 8b 55 c8              mov    edx,DWORD PTR [rbp-0x38]
  400871: 8b 45 cc              mov    eax,DWORD PTR [rbp-0x34]
  400874: 01 d0                add    eax,edx
  400876: 3d 88 00 00 00        cmp    eax,0x88 #足して136
  40087b: 75 1a                jne    400897 <main+0xf1>
  40087d: 8b 55 c8              mov    edx,DWORD PTR [rbp-0x38]
  400880: 8b 45 cc              mov    eax,DWORD PTR [rbp-0x34]
  400883: 0f af c2              imul   eax,edx
  400886: 3d c7 0e 00 00        cmp    eax,0xec7 #掛けて3783
  40088b: 75 0a                jne    400897 <main+0xf1>
  40088d: 8b 55 c8              mov    edx,DWORD PTR [rbp-0x38]
  400890: 8b 45 cc              mov    eax,DWORD PTR [rbp-0x34]
  400893: 39 c2                cmp    edx,eax #1つ目のほうが小さい
Shellページでサーバに接続します。
$ ./i_like_it
I like the string that I'm thinking of:
okrrrrrrr
I said I like it like that!
I like two integers that I'm thinking of (space separated):
39 97
I said I like it like that!
Flag: actf{okrrrrrrr_39_97}
フラグは、
actf{okrrrrrrr_39_97}