> For the complete documentation index, see [llms.txt](https://cajac.gitbook.io/ctf-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cajac.gitbook.io/ctf-notes/rev-eng/reverse-engineering-introduction.md).

# Reverse Engineering - Introduction

{% hint style="info" %}
Please note that this site is a continuous **work-in-progress!**
{% endhint %}

**Reverse engineering** (also known as backwards engineering or back engineering) is a process or method through which one attempts to understand through [deductive reasoning](https://en.wikipedia.org/wiki/Deductive_reasoning) how a previously made device, process, system, or piece of [software](https://en.wikipedia.org/wiki/Software) accomplishes a task with very little (if any) insight into exactly how it does so. Depending on the system under consideration and the technologies employed, the knowledge gained during reverse engineering can help with repurposing obsolete objects, doing security analysis, or learning how something works.

## Reverse Engineering Checklist

Checklist for easier reverse engineering challenges in CTFs:

<details>

<summary>Get more information by running the program</summary>

```bash
chmod +x <file>
./<file> -h
./<file>
```

</details>

<details>

<summary>Check for strings</summary>

View all strings of length 8+ characters and their (decimal) position in the file

```bash
strings -n 8 -t d <file>
```

</details>

<details>

<summary>Run the program under ltrace/strace</summary>

```bash
ltrace <program> [<params>]
strace <program> [<params>]
```

</details>

## ToDo

* Add section with disassemblers (incl. online ones)

## Resources

**ltrace** - Linux manual page: <https://man7.org/linux/man-pages/man1/ltrace.1.html>

Reverse engineering - Wikipedia: <https://en.wikipedia.org/wiki/Reverse_engineering>

**strace** - Linux manual page: <https://man7.org/linux/man-pages/man1/strace.1.html>
