Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
LiME — 用于从 Linux 和 Android 设备获取易失性内存的内核模块,可生成具备取证可靠性的内存捕获,并保存到磁盘或通过网络传输。 | Kitploit
工具/GitHubGitHub/jtsylve/lime
内存取证取证分析移动取证数字取证事件响应
GitHubjtsylve/lime

LiME

用于从 Linux 和 Android 设备获取易失性内存的内核模块,可生成具备取证可靠性的内存捕获,并保存到磁盘或通过网络传输。

查看仓库
2.0k3684个月前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

LiME ~ Linux 内存提取器

一个用于从 Linux 及基于 Linux 的设备(如 Android)获取易失性内存的可加载内核模块 (LKM)。LiME 在获取过程中会尽量减少与用户空间及内核空间进程之间的交互,从而生成比其他专为 Linux 内存获取而设计的工具更具取证可靠性的内存镜像。

目录

  • 功能特性
  • 使用方法
    • 示例
  • 可用摘要算法
  • 压缩
  • 演讲介绍

功能特性

  • 从 Linux(及 Android)系统进行完整内存获取
  • 通过网络接口或本地磁盘进行获取
  • 多种输出格式(raw、lime、padded)
  • 可选的哈希计算,并生成辅助摘要文件
  • 可选的 zlib 压缩
  • 极小的进程占用

使用方法

有关 LiME 用法及内部原理的详细文档可在项目的“docs”目录中找到。

LiME 使用 insmod 命令加载模块,并传递其执行所需的参数。

root@kitploit:~
insmod ./lime-$(uname -r).ko "path=<outfile | tcp:<port>>
    format=<raw|padded|lime>
    [digest=<digest>]
    [dio=<0|1>]
    [compress=<0|1>]
    [localhostonly=<0|1>]
    [timeout=<ms>]"

path (required):
    outfile ~ name of file to write to on local system
    tcp:port ~ network port to communicate over

format (required):
    padded ~ pads all non-System RAM ranges with 0s,
             starting from physical address 0
    lime ~ each range prepended with fixed-size header
           containing address space info
    raw ~ concatenates all System RAM ranges
          (warning: original position of dumped memory
          is likely to be lost therefore making analysis
          in most forensics tools impossible. This format
          is not recommended except for advanced users)

digest (optional):
    Hash the RAM and provide a sidecar file with the sum.
    The sidecar filename is the output path with the
    digest algorithm appended (e.g., ram.lime.sha256).
    Supports kernel version 2.6.11 and up. See below for
    available digest options.
    Note: enabling digest increases code complexity during
    acquisition and will overwrite additional memory. Only
    use when integrity verification is required.

compress (optional):
    1 ~ compress output with zlib
    0 ~ do not compress (default)
    Only available when CONFIG_ZLIB_DEFLATE is enabled
    in the kernel.
    Note: enabling compression allocates additional kernel
    memory (~24 KB) and increases code complexity during
    acquisition, disturbing more of the target system's
    memory. Only use when the speed or size benefit is
    required.

dio (optional):
    1 ~ attempt to enable Direct IO
    0 ~ do not attempt Direct IO (default)

localhostonly (optional):
    1 ~ restricts tcp to only listen on localhost
    0 ~ binds on all interfaces (default)

timeout (optional):
    1000 ~ max milliseconds tolerated to read/write a
           page (default, 1 second). If a page exceeds the timeout,
           the rest of that memory range is skipped.
       0 ~ disable the timeout so the slow region will
           be acquired.
    This feature is only available on kernels >= 2.6.35.

示例

Linux

将内存获取到文件:

root@kitploit:~
insmod ./lime-$(uname -r).ko "path=/tmp/ram.lime format=lime"

通过网络获取内存:

root@kitploit:~
insmod ./lime-$(uname -r).ko "path=tcp:4444 format=lime"

然后在接收端机器上:

root@kitploit:~
nc <target-ip> 4444 > ram.lime

Android

使用 adb 加载 LiME 并通过网络获取内存:

root@kitploit:~
adb push lime.ko /sdcard/lime.ko
adb forward tcp:4444 tcp:4444
adb shell
su
insmod /sdcard/lime.ko "path=tcp:4444 format=lime"

在主机上使用 netcat 捕获内存转储:

root@kitploit:~
nc localhost 4444 > ram.lime

获取到 SD 卡:

root@kitploit:~
insmod /sdcard/lime.ko "path=/sdcard/ram.lime format=lime"

可用摘要算法

LiME 支持内核加密库中可用的任何摘要算法。通过 TCP 转储时收集摘要文件需要建立 2 个独立的连接。

root@kitploit:~
nc localhost 4444 > ram.lime
nc localhost 4444 > ram.sha1

为方便快速查阅,以下是所支持的摘要算法列表。

2.6.11 及以上

root@kitploit:~
crc32c
md4, md5
sha1, sha224, sha256, sha384, sha512
wp512, wp384, wp256

3.0 及以上

root@kitploit:~
rmd128, rmd160, rmd256, rmd320

4.10 及以上

root@kitploit:~
sha3-224, sha3-256, sha3-384, sha3-512

压缩

压缩可以显著减少获取内存镜像所需的时间。与未压缩的传输相比,它可实现 4 倍的加速,而内存开销极低(约 24 KB)。

RAM 文件将采用 zlib 格式,这与 gzip 或 zip 格式不同。原因是内核内嵌的 deflate 库不支持这些格式。

你可以使用 pigz 或任何兼容 zlib 的库来解压它。

root@kitploit:~
nc localhost 4444 | unpigz > ram.lime

请注意,只有 RAM 文件会被压缩。摘要文件不会被压缩,其哈希值与未压缩的数据相对应。

演讲介绍

LiME 由 Joe Sylve 在 2012 年 Shmoocon 大会上首次发表。

Youtube~ Android 读心术:使用 DMD 和 Volatility 进行内存获取 与分析

下载工具