
وحدة نواة لالتقاط الذاكرة المتطايرة من أجهزة لينكس وأندرويد، تُنتج لقطات سليمة جنائياً على القرص أو عبر الشبكة.
وحدة نواة قابلة للتحميل (LKM) لالتقاط الذاكرة المتطايرة من لينكس والأجهزة القائمة على لينكس، مثل أندرويد. تقلل LiME من تفاعلها مع عمليات مساحة المستخدم ومساحة النواة أثناء الالتقاط، مما ينتج لقطات ذاكرة أكثر سلامةً من ناحية الطب الشرعي الرقمي مقارنةً بالأدوات الأخرى المصممة لالتقاط ذاكرة لينكس.
يمكن العثور على توثيق مفصّل حول استخدام LiME وبنيتها الداخلية في دليل "docs" الخاص بالمشروع.
يستخدم LiME الأمر insmod لتحميل الوحدة، مع تمرير الوسائط المطلوبة لتنفيذها.
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.
التقاط الذاكرة إلى ملف:
insmod ./lime-$(uname -r).ko "path=/tmp/ram.lime format=lime"
التقاط الذاكرة عبر الشبكة:
insmod ./lime-$(uname -r).ko "path=tcp:4444 format=lime"
ثم على الجهاز المستقبِل:
nc <target-ip> 4444 > ram.lime
استخدم adb لتحميل LiME والتقاط الذاكرة عبر الشبكة:
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:
nc localhost 4444 > ram.lime
الالتقاط إلى بطاقة SD:
insmod /sdcard/lime.ko "path=/sdcard/ram.lime format=lime"
يدعم LiME أي خوارزمية تجزئة متاحة في مكتبة التشفير الخاصة بالنواة. يتطلب جمع ملف التجزئة عند التفريغ عبر TCP اتصالين منفصلين.
nc localhost 4444 > ram.lime
nc localhost 4444 > ram.sha1
لمرجع سريع، إليك قائمة بخوارزميات التجزئة المدعومة.
crc32c
md4, md5
sha1, sha224, sha256, sha384, sha512
wp512, wp384, wp256
rmd128, rmd160, rmd256, rmd320
sha3-224, sha3-256, sha3-384, sha3-512
يمكن أن يقلل الضغط بشكل ملحوظ من الوقت اللازم لالتقاط الذاكرة. ويمكنه تحقيق تسريع يصل إلى 4 أضعاف مقارنة بالنقل غير المضغوط مع عبء ذاكرة ضئيل (~24 كيلوبايت).
سيكون ملف الذاكرة بصيغة zlib، وهي مختلفة عن صيغتي gzip أو zip. والسبب هو أن مكتبة deflate المدمجة في النواة لا تدعمهما.
لفك ضغطه يمكنك استخدام pigz أو أي مكتبة متوافقة مع zlib.
nc localhost 4444 | unpigz > ram.lime
لاحظ أنه يتم ضغط ملف الذاكرة فقط. ملف التجزئة غير مضغوط، وستطابق قيمة التجزئة البيانات غير المضغوطة.
تم تقديم LiME لأول مرة في Shmoocon 2012 بواسطة Joe Sylve.
Youtube~ قراءة العقل في أندرويد: التقاط الذاكرة وتحليلها مع DMD و Volatility