# Examining Binaries

### What is this file?

run the `file` command!

Check what kind of security features are enabled

#### Checksec

Check the properties of a binary with [Checksec](https://github.com/slimm609/checksec.sh).

Output example from their repo:

![](https://4085302497-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFMQjmmLeUT8hgiI8az%2F-MGO8RzBlhG1T14fMC03%2F-MGPABKCSi5MScTtrk68%2Fimage.png?alt=media\&token=f178f345-49ce-44f2-bd32-16fcbcdbf261)

#### Hardening Check

Check binaries for security hardening features. I find it less reliable when it comes to RELRO.

Included in the **devscripts** package on debian-based distros.

#### gef - checksec

[gef](https://github.com/hugsy/gef) has a pretty neat `checksec` command.

### Let's dump stuff!

* `strings <FILE>` - look for any readable clue.
* `objdump -x <FILE> | less` - Information about the file, headers, sections and more. pipe for easy reading.
* `strace <FILE>` - examine syscalls in the binary.
* `ltrace <FILE>` - examine library calls in the binary.
