ReverseEngineering – Telegram
ReverseEngineering
1.24K subscribers
40 photos
10 videos
55 files
666 links
Download Telegram
رمزنگاری/انکدینگ رشته‌ ها String Encryption


برنامه‌ ها رشته‌های متنی مثل پیام‌ها، URLها، کلیدها رو توی فایل به‌صورت رمز یا انکد نگه میدارن و فقط موقع اجرا بازشون میکنن تا کسی با نگاه کردن توی باینری پیداشون نکنه

توضیح:
دیدید یه باینری اصلا رشته‌ای نداره؟ احتمالا سازنده‌ ش رشته‌ها رو قفل کرده یعنی مثلا «hello» تو فایل نیست چون یه تابع موقع اجرا میاد و بازش میکنه این کار براشون میتونه یه جور حفاظتی باشه یا تلاش برای مخفی کاری

مثال:
تو دیس‌ اسمبلر میبینید هیچ رشته خوانایی نیست اما یه تابع هست که چند باره حافظه رو میسازه و داده‌ ها رو تبدیل میکنه احتمالا رشته‌ها در runtime ساخته میشن

دیتکشن

نبودن رشته‌های خوانا در بخش .rdata/.rodata

توابعی که مکررا حافظه allo/free میکنن و روی بافر ها عملیات بیت/بایت انجام میدن

بی نظمی بالای بخش داده‌ ها


میتیگیشن (مدافع/برنامه‌نویس)

مدافع: monitor فراخوانی‌ هایی که رشته‌ ها رو در runtime میسازن و بررسی الگوهای غیرعادی

توسعه‌دهنده: از لاگینگ و کانفیگ امن استفاده کنید تا نیاز به رمزنگاری بی‌ دلیل رشته‌ ها کم بشه




String Encryption

Programs store text strings (such as messages, URLs, keys) in a file as a password or encoding and only open them at runtime so that no one can find them by looking in the binary

Explanation:
Did you see that a binary doesn't have a string at all? The creator probably locked the strings, meaning "hello" is not in the file because a function comes in and opens it at runtime. This could be a form of protection or an attempt at hiding.

Example:
In the disassembler, you see no readable strings, but there is a function that creates memory and converts data several times. The strings are probably created at runtime.

Detection

No readable strings in the .rdata/.rodata section

Functions that repeatedly allocate/free memory and perform bit/byte operations on buffers

High entropy in the data section

Mitigation (Defender/Programmer)

Defender: Monitor calls that create strings at runtime and check for unusual patterns

Developer: Use secure logging and configuration to reduce the need for unnecessary string encryption

@reverseengine
3