Skip to content

Commit 6dc2a4d

Browse files
committed
Update readme
1 parent d81ba78 commit 6dc2a4d

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

README.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,32 @@
22

33
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.
44

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.
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. If CO-RE is not available on the target machine a universal kernel-independent no CO-RE version of lemon can be run on it.
66

77
## Usage
88

99
Copy the `lemon` binary to the target machine and initiate a memory dump on disk with:
1010

1111
```sh
12-
./lemon.ARCH -d memory_on_disk.dump
12+
./lemon.MODE.ARCH -d memory_on_disk.dump
1313
```
1414

1515
For a network dump instead use:
1616

1717
```sh
18-
./lemon.ARCH -n TARGET_IP -p TARGET_PORT
18+
./lemon.MODE.ARCH -n TARGET_IP -p TARGET_PORT
1919
```
2020
while on the target machine
2121
```sh
2222
nc -l -p TARGET_PORT > memory_by_net.dump
2323
```
2424

2525
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.
26+
Sometimes LEMON returns reading error on a 2MB block of pages: it is normal and due to KFENCE security infrastructure of the kernel.
2627

2728
## Build
2829

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.
30+
Precompiled static binaries are available in this repository (check the Github actions tab) or in the release section. Analysts can also compile LEMON themselves, either dynamically or statically. The dynamic version requires the presence of `libbpf`, `libz`, `libelf`, `libzstd` and `libcap` 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.
3031

3132
### Dependencies
3233

@@ -46,23 +47,15 @@ Other distributions provide equivalent packages, which at minimum allow compilin
4647
git clone [email protected]:eurecom-s3/lemon.git && cd lemon
4748
```
4849

49-
2. **Generate a valid **`vmlinux.h`** file (only for CO-RE builds):**
50+
2. **Compile:**
5051

51-
Copy a valid `vmlinux.h` file into `lemon/` or generate one with:
52-
53-
```sh
54-
make vmlinux
55-
```
56-
57-
3. **Compile:**
58-
59-
- Dynamic binary (set CORE=0 for non CO-RE binaries):
52+
- Dynamic binary (MODE accepts: core, nocore (for using no CO-RE version based on kernel headers) and nocoreuni (for no CO-RE version using the universal header included in LEMON)):
6053
```sh
61-
make CORE=1
54+
make MODE=core
6255
```
6356
- Static binary:
6457
```sh
65-
make CORE=1 static
58+
make MODE=core static
6659
```
6760

6861
## Limitations
@@ -72,7 +65,7 @@ Other distributions provide equivalent packages, which at minimum allow compilin
7265
7366
## TODO
7467
75-
- [X] Support non CO-RE kernels ([this library](https://github.com/eunomia-bpf/bpf-compatible) might help)
68+
- [X] Support non CO-RE kernels
7669
- [X] Insert checks on kernel versions and ```CONFIG_``` kernel options to extend support
7770
- [X] Implement network dump (TCP)
7871
- [X] Implement dump with reduced granule if page fail to be read

0 commit comments

Comments
 (0)