Here is a link with more info about the virus:
So, we can identify that someone is infected by finding the $Recycle.Bin folders in the shares. But we need to track down where this came from. To do that we want to see the owner of the $Recycle.Bin folder because that is the person that created it.
You can't get the owner of the $Recycle.Bin folder by using Windows Explorer because Explorer treats this as a special folder type and limits what you can see. However, you can find the owner by using Get-ACL in PowerShell.
On a large file server with many shares, it's useful to scan the whole server to verify the extent of the infection. The script below starts in the current directory, finds all of the Recycle.Bin folders, displays the full folder path and the owner of each folder.
$Folders=Get-ChildItem -Force -Recurse -ErrorAction SilentlyContinue | Where {$_.psiscontainer -eq $true -and $_.Name -like '$Recycle.B*' }
Foreach ($f in $Folders) {
$owner=($f | get-acl).owner
$Name=$f.Fullname
Write-Host "Folder: $Name"
Write-Host "Owner: $owner"
Write-Host ""
}
Some others have written scripts to rename folders back to their original names which is useful if many folders were infected. See these links for more information:
- Perl script - https://community.spiceworks.com/topic/1662889-network-drive-folders-renamed-and-hidden-virus
- PowerShell script - https://www.reddit.com/r/PowerShell/comments/4su2jg/zeroday_malware_renamed_folders_on_a_shared_drive/
No comments:
Post a Comment