ru
Feedback

Не попадитесь на канал ботавода! Telemetrio находит и помечает такие каналы 👉 Хотите видеть метку — оформите подписку

ReverseEngineering

ReverseEngineering

Открыть в Telegram
1 730
Подписчики
-124 часа
-47 дней
+28230 дней

Загружаем данные

Похожие каналы
Нет данных
Возникли проблемы? Пожалуйста, обновите страницу или обратитесь к нашему support-менеджеру .
Входящие и исходящие упоминания
---
---
---
---
---
---
Привлечение подписчиков
дек. '26
декабрь '26
+1
в 0 каналах
ноябрь '26
+316
в 0 каналах
Get PRO
октябрь '26
+194
в 0 каналах
Get PRO
сентябрь '260
в 0 каналах
Get PRO
август '260
в 2 каналах
Get PRO
июль '260
в 0 каналах
Get PRO
июнь '260
в 0 каналах
Get PRO
май '26
+18
в 1 каналах
Get PRO
апрель '26
+23
в 0 каналах
Get PRO
март '26
+17
в 0 каналах
Get PRO
февраль '26
+34
в 0 каналах
Get PRO
январь '26
+18
в 0 каналах
Get PRO
декабрь '25
+46
в 1 каналах
Get PRO
ноябрь '25
+77
в 3 каналах
Get PRO
октябрь '25
+60
в 4 каналах
Get PRO
сентябрь '25
+69
в 4 каналах
Get PRO
август '25
+55
в 0 каналах
Get PRO
июль '25
+93
в 1 каналах
Get PRO
июнь '25
+200
в 4 каналах
Get PRO
май '25
+115
в 4 каналах
Get PRO
апрель '25
+433
в 6 каналах
Get PRO
март '250
в 3 каналах
Get PRO
февраль '250
в 5 каналах
Get PRO
январь '25
+262
в 0 каналах
Get PRO
декабрь '240
в 1 каналах
Get PRO
ноябрь '240
в 2 каналах
Get PRO
октябрь '24
+74
в 2 каналах
Дата
Привлечение подписчиков
Упоминания
Каналы
03 декабря+1
02 декабря0
01 декабря0
Посты канала
print(
        block.capstone
    )
First, we locate the target function using its address. Next, we examine its constituent Basic Blocks and display the assembly instructions. This helps us gain a better understanding of the function's internal structure. Note that the address 0x401120 is merely an example; you should replace it with the address obtained from your own file. Determining the Purpose of Unknown Functions Identifying the scope of a function is only the first step. Subsequently, we must determine the specific purpose of the function. To do this, we examine several key aspects: Function Inputs Observe the arguments the function receives. In the System V ABI standard for the x86-64 architecture, the first six arguments (whether integers or pointers) are typically passed via the following registers:
rdi
rsi
rdx
rcx
r8
r9
Function Output Examine the value returned by the function. In the System V ABI standard for x86-64, the return value is generally placed in the rax register. Calls to Other Functions If a function frequently calls routines such as malloc, free, memcpy, or strcmp, these calls can provide significant clues regarding the function's purpose. Memory Access Analyze what data the function reads from or modifies within memory. For instance, it might interact with buffers, arrays, data structures, or strings. By synthesizing these indicators, we can arrive at a logical interpretation of the function's behavior. An important caveat: function identification is not always definitive. In compiled programs, one may encounter scenarios where identification... These factors make analyzing functions more difficult: Examples include: Function inlining by the compiler Tail Call Optimization The use of function pointers Self-modifying code Indirect jumps Insufficient information to determine function boundaries For instance, when a function is inlined, its code may be placed directly inside another function, meaning it no longer exists as a distinct, independent entity. Consequently, the output from tools like angr should be viewed as the result of an analysis rather than an absolute, definitive truth. In this section, we explored the concept of "stripped binaries" and saw how the removal of symbols complicates the analysis of executable files. We also examined how to identify functions using CFGFast in angr. By analyzing assembly code—including arguments, return values, and internal calls—we were able to gain a solid understanding of each function's purpose. @reverseengine
02 дек., 16:27

2
These names are usually created by analysis tools so that we can identify different functions by their starting address Examining the structure of a function After we have identified the function, we can examine its instructions address = 0x401120 function = project.kb.functions[address] for block in function.blocks: print("Block:", hex(block.addr))
53
3
Part 41 Buffer Overflow Function Identification in Stripped Executable Files Suppose we have an executable file whose Symbol Table information has been removed When we open the file with tools like Ghidra or IDA, we no longer see the real names of many functions and we may only see addresses like the following sub_401120 sub_401180 sub_401230 sub_4012A0 This is where Function Identification becomes important Our goal is to identify the scope of functions and understand as much as possible what each function does Stripped Binary When a program is compiled, the executable file may contain information such as the names of functions and variables, and various symbols This information helps analysis tools to identify the structure of the program more easily However, with a process called Stripping, some of this information can be removed from the executable file For example gcc -O0 -fno-pie -no-pie sample.c -o sample To check the symbols We can use the following command nm sample Now we will create the stripped version strip sample We will run the previous command again nm sample Now we may no longer see the names of functions such as main and the functions that we defined in the program Of course, be aware that Stripping does not necessarily remove all information related to the structure of the program Some information such as code sections and addresses and machine instructions are still present in the file The first step is to find the scope of functions One of the first things we do when analyzing an executable file is to identify the scope of functions There are several important signs for this Function Prologue Many functions in the x86-64 architecture start with instructions to prepare the Stack Frame For example push rbp mov rbp, rsp sub rsp, 0x20 These instructions are usually used to save the previous value of rbp and create a new Stack Frame and allocate the required space for local variables But there is one important point All Functions do not necessarily start with this pattern The compiler may not use Frame Pointer or generate the function code differently So we cannot say with certainty that we have found the beginning of a function just by looking at these instructions Return Instruction The ret instruction is usually considered one of the end marks of a function in the x86-64 architecture leave ret But not every ret necessarily means the end of a standalone function We may also encounter this instruction in special codes or unusual structures Call Instructions The call instruction is used to call a function call 0x401230 If the destination of this instruction is a specific address, we can check that address as a proxy for the start of the function Of course, the presence of the call instruction alone does not guarantee that the destination is definitely a standalone function Identifying Functions with angr Now we want to see how angr can identify functions in an executable file First compile the file with the following instructions and Stripped We will gcc -O0 -fno-pie -no-pie sample.c -o sample strip sample Then we will create a Python script import angr project = angr.Project( "./sample", auto_load_libs=False cfg = project.analyses.CFGFast() for address, function in cfg.kb.functions.items(): print( "Address:", hex(address), "Name:", function.name, "Blocks:", len(function.blocks) ) In this code, we first extract the CFG of the program Then we access the information of the functions that were identified through cfg.kb.functions The output may look something like this Address: 0x401000 Name: sub_401000 Blocks: 3 Address: 0x401120 Name: sub_401120 Blocks: 4 Address: 0x401180 Name: sub_401180 Blocks: 2 Address: 0x401230 Name: sub_401230 Blocks: 5 Names like sub_401120 are definitely not the actual function name
49
4
print( block.capstone ) اینجا اول تابع موردنظر رو از طریق آدرس پیدا میکنیم بعد Basic Block های مربوط به اون رو بررسی میکنیم و دستور های Assembly رو نمایش میدیم این کار کمک میکنه ساختار داخلی تابع رو بهتر بشناسیم البته آدرس 0x401120 فقط یه نمونه هست و باید اون رو با آدرسی که از فایل خودتون به دست آوردید جایگزین کنید تشخیص وظیفه توابع ناشناس پیدا کردن محدوده تابع فقط مرحله اول کاره بعد از اون باید بفهمیم تابع موردنظر دقیقا چه وظیفه‌ای داره برای این کار چند مورد مهم رو بررسی میکنیم ورودی‌های تابع ببینید تابع چه آرگومان‌ هایی دریافت میکنه توی ABI استاندارد System V برای معماری x86-64 شش آرگومان درست یا اشاره‌ گری اول معمولا از طریق رجیستر های زیر ارسال میشن rdi rsi rdx rcx r8 r9 خروجی تابع بررسی کنید تابع چه مقداری برمیگردونه توی ABI استاندارد System V برای x86-64 مقدار بازگشتی معمولا داخل رجیستر rax قرار میگیره فراخوانی توابع دیگه اگه یه تابع مرتب توابعی مثل malloc و free و memcpy یا strcmp رو فراخوانی کنه این فراخوانی‌ ها میتونن سرنخ مهمی درباره وظیفه اون تابع بهمون بدن دسترسی به حافظه بررسی کنید تابع چه اطلاعاتی رو از حافظه میخونه یا تغییر میده مثلا ممکنه با Buffer ها و آرایه‌ ها و ساختارها یا رشته‌ ها سروکار داشته باشه با کنار هم گذاشتن این نشونه‌ها میتونیم به یه برداشت منطقی از عملکرد تابع برسیم یه نکته مهم Function Identification همیشه قطعی نیست توی برنامه‌های کامپایل‌ شده ممکنه با شرایطی روبه‌رو بشیم که شناسایی توابع رو سخت‌ تر میکنن مثل Inline شدن توابع توسط کامپایلر Tail Call Optimization استفاده از Function Pointer کدهای Self-Modifying پرش‌ های غیر مستقیم نبود اطلاعات کافی برای تشخیص مرز توابع برای مثال وقتی یه تابع Inline میشه ممکنه کد اون مستقیما داخل تابع دیگه‌ای قرار بگیره و دیگه محدوده مستقلی برای اون وجود نداشته باشه به همین دلیل خروجی ابزارهایی مثل angr رو باید نتیجه تحلیل در نظر بگیریم نه یه حقیقت قطعی توی این بخش با مفهوم Stripped Binary آشنا شدیم و دیدیم که چرا حذف Symbol ها میتونه تحلیل فایل‌های اجرایی رو سخت‌تر کنه و بررسی کردیم که چطور با استفاده از CFGFast در angr میشه توابع رو شناسایی کرد و با بررسی Assembly و آرگومان‌ ها و مقادیر بازگشتی و فراخوانی‌ های داخلی تا حد زیادی وظیفه هر تابع رو فهمیدیم @reverseengine
50
5
بخش چهل و یکم بافر اورفلو Function Identification در فایل‌های اجرایی Stripped فرض کنید یه فایل اجرایی داریم که اطلاعات Symbol Table اون حذف شده وقتی فایل رو با ابزارهایی مثل Ghidra یا IDA باز میکنیم دیگه خبری از اسم واقعی خیلی از توابع نیست و ممکنه فقط آدرس‌هایی مثل موارد زیر رو ببینیم sub_401120 sub_401180 sub_401230 sub_4012A0 اینجاست که Function Identification اهمیت پیدا میکنه هدف ما اینه که محدوده توابع رو شناسایی کنیم و تا جای ممکن بفهمیم هر تابع چه کاری انجام میده Stripped Binary وقتی یه برنامه کامپایل میشه ممکنه فایل اجرایی شامل اطلاعاتی مثل اسم توابع و متغیرها و Symbol های مختلف باشه این اطلاعات به ابزارهای تحلیل کمک میکنن تا ساختار برنامه رو راحت‌تر شناسایی کنن اما با فرایندی به اسم Stripping میشه بخشی از این اطلاعات رو از فایل اجرایی حذف کرد برای مثال gcc -O0 -fno-pie -no-pie sample.c -o sample برای بررسی Symbol ها میتونیم از دستور زیر استفاده کنیم nm sample حالا نسخه Stripped رو درست میکنیم strip sample دوباره دستور قبلی رو اجرا میکنیم nm sample حالا ممکنه دیگه اسم توابعی مثل main و توابعی که خودمون داخل برنامه تعریف کردیم رو مشاهده نکنیم البته حواستون باشه که Stripping لزوما تمام اطلاعات مربوط به ساختار برنامه رو حذف نمیکنه بعضی اطلاعات مثل بخش‌های کد و آدرس‌ها و دستورالعمل‌های ماشین همچنان داخل فایل وجود دارن اولین قدم پیدا کردن محدوده توابع یکی از اولین کارهایی که موقع تحلیل فایل اجرایی انجام میدیم شناسایی محدوده توابعه برای این کار چندتا نشونه مهم وجود داره Function Prologue خیلی از توابع توی معماری x86-64 با دستورالعمل‌هایی برای آماده‌سازی Stack Frame شروع میشن برای مثال push rbp mov rbp, rsp sub rsp, 0x20 این دستورها معمولا برای ذخیره مقدار قبلی rbp و ایجاد Stack Frame جدید و اختصاص فضای موردنیاز برای متغیرهای محلی استفاده میشن اما یه نکته مهم وجود داره همه توابع لزوما با این الگو شروع نمیشن ممکنه کامپایلر از Frame Pointer استفاده نکنه یا کد تابع رو به شکل متفاوتی تولید کنه پس صرفا با دیدن این دستورها نمیتونیم با اطمینان بگیم ابتدای یه تابع رو پیدا کردیم Return Instruction دستورالعمل ret معمولا یکی از نشونه‌های اخر تابع توی معماری x86-64 محسوب میشه leave ret اما هر ret لزوما به معنی اخر یک تابع مستقل نیست ممکنه توی کد های خاص یا ساختارهای غیرمعمول هم با این دستور روبه‌رو بشیم Call Instructions از دستورالعمل call برای فراخوانی تابع استفاده میشه call 0x401230 اگه مقصد این دستور یه آدرس مشخص باشه میتونیم اون آدرس رو به‌ عنوان یه نماینده برای شروع تابع بررسی کنیم البته وجود دستور call به‌تنهایی تضمین نمیکنه که مقصد حتما یه تابع مستقل باشه شناسایی توابع با angr حالا میخوایم ببینیم angr چطور میتونه توابع یه فایل اجرایی رو شناسایی کنه اول فایل رو با دستور های زیر کامپایل و Stripped میکنیم gcc -O0 -fno-pie -no-pie sample.c -o sample strip sample بعد یه اسکریپت پایتون ایجاد میکنیم import angr project = angr.Project( "./sample", auto_load_libs=False ) cfg = project.analyses.CFGFast() for address, function in cfg.kb.functions.items(): print( "Address:", hex(address), "Name:", function.name, "Blocks:", len(function.blocks) ) توی این کد اول CFG برنامه رو استخراج میکنیم بعد از طریق cfg.kb.functions به اطلاعات توابعی که شناسایی شدن دسترسی پیدا میکنیم خروجی ممکنه چیزی شبیه این باشه Address: 0x401000 Name: sub_401000 Blocks: 3 Address: 0x401120 Name: sub_401120 Blocks: 4 Address: 0x401180 Name: sub_401180 Blocks: 2 Address: 0x401230 Name: sub_401230 Blocks: 5 اسم‌هایی مثل sub_401120 حتما اسم واقعی تابع نیستن این اسم‌ ها معمولا توسط ابزار تحلیل ساخته میشن تا بتونیم توابع مختلف رو از طریق آدرس شروعشون تشخیص بدیم بررسی ساختار یک تابع بعد از اینکه تابع رو شناسایی کردیم میتونیم دستورالعمل‌ های مربوط به اون رو بررسی کنیم address = 0x401120 function = project.kb.functions[address] for block in function.blocks: print("Block:", hex(block.addr))
48
6
MLFQ and Gaming the Scheduler In the previous section, we saw how the MLFQ algorithm changes the priority of programs by examining their behavior. Programs that use a lot of CPU time are gradually moved to lower queues. Programs that wait for I/O operations after a short processing time can usually maintain a higher priority. But here there is an interesting problem. Suppose a process realizes that if it stops its execution before the Quantum is over and frees up the CPU, it may still remain in the high-priority queue. In fact, this process can use the scheduling rules to its advantage. We call this behavior Gaming the Scheduler. How to bypass the Scheduler. Suppose a process is at the highest priority level and has a certain amount of time to use the CPU. In a simple and wrong implementation, the Scheduler may only check whether the process has used up the entire Quantum. Now the process can stop its execution before the Quantum is over and get the CPU again later. For Example High Priority Queue Process starts | v Uses CPU | v Releases CPU before Quantum ends | v Waits for I/O | v Returns to Ready Queue | v Keeps High Priority If the Scheduler only cares about the Quantum being exhausted, the process may never be moved to a lower queue As a result, a CPU-bound program can behave like an interactive program in this way MLFQ solution to prevent this behavior There is an important concept in the MLFQ design discussed in the OSTEP book called Time Allotment Instead of the Scheduler just checking whether the process has consumed a full Quantum or not, it should calculate the total time used by the CPU at each priority level For example, suppose Time Allotment = 10 ms First CPU Burst = 3 ms Second CPU Burst = 2 ms Third CPU Burst = 5 ms Total CPU Usage = 10 ms Even if the process has released the processor several times before the Quantum is exhausted, the times used are added together When the total CPU usage reaches the Time Allotment of that level, the process priority is reduced Therefore, temporarily releasing the CPU cannot cause a process to stay at the highest level forever Priority remains Difference between Quantum and Time Allotment These two concepts should not be confused Quantum is the maximum time a process can have the CPU at any time But Time Allotment is the total time a process is allowed to use the CPU at a priority level before being transferred to a lower level For example, Quantum may be 4 milliseconds and Time Allotment may be 10 milliseconds In this situation, the process can receive the CPU several times, but the total time spent on the CPU at this level should not exceed the assigned share Gaming the Scheduler shows that the design of the Scheduler is not limited to just dividing the CPU time between the processes, the operating system must also consider behaviors that may cause abuse of the scheduling rules For this reason, calculating the total time spent on the CPU at each priority level is considered one of the important rules of MLFQ @reverseengine
43
7
MLFQ و Gaming the Scheduler توی قسمت قبل دیدیم که الگوریتم MLFQ چطور با بررسی رفتار برنامه‌ ها اولویت اون‌ها رو تغییر میده برنامه‌ هایی که زمان زیادی از CPU استفاده میکنن به‌ مرور به صف‌ های پایین‌ تر منتقل میشن در مقابل برنامه‌ هایی که بعد از یه پردازش کوتاه منتظر عملیات I/O میمونن معمولا میتونن اولویت بالاتری رو حفظ کنن اما اینجا یه مشکل جالب وجود داره فرض کنید یه Process متوجه بشه که اگه قبل از تموم شدن Quantum اجرای خودش رو متوقف کنه و CPU رو آزاد کنه ممکنه همونجوری توی صف با اولویت بالا بمونه در واقع این Process میتونه از قوانین زمان‌ بندی به نفع خودش استفاده کنه به این رفتار Gaming the Scheduler میگیم چطور Scheduler رو دور میزنن فرض کنید یه Process توی بالاترین سطح اولویت قرار داره و مقدار مشخصی زمان برای استفاده از CPU در اختیارشه توی یه پیاده‌سازی ساده و اشتباه ممکنه Scheduler فقط بررسی کنه که Process کل Quantum رو مصرف کرده یا نه حالا Process میتونه قبل از تموم شدن Quantum اجرای خودش رو متوقف کنه و بعدا دوباره CPU دریافت کنه برای مثال High Priority Queue Process starts | v Uses CPU | v Releases CPU before Quantum ends | v Waits for I/O | v Returns to Ready Queue | v Keeps High Priority اگه Scheduler فقط به تموم شدن Quantum توجه کنه ممکنه این Process هیچوقت به صف پایین‌ تر منتقل نشه در نتیجه یه برنامه CPU-bound میتونه با این روش رفتاری شبیه برنامه‌ های Interactive از خودش نشون بده راهکار MLFQ برای جلوگیری از این رفتار توی طراحی MLFQ که در کتاب OSTEP بررسی میشه یه مفهوم مهم به اسم Time Allotment وجود داره به جای اینکه Scheduler فقط بررسی کنه Process یه Quantum کامل رو مصرف کرده یا نه باید مجموع زمان استفاده‌ شده از CPU در هر سطح اولویت رو محاسبه کنه برای مثال فرض کنید Time Allotment = 10 ms First CPU Burst = 3 ms Second CPU Burst = 2 ms Third CPU Burst = 5 ms Total CPU Usage = 10 ms حتی اگه Process چند بار قبل از تموم شدن Quantum پردازنده رو آزاد کرده باشه زمان‌ های مصرف‌ شده با هم جمع میشن وقتی مجموع زمان استفاده از CPU به Time Allotment اون سطح برسه اولویت Process کاهش پیدا میکنه بنابراین آزاد کردن موقت CPU نمیتونه باعث بشه یه Process برای همیشه توی بالاترین سطح اولویت باقی بمونه تفاوت Quantum و Time Allotment این دو مفهوم رو نباید با هم اشتباه بگیریم Quantum حداکثر زمانیه که یه Process در هر نوبت میتونه CPU رو در اختیار داشته باشه اما Time Allotment مجموع زمانیه که یه Process اجازه داره در یه سطح اولویت از CPU استفاده کنه قبل از اینکه به سطح پایین‌تر منتقل بشه برای مثال ممکنه Quantum برابر 4 میلی‌ثانیه و Time Allotment برابر 10 میلی‌ثانیه باشه توی این شرایط Process میتونه چند بار CPU دریافت کنه اما مجموع زمان استفاده از CPU در این سطح نباید از سهم تعیین‌شده بیشتر بشه Gaming the Scheduler نشون میده که طراحی Scheduler فقط به تقسیم زمان CPU بین Process ها محدود نمیشه سیستم‌ عامل باید رفتار هایی رو هم در نظر بگیره که ممکنه باعث سواستفاده از قوانین زمان‌بندی بشن به همین دلیل محاسبه مجموع زمان استفاده از CPU در هر سطح اولویت یکی از قوانین مهم MLFQ محسوب میشه @reverseengine
51
8
Advanced Root Detection & Bypass Techniques In this blog, we will explore techniques related to root detection on Android devices and methods to bypass it. Our main focus will be on the strategies employed by app developers to protect their applications and prevent them from running on compromised devices. https://8ksec.io/advanced-root-detection-bypass-techniques/ #mobile #android #reverse #frida #root #detection #bypass
55
9
Ultrafast x86-64 decompiler https://github.com/DimitriFourny/fast-decomp
57
10
WebKit_Exploit_Chain_Pwn2Own.pdf
62
11
Malware_Techniques_AHU-stamped.pdf
67
12
+3
Windows Debugging Disassembling Reversing SE - Practical Foundation
75
13
#windows #kernel
78
14
UserComment is a plugin to display user-added comments in disassembly and pseudocode views. https://forum.reverse4you.org/t/usercomment-an-ida-plugin-to-show-user-added-comments/19747 @reverseengine
164
15
https://reversing.info/posts/hyperdeceit/ @reverseengine
151
16
https://github.com/snowcra5h/windows-api-function-cheatsheets @reverseengine
140
17
Trailmark parses source code into a graph of functions, types, calls, and other relationships, then lets you ask structural questions about it: • Which entrypoints can reach this function, and along which call paths? • What changed in the attack surface between two commits? • Which functions write this Solidity storage variable? • Where did call resolution stop, so that reachability results are incomplete? https://github.com/trailofbits/trailmark @reverseengine
133
18
Linkers and Loaders @reverseengine
110
19
Recent Trends and Tactics of Agentic AI Attacks @reverseengine
114
20
This remains one of the best videos I’ve ever seen: How the Best Hackers Learn Their Craft Simple, direct, and without any unnecessary fluff.
119

Мы используем файлы cookie для улучшения вашего опыта просмотра.
Нажав «Принять все», вы соглашаетесь с политикой использования файлов cookie.