THREAT REMOVAL

PetrWrap Based on Petya Ransomware Attacks Organizations

Kaspersky Lab researchers have discovered a new ransomware family deployed in targeted attacks against organizations. There are a couple of interesting things about this operation the payload of which is a slightly different Petya ransomware the researchers dubbed PetrWrap.

Threat Summary

Name PetrWrap
Type Ransomware
Short Description According to Kaspersky, PetrWrap is written in C and compiled in MS Visual Studio. It contains a sample of Petya v3 ransomware which is the payload of the operation.
Symptoms Victim’s files are encrypted. The criminals used their own private and public keys.
Distribution Method Organizations have been victimized in targeted attacks.
Detection Tool See If Your System Has Been Affected by malware

Download

Malware Removal Tool

Data Recovery Tool Windows Data Recovery by Stellar Phoenix Notice! This product scans your drive sectors to recover lost files and it may not recover 100% of the encrypted files, but only few of them, depending on the situation and whether or not you have reformatted your drive.
User Experience Join Our Forum to Discuss PetrWrap.

Update June 2017! Learn more about the latest variant of Petya ransomware – Petya.A/ WannaCry – known to use the EternalBlue exploit deployed in the WannaCry outbreak. This new variant is currently active so be sure to inform yourself about its specifics.

Once in an organization’s network, the attackers used the PsExec tool to install the ransomware payload – on all endpoints and servers. But it’s not your typical Petya RaaS payload. PetrWrap has a special module that “patches the original Petya ransomware on the fly”.

Related: Mischa Ransomware Bonds with Petya Ransomware

PetrWrap Ransomware: Technical Overview

Kaspersky’s report indicates that the ransomware is written in C and compiled in MS Visual Studio. It contains a sample of Petya v3 ransomware which is the payload of the whole operation.

PetrWrap uses its own cryptographic routines and alters the code of Petya on runtime. This is done so that the execution is controlled and Petya is concealed during the infection process.

After being launched PetrWrap delays its execution (sleeps for 5400 seconds = 1.5 hours). Then it decrypts the main DLL of Petya from its data section and gets ready to call its exported function ZuWQdweafdsg345312. This function normally prepares Petya for further operations and starts the MBR overwrite process. PetrWrap, however, needs to hook a couple of Petya’s functions first, so it replaces the instructions that call Petya’s DllEntryPoint with NOPs (hex bytes 0x90). This prevents Petya from proceeding on its own and allows PetrWrap to make all the necessary computations and preparations before letting it continue.

PetrWrap Cryptography

In a normal Petya ransomware infection the ransomware would deploy a 16-byte key and the Salsa20 cipher to encrypt the MFT of the NTFS partitions on local drives. In the case of PetrWrap, the criminals used their own private and public keys. As a result, the ransomware uses the following cryptographic routines, as explained by Kaspersky’s researchers:

  • PetrWrap contains an embedded public key master_pub;
  • Upon each individual infection, the ransomware generates a new pair of session keys ec_session_priv + ec_session_pub;
  • The ransomware computes ecdh_shared_digest = SHA512(ECDH(master_pub, ec_session_priv));
  • Then it ‘Intercepts’ the salsa key generated by Petya and encrypts it using ecdh_shared_digest;
  • Then it constructs user_id, a string representation that contains the encrypted salsa key and the ec_session_pub;
  • Finally, it passes this user_id to Petya, which uses it as if it was its own data.

In a nutshell, PetrWrap accomplishes the following list of activities:

1. The victim’s machine is locked and the MFT of NTFS partitions is encrypted securely (because Petya v3 which is used in this attack doesn’t have flaws of the earlier versions and implements Salsa20 correctly);
2. The lockscreen doesn’t show the flashing skull animation and doesn’t contain any mentions of Petya which makes it harder to assess the situation and determine the extent of the caused damage;
3. The developers of PetrWrap didn’t have to write the low-level bootloader code and risk making mistakes similar to the ones observed in earlier versions of Petya.

PetrWrap Decryption

Unfortunately, the strong encryption used by PetrWrap gets in the way of encryption. As Kaspersky researchers put it, “a decryption key is out of the question”. Victims of the ransomware are currently organizations but individuals may also be targeted. Ransomware is known to know no boundaries. If you have been victimized by PetrWrap, you could try and restore your files with third-party solutions but there is no guarantee they could work.

In the future, always remember to keep your system protected and your data properly backed up.

Download

Malware Removal Tool


Spy Hunter scanner will only detect the threat. If you want the threat to be automatically removed, you need to purchase the full version of the anti-malware tool.Find Out More About SpyHunter Anti-Malware Tool / How to Uninstall SpyHunter

Milena Dimitrova

Milena Dimitrova

An inspired writer and content manager who has been with SensorsTechForum since the beginning. Focused on user privacy and malware development, she strongly believes in a world where cybersecurity plays a central role. If common sense makes no sense, she will be there to take notes. Those notes may later turn into articles! Follow Milena @Milenyim

More Posts

Follow Me:
Twitter


Windows Mac OS X Google Chrome Mozilla Firefox Microsoft Edge Safari Internet Explorer

How to Remove PetrWrap from Windows.


Step 1: Boot Your PC In Safe Mode to isolate and remove PetrWrap

OFFER

Manual Removal Usually Takes Time and You Risk Damaging Your Files If Not Careful!
We Recommend To Scan Your PC with SpyHunter

Keep in mind, that SpyHunter’s scanner is only for malware detection. If SpyHunter detects malware on your PC, you will need to purchase SpyHunter's malware removal tool to remove the malware threats. Read our SpyHunter 5 review. Click on the corresponding links to check SpyHunter's EULA, Privacy Policy and Threat Assessment Criteria

1. Hold Windows key() + R


2. The "Run" Window will appear. In it, type "msconfig" and click OK.


3. Go to the "Boot" tab. There select "Safe Boot" and then click "Apply" and "OK".
Tip: Make sure to reverse those changes by unticking Safe Boot after that, because your system will always boot in Safe Boot from now on.


4. When prompted, click on "Restart" to go into Safe Mode.


5. You can recognise Safe Mode by the words written on the corners of your screen.


Step 2: Uninstall PetrWrap and related software from Windows

Here is a method in few easy steps that should be able to uninstall most programs. No matter if you are using Windows 10, 8, 7, Vista or XP, those steps will get the job done. Dragging the program or its folder to the recycle bin can be a very bad decision. If you do that, bits and pieces of the program are left behind, and that can lead to unstable work of your PC, errors with the file type associations and other unpleasant activities. The proper way to get a program off your computer is to Uninstall it. To do that:


1. Hold the Windows Logo Button and "R" on your keyboard. A Pop-up window will appear.


2. In the field type in "appwiz.cpl" and press ENTER.


3. This will open a window with all the programs installed on the PC. Select the program that you want to remove, and press "Uninstall"
Follow the instructions above and you will successfully uninstall most programs.


Step 3: Clean any registries, created by PetrWrap on your computer.

The usually targeted registries of Windows machines are the following:

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
  • HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
  • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
  • HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce

You can access them by opening the Windows registry editor and deleting any values, created by PetrWrap there. This can happen by following the steps underneath:

1. Open the Run Window again, type "regedit" and click OK.


2. When you open it, you can freely navigate to the Run and RunOnce keys, whose locations are shown above.


3. You can remove the value of the virus by right-clicking on it and removing it.
Tip: To find a virus-created value, you can right-click on it and click "Modify" to see which file it is set to run. If this is the virus file location, remove the value.

IMPORTANT!
Before starting "Step 4", please boot back into Normal mode, in case you are currently in Safe Mode.
This will enable you to install and use SpyHunter 5 successfully.

Step 4: Scan for PetrWrap with SpyHunter Anti-Malware Tool

1. Click on the "Download" button to proceed to SpyHunter's download page.


It is recommended to run a scan before purchasing the full version of the software to make sure that the current version of the malware can be detected by SpyHunter. Click on the corresponding links to check SpyHunter's EULA, Privacy Policy and Threat Assessment Criteria.


2. After you have installed SpyHunter, wait for it to update automatically.

SpyHunter5-update-2018


3. After the update process has finished, click on the 'Malware/PC Scan' tab. A new window will appear. Click on 'Start Scan'.

SpyHunter5-Free-Scan-2018


4. After SpyHunter has finished scanning your PC for any files of the associated threat and found them, you can try to get them removed automatically and permanently by clicking on the 'Next' button.

SpyHunter-5-Free-Scan-Next-2018

If any threats have been removed, it is highly recommended to restart your PC.


Windows Mac OS X Google Chrome Mozilla Firefox Microsoft Edge Safari Internet Explorer

Get rid of PetrWrap from Mac OS X.


Step 1: Uninstall PetrWrap and remove related files and objects

OFFER
Manual Removal Usually Takes Time and You Risk Damaging Your Files If Not Careful!
We Recommend To Scan Your Mac with SpyHunter for Mac
Keep in mind, that SpyHunter for Mac needs to purchased to remove the malware threats. Click on the corresponding links to check SpyHunter’s EULA and Privacy Policy


1. Hit the ⇧+⌘+U keys to open Utilities. Another way is to click on “Go” and then click “Utilities”, like the image below shows:


2. Find Activity Monitor and double-click it:


3. In the Activity Monitor look for any suspicious processes, belonging or related to PetrWrap:

Tip: To quit a process completely, choose the “Force Quit” option.


4. Click on the "Go" button again, but this time select Applications. Another way is with the ⇧+⌘+A buttons.


5. In the Applications menu, look for any suspicious app or an app with a name, similar or identical to PetrWrap. If you find it, right-click on the app and select “Move to Trash”.


6: Select Accounts, after which click on the Login Items preference. Your Mac will then show you a list of items that start automatically when you log in. Look for any suspicious apps identical or similar to PetrWrap. Check the app you want to stop from running automatically and then select on the Minus (“-“) icon to hide it.


7: Remove any left-over files that might be related to this threat manually by following the sub-steps below:

  • Go to Finder.
  • In the search bar type the name of the app that you want to remove.
  • Above the search bar change the two drop down menus to “System Files” and “Are Included” so that you can see all of the files associated with the application you want to remove. Bear in mind that some of the files may not be related to the app so be very careful which files you delete.
  • If all of the files are related, hold the ⌘+A buttons to select them and then drive them to “Trash”.

In case you cannot remove PetrWrap via Step 1 above:

In case you cannot find the virus files and objects in your Applications or other places we have shown above, you can manually look for them in the Libraries of your Mac. But before doing this, please read the disclaimer below:

Disclaimer! If you are about to tamper with Library files on Mac, be sure to know the name of the virus file, because if you delete the wrong file, it may cause irreversible damage to your MacOS. Continue on your own responsibility!

1: Click on "Go" and Then "Go to Folder" as shown underneath:

2: Type in "/Library/LauchAgents/" and click Ok:

3: Delete all of the virus files that have similar or the same name as PetrWrap. If you believe there is no such file, do not delete anything.

You can repeat the same procedure with the following other Library directories:

→ ~/Library/LaunchAgents
/Library/LaunchDaemons

Tip: ~ is there on purpose, because it leads to more LaunchAgents.


Step 2: Scan for and remove malware from your Mac

When you are facing problems on your Mac as a result of unwanted scripts, programs and malware, the recommended way of eliminating the threat is by using an anti-malware program. Combo Cleaner offers advanced security features along with other modules that will improve your Mac’s security and protect it in the future.



Windows Mac OS X Google Chrome Mozilla Firefox Microsoft Edge Safari Internet Explorer


Remove PetrWrap from Google Chrome.


Step 1: Start Google Chrome and open the drop menu


Step 2: Move the cursor over "Tools" and then from the extended menu choose "Extensions"


Step 3: From the opened "Extensions" menu locate the unwanted extension and click on its "Remove" button.


Step 4: After the extension is removed, restart Google Chrome by closing it from the red "X" button at the top right corner and start it again.


Windows Mac OS X Google Chrome Mozilla Firefox Microsoft Edge Safari Internet Explorer


Erase PetrWrap from Mozilla Firefox.

Step 1: Start Mozilla Firefox. Open the menu window


Step 2: Select the "Add-ons" icon from the menu.


Step 3: Select the unwanted extension and click "Remove"


Step 4: After the extension is removed, restart Mozilla Firefox by closing it from the red "X" button at the top right corner and start it again.



Windows Mac OS X Google Chrome Mozilla Firefox Microsoft Edge Safari Internet Explorer


Uninstall PetrWrap from Microsoft Edge.


Step 1: Start Edge browser.


Step 2: Open the drop menu by clicking on the icon at the top right corner.


Step 3: From the drop menu select "Extensions".


Step 4: Choose the suspected malicious extension you want to remove and then click on the gear icon.


Step 5: Remove the malicious extension by scrolling down and then clicking on Uninstall.



Windows Mac OS X Google Chrome Mozilla Firefox Microsoft Edge Safari Internet Explorer


Remove PetrWrap from Safari.


Step 1: Start the Safari app.


Step 2: After hovering your mouse cursor to the top of the screen, click on the Safari text to open its drop down menu.


Step 3: From the menu, click on "Preferences".

stf-safari preferences


Step 4: After that, select the 'Extensions' Tab.

stf-safari-extensions


Step 5: Click once on the extension you want to remove.


Step 6: Click 'Uninstall'.

stf-safari uninstall

A pop-up window will appear asking for confirmation to uninstall the extension. Select 'Uninstall' again, and the PetrWrap will be removed.


How to Reset Safari
IMPORTANT: Before resetting Safari make sure you back up all your saved passwords within the browser in case you forget them.

Start Safari and then click on the gear leaver icon.

Click the Reset Safari button and you will reset the browser.


Windows Mac OS X Google Chrome Mozilla Firefox Microsoft Edge Safari Internet Explorer


Eliminate PetrWrap from Internet Explorer.


Step 1: Start Internet Explorer.


Step 2: Click on the gear icon labeled 'Tools' to open the drop menu and select 'Manage Add-ons'


Step 3: In the 'Manage Add-ons' window.


Step 4: Select the extension you want to remove and then click 'Disable'. A pop-up window will appear to inform you that you are about to disable the selected extension, and some more add-ons might be disabled as well. Leave all the boxes checked, and click 'Disable'.


Step 5: After the unwanted extension has been removed, restart Internet Explorer by closing it from the red 'X' button located at the top right corner and start it again.


Leave a Comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

Stay tuned
Subscribe for our newsletter regarding the latest cybersecurity and tech-related news.