1 730
UPX
و نمونه های پیچیده تر
فایل اصلی فشرده یا رمز میشه و Loader موقع اجرا محتوا رو آنپک میکنه پس static analysis اغلب بی فایده ست تا وقتی که unpack شدن انجام بشه
یه فایل ممکنه کوچیک باشه ولی وقتی اجرا میکنی ناگهان یه قسمت بزرگ از کد تو حافظه ظاهر میشه یعنی packed بوده مثل اینکه یه جعبه بسته رو باز کنی و داخلش یه چیز دیگه باشه
مثال:
تو header یا با نگاه کردن به اندازه امضا میتونید بفهمید packed هست در اجرای برنامه میبینید بخش ههای جدیدی توی حافظه ساخته میشه علامت unpacking
دیتکشن
امضا های packer شناخته شده توی header
افزایش ناگهانی بخشهای اجرایی در حافظه بعد از لانچ
رفتار loader در runtime که حافظه رو مینویسه و بعد jump به بخش جدید میزنه
میتیگیشن
اجرا در sandbox/VM با مانیتورینگ کامل (فایل شبکه پروسس) تا رفتار after-unpack دیده بشه
برای سازمان ها: امضای فایل ها و بررسی integrity قبل از اجرا و quarantine کردن فایل های مشکوک
UPX and more complex examples
The original file is compressed or encrypted and the Loader unpacks the content at runtime, so static analysis is often useless until unpacking is done
A file may be small, but when you run it, a large chunk of code suddenly appears in memory, meaning it was packed, like opening a closed box and there's something else inside
Example:
You can tell it's packed in the header or by looking at the size of the signature. When running the program, you'll see new sections being created in memory, a sign of unpacking
Detection
Known packer signatures in the header
Sudden increase in executable sections in memory after launch
Loader behavior at runtime that writes memory and then jumps to a new section
Mitigation
Run in a sandbox/VM with full monitoring (process network file) to see after-unpack behavior
For organizations: file signing and integrity checking before execution and quarantining suspicious files
@reverseengine
06 Noy 2025, 13:45

