F5 not allowed

Published date : Jan. 18, 2021, 3:23 p.m.
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


Solved by

Username Website Score Date
nicolaslekoala https://epita.fr 460 Jan. 19, 2021, 4:41 p.m.
nforay 210 Jan. 19, 2021, 6 p.m.
selmelc 275 Jan. 20, 2021, 3:26 a.m.
statooin 25 Jan. 22, 2021, 8:54 p.m.
Yir 1080 Jan. 23, 2021, 11:13 a.m.
arpascal https://arnaud.sh 1970 Jan. 23, 2021, 10:29 p.m.
Njörd 45 Jan. 24, 2021, 10:59 p.m.
SoEasY http://soeasy.ouaibe.fr 85 Jan. 25, 2021, 10:14 a.m.
Unactive 530 Jan. 25, 2021, 1:45 p.m.
animoke https://animoke.dev 80 Jan. 26, 2021, 12:51 p.m.
jachoi https://n00bh4cker.tistory.com 60 Jan. 28, 2021, 4:40 p.m.
pscott 50 Feb. 13, 2021, 5:28 p.m.
reveng https://twitter.com/revengsh 1005 Feb. 20, 2021, 2:16 p.m.
violettagoldman 60 Feb. 20, 2021, 2:19 p.m.
hbaudet 80 Feb. 20, 2021, 2:33 p.m.
Piki 25 Feb. 20, 2021, 2:54 p.m.
Akiminos 30 Feb. 20, 2021, 2:59 p.m.
Jean 25 Feb. 20, 2021, 3:57 p.m.
smaccary https://twitter.com/nol_tech 765 Feb. 20, 2021, 4:10 p.m.
molivier 615 Feb. 20, 2021, 11:59 p.m.
grannou 25 March 20, 2021, 3:54 p.m.
gdelabro 120 April 8, 2021, 5:17 p.m.
morizur 245 June 24, 2021, 10:47 a.m.
jb 45 Sept. 3, 2021, 5:27 p.m.
42stillsucks https://www.youtube.com/watch?v=hfTAv8htci8 1250 Oct. 26, 2021, 11:50 a.m.
Karakvra 35 Nov. 17, 2021, 10:59 a.m.
lmartin 1260 Dec. 9, 2021, 1:36 a.m.
daniseed 55 Dec. 15, 2021, 6 p.m.
eclypse666 645 Dec. 17, 2021, 5:16 p.m.
Danhia 465 Jan. 30, 2022, 10:45 p.m.
Relkondo 20 Jan. 31, 2022, 2:58 p.m.
DocDoomDuck 50 Feb. 2, 2022, 7:32 p.m.
rcarles 240 Feb. 3, 2022, 3:54 p.m.
Penguin 100 Feb. 7, 2022, 1:39 p.m.
Alpha 55 Feb. 27, 2022, 7:01 p.m.
gtoubol 35 March 3, 2022, 2:47 p.m.
sam0verfl0w https://github.com/Unam3dd 1070 March 6, 2022, 11:28 a.m.
pixailz@420v3rfl0w https://github.com/Pixailz 955 March 6, 2022, 11:37 a.m.
S_in https://twitter.com/sin_infosec 1055 March 9, 2022, 10:13 p.m.
wen 100 March 9, 2022, 11:55 p.m.
vsaltel 30 March 19, 2022, 5:09 p.m.
atrouill 860 March 20, 2022, 12:40 p.m.
nieyraud 1055 March 22, 2022, 1:51 p.m.
0xSpyC 30 March 22, 2022, 8:16 p.m.
Snaker 40 March 22, 2022, 8:17 p.m.
Jimb0 40 March 22, 2022, 8:34 p.m.
L0Wigh 445 March 22, 2022, 11:29 p.m.
Hugxef 180 March 23, 2022, 11:52 a.m.
Podalirius https://podalirius.net/ 25 March 23, 2022, 6:30 p.m.
abouthib 1200 March 26, 2022, 4:03 a.m.
0x00 https://127.0.0.1 140 March 26, 2022, 4:05 a.m.
M_X 35 April 18, 2022, 6:10 p.m.
jfrancai https://github.com/jfrancai 125 April 25, 2022, 6:41 p.m.
Hanako 30 May 4, 2022, 4:49 p.m.
Alexis 565 May 4, 2022, 5:01 p.m.
polo75 215 May 4, 2022, 10:09 p.m.
flhember 250 May 11, 2022, 9:28 p.m.
Cryptanalyse 395 May 15, 2022, 10:30 a.m.
mli 35 June 6, 2022, 2:31 p.m.
alagroy- 150 June 6, 2022, 5:09 p.m.
Akatso 195 June 6, 2022, 6:41 p.m.
Ardcord 1010 June 11, 2022, 10:30 p.m.
vnaud 105 June 24, 2022, 3:49 p.m.
Deacllock 10 June 25, 2022, 10:30 p.m.
Frinzy3 45 July 1, 2022, 4:19 p.m.
blevrel 55 July 1, 2022, 4:20 p.m.
achretie 205 July 4, 2022, 1:54 a.m.
kle-guen 145 July 4, 2022, 5:49 p.m.
equesnel 75 July 5, 2022, 8:14 p.m.
clinche https://github.com/clinche 1185 July 6, 2022, 9:16 p.m.
bob 10 July 9, 2022, 5:37 a.m.
napalm 25 July 18, 2022, 5:05 p.m.
PJ 35 July 18, 2022, 5:55 p.m.
Syca https://cyrihack.fr 1605 July 24, 2022, 3:04 a.m.
OrioPrisco 55 Aug. 24, 2022, 2:12 p.m.
etyloppihacilem 25 Aug. 24, 2022, 2:59 p.m.
Antotor 45 Aug. 24, 2022, 2:59 p.m.
wow https://friends42.fr 465 Aug. 24, 2022, 3:01 p.m.
nsainton 25 Aug. 24, 2022, 3:59 p.m.
jle 25 Aug. 24, 2022, 4:27 p.m.
Le_Petit_Hylien 25 Aug. 24, 2022, 4:28 p.m.
jvigny 45 Aug. 24, 2022, 4:37 p.m.
tea_for_two 25 Aug. 24, 2022, 5:05 p.m.
lenoctambule 25 Aug. 24, 2022, 5:42 p.m.
Mitch 55 Aug. 27, 2022, 9:58 a.m.
abubilla https://github.com/juzzrespecter 160 Sept. 11, 2022, 9:27 p.m.
mde-arpe https://github.com/migueldar 110 Sept. 12, 2022, 6:43 a.m.
Matubu https://mathias.ninja 110 Sept. 27, 2022, 11:11 p.m.
kbz_8 https://akel-engine.com 25 Sept. 29, 2022, 2:20 a.m.
0x35c 50 Sept. 29, 2022, 11:53 a.m.
Leonidas 45 Sept. 29, 2022, 11:53 a.m.
Arty 70 Sept. 29, 2022, 2:24 p.m.
afaby https://www.arthurfaby.fr 60 Sept. 29, 2022, 4:20 p.m.
pirabaud 25 Sept. 29, 2022, 4:22 p.m.
jsauvain 50 Sept. 29, 2022, 5:36 p.m.
cerisier 35 Oct. 1, 2022, 9:52 p.m.
ParesseuxRose 470 Oct. 4, 2022, 10:58 p.m.
gtouzali 70 Oct. 6, 2022, 11:11 a.m.
mjuin 25 Oct. 6, 2022, 4:50 p.m.
vusk 80 Oct. 11, 2022, 11:18 a.m.
valkheim 60 Oct. 14, 2022, 5:03 p.m.
Nyr 230 Oct. 15, 2022, 3:43 p.m.
Imhotep 315 Oct. 27, 2022, 5:17 p.m.
Olriik 145 Nov. 2, 2022, 12:24 p.m.
tdeverge 45 Nov. 3, 2022, 4:15 p.m.
mlauro 30 Nov. 4, 2022, 6:22 p.m.
riblanc 1225 Nov. 6, 2022, 11:59 p.m.
luciefer 25 Nov. 9, 2022, 4:43 p.m.
hel-kame 30 Nov. 9, 2022, 4:43 p.m.
tbelleng 25 Nov. 9, 2022, 4:49 p.m.
Hijodelaluna 20 Nov. 9, 2022, 4:49 p.m.
h00kz_ 365 Nov. 23, 2022, 5:14 p.m.
lsneal 120 Dec. 3, 2022, 11:17 a.m.
uncle_j4ck 275 Dec. 7, 2022, 3:49 p.m.
izenynn https://izenynn.com 460 Dec. 12, 2022, 7:06 p.m.
n0bl3ss 180 Dec. 27, 2022, 12:06 p.m.
vvaas 55 Jan. 9, 2023, 7:23 p.m.
0xpwny_OR_ziggs.ma https://thehackernewsbdarija.com/ 385 Feb. 14, 2023, 7:27 p.m.
Lx 65 Feb. 20, 2023, 1:02 p.m.
asarandi https://github.com/asarandi 2215 April 19, 2023, 2:20 p.m.
asoursou https://github.com/ChuOkupai 570 April 23, 2023, 10:20 p.m.
Sh 190 May 31, 2023, 4:22 p.m.
theHidden0ne https://open.spotify.com/track/3PK9MAYUZhUnhEizlmzkGs?si=54cf9d51f8b940b4 45 June 3, 2023, 12:31 p.m.
alyildiz https://github.com/0xSHIN 370 July 3, 2023, 11:04 p.m.
Lxt3h https://lextersec.fr 340 July 9, 2023, 2:44 a.m.
hperrin 100 July 20, 2023, 11:47 a.m.
romanraa 160 Aug. 26, 2023, 4:09 p.m.
hsabir-xoreaxeax https://github.com/lenartlola 1265 Oct. 13, 2023, 6:35 p.m.
pichuu 625 Nov. 14, 2023, 6:54 p.m.
matfranc 220 Nov. 14, 2023, 9:30 p.m.
at0m741 https://at0m741.github.io/at0m741 580 Nov. 19, 2023, 5:11 p.m.
mclaudel 420 Dec. 7, 2023, 3:56 p.m.
aattali 35 Dec. 10, 2023, 2:35 p.m.
NilsLeVrai https://www.youtube.com/watch?v=ixAsNmNROYg 195 Dec. 15, 2023, 5:29 p.m.
gdel-giu 10 Dec. 15, 2023, 10:24 p.m.
mboivin https://twitter.com/m4tya_ 805 Dec. 15, 2023, 11:27 p.m.
CrispLake https://github.com/CrispLake 150 Dec. 19, 2023, 5:30 p.m.
lemmok 675 Feb. 7, 2024, 12:47 p.m.
tomaquet18 https://www.youtube.com/watch?v=Ny_nGsArw1g 410 March 1, 2024, 12:57 p.m.
timmy 60 March 19, 2024, 12:16 p.m.
jquivogn 65 March 19, 2024, 3:14 p.m.
kyungjle 160 March 27, 2024, 2:40 p.m.
MinjaeLee https://github.com/MinjeaLee 2095 April 22, 2024, 5:12 a.m.
Sneezing1090 150 May 21, 2024, 11:56 a.m.
miaoujepwn 225 July 11, 2024, 7:42 p.m.
miaoujehack 225 July 12, 2024, 7:18 p.m.
G3ngh1s 550 July 13, 2024, 12:19 p.m.
00101010 1210 Aug. 4, 2024, 4:34 p.m.
mel-mans 20 Oct. 3, 2024, 11:04 p.m.
deblokc 45 Oct. 11, 2024, 4:56 p.m.
rgramati 215 Oct. 21, 2024, 8:25 p.m.
Wirare 85 Oct. 21, 2024, 8:25 p.m.
pquline https://github.com/pquline 595 Oct. 27, 2024, 5:39 p.m.
42abyss https://42abyss.com 40 Nov. 10, 2024, 12:25 a.m.