Tags: diff xxd 

Rating:


# EASYCTF - Diff

> description: Sometimes, the differences matter. Especially between the files in this archive.

> category: Forensics

We have 4 binaries, and according to the title, we will have to use the `diff` command:

```
xxd file > file_xxd
xxd file2 > file2_xxd
xxd file3 > file3_xxd
xxd file4 > file4_xxd
```

Now we can diff:

```
diff file_xxd file2_xxd
.ELF............
.ELF.....e...... // -> e
................
.........a...... // -> a
.. .............
.. .......s..... // -> s
.......... .....
................
....yct... ..... // -> yct
......f......... // -> f
D...............
D......{........ // -> {
................
.......d........ // -> d
................
.......i........ // -> i
.

diff file_xxd file3_xxd
................
..f............. // -> f
..`.....|.......
..`.f...|....... // -> f
................
.....i.......... // -> i
................
.....ni......... // -> ni
................
......tl........ // -> tl
_r..rela.dyn..re
_r..rey_.dyn..re // -> ????
................
......an_....... // -> an_
.

diff file_xxd file4_xxd
................
ez.._problem!}.. // -> ez_problem!}
```

We have this : `easyctf{diffinitl????an_ez_problem!}`

On the diff between file and file3, we can easily find the correct keys: `easyctf{diffinitly_an_ez_problem!}`

Original writeup (https://ctfshellclub.github.io/2018/02/21/easyctf-Diff/).