You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# LEMON - An eBPF Memory Dump Tool for x64 and ARM64 Linux
1
+
# LEMON - An eBPF Memory Dump Tool for x64 and ARM64 Linux and Android
2
2
3
-
LEMON is a Linux memory dump tool that utilizes eBPF to capture the entire physical memory of a system and save it in LiME format, compatible with forensic tools such as Volatility 3.
3
+
LEMON is a Linux and Android memory dump tool that utilizes eBPF to capture the entire physical memory of a system and save it in LiME format, compatible with forensic tools such as Volatility 3.
4
4
5
5
LEMON is available as a precompiled static binary for x64 and ARM64, leveraging a CO-RE (Compile Once, Run Everywhere) eBPF program. This allows analysts to dump system memory without compiling anything on the target machine, checking for specific compatibility with installed libraries and kernel versions, and without requiring kernel headers. It is particularly useful in scenarios where loading kernel modules is not possible (e.g., due to Secure Boot) or when `{/proc, /dev}/kcore` is unavailable.
6
6
7
7
## Usage
8
8
9
-
Copy the `lemon` binary to the target machine and initiate the memory dump with:
9
+
Copy the `lemon` binary to the target machine and initiate a memory dump on disk with:
10
10
11
11
```sh
12
-
./lemon memory.dump
12
+
./lemon.ARCH -d memory_on_disk.dump
13
+
```
14
+
15
+
For a network dump instead use:
16
+
17
+
```sh
18
+
./lemon.ARCH -n TARGET_IP -p TARGET_PORT
19
+
```
20
+
while on the target machine
21
+
```sh
22
+
nc -l -p TARGET_PORT > memory_by_net.dump
13
23
```
14
24
15
25
This generates a `memory.dump` file in LiME format, containing all physical memory pages. Since running eBPF programs typically requires root privileges, LEMON must be executed as `root` or with an appropriate `sudo` configuration.
16
26
17
27
## Build
18
28
19
-
Precompiled static binaries (`static_bins/lemon.x64` and `static_bins/lemon.arm64`) are available in this repository. Analysts can also compile LEMON themselves, either dynamically or statically. The dynamic version requires the presence of `libbpf`, `libz`, `libelf`, and `libzstd` on the target machine, whereas the static version has no external dependencies. Note that the build machine **MUST** have the same CPU architecture as the target.
29
+
Precompiled static binaries are available in this repository (check the Github actions tab). Analysts can also compile LEMON themselves, either dynamically or statically. The dynamic version requires the presence of `libbpf`, `libz`, `libelf`, and `libzstd` on the target machine, whereas the static version has no external dependencies. Note that the build machine **MUST** have the same CPU architecture as the target.
20
30
21
31
### Dependencies
22
32
@@ -36,7 +46,7 @@ Other distributions provide equivalent packages, which at minimum allow compilin
0 commit comments