# Useful tools and techniques for Binary Exploitation

### File command

The file command is useful to check what kind of file you have.

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-M6tPOOBb78h0fQS2aim%2F-M6un8VjcMEpmt8O9Yv9%2Fimage.png?alt=media\&token=2e8a614c-0c67-4dd3-b0b6-f3146e13b856)

### Hexdump

We can hexdump a file to get its actual values.

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-M6tPOOBb78h0fQS2aim%2F-M6uo4GzCg-XAyblVXgY%2Fimage.png?alt=media\&token=c1a95168-1c2f-4829-b85c-aed3fdb9e223)

By using hexdump we can also get some information about the binary like the outlined parts of the image above.&#x20;

### mas ASCII

We can use the man pages to get a fast ASCII table when we need to check some values.

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-M6tPOOBb78h0fQS2aim%2F-M6uoaf25tjXuNfi_WtI%2Fimage.png?alt=media\&token=44bd385b-2245-4ad9-b07f-a23f9c001c0f)

### Strings

Scan a file and print all printable character sequences with at least a certain length.

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-M6tPOOBb78h0fQS2aim%2F-M6upByQyeDUTWcVUH9Y%2Fimage.png?alt=media\&token=0ab7a92d-7399-4f7d-bc73-18dee0a7c8b9)

As shown above, the key for this license check binary could be found just using strings.

### Objdump

We can use objdump to read the disassembly, instead o gdb using `objdump -M intel -d <program>`.

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-M6tPOOBb78h0fQS2aim%2F-M6upzPEaDkFcjvItRys%2Fimage.png?alt=media\&token=dcfd71d0-14d2-4dfa-9e8d-dc767674965a)

### STRACE

Strace can be used to trace system calls and signals.

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-M6tPOOBb78h0fQS2aim%2F-M6utQ38jxCvyRUevtkM%2Fimage.png?alt=media\&token=fdf2942d-4020-496d-aecd-0dd13717334c)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://666isildur.gitbook.io/ethical-hacking/binary-exploitation-exploit-development/useful-tools-and-techniques-for-binary-exploitation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
