# Linux binaries

## Strace

In the simplest case strace runs the specified command until it exits. It intercepts and records the system calls which are called by a process and the signals which are received by a process.

**Strace a running process**

```
strace -p [pid]
```

**Strace a program**

```
strace ./program [arguments]
```

**Strace a program and threads**

```
strace -f ./program [arguments]
```

## Ltrace

**ltrace** is a program that simply runs the specified command until it exits. It intercepts and records the dynamic library calls which are called by the executed process and the signals which are received by that process.

```
ltrace ./program
```

## Strings

Classic, but OP. You can run strings on binaries to print all 'strings' in a file:

```
strings ./program
```

## Ghidra

Time to read some code.&#x20;

Ghidra is a software reverse engineering (SRE) framework created and maintained by the [National Security Agency](https://www.nsa.gov) Research Directorate.

{% embed url="<https://github.com/NationalSecurityAgency/ghidra>" %}

<figure><img src="/files/awcoxkjhOAIlxS882TEE" alt=""><figcaption></figcaption></figure>


---

# 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://notes.incendium.rocks/pentesting-notes/reversing/linux-binaries.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.
