19 API Basics CreateProcess
19 API Basics CreateProcess
https://t.me/learningnets
Creating Process
Process
( notepad.exe )
CreateProcess( )
notepad.exe
RAM
https://t.me/learningnets
Function Prototype
BOOL CreateProcess(
lpApplicationName, // Path to the executable
lpCommandLine, // Command-line arguments
lpProcessAttributes, // Security attributes for the process
lpThreadAttributes, // Security attributes for the primary thread
bInheritHandles, // Inherit handles from parent process
dwCreationFlags, // Process creation flags
lpEnvironment, // Pointer to environment block
lpCurrentDirectory, // Working directory of the new process
lpStartupInfo, // Pointer to STARTUPINFO structure
lpProcessInformation // Pointer to PROCESS_INFORMATION structure
);
https://t.me/learningnets
Function Prototype
Flag Description
BOOL CreateProcess(
CREATE_NEW_CONSOLE Creates a new console window for the child
lpApplicationName, // Path to the executable process.
lpCommandLine, // Command-line arguments CREATE_SUSPENDED Creates the process in a suspended state.
(Used in process injection.)
lpProcessAttributes, // Security attributes for the process
CREATE_NO_WINDOW Runs the process without showing any
lpThreadAttributes, // Security attributes for the primary thread window (used for stealth malware).
bInheritHandles, // Inherit handles from parent process CREATE_DEFAULT_ERROR_ Uses the parent's error mode.
MODE
dwCreationFlags, // Process creation flags
CREATE_BREAKAWAY_FRO Allows the process to run outside of a job
lpEnvironment, // Pointer to environment block M_JOB object.
lpCurrentDirectory, // Working directory of the new process CREATE_SEPARATE_WOW_ Runs the process in a separate virtual DOS
VDM machine (for 16-bit apps).
lpStartupInfo, // Pointer to STARTUPINFO structure
CREATE_SHARED_WOW_VD Runs in a shared DOS environment (legacy
lpProcessInformation // Pointer to PROCESS_INFORMATION structure M stuff).
https://t.me/learningnets
Function Prototype
BOOL CreateProcess(
lpApplicationName, // Path to the executable
lpCommandLine, // Command-line arguments
lpProcessAttributes, // Security attributes for the process
lpThreadAttributes, // Security attributes for the primary thread
bInheritHandles, // Inherit handles from parent process
dwCreationFlags, // Process creation flags
lpEnvironment, // Pointer to environment block
lpCurrentDirectory, // Working directory of the new process
lpStartupInfo, // Pointer to STARTUPINFO structure
lpProcessInformation // Pointer to PROCESS_INFORMATION structure
);
https://t.me/learningnets
Function Prototype
BOOL CreateProcess(
lpApplicationName, // Path to the executable
lpCommandLine, // Command-line arguments
lpProcessAttributes, // Security attributes for the process
lpThreadAttributes, // Security attributes for the primary thread
bInheritHandles, // Inherit handles from parent process
dwCreationFlags, // Process creation flags
lpEnvironment, // Pointer to environment block
lpCurrentDirectory, // Working directory of the new process
It controls how the new process starts (window size, position, appearance, etc.).
lpStartupInfo, // Pointer to STARTUPINFO structure
lpProcessInformation // Pointer to PROCESS_INFORMATION structure
);
https://t.me/learningnets
Function Prototype
BOOL CreateProcess(
lpApplicationName, // Path to the executable
lpCommandLine, // Command-line arguments
lpProcessAttributes, // Security attributes for the process
lpThreadAttributes, // Security attributes for the primary thread
bInheritHandles, // Inherit handles from parent process
dwCreationFlags, // Process creation flags
lpEnvironment, // Pointer to environment block
lpCurrentDirectory, // Working directory of the new process
It controls how the new process starts (window size, position, appearance, etc.).
lpStartupInfo, // Pointer to STARTUPINFO structure
lpProcessInformation // Pointer to PROCESS_INFORMATION structure
);
https://t.me/learningnets
Function Prototype
BOOL CreateProcess(
lpApplicationName, // Path to the executable
lpCommandLine, // Command-line arguments
lpProcessAttributes, // Security attributes for the process
lpThreadAttributes, // Security attributes for the primary thread
bInheritHandles, // Inherit handles from parent process
dwCreationFlags, // Process creation flags
lpEnvironment, // Pointer to environment block
lpCurrentDirectory, // Working directory of the new process
lpStartupInfo, // Pointer to STARTUPINFO structure
Holds important information about the newly created process.
lpProcessInformation // Pointer to PROCESS_INFORMATION structure
);
https://t.me/learningnets