1 730
Repost from کیر تو کارمندی، باگ بزنید
این همچنان یکی از بهترین ویدیوهایی هست که دیدم:
How the Best Hacker Learn Their Craft
ساده، مستقیم بدون اضافه گویی.
28 نوفمبر, 14:49
0x12 Dark Development Claude just made this tool, HeapExplorer, hooks Windows heap functions to show realtime memory allocations, detect encrypted buffers, extract strings, and spot implant patterns like key rotation and unbacked shellcode I can upload to GitHub if anyone is interested in the tool.
explorer.exe
|
└── notepad.exe
|
└── child.exe
|
└── another.exe
Each process can have multiple child processes, which leads to the formation of a larger tree structure.
How does Windows create a new process?
One of the key Windows APIs for creating a new process is the following function:
CreateProcessW()
This function allows a program to create and execute a new process.
The general structure for using this function is as follows:
BOOL CreateProcessW(
LPCWSTR lpApplicationName,
LPWSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
BOOL bInheritHandles,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCWSTR lpCurrentDirectory,
LPSTARTUPINFOW lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
);
You don't need to memorize every single parameter right now.
It is sufficient to familiarize yourself with a few of the more important ones.
What happens when a process is created? When a program uses CreateProcessW, Windows must perform several steps to prepare the new process for execution.
Simply put, the process can be visualized as follows:
Parent Process
|
v
CreateProcessW()
|
v
Process Creation
|
v
Create Initial Thread
|
v
Load Executable Image
|
v
Initialize Process
|
v
Execute Program
This is merely a simplified overview of the process.
In reality, creating a process and preparing its execution environment involves many more internal steps within the Windows Kernel and User Mode.
Difference Between a Process and a Thread
It is important to note a key distinction here:
A Process and a Thread are two distinct concepts.
A Process provides the execution environment for a program, encompassing elements such as a virtual address space, resources, and process-specific information.
A Thread, on the other hand, is the unit that actually executes the program's instructions.
Every process contains at least one initial thread, through which the program's execution begins.
Process | ├── Thread 1 | ├── Thread 2 | └── Thread 3Therefore, when a new process is created, Windows must also prepare its initial thread so that the program can run. Parent PID Every process in Windows is assigned an identifier known as a PID (Process ID). When a new process is created, information regarding its parent process can also be recorded within various Windows data structures. For example:
explorer.exe
PID: 1200
| └── notepad.exe
PID: 2400
Parent PID: 1200
In this example, the Parent PID value of the child process points to the PID of the parent process.
However, there is a technical nuance to consider.
The "Parent PID"
does not necessarily always refer to the process
that actually performed the operation of creating the new process.
Windows provides mechanisms through which the "registered" parent process for a new process can be specified.
Therefore, in technical analysis, we must distinguish between the process that actually created the new process and the "registered" parent process.
Why is understanding this important?
نستخدم ملفات تعريف الارتباط لتحسين تجربة التصفح لديك.
بالنقر على «قبول الكل»، فإنك توافق على سياسة استخدام ملفات تعريف الارتباط.