F5 not allowed

掲載日 : 2021年1月18日15:23
So, I've heard you're kinda new to reverse-engineering ?

Basically, in almost every challenge you'll be provided a binary hiding a secret.
Your goal is generally to break the secret checking function in order to recover the flag.
For this you'll need to understand the assembly code and write back the corresponding C code if you need to (or you can do it in real-time if you're not human).

To make it easier, i'll give you the flag checking function only and your task will be to recover which input returns 1.
I advise you to do some research about x86 ISA and x86 linux calling convention first.

Good luck !


0000000000001139 <check_secret>:
    1139:       55                      push   rbp
    113a:       48 89 e5                mov    rbp,rsp
    113d:       48 89 7d e8             mov    QWORD PTR [rbp-0x18],rdi
    1141:       48 8b 45 e8             mov    rax,QWORD PTR [rbp-0x18]
    1145:       48 89 45 f8             mov    QWORD PTR [rbp-0x8],rax
    1149:       48 8b 45 f8             mov    rax,QWORD PTR [rbp-0x8]
    114d:       8b 00                   mov    eax,DWORD PTR [rax]
    114f:       35 40 20 5b 7f          xor    eax,0x7f5b2040
    1154:       89 45 f0                mov    DWORD PTR [rbp-0x10],eax
    1157:       48 8b 45 f8             mov    rax,QWORD PTR [rbp-0x8]
    115b:       48 83 c0 04             add    rax,0x4
    115f:       8b 00                   mov    eax,DWORD PTR [rax]
    1161:       35 53 23 59 76          xor    eax,0x76592353
    1166:       89 45 f4                mov    DWORD PTR [rbp-0xc],eax
    1169:       81 7d f0 37 13 37 13    cmp    DWORD PTR [rbp-0x10],0x13371337
    1170:       75 10                   jne    1182 <check_secret+0x49>
    1172:       81 7d f4 37 13 37 13    cmp    DWORD PTR [rbp-0xc],0x13371337
    1179:       75 07                   jne    1182 <check_secret+0x49>
    117b:       b8 01 00 00 00          mov    eax,0x1
    1180:       eb 05                   jmp    1187 <check_secret+0x4e>
    1182:       b8 00 00 00 00          mov    eax,0x0
    1187:       5d                      pop    rbp
    1188:       c3                      ret


解答者

ユーザー名 ウェブサイト スコア 日付
nicolaslekoala https://epita.fr 465 2021年1月19日16:41
nforay 220 2021年1月19日18:00
selmelc 280 2021年1月20日3:26
statooin 25 2021年1月22日20:54
Yir 1125 2021年1月23日11:13
arpascal https://arnaud.sh 2035 2021年1月23日22:29
Njörd 45 2021年1月24日22:59
SoEasY http://soeasy.ouaibe.fr 85 2021年1月25日10:14
Unactive 565 2021年1月25日13:45
animoke https://animoke.dev 80 2021年1月26日12:51
jachoi https://n00bh4cker.tistory.com 60 2021年1月28日16:40
pscott 50 2021年2月13日17:28
reveng https://twitter.com/revengsh 1025 2021年2月20日14:16
violettagoldman 65 2021年2月20日14:19
hbaudet 85 2021年2月20日14:33
Piki 25 2021年2月20日14:54
Akiminos 30 2021年2月20日14:59
Jean 25 2021年2月20日15:57
smaccary https://twitter.com/nol_tech 795 2021年2月20日16:10
molivier 645 2021年2月20日23:59
grannou 25 2021年3月20日15:54
gdelabro 130 2021年4月8日17:17
morizur 85 2021年6月24日10:47
jb 50 2021年9月3日17:27
42stillsucks https://www.youtube.com/watch?v=hfTAv8htci8 1300 2021年10月26日11:50
Karakvra 35 2021年11月17日10:59
lmartin 1310 2021年12月9日1:36
daniseed 55 2021年12月15日18:00
laird_ikar 670 2021年12月17日17:16
Danhia 490 2022年1月30日22:45
Relkondo 20 2022年1月31日14:58
DocDoomDuck 50 2022年2月2日19:32
rcarles 255 2022年2月3日15:54
Penguin 100 2022年2月7日13:39
Alpha 60 2022年2月27日19:01
gtoubol 35 2022年3月3日14:47
sam0verfl0w https://github.com/Unam3dd 1110 2022年3月6日11:28
pixailz@420v3rfl0w https://github.com/Pixailz 920 2022年3月6日11:37
S_in https://twitter.com/sin_infosec 1080 2022年3月9日22:13
wen 100 2022年3月9日23:55
vsaltel 30 2022年3月19日17:09
atrouill 890 2022年3月20日12:40
nieyraud 1105 2022年3月22日13:51
0xSpyC 30 2022年3月22日20:16
Snaker 40 2022年3月22日20:17
Jimb0 40 2022年3月22日20:34
L0Wigh 465 2022年3月22日23:29
Hugxef 185 2022年3月23日11:52
Podalirius https://podalirius.net/ 25 2022年3月23日18:30
abouthib 1245 2022年3月26日4:03
0x00 https://127.0.0.1 150 2022年3月26日4:05
M_X 35 2022年4月18日18:10
jfrancai https://github.com/jfrancai 125 2022年4月25日18:41
Hanako 30 2022年5月4日16:49
Alexis 590 2022年5月4日17:01
polo75 220 2022年5月4日22:09
flhember 255 2022年5月11日21:28
Cryptanalyse 410 2022年5月15日10:30
mli 35 2022年6月6日14:31
alagroy- 155 2022年6月6日17:09
Akatso 205 2022年6月6日18:41
Ardcord 1050 2022年6月11日22:30
vnaud 110 2022年6月24日15:49
Deacllock 10 2022年6月25日22:30
Frinzy3 45 2022年7月1日16:19
blevrel 55 2022年7月1日16:20
achretie 215 2022年7月4日1:54
kle-guen 155 2022年7月4日17:49
equesnel 75 2022年7月5日20:14
clinche https://github.com/clinche 1225 2022年7月6日21:16
bob 10 2022年7月9日5:37
napalm 25 2022年7月18日17:05
PJ 35 2022年7月18日17:55
Syca https://cyrihack.fr 1660 2022年7月24日3:04
OrioPrisco 55 2022年8月24日14:12
etyloppihacilem 25 2022年8月24日14:59
Antotor 45 2022年8月24日14:59
wow https://friends42.fr 480 2022年8月24日15:01
nsainton 25 2022年8月24日15:59
jle 25 2022年8月24日16:27
Le_Petit_Hylien 25 2022年8月24日16:28
jvigny 45 2022年8月24日16:37
tea_for_two 25 2022年8月24日17:05
lenoctambule 25 2022年8月24日17:42
Mitch 55 2022年8月27日9:58
abubilla https://github.com/juzzrespecter 165 2022年9月11日21:27
mde-arpe https://github.com/migueldar 110 2022年9月12日6:43
Matubu https://mathias.ninja 115 2022年9月27日23:11
kbz_8 https://akel-engine.com 25 2022年9月29日2:20
0x35c 50 2022年9月29日11:53
Leonidas 45 2022年9月29日11:53
Arty 75 2022年9月29日14:24
afaby https://www.arthurfaby.fr 60 2022年9月29日16:20
pirabaud 25 2022年9月29日16:22
jsauvain 50 2022年9月29日17:36
cerisier 35 2022年10月1日21:52
ParesseuxRose 485 2022年10月4日22:58
gtouzali 70 2022年10月6日11:11
mjuin 25 2022年10月6日16:50
vusk 80 2022年10月11日11:18
valkheim 60 2022年10月14日17:03
Nyr 245 2022年10月15日15:43
Imhotep 325 2022年10月27日17:17
Olriik 145 2022年11月2日12:24
tdeverge 45 2022年11月3日16:15
mlauro 30 2022年11月4日18:22
riblanc 1275 2022年11月6日23:59
luciefer 25 2022年11月9日16:43
hel-kame 30 2022年11月9日16:43
tbelleng 25 2022年11月9日16:49
Hijodelaluna 20 2022年11月9日16:49
h00kz_ 370 2022年11月23日17:14
lsneal 130 2022年12月3日11:17
uncle_j4ck 285 2022年12月7日15:49
izenynn https://izenynn.com 485 2022年12月12日19:06
n0bl3ss 185 2022年12月27日12:06
vvaas 40 2023年1月9日19:23
0xpwny_OR_ziggs.ma https://thehackernewsbdarija.com/ 405 2023年2月14日19:27
Lx 70 2023年2月20日13:02
asarandi https://github.com/asarandi 2300 2023年4月19日14:20
asoursou https://github.com/ChuOkupai 585 2023年4月23日22:20
Sh 190 2023年5月31日16:22
theHidden0ne https://open.spotify.com/track/3PK9MAYUZhUnhEizlmzkGs?si=54cf9d51f8b940b4 45 2023年6月3日12:31
alyildiz https://github.com/0xSHIN 390 2023年7月3日23:04
Lxt3h https://lextersec.fr 355 2023年7月9日2:44
hperrin 100 2023年7月20日11:47
romanraa 165 2023年8月26日16:09
hsabir-xoreaxeax https://github.com/lenartlola 1320 2023年10月13日18:35
pichuu 650 2023年11月14日18:54
matfranc 235 2023年11月14日21:30
at0m741 https://at0m741.github.io/at0m741 270 2023年11月19日17:11
mclaudel 430 2023年12月7日15:56
aattali 35 2023年12月10日14:35
NilsLeVrai https://www.youtube.com/watch?v=ixAsNmNROYg 210 2023年12月15日17:29
gdel-giu 10 2023年12月15日22:24
mboivin https://twitter.com/m4tya_ 790 2023年12月15日23:27
CrispLake https://github.com/CrispLake 155 2023年12月19日17:30
lemmok 710 2024年2月7日12:47
tomaquet18 https://www.youtube.com/watch?v=Ny_nGsArw1g 440 2024年3月1日12:57
timmy 65 2024年3月19日12:16
jquivogn 70 2024年3月19日15:14
kyungjle 170 2024年3月27日14:40
yeolee2 https://github.com/MinjeaLee 1445 2024年4月22日5:12
Sneezing1090 160 2024年5月21日11:56
miaoujepwn 240 2024年7月11日19:42
miaoujehack 235 2024年7月12日19:18
G3ngh1s 570 2024年7月13日12:19
00101010 https://youtu.be/dQw4w9WgXcQ 1255 2024年8月4日16:34