Massive Ransomware Attack - Backup your files and BE AWARE!

wonder

Expert
Licensed User
Longtime User
Just to let you guys know, there is a massive ransomware cyberattack / outbreak going on today (12.05.2017).

For now, Spain seems to be the most affected country, but Portuguese companies have been affected as well.

EDIT:
- UK affected as well, see post #3.
- Technical info, see post #10.

http://uk.reuters.com/article/uk-spain-cyber-idUKKBN1881TI

https://www.bleepingcomputer.com/ne...n-computers-amid-massive-ransomware-outbreak/

https://www.ccn-cert.cni.es/segurid...evado-numero-de-organizaciones-espanolas.html

Basic prevention tips:
- Windows Update
- Create a restore point
- Backup your files offline (USB / DVD)
- Do not open emails from unknown sources
 
Last edited:

rboeck

Well-Known Member
Licensed User
Longtime User
If you know peoples without backup, but with ransomware attack, a company in russia is the best in decoding files. I have tried them three times and they could always restore the files (from different attacks). The adress: https://www.drweb.com. I hope, it is allowed to bring this information.
A Second tip: If you use a nas or network drive for backup, protect your backup directory with an different user acount like them you are working with. This information should only know your backup program. So the attack cant destroy your backup files.
 

Peter Simpson

Expert
Licensed User
Longtime User
It's been on TV over here in the UK. 40 out of over 200 NHS trusts in England have been attacked stopping our hard working doctors and nurses from retrieving patients records in some of our hospitals, it's even managed to stop some phone systems from working. In the NHS it's only effected computers that were not up to date with security patched, updated machines were not effected. What a complete bunch of ........, extremely bad news indeed :mad:
 
Last edited:

sorex

Expert
Licensed User
Longtime User
it makes sense for them.

I worked at a hospital once and combining laptops and desktop we speak about 3000+ devices multiply that with the $200 they're asking and you can retire if they pay.

Most valuable data is on servers so less of that kind ofcourse but even when it's only re-imaging PCs to get rid of that crap the man hours also cost money.
Worst case stuff keeps getting infected and encrypted during your clean up or data restore on the servers.
 

Peter Simpson

Expert
Licensed User
Longtime User
The problem isn't the servers of the NHS, it's individual XP machines. M$ are no longer issuing automatic updates for XP machines, but M$ have previously released the patch online, actually M$ released the patch for download on 12th March, 2 months ago. The problem is that XP machines users need to go to M$ support website and then manually download and install the patch for this particular flaw in their XP.

Please note: The news in the UK said it was XP machines on the NHS computers. I'm not saying it's just XP machines, but on the NHS it appears to be just that...
 
Last edited:

Beja

Expert
Licensed User
Longtime User
That's why I am not considering Bitcoin. 90 countries and growing!
 

sorex

Expert
Licensed User
Longtime User
automatic updates

in the hospital example patch management and roll out (via WSUS or something else) is used unlike on home computers.

you can't risk that a bad update takes down hundreds of PCs so every patch is tested first and with validating hundreds of applications this takes time.

in this case not having the patch takes them down aswell but that's part of the risk you take with the step above.

but as you wrote Peter, it seems that XP or people who turned off their automatic updates might become the victims.
Colleagues at work also tend to turn off the updates because people nag that their pc doesn't shut down immediatly when it updates something.
I turn it back on and install all missing updates when they pass my hands.
That 5 minutes waiting is nothing compared to 2+ days of work after a cryptware tool encrypted a few hundred thousands of files on the shares.
 

wonder

Expert
Licensed User
Longtime User
WannaCry|WannaDecrypt0r NSA-Cybereweapon-Powered Ransomware Worm
  • Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
  • Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
  • Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
  • Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
  • Kill switch: If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm.
SECURITY BULLETIN AND UPDATES HERE: https://technet.microsoft.com/en-us/library/security/ms17-010.aspx

Microsoft first patch for XP since 2014: https://blogs.technet.microsoft.com/msrc/2017/05/12/customer-guidance-for-wannacrypt-attacks/

Killswitch source: https://blog.malwarebytes.com/threat-analysis/2017/05/the-worm-that-spreads-wanacrypt0r/https://www.malwaretech.com/2017/05/how-to-accidentally-stop-a-global-cyber-attacks.html

Infections
Malware samples
Binary blob in PE crypted with pass 'WNcry@2ol7', credits to ens!

Informative Tweets
Cryptography details
  • encrypted via AES-128-CBC (custom implementation in the binary)

  • AES key generated with a CSPRNG, CryptGenRandom

  • AES key is encrypted by RSA-2048 (windows RSA implementation)

  • https://haxx.in/key1.bin (the ransomware pubkey, used to encrypt the aes keys)

  • https://haxx.in/key2.bin (the dll decryption privkey) the CryptImportKey() rsa key blob dumped from the DLL by blasty.
Bitcoin ransom addresses
3 addresses hard coded into the malware.

C&C centers
  • gx7ekbenv2riucmf.onion
  • 57g7spgrzlojinas.onion
  • xxlvbrloxvriy2c5.onion
  • 76jdd2ir2embyv47.onion
  • cwwnhwhlz52maqm7.onion
Languages
All language ransom messages available here: https://transfer.sh/y6qco/WANNACRYDECRYPTOR-Ransomware-Messages-all-langs.zip

m_bulgarian, m_chinese (simplified), m_chinese (traditional), m_croatian, m_czech, m_danish, m_dutch, m_english, m_filipino, m_finnish, m_french, m_german, m_greek, m_indonesian, m_italian, m_japanese, m_korean, m_latvian, m_norwegian, m_polish, m_portuguese, m_romanian, m_russian, m_slovak, m_spanish, m_swedish, m_turkish, m_vietnamese

File types
The filetypes it looks for to encrypt are

.doc, .docx, .xls, .xlsx, .ppt, .pptx, .pst, .ost, .msg, .eml, .vsd, .vsdx, .txt, .csv, .rtf, .123, .wks, .wk1, .pdf, .dwg, .onetoc2, .snt, .jpeg, .jpg, .docb, .docm, .dot, .dotm, .dotx, .xlsm, .xlsb, .xlw, .xlt, .xlm, .xlc, .xltx, .xltm, .pptm, .pot, .pps, .ppsm, .ppsx, .ppam, .potx, .potm, .edb, .hwp, .602, .sxi, .sti, .sldx, .sldm, .sldm, .vdi, .vmdk, .vmx, .gpg, .aes, .ARC, .PAQ, .bz2, .tbk, .bak, .tar, .tgz, .gz, .7z, .rar, .zip, .backup, .iso, .vcd, .bmp, .png, .gif, .raw, .cgm, .tif, .tiff, .nef, .psd, .ai, .svg, .djvu, .m4u, .m3u, .mid, .wma, .flv, .3g2, .mkv, .3gp, .mp4, .mov, .avi, .asf, .mpeg, .vob, .mpg, .wmv, .fla, .swf, .wav, .mp3, .sh, .class, .jar, .java, .rb, .asp, .php, .jsp, .brd, .sch, .dch, .dip, .pl, .vb, .vbs, .ps1, .bat, .cmd, .js, .asm, .h, .pas, .cpp, .c, .cs, .suo, .sln, .ldf, .mdf, .ibd, .myi, .myd, .frm, .odb, .dbf, .db, .mdb, .accdb, .sql, .sqlitedb, .sqlite3, .asc, .lay6, .lay, .mml, .sxm, .otg, .odg, .uop, .std, .sxd, .otp, .odp, .wb2, .slk, .dif, .stc, .sxc, .ots, .ods, .3dm, .max, .3ds, .uot, .stw, .sxw, .ott, .odt, .pem, .p12, .csr, .crt, .key, .pfx, .der

credit herulume, thanks for extracting this list from the binary.

Some other interesting strings
BAYEGANSRV\administrator Smile465666SA wanna18@hotmail.com

credit: nulldot https://pastebin.com/0LrH05y2

Encrypted file format
<64-bit SIGNATURE> - WANACRY!
<length of encrypted key> - 256 for 2048-bit keys, cannot exceed 4096-bits
<encrypted key> - 256 bytes if keys are 2048-bits
<32-bit value> - unknown
<64 bit file size> - return by GetFileSizeEx
<encrypted data> - with custom AES-128 in CBC mode

credit for reversing this file format info: cyg_x11

Vulnerability disclosure
The specific vulnerability that it uses to propagate is ETERNALBLUE.

This was developed by "equation group" an exploit developer group associated with the NSA and leaked to the public by "the shadow brokers". Microsoft fixed this vulnerability March 14, 2017. They were not 0 days at the time of release.



Source: https://gist.github.com/rain-1/989428fa5504f378b993ee6efbc0b168
 

sorex

Expert
Licensed User
Longtime User
nice going Mircosoft... special download links for this issue but the xp one doesn't even work :)

Edit:

it finally works...

if anyone has issues to get to the actual download then try this direct link for XP (might be the Dutch one tho, I'll add the universal link when I get that one working)

XP SP3 English:
http://download.windowsupdate.com/d..._eceb7d5023bbb23c0dc633e46b9c2f14fa6ee9dd.exe

XP SP3 Dutch:
http://download.windowsupdate.com/d..._b5ca96f480a0c1eed967f4d61d8eb7c8ace46003.exe

update sites of M$ are slow as hell due to the cyberattack (everyone seems to update their windows)
 
Last edited:

Peter Simpson

Expert
Licensed User
Longtime User
Completely agree.
I was previously a self employed M$ networking and software engineer. Just like you I've seen some serious issue happen when M$ patches Windows, then all of a sudden a bespoke developed software package designed to run an organisation or business of some kind just stops working because of an update or a patch @sorex, I completely agree with you...
 
Top