Tags: rev 

Rating:

Towards the end of the `assembler dump` in GDB, you see:

```
0x0000555555555236 <+241>: call 0x555555555030 <puts@plt>
0x000055555555523b <+246>: mov eax,0x0
0x0000555555555240 <+251>: mov rbx,QWORD PTR [rbp-0x8]
0x0000555555555244 <+255>: leave
0x0000555555555245 <+256>: ret
```

Set a breakpoint at this `puts` and run the program.

```
b *0x0000555555555236
r
```

Notice the items on the stack

```
0000| 0x7fffffffda30 ("DUCTF{d1d_You_Just_ltrace_296faa2990acbc36}}")
0008| 0x7fffffffda38 ("d_You_Just_ltrace_296faa2990acbc36}}")
0016| 0x7fffffffda40 ("st_ltrace_296faa2990acbc36}}")
0024| 0x7fffffffda48 ("e_296faa2990acbc36}}")
0032| 0x7fffffffda50 ("2990acbc36}}")
0040| 0x7fffffffda58 --> 0x7d7d3633 ('36}}')
0048| 0x7fffffffda60 --> 0xf0b5ff
0056| 0x7fffffffda68 --> 0xc2
```

You got the flag!

```
DUCTF{d1d_You_Just_ltrace_296faa2990acbc36}
```

> Alternatively, you could just execute `ltrace` and read the bytes, wrap the string with `DUCTF{}`