Malware News The AVCrypt Ransomware Tries To Uninstall Your AV Software

Faybert

Level 24
Thread author
Verified
Top Poster
Well-known
Jan 8, 2017
1,320
A new ransomware named AVCrypt has been discovered that tries to uninstall existing security software before it encrypts a computer. Furthermore, as it removes numerous services, including Windows Update, and provides no contact information, this ransomware may be a wiper.

First discovered by MalwareHunterTeam, and further analyzed by myself and Michael Gillespie, we decided to name this ransomware AVCrypt as the sample file names are av2018.exe. The developer, though, may be naming it LOL based on some of the debug messages found in the ransomware samples.
....
....
AVCrypt tries to uninstall your security software
As already stated, when AVCrypt runs it will attempt to remove installed security software from the victim's computer. It does this in two ways; by specifically targeting Windows Defender and Malwarebytes and by querying for installed AV software and then attempting to remove them.

First AVCrypt will delete Windows services required for the proper operation of Malwarebytes and Windows Defender. It does this using a command like the following format:
...
...
 
D

Deleted member 65228

Windows Defender already has self-defence.

Once malware has infected the machine and has also gained administrative privileges, it's already game over. Malware with standard rights is not going to be able to disable Windows Defender, however of course once it's acquired administrative privileges, it will be able to do so.

This was how Windows was designed to work.
 
F

ForgottenSeer 69673

Windows Defender already has self-defence.

You're all missing the point. The point is that once malware has infected the machine and has also gained administrative privileges, it's already game over. Malware with standard rights is not going to be able to disable Windows Defender, however of course once it's acquired administrative privileges, it will be able to do so.

This was how Windows was designed to work.

I will have to go back and look at the link because I thought it was kinda vague as to the infection method.
 

upnorth

Level 68
Verified
Top Poster
Malware Hunter
Well-known
Jul 27, 2015
5,458
Windows Defenders reply :
x0jLKjLC_o.png
 

Nightwalker

Level 24
Verified
Honorary Member
Top Poster
Content Creator
Well-known
May 26, 2014
1,339
Windows Defender runs at "System protected process" level, it is actually better than many other solutions self defense implementations.


I am little sceptical, does this kind of command really deletes a System Protected Process?

01c9ea4a-4bfb-49c0-9875-d5116749d211.png


I know that Windows Defender can be easily disabled using Group Policy (it is by design), but the rest (delete the files) I am not so sure.

Updates and servicing
After the anti-malware service is launched as protected, other non-protected processes (and even admins) aren't able to stop the service. In the case of updates to the service binaries, the anti-malware service needs to receive a callback from the installer to stop itself so that it can be serviced. After the service is stopped, the anti-malware installer can perform upgrades and then follow the steps described above in the Registering the service and Starting the service as protected sections to register the certificate and start the service as protected.

Note that the service should ensure that only trusted callers can stop the service. Allowing untrusted callers to do so defeats the purpose of protecting the service.

Source: https://msdn.microsoft.com/en-us/library/windows/desktop/dn313124(v=vs.85).aspx?f=255&MSPPError=-2147217396
 
Last edited:
D

Deleted member 65228

Windows Defender runs at "System protected process" level, it is actually better than many other solutions self defense implementations.
February 2018 – Opcode

To find the right part to read relevant, use the Find Tool and enter "We’re going to take a look at how the process protection mechanism which is built-into Windows".

That bit you will find there is on the Windows process protection mechanism which is internal, you may find it interesting since you mentioned it here.
 
D

Deleted member 65228

@silversurfer kindly provided me with a sample for the AVCrypt ransomware variant and I took a look at it earlier, however I've only performed some static reverse engineering through disassembly.

When the sample is first started, here's some of the things it may attempt to do
1. Attempt to obtain SeDebugPrivilege and SeShutdownPrivilege
2. Mutex creation
3. Anti-debugging is accomplished via IsDebuggerPresent. The IsDebuggrPresent Win32 API routine works internally by checking the Process Environment Block IsBeingDebugged field
4. Attempts to delete a registry key: HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\System\\DisableCMD
5. Attempts to delete a registry key: HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableRegistryTools
6. Attempts to disable some security software
7. Registry modification: HKEY_LOCAL_MACHINE\\HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Download for the CheckExeSignatures
9. Disables User Account Control and SmartScreen (quick glance it would appear this is the case)
10. Changes the wallpaper on the Desktop (quick glance it would appear this is the case)

The articles from others will probably cover more on what the sample does/how it works, it does more than the above and some operations involve usage of cmd, etc. The sample isn't limited to the above.

I was mainly interested in how the encryption routine worked so I located it in the disassembly, here's some insight into it.

1. CreateFileW
2. CryptAcquireContextW
3. CryptCreateHash
4. CryptHashData
5. CryptDeriveKey
6. ReadFile
7. CryptEncrypt
8. WriteFile
9. CloseHandle

The CreateFileW (KERNEL32 -> KERNELBASE) call is required to get a handle on the targeted file for encryption, and since it's CreateFileW, the buffer is unicode-encoded (wide-string). Without acquiring the file handle, the ransomware will be unable to read/write from and to the file. It will also need to have the necessary privileges to acquire the file handle with the desired handle access rights needed for its read/write operations.

The ReadFile (KERNEL32 -> KERNELBASE) call is required to read the contents of the file into memory. This is done so the original contents now stored in-memory can be encrypted, and then the then-encrypted buffer will replace the original contents with the file write operation.

The WriiteFile (KERNEL32 -> KERNELBASE) call is required to overwrite the original file contents with the encrypted copy.

The CloseHandle call is to close the opened file handle now the operation with that file is over.

Regarding enumeration of files on the system, it relies on FindFirstFileExW and FindNextFileExW Win32 API routines to enumerate through directories recursively and locate files which are a target for the encryption procedure.

-----
The sample will rely on the MoveFileEx Win32 API routine to try and automatically delete itself on the next reboot. This works depending on the parameter data given to the routine, and the routine internally works by using the registry.

For the record, disabling of Windows Defender isn't only via one technique. It attempts to attack multiple areas, e.g. registry configuration area for it as well.

In other words it is your average home user malware and will likely be blocked by your AV.
 

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top