Created
          April 24, 2019 20:00 
        
      - 
      
- 
        Save noahpeltier/d7b2f75d2c016164dac5bd6bcb102678 to your computer and use it in GitHub Desktop. 
    Scanns all local drives for files encrypted by the QQ Randsomware
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $drives = @(Get-CimInstance Win32_LogicalDisk -Filter 'DriveType=3') | |
| Write-Host "Loading Logical Drives`n$drives" -ForegroundColor Cyan | |
| $logfile = 'C:\temp\FoundFiles.log' | |
| $logpath = 'C:\temp' | |
| If (!$logpath) {New-Item -ItemType Directory -Name 'temp'} | |
| #If (!$logfile) {New-Item -ItemType Directory -Name 'FoundFiles.log'} | |
| Write-host "Scanning Directories for files" -ForegroundColor Cyan | |
| Foreach ($drive in $drives) { | |
| Get-childitem -Path "$($drive.DeviceID)\" -Recurse -Filter '*QQ*.eth' -ErrorAction SilentlyContinue | Select-Object FullName,LastWriteTime | ForEach-Object { | |
| $string = "Found $($_.FullName) | last write time $($_.LastWriteTime)" | |
| Write-Host $string -ForegroundColor Yellow | |
| Add-Content -Value $string -Path $logfile | |
| } | |
| } | |
| If (!$logfile) {Write-Host "No files were found on this system"} Else {Invoke-Item $logfile} | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment