Could this idea against ransomwares be possible?

W

Wave

Hi! Could someone clarify me another thing : if you connect usb while there isa ransomware infection in a PC , it crypt also files in the usb drive/unit .

But can the ransomware transfer itself in the external hd/ usb stick ?

Thank you
If your USB was connected after the ransomware had collected a list of the drives (e.g. some ransomware will collect a list of the drives before searching for files instead of going along as it finds them) then your files won't be affected, however it really depends on the enumeration method used by the ransomware. Also, if your USB was plugged in prior to running the ransomware sample, then it will most likely be affected - not all ransomware will even encrypt files on removable disk drives but will only target specific locations... All depends down to the ransomware at the end of the day since each sample can work differently.

Yes, ransomware can attach itself to the external HDD/USB stick via exploits (e.g. firmware-based exploits) or via usage of features within the OS itself (e.g. AutoRun). An example of a firmware exploit which ransomware could leverage to auto-infect USB devices would be BadUSB, you can find out more information here: The BadUSB exploit is deadly, but few may be hit, This thumbdrive hacks computers. “BadUSB” exploit makes devices turn “evil”

Hope this helped and stay safe,
Wave. ;)
 
W

Wave

Thank you very much !
Regarding part 2 of your post : so , if i connect the usb on another PC then,the ransomware could start encrypting the other PC ?

Wow
Essentially the answer to your question is yes (if an exploit like that is being used), since it allows an attacker to have malicious software embedded within the removable device, which will spread back to any host the device is connected too.

However it's been awhile since the big outbreak of BadUSB and there are solutions out there which can defend against BadUSB attacks, such as Anti-Exploit software like HitmanPro.Alert: HitmanPro.Alert - SurfRight
Other Risk Reduction features focus e.g. on anti-espionage, such as kernel-level Keystroke Encryption, Webcam Notifier and BadUSB Protection.

Hope this helped and stay safe,
Wave. ;)
 

Dirk41

Level 17
Thread author
Verified
Top Poster
Well-known
Mar 17, 2016
797
Yeah thank you

Furthermore actually on bleeping computer I read that most / some ransomwares deactivate themself after encryption is termined. They "die ".
But In some forums they always suggest to not plugin usb and format the drive : isn't this a too radical solution ?
Even if I read that some ransomwares download also other malware that can steal pw and something like that .
 
  • Like
Reactions: DardiM
W

Wave

Yeah thank you

Furthermore actually on bleeping computer I read that most / some ransomwares deactivate themself after encryption is termined. They "die ".
But In some forums they always suggest to not plugin usb and format the drive : isn't this a too radical solution ?
Even if I read that some ransomwares download also other malware that can steal pw and something like that .
If the purpose of the infection was to encrypt the users files (e.g. to try to receive a ransom for the decryption key in return) the chances are all the malware will do is... focus on it's goal; in this case that would be encryption of the files.

However you should never trust a malware writer, for all you know you can decrypt the files without a "key" (e.g. some ransomware is badly made and the encryption algorithms can be reversed to create a decryption tool - similar to what vendors like Emsisoft do with ransomware when is wasn't developed properly). (and it can contain other components such as rootkit functionality to help conceal itself during encryption - depends how sophisticated the malware is).

At the end of the day it depends how advanced the malware is and the main goals behind the infection (usually just to destroy someones system/mess something up or as a method of making lots of money). Some malware will include Trojan Downloader functionality while others may include Trojan Backdoor functionality, rootkit components, keylogging components (e.g. hook the keyboard to monitor key-strokes and send back this information to the attacker) and the list can go on.

Without performing analysis on the sample you won't exactly know how it works.

As for plugging in your USB, you can always restrict write-access if you need to retrieve important documents (but not overwrite any files on the USB). You can plug-in your USB, just make sure you un-plug it when it's not needed since if you become infected and you left it plugged in then you may be out of luck in ransomware cases... Better yet, if there's a backup of the documents which were on the removable disk then happy days! :) (not sure if I understood what you said fully).

Check this: Control Read or Write Access to Removable Devices or Media, Deny All Access to Removable Devices or Media, Enable or Disable Write Access on USB Ports - Prevent Copying Files
 
L

LabZero

Hi! Could someone clarify me another thing : if you connect usb while there isa ransomware infection in a PC , it crypt also files in the usb drive/unit .

But can the ransomware transfer itself in the external hd/ usb stick ?

Thank you
Ransomware encrypts the files present also on the USB devices connected to the computer at the time of infection or subsequently.
That is why it is necessary always to disconnect, after use, USB devices.

Ransomware is executed on the computer where, according to its algorithm, starts to encrypt files in various paths but usually the infection vector is in the PC.
But I do not exclude ransomware with Worm''s features with the ability to replicate itself by transferring itself to another computer via storage media.
 

Dirk41

Level 17
Thread author
Verified
Top Poster
Well-known
Mar 17, 2016
797
Crypto malware ransomware is typically programmed to automatically remove itself...the malicious files responsible for the infection...after the encrypting is done since they are no longer needed.

By Lawrence Abram from bleepingcomputer
 
  • Like
Reactions: _CyberGhosT_

Dirk41

Level 17
Thread author
Verified
Top Poster
Well-known
Mar 17, 2016
797
Keep in mind that behavioral patterns of ransomware and malware in the general, are constantly evolving and changing, what is certain today, it's not sure tomorrow.

Sure ! Thank you !

I already read about one , at least , that goes on encrypting
 
  • Like
Reactions: Wave and LabZero
L

LabZero

Sure ! Thank you !

I already read about one , at least , that goes on encrypting
Generally, for example, we consider the new variants of Petya that, unlike other ransomware, it also attacks the Master Boot Record (MBR) of the hard disk or SSD drive, by blocking all the contents of the disk.
Petya payload is similar to old DOS boot viruses designed to infect the boot sector of the floppy disk and the HDD MBR, and finally to overwrite the first 100 sectors of the disk, making it unusable.

But I guess that few people have predicted this ransomware's evolution, also well knowing that old virus acted in a similar way.
The difference is the business.
 
W

Wave

You completely understood. Sorry my poor English . Thank you
Perfect, and don't worry about your English since I understood correctly. :)

By Lawrence Abram from bleepingcomputer
It depends on how the ransomware was designed to work and how sophisticated it is - for example, it may encrypt the files and then lock the screen to talk about the ransom payments to receive the decryption key back, or it may encrypt the files and then drop another PE to the disk which is responsible for the screen-locking and then delete itself after executing the newly dropped PE (e.g. extract from resources), or it could even drop a DLL and then inject this into another process to cause the screen-lock being presented from within a "trusted" process (or code injection).

On the other hand, some ransomware may want to remove itself due to the encryption algorithm being easily reversible, since not every ransomware sample is made properly by people who know what they are doing - some ransomware will encrypt files and make it impossible (currently) to decrypt the files without the private key (which you have to risk paying the ransom to receive - although you can never trust a malware author/hacker and therefore should not pay the ransom), whereas others will have a weak encryption algorithm and therefore by removing itself it helps prevent the sample being spread over to malware analysts more quickly (since if someone reports the infection for assistance, the sample containing the encryption is no longer on the system).

One way malware may remove itself is on reboot, or inject code into an external process which will terminate the process responsible for the encryption process and then remove it.

However, some ransomware is more advanced and may even inject into external processes for the actual encryption process to take place - an example would be on previous OS versions (Windows 7 for example), where we could easily open a handle to csrss.exe (it wasn't a protected process back then) after elevating our rights to enable Debugging Rights (easily achieved via RtlAdjustPrivilege NTAPI function), and then we could inject into it (e.g. inject the code for the encryption process and then start a new thread remotely to run this encryption code we injected into csrss.exe). This way, if someone opened up Task Manager and saw a suspicious process and terminated it, then they may feel they are once again "safe" (or they may also run some scans afterwards but the encryption process is now taking place from a trusted Windows process and none of these Anti-Malware scanners will detect if a sample has already injected into a process like csrss.exe it seems), but then give it some time and they'll be hit with the noticeable effects of all their files having been encrypted and some files on the desktop for the payment instructions or a screen-lock.

Usually these days the goal is to make money, back in the old days it was more about just PC destruction and being a nuisance IMO.

There are limitless possibilities, the above are just examples, I completely agree with @LabZero because malware is evolving all the time (and sometimes we go back into the past, like with Petya doing the old MBR modifications and then we also see new threats which will exploit new vulnerabilities and work using new methods we haven't seen before) - malware is evolving as we speak right now...

Stay safe,
Wave. ;)
 

Dirk41

Level 17
Thread author
Verified
Top Poster
Well-known
Mar 17, 2016
797
And regarding the discussion ( some days ago ) about unplug the PC from the electricity(while the ransonware is starting encrypting ) : Maybe instead of connecting the HD in another PC and start it , it is safer to boot from a Linux live and copy all still uncrypted files on another HD . Or , hypothetically , the ransomware can transfer itself through the live Linux ?
 
  • Like
Reactions: DardiM
L

LabZero

And regarding the discussion ( some days ago ) about unplug the PC from the electricity(while the ransonware is starting encrypting ) : Maybe instead of connecting the HD in another PC and start it , it is safer to boot from a Linux live and copy all still uncrypted files on another HD . Or , hypothetically , the ransomware can transfer itself through the live Linux ?
Live LinuxCD can be a good choice to try to recover the not encrypted files. Ransomware can not "transfer itself" through LinuxCD
 

Dirk41

Level 17
Thread author
Verified
Top Poster
Well-known
Mar 17, 2016
797
Live LinuxCD can be a good choice to try to recover the not encrypted files. Ransomware can not "transfer itself" through LinuxCD

Thank you . Is there any difference between using the live Linux on the same PC infected or putting the HD in another PC and ( always booting from the live Linux )? Not right ?
 
  • Like
Reactions: DardiM

Dirk41

Level 17
Thread author
Verified
Top Poster
Well-known
Mar 17, 2016
797
What do you mean?

Sorry , we talked about to ( when a ransomware start encrypting ) unplug the PC from the electricity and put the HD on another PC ( and the difference if it is bootable or not ) . Then when mentioned the live Linux to save the files.
But , to use the live Linux , I can boot it from the same PC infected or I have to disconnect the HD infected form the PC and connect it to another PC ?
 
  • Like
Reactions: DardiM
W

Wave

Sorry , we talked about to ( when a ransomware start encrypting ) unplug the PC from the electricity and put the HD on another PC ( and the difference if it is bootable or not ) . Then when mentioned the live Linux to save the files.
But , to use the live Linux , I can boot it from the same PC infected or I have to disconnect the HD infected form the PC and connect it to another PC ?
You can boot into Linux from the same PC - the Windows malware won't be able to execute itself onto Linux by default since it's designed for Windows. Even if the ransomware had a Linux version, since you'd be booting from a Linux LiveCD it wouldn't be able to copy across anyway, since Windows wouldn't be active when you use the Linux LiveCD anyway.
 

Dirk41

Level 17
Thread author
Verified
Top Poster
Well-known
Mar 17, 2016
797
Hi guys , I am here with another curiousity:
on bleepingcomputer , they suggest to make (into an externals HD ) an image of the HD encrypted by a ransomware ( because of the possibility to be able to decrypt the files in the future, if someone make up a decryptor.. And to decrypt other things like registry keys or ransom notes could be useful ) ,
so I wonder : since ,in the image ,files are compressed, can the ransomware be active and encrypt other files i put later ( or already are) in the same external HD

Thank you
 

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