Xeno-rat
Loading...
Searching...
No Matches
Hidden_handler.Process_Handler Class Reference
Collaboration diagram for Hidden_handler.Process_Handler:

Classes

struct  PROCESS_INFORMATION
 
struct  STARTUPINFO
 

Public Member Functions

 Process_Handler (string DesktopName)
 
bool StartExplorer ()
 Starts the Windows Explorer process and returns a boolean indicating success.
 
string GetOperaPath ()
 Retrieves the installation path of the Opera browser.
 
string GetBravePath ()
 Retrieves the installation path of the Brave browser.
 
string GetOperaGXPath ()
 Retrieves the installation path of Opera GX browser from the Windows registry.
 
string getChromePath ()
 Retrieves the file path for the installed Chrome browser.
 
string GetEdgePath ()
 Retrieves the installation path of Microsoft Edge browser.
 
string GetFirefoxPath ()
 Retrieves the installation path of Mozilla Firefox from the Windows registry.
 
bool StartChrome ()
 Starts the Chrome browser with specified options and user data directory.
 
bool StartOpera ()
 Starts the Opera browser with specified settings and user data directory.
 
bool StartOperaGX ()
 Starts the Opera GX browser with specific configurations.
 
bool StartBrave ()
 Starts the Brave browser with specified settings.
 
bool StartEdge ()
 Starts the Edge browser with specific configurations and user data directory.
 
bool StartFirefox ()
 Starts the Firefox browser with a specific profile and returns a boolean indicating success.
 
async Task< bool > CloneChrome ()
 Clones the Chrome user data directory to a specified location.
 
async Task< bool > CloneOperaGX ()
 Clones the Opera GX browser data to a specified directory.
 
async Task< bool > CloneOpera ()
 Clones the Opera browser data to a specified directory.
 
async Task< bool > CloneBrave ()
 Clones the Brave browser data to a specified directory.
 
async Task< bool > CloneFirefox ()
 Clones the Firefox profile data to a specified directory.
 
async Task< bool > CloneEdge ()
 Clones the Microsoft Edge user data to a specified directory.
 
async Task CopyDirAsync (string sourceDir, string destinationDir)
 Asynchronously copies all directories and files from the source directory to the destination directory.
 
bool CreateProc (string filePath)
 Creates a new process using the specified file path.
 

Private Member Functions

static bool CreateProcess (string lpApplicationName, string lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool bInheritHandles, int dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, ref STARTUPINFO lpStartupInfo, ref PROCESS_INFORMATION lpProcessInformation)
 Creates a new process and its primary thread. The new process runs in the security context of the calling process.
 
async Task CopyDirectoriesAsync (string sourceDir, string destinationDir)
 Copies all directories from the source directory to the destination directory asynchronously.
 

Static Private Member Functions

static string RecursiveFileSearch (string currentDirectory, string targetFileName)
 Recursively searches for a file with the specified name in the given directory and its subdirectories.
 
static async Task CopyFilesInParallelAsync (IEnumerable< string > files, string sourceDir, string destinationDir, int maxParallelism)
 Copies files from the source directory to the destination directory in parallel using the specified maximum parallelism.
 

Private Attributes

string DesktopName
 

Constructor & Destructor Documentation

◆ Process_Handler()

Hidden_handler.Process_Handler.Process_Handler ( string DesktopName)
inline

Member Function Documentation

◆ CloneBrave()

async Task< bool > Hidden_handler.Process_Handler.CloneBrave ( )
inline

Clones the Brave browser data to a specified directory.

Returns
True if the cloning process is successful; otherwise, false.

This method asynchronously clones the data from the Brave browser's user directory to the specified data directory. If the specified data directory already exists, it is deleted and recreated before the cloning process. The method returns true if the cloning process is successful; otherwise, it returns false.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CloneChrome()

async Task< bool > Hidden_handler.Process_Handler.CloneChrome ( )
inline

Clones the Chrome user data directory to a specified location.

Returns
True if the cloning operation is successful; otherwise, false.

This method asynchronously clones the Chrome user data directory to the specified location. It first checks if the destination directory exists, and if so, deletes it and creates a new one. Then it copies all the contents from the source directory to the destination directory. If any exception occurs during the cloning process, the method returns false.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CloneEdge()

async Task< bool > Hidden_handler.Process_Handler.CloneEdge ( )
inline

Clones the Microsoft Edge user data to a specified directory.

Returns
True if the cloning operation is successful; otherwise, false.
Exceptions
ExceptionThrown when an error occurs during the cloning process.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CloneFirefox()

async Task< bool > Hidden_handler.Process_Handler.CloneFirefox ( )
inline

Clones the Firefox profile data to a specified directory.

Returns
True if the cloning process is successful; otherwise, false.

This method searches for the Firefox profile directory in the user's AppData folder and clones the profile data to a specified directory. If the profile directory is not found or the cloning process fails, the method returns false. The method uses asynchronous operations to perform file and directory manipulations.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CloneOpera()

async Task< bool > Hidden_handler.Process_Handler.CloneOpera ( )
inline

Clones the Opera browser data to a specified directory.

Returns
True if the cloning operation is successful; otherwise, false.

This method asynchronously clones the Opera browser data from the default location to the specified directory. If the specified directory already exists, it will be deleted and recreated to ensure a clean copy.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CloneOperaGX()

async Task< bool > Hidden_handler.Process_Handler.CloneOperaGX ( )
inline

Clones the Opera GX browser data to a specified directory.

Returns
True if the cloning operation is successful; otherwise, false.

This method asynchronously clones the data directory of the Opera GX browser to the specified location. If the target directory already exists, it will be deleted and recreated before the cloning operation.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CopyDirAsync()

async Task Hidden_handler.Process_Handler.CopyDirAsync ( string sourceDir,
string destinationDir )
inline

Asynchronously copies all directories and files from the source directory to the destination directory.

Parameters
sourceDirThe source directory to copy from.
destinationDirThe destination directory to copy to.
Returns
A task representing the asynchronous operation.

This method first copies all directories from the source directory to the destination directory using an asynchronous operation. Then, it enumerates all files in the source directory and its subdirectories, and asynchronously copies them to the destination directory in parallel with a specified maximum parallelism limit.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CopyDirectoriesAsync()

async Task Hidden_handler.Process_Handler.CopyDirectoriesAsync ( string sourceDir,
string destinationDir )
inlineprivate

Copies all directories from the source directory to the destination directory asynchronously.

Parameters
sourceDirThe source directory from which directories will be copied.
destinationDirThe destination directory to which directories will be copied.

This method asynchronously enumerates all directories in the sourceDir and its subdirectories. For each directory found, it creates a corresponding directory in the destinationDir . The relative path of each directory in the source directory is used to create the corresponding directory in the destination directory.

Here is the caller graph for this function:

◆ CopyFilesInParallelAsync()

static async Task Hidden_handler.Process_Handler.CopyFilesInParallelAsync ( IEnumerable< string > files,
string sourceDir,
string destinationDir,
int maxParallelism )
inlinestaticprivate

Copies files from the source directory to the destination directory in parallel using the specified maximum parallelism.

Parameters
filesThe collection of file paths to be copied.
sourceDirThe source directory from which the files are to be copied.
destinationDirThe destination directory to which the files are to be copied.
maxParallelismThe maximum number of parallel copy operations allowed.
Exceptions
ArgumentNullExceptionThrown when any of the input parameters is null.
ArgumentExceptionThrown when the source or destination directory is invalid.
IOExceptionThrown when an I/O error occurs during file copy operation.
Returns
A task representing the asynchronous operation.

This method asynchronously copies the files from the source directory to the destination directory using parallel copy tasks. It creates a semaphore to control the maximum parallelism and ensures that the maximum number of parallel copy operations is not exceeded. Each file is copied asynchronously using File.Copy(string, string, bool) method within a try-finally block to release the semaphore. The method returns a task representing the asynchronous operation of copying all files in parallel.

Here is the caller graph for this function:

◆ CreateProc()

bool Hidden_handler.Process_Handler.CreateProc ( string filePath)
inline

Creates a new process using the specified file path.

Parameters
filePathThe path of the file to be executed as a new process.
Returns
True if the process creation is successful; otherwise, false.

This method creates a new process using the file specified by filePath . It initializes the STARTUPINFO structure si and the PROCESS_INFORMATION structure pi . The function returns true if the process creation is successful; otherwise, it returns false.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateProcess()

static bool Hidden_handler.Process_Handler.CreateProcess ( string lpApplicationName,
string lpCommandLine,
IntPtr lpProcessAttributes,
IntPtr lpThreadAttributes,
bool bInheritHandles,
int dwCreationFlags,
IntPtr lpEnvironment,
string lpCurrentDirectory,
ref STARTUPINFO lpStartupInfo,
ref PROCESS_INFORMATION lpProcessInformation )
private

Creates a new process and its primary thread. The new process runs in the security context of the calling process.

Parameters
lpApplicationNameThe name of the module to be executed.
lpCommandLineThe command line to be executed.
lpProcessAttributesA pointer to a SECURITY_ATTRIBUTES structure that determines whether the returned handle to the new process object can be inherited by child processes.
lpThreadAttributesA pointer to a SECURITY_ATTRIBUTES structure that determines whether the returned handle to the new thread object can be inherited by child processes.
bInheritHandlesIf this parameter is TRUE, each inheritable handle in the calling process is inherited by the new process. If the parameter is FALSE, the handles are not inherited.
dwCreationFlagsThe flags that control the priority class and the creation of the process.
lpEnvironmentA pointer to an environment block for the new process.
lpCurrentDirectoryThe full path to the current directory for the process.
lpStartupInfoA pointer to a STARTUPINFO or STARTUPINFOEX structure.
lpProcessInformationA pointer to a PROCESS_INFORMATION structure that receives identification information about the new process.
Returns
True if the function succeeds, otherwise false. To get extended error information, call GetLastError.
Here is the caller graph for this function:

◆ GetBravePath()

string Hidden_handler.Process_Handler.GetBravePath ( )
inline

Retrieves the installation path of the Brave browser.

Returns
The installation path of the Brave browser, or null if the path is not found.

This method retrieves the installation path of the Brave browser by accessing the Windows Registry. It first attempts to retrieve the path from the registry key "HKEY_CLASSES_ROOT\BraveHTML\shell\open\command". If the path is found, it is then parsed to extract the installation path. The method returns the installation path if found, otherwise it returns null.

Here is the caller graph for this function:

◆ getChromePath()

string Hidden_handler.Process_Handler.getChromePath ( )
inline

Retrieves the file path for the installed Chrome browser.

Returns
The file path for the installed Chrome browser, or null if the path is not found.

This method retrieves the file path for the installed Chrome browser by accessing the Windows Registry and extracting the path from the registry key "HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command". If the path is found, it is split using the double quotes character and the second element is returned as the file path. If the path is not found, null is returned.

Here is the caller graph for this function:

◆ GetEdgePath()

string Hidden_handler.Process_Handler.GetEdgePath ( )
inline

Retrieves the installation path of Microsoft Edge browser.

Returns
The installation path of Microsoft Edge browser, or null if the browser is not installed.

This method retrieves the installation path of Microsoft Edge browser by accessing the registry key at the specified location. If the registry key is found and contains a valid path, it returns the installation path as a string. If the registry key is not found or does not contain a valid path, it returns null.

Here is the caller graph for this function:

◆ GetFirefoxPath()

string Hidden_handler.Process_Handler.GetFirefoxPath ( )
inline

Retrieves the installation path of Mozilla Firefox from the Windows registry.

Returns
The installation path of Mozilla Firefox if found; otherwise, null.

This method retrieves the installation path of Mozilla Firefox by accessing the Windows registry. It first looks for the current version of Firefox, then retrieves the installation path from the registry. If the installation path is found, it is returned; otherwise, null is returned.

Here is the caller graph for this function:

◆ GetOperaGXPath()

string Hidden_handler.Process_Handler.GetOperaGXPath ( )
inline

Retrieves the installation path of Opera GX browser from the Windows registry.

Returns
The installation path of Opera GX browser, or null if it is not found.

This method retrieves the installation path of Opera GX browser by accessing the Windows registry. It first looks for the relevant registry keys under the path SOFTWARE\Clients\StartMenuInternet, and then iterates through the subkeys to find the one related to Opera GX. Once the appropriate subkey is found, it accesses the command subkey to retrieve the installation path of Opera GX browser. The method returns the installation path as a string, or null if it is not found.

Here is the caller graph for this function:

◆ GetOperaPath()

string Hidden_handler.Process_Handler.GetOperaPath ( )
inline

Retrieves the installation path of the Opera browser.

Returns
The installation path of the Opera browser, or null if it is not found.

This method retrieves the installation path of the Opera browser by searching the Windows Registry under the path "SOFTWARE\Clients\StartMenuInternet". It iterates through the subkeys to find the one related to Opera (excluding Opera GX) and retrieves the installation path from the registry key "shell\open\command". If the installation path is found, it is returned after trimming any surrounding double quotes. If not found, null is returned.

Here is the caller graph for this function:

◆ RecursiveFileSearch()

static string Hidden_handler.Process_Handler.RecursiveFileSearch ( string currentDirectory,
string targetFileName )
inlinestaticprivate

Recursively searches for a file with the specified name in the given directory and its subdirectories.

Parameters
currentDirectoryThe current directory to start the search from.
targetFileNameThe name of the file to search for.
Returns
The path of the directory containing the file with the specified name, or null if the file is not found.

This method recursively searches for the file with the specified name in the given directory and its subdirectories. If the file is found, the method returns the path of the directory containing the file. If the file is not found, the method returns null.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartBrave()

bool Hidden_handler.Process_Handler.StartBrave ( )
inline

Starts the Brave browser with specified settings.

Returns
True if the Brave browser is successfully started; otherwise, false.

This method starts the Brave browser with the specified settings. It first checks for the existence of the Brave browser executable at the path obtained from GetBravePath method. If the path is null or the file does not exist, the method returns false. Otherwise, it creates a new process with the specified command-line arguments to start the Brave browser and returns true if the process is successfully created; otherwise, false.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartChrome()

bool Hidden_handler.Process_Handler.StartChrome ( )
inline

Starts the Chrome browser with specified options and user data directory.

Returns
True if Chrome is successfully started; otherwise, false.

This method starts the Chrome browser with the specified options and user data directory. It first checks for the existence of the Chrome executable at the path obtained from getChromePath method. If the path is null or the file does not exist, the method returns false. Otherwise, it creates a process to start Chrome with the specified options and user data directory.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartEdge()

bool Hidden_handler.Process_Handler.StartEdge ( )
inline

Starts the Edge browser with specific configurations and user data directory.

Returns
True if the Edge browser is successfully started; otherwise, false.

This method retrieves the path for the Edge browser, and if the path is valid and the file exists, it creates a process to start the Edge browser with specific configurations such as no-sandbox, allow-no-sandbox-job, disable-gpu, and a user data directory. If the path is null or the file does not exist, the method returns false.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartExplorer()

bool Hidden_handler.Process_Handler.StartExplorer ( )
inline

Starts the Windows Explorer process and returns a boolean indicating success.

Returns
True if the Windows Explorer process was successfully started; otherwise, false.

This method modifies the Windows registry to set a specific value to prevent combining taskbar buttons. It then attempts to start the Windows Explorer process either as an admin or restricted user. If successful, it returns true; otherwise, it attempts to start the Windows Explorer process and returns the result.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartFirefox()

bool Hidden_handler.Process_Handler.StartFirefox ( )
inline

Starts the Firefox browser with a specific profile and returns a boolean indicating success.

Returns
True if the Firefox browser is successfully started; otherwise, false.

This method retrieves the path of the Firefox executable and the data directory for the Firefox profile. If the path is not found or the file does not exist, the method returns false. Otherwise, it creates a new process to start the Firefox browser with the specified profile and returns true upon successful start.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartOpera()

bool Hidden_handler.Process_Handler.StartOpera ( )
inline

Starts the Opera browser with specified settings and user data directory.

Returns
True if the Opera browser is successfully started; otherwise, false.

This method retrieves the path of the Opera browser executable and checks if it exists. If the path is not found or the file does not exist, the method returns false. If the path is valid and the file exists, the method creates a new process for the Opera browser with specified settings and user data directory.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartOperaGX()

bool Hidden_handler.Process_Handler.StartOperaGX ( )
inline

Starts the Opera GX browser with specific configurations.

Returns
True if the Opera GX browser is started successfully; otherwise, false.

This method starts the Opera GX browser with specific configurations, including disabling GPU, setting the user data directory, and other options. If the path to the Opera GX executable is not found or the file does not exist, the method returns false.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ DesktopName

string Hidden_handler.Process_Handler.DesktopName
private

The documentation for this class was generated from the following file: