Massgrave Command Update and Troubleshooting
Massgrave Command Update and Troubleshooting
Post-execution, the script seeks out temporary files starting with 'MAS' located in system or user temporary directories and deletes them. These cleanup operations help prevent unnecessary file accumulation, ensuring that system storage remains optimized and secure .
The function 'Check3rdAV' is used to detect if any third-party antivirus software products might block the script execution. It does so by retrieving antivirus products from the 'root\SecurityCenter2' namespace and excluding those with 'windows' in their display name. If such software is present, it alerts the user .
The script checks if 'cmd.exe' is functioning by attempting an echo operation and analyzing the result. If it is not functioning, a warning is issued, and users are directed to report the issue via the troubleshoot link, emphasizing transparency in handling potential execution failures .
The script is designed to operate in an environment with administrative privileges, highlighted by a condition checking if the current identity group matches 'S-1-5-32-544'. It accordingly sets file paths for the script execution based on the availability of such privileges, ensuring the necessary permissions for its operations .
If an Autorun registry entry is detected, the script warns that CMD may crash and suggests the user manually remove the registry property using the command 'Remove-ItemProperty -Path [path] -Name 'Autorun'', guiding them towards self-resolution and preventing potential command-line conflicts .
The script utilizes a set of multiple URLs to retrieve the script components. It iteratively attempts to download the script from these URLs using 'Invoke-WebRequest', sorted in a random order, thus ensuring redundancy. If downloading fails from all sources, it attempts to diagnose potential issues like antivirus interference .
The current command used for massgrave.dev scripts, namely 'irm https://massgrave.dev/get | iex', is set to be retired soon, and users are advised to switch to using 'irm https://get.activated.win | iex'. This change is likely made to improve script efficiency, security, or reliability .
The script checks if PowerShell is running in Full Language Mode by comparing the LanguageMode value against 0. If it is not running in Full Language Mode, the script outputs a message and provides a link to resolve the issue, 'https://gravesoft.dev/fix_powershell', enhancing the user's capability to switch modes easily .
The script checks the existence of files using the 'Test-Path' cmdlet in the 'CheckFile' function. If the file does not exist, it attempts to diagnose the issue by invoking the 'Check3rdAV' function and alerts the user with a failure message, directing them to troubleshooting resources at 'https://massgrave.dev/troubleshoot' .
The script verifies the integrity of the downloaded script by computing the SHA-256 hash of the script content and comparing it against a known hash value, '5FDDC4C7FE3D51CA291EF49C1A6EA9DF7F5EE5171D5BEBC4678600DA233E55D5'. Any mismatch in hashing results in an operation abort with user notification, ensuring that only untampered scripts are utilized .