SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Wannacrypt + Smbv1.0
Vulnerability = One of the Most
Damaging Ransomware Attacks
in History
Andrea Lelli – anlelli@microsoft.com
Introduction
• Initial spread and telemetry
• The bug
• The backdoor
• Mitigations
• The ransomware
• The aftermath
• Conclusion
It began on a Friday
• Several organization started reporting
massive infections
o NHS in UK
o Telefonica in Spain
o FedEx in US
o MegaFon in Russia
Overall campaign:
• 216k until August (estimated more)
• Spanning through all the world
“Is it worm-able ?”
• How does it spread so fast?
“Is it worm-able ?” YES
Source: Packetstorm Security
https://packetstormsecurity.com/files/142464/MS17-010.txt
Timeline of the vulnerability
March
14th
May
12th
April
14th
MS17-010 Released
ETERNALBLUE leaked, code is publicly available
WannaCrypt unleashed
May
10th Exploit code wildly adopted (Packetstorm, Exploit DB)
January
16th US CERT warns about potential (unconfirmed) SMB vulnerability
January
8th ShadowBrokers put stolen tools on sale (750 Bitcoins)
Initial infection vector ?
• Earlier Wannacry found along with Lazarus’ tools
• New Wannacry possibly planted by Lazarus actors?
• We don‘t know!
Telemetry
• Wannacrypt detections
• Distinct machines
• First encounters
Windows 7
Cumulative Telemetry
• Wannacrypt detections
• Distinct machines
• First encounters
The Killswitch
http://www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com
The Killswitch
Source: internic.net
Understanding the attack
The bug
Bad integer cast -> buffer overflow
ATTR ATTR ATTR ATTR ATTR
BUFFER
ATTR ATTR ATTRATTR ATTR Original List Size: 0x00010000
Truncated List Size: 0x0000FF5D
Updated List size: 0x0001FF5D
Excellent article from Viktor Brange:
https://blogs.technet.microsoft.com/mmpc/2017/06/16/analysis-of-the-shadow-brokers-release-and-mitigation-
with-windows-10-virtualization-based-security/
Unsigned Long
Unsigned Short
The exploit KERNEL MEMORY
SMB Spray
Trigger
…
…
Ptr SRVNET_CONNECTION
…
…
SRVBUFFER struct
HAL MEMORY
RWX
…
Ptr SRVNET_RECEIVE_HANDLER
…
Shellcode
SRVNET_CONNECTION struct
Fixed address!
Works on
Windows 7
The backdoor (DoublePulsar)
Excellent article from Matt Oh:
https://blogs.technet.microsoft.com/mmpc/2017/06/30/exploring-the-crypt-analysis-of-the-wannacrypt-
ransomware-smb-exploit-propagation/
Step 1:
Hook SYSENTER handler
What About Patchguard ???
The backdoor (DoublePulsar)
Step 2:
SYSENTER hook is executed,
Original SYSENTER handler restored
Backdoor installed
SRV!SrvTransactionNotImplemented
(Transaction2->SESSION_SETUP)
Hook UnHook
Patchguard thread:
• Unlikely to spawn when SYSENTER hooked
• Does not check for SRV code/ writabe data
sections
By design, PatchGuard does not catch transient attacks
Mitigations
1. HAL memory not RWX (DEP,
HVCI requires DeviceGuard)
2. HAL memory location
randomized (kASLR)
3. Control Flow Guard (optional,
requires DeviceGuard)
X
X
X XDoesn’t work on
Windows 10 RS1+!
X
Mitigations
1. Hyper Guard – Mitigates MSR writes
2. Legacy dispatch tables made Read Only
X
X
More mitigations!
In general, several mitigations were introduced in Windows 10
• Controlled Folder Access (CFA)
• Access to folders with documents is restricted (hinders ransomware)
• Code Integrity Guard (CIG)
• Can’t modify executable memory
• Arbitrary Code Guard (ACG)
• Can’t load or create untrusted executable memory
• MemGC
• Prevents Use After Free exploitation
…and more! (Not all are active by default.)
The ransomware
Encryption
• Targets wide range of file extensions
• Renames encrypted files by adding “.wncry”
• Uses AES-128
• One key per file
• Encrypted with randomly generated RSA key
And finally…
Unusual features
• Stops exchange and SQL related processes
• Deletes shadow copies / backup catalog
• Overwrites original file with junk data
• Then deletes it
• Writes Gb’s of junk data in temp file
• Until < 1Gb remains
Should you pay?
???
WanaKiwi / WanaDecrypt
• Tools for decryption of the files
 Scans WanaCrypt’s memory for keys
• Do they work?
 If you did not reboot
 If you did not run other software
 If you ran WanaKiwi immediately
 If you are lucky
• Too many “if”!
WanaKiwi / WanaDecrypt
IT WORKS!
(Wanafork tool can use this)
Prime numbers
candidates
(from memory)
This candidate
divides malware’s key
IN THEORY:
WanaKiwi / WanaDecrypt
IN PRACTICE:
• Office
• Browser
• Outlook
• Click WanaCrypt’s
interface
• Leave it for a couple of
hours
Unlikely to work
Worth it?
“We have taken measures to blacklist all addresses associated
with the WannaCry attackers that are known to the ShapeShift
team”
Spokesperson from ShapeShift
Worth it?
$ 142,361
$ 300
474
payments
0.2 %
of 216000
infected
machines
(Very rough estimate)
"Cyber extortion losses are skyrocketing with ransomware on pace to be a 1
billion dollar business in 2016."
The FBI - as reported by CNN
Is it still alive?
Alas, yes! (Not just Wannacrypt)
DoublePulsar detections by platform per day
Is it still alive?
DoublePulsar distribution
Copycats
• UIWIX
• Ransomware: encrypts files
• File-less: only resides in memory
• Steals information
• ALDYKUZZ
• Monero coin miner
• PETYA
• Encrypts Files and MFT
• BADRABBIT (PETYA variant)
• Leverages ETERNALROMANCE
Who?
Who?
Wannacrypt Lazarus
Conclusion
• Install security updates!
• Disable unnecessary / legacy features
• Block inbound/outbound SMB traffic to your network if possible
• Do not pay cybercriminals
• Do not delete the encrypted files
• Respond quickly and isolate infected machines
• Use Windows 10!
BlueHat v17 || Wannacrypt + Smbv1.0 Vulnerability = One of the Most Damaging Ransomware Attacks in History

Weitere ähnliche Inhalte

Was ist angesagt?

Weekend Malware Research 2012
Weekend Malware Research 2012Weekend Malware Research 2012
Weekend Malware Research 2012
Andrew Morris
 
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat Security Conference
 
CSW2017 chuanda ding_state of windows application security
CSW2017 chuanda ding_state of windows application securityCSW2017 chuanda ding_state of windows application security
CSW2017 chuanda ding_state of windows application security
CanSecWest
 
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
BlueHat v17 ||  Detecting Compromise on Windows Endpoints with Osquery  BlueHat v17 ||  Detecting Compromise on Windows Endpoints with Osquery
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
BlueHat Security Conference
 
[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland
[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland
[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland
CODE BLUE
 
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoTCSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CanSecWest
 
BSidesCharleston2014 - Ballin on a Budget: Tracking Chinese Malware Campaigns...
BSidesCharleston2014 - Ballin on a Budget: Tracking Chinese Malware Campaigns...BSidesCharleston2014 - Ballin on a Budget: Tracking Chinese Malware Campaigns...
BSidesCharleston2014 - Ballin on a Budget: Tracking Chinese Malware Campaigns...
Andrew Morris
 
[OWASP Poland Day] Application frameworks' vulnerabilities
[OWASP Poland Day] Application frameworks' vulnerabilities[OWASP Poland Day] Application frameworks' vulnerabilities
[OWASP Poland Day] Application frameworks' vulnerabilities
OWASP
 

Was ist angesagt? (20)

What you need to know about ExPetr ransomware
What you need to know about ExPetr ransomwareWhat you need to know about ExPetr ransomware
What you need to know about ExPetr ransomware
 
Weekend Malware Research 2012
Weekend Malware Research 2012Weekend Malware Research 2012
Weekend Malware Research 2012
 
BlueHat v17 || Mitigations for the Masses: From EMET to Windows Defender Exp...
BlueHat v17 ||  Mitigations for the Masses: From EMET to Windows Defender Exp...BlueHat v17 ||  Mitigations for the Masses: From EMET to Windows Defender Exp...
BlueHat v17 || Mitigations for the Masses: From EMET to Windows Defender Exp...
 
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
 
CSW2017 chuanda ding_state of windows application security
CSW2017 chuanda ding_state of windows application securityCSW2017 chuanda ding_state of windows application security
CSW2017 chuanda ding_state of windows application security
 
Hunting For Exploit Kits
Hunting For Exploit KitsHunting For Exploit Kits
Hunting For Exploit Kits
 
Fruit vs Zombies: Defeat Non-jailbroken iOS Malware by Claud Xiao
Fruit vs Zombies:  Defeat Non-jailbroken iOS Malware by Claud XiaoFruit vs Zombies:  Defeat Non-jailbroken iOS Malware by Claud Xiao
Fruit vs Zombies: Defeat Non-jailbroken iOS Malware by Claud Xiao
 
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
BlueHat v17 ||  Detecting Compromise on Windows Endpoints with Osquery  BlueHat v17 ||  Detecting Compromise on Windows Endpoints with Osquery
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
 
[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland
[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland
[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland
 
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoTCSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
 
Using GreyNoise to Quantify Response Time of Cloud Provider Abuse Teams
Using GreyNoise to Quantify Response Time of Cloud Provider Abuse TeamsUsing GreyNoise to Quantify Response Time of Cloud Provider Abuse Teams
Using GreyNoise to Quantify Response Time of Cloud Provider Abuse Teams
 
Taking Hunting to the Next Level: Hunting in Memory
Taking Hunting to the Next Level: Hunting in MemoryTaking Hunting to the Next Level: Hunting in Memory
Taking Hunting to the Next Level: Hunting in Memory
 
Adversarial Post-Ex: Lessons From The Pros
Adversarial Post-Ex: Lessons From The ProsAdversarial Post-Ex: Lessons From The Pros
Adversarial Post-Ex: Lessons From The Pros
 
ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on ...
ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on ...ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on ...
ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on ...
 
BSidesCharleston2014 - Ballin on a Budget: Tracking Chinese Malware Campaigns...
BSidesCharleston2014 - Ballin on a Budget: Tracking Chinese Malware Campaigns...BSidesCharleston2014 - Ballin on a Budget: Tracking Chinese Malware Campaigns...
BSidesCharleston2014 - Ballin on a Budget: Tracking Chinese Malware Campaigns...
 
External to DA, the OS X Way
External to DA, the OS X WayExternal to DA, the OS X Way
External to DA, the OS X Way
 
[OWASP Poland Day] Application frameworks' vulnerabilities
[OWASP Poland Day] Application frameworks' vulnerabilities[OWASP Poland Day] Application frameworks' vulnerabilities
[OWASP Poland Day] Application frameworks' vulnerabilities
 
Malware Collection and Analysis via Hardware Virtualization
Malware Collection and Analysis via Hardware VirtualizationMalware Collection and Analysis via Hardware Virtualization
Malware Collection and Analysis via Hardware Virtualization
 
CyberSEED: Virtual Machine Introspection to Detect and Protect
CyberSEED: Virtual Machine Introspection to Detect and ProtectCyberSEED: Virtual Machine Introspection to Detect and Protect
CyberSEED: Virtual Machine Introspection to Detect and Protect
 
BSides London 2017 - Hunt Or Be Hunted
BSides London 2017 - Hunt Or Be HuntedBSides London 2017 - Hunt Or Be Hunted
BSides London 2017 - Hunt Or Be Hunted
 

Ähnlich wie BlueHat v17 || Wannacrypt + Smbv1.0 Vulnerability = One of the Most Damaging Ransomware Attacks in History

Stranded on Infosec Island: Defending the Enterprise with Nothing but Windows...
Stranded on Infosec Island: Defending the Enterprise with Nothing but Windows...Stranded on Infosec Island: Defending the Enterprise with Nothing but Windows...
Stranded on Infosec Island: Defending the Enterprise with Nothing but Windows...
Adrian Sanabria
 

Ähnlich wie BlueHat v17 || Wannacrypt + Smbv1.0 Vulnerability = One of the Most Damaging Ransomware Attacks in History (20)

How to protect your business from Wannacry Ransomware
How to protect your business from Wannacry RansomwareHow to protect your business from Wannacry Ransomware
How to protect your business from Wannacry Ransomware
 
Stranded on Infosec Island: Defending the Enterprise with Nothing but Windows...
Stranded on Infosec Island: Defending the Enterprise with Nothing but Windows...Stranded on Infosec Island: Defending the Enterprise with Nothing but Windows...
Stranded on Infosec Island: Defending the Enterprise with Nothing but Windows...
 
Wannacry
WannacryWannacry
Wannacry
 
Corporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomwareCorporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomware
 
Ransomware Attack.pptx
Ransomware Attack.pptxRansomware Attack.pptx
Ransomware Attack.pptx
 
WannaCry: Autopsy of Ransomwar
WannaCry: Autopsy of RansomwarWannaCry: Autopsy of Ransomwar
WannaCry: Autopsy of Ransomwar
 
Wannacry | Technical Insight and Lessons Learned
Wannacry | Technical Insight and Lessons LearnedWannacry | Technical Insight and Lessons Learned
Wannacry | Technical Insight and Lessons Learned
 
Escan advisory wannacry ransomware
Escan advisory wannacry ransomwareEscan advisory wannacry ransomware
Escan advisory wannacry ransomware
 
WannaCry? No Thanks!
WannaCry? No Thanks!WannaCry? No Thanks!
WannaCry? No Thanks!
 
OSB340: Disrupting an Advanced Attack
OSB340: Disrupting an Advanced AttackOSB340: Disrupting an Advanced Attack
OSB340: Disrupting an Advanced Attack
 
OSB340R: Disrupting an Advanced Attack
OSB340R: Disrupting an Advanced AttackOSB340R: Disrupting an Advanced Attack
OSB340R: Disrupting an Advanced Attack
 
RSA USA 2015 - Getting a Jump on Hackers
RSA USA 2015 - Getting a Jump on HackersRSA USA 2015 - Getting a Jump on Hackers
RSA USA 2015 - Getting a Jump on Hackers
 
Get Smart about Ransomware: Protect Yourself and Organization
Get Smart about Ransomware: Protect Yourself and OrganizationGet Smart about Ransomware: Protect Yourself and Organization
Get Smart about Ransomware: Protect Yourself and Organization
 
Order vs. Mad Science: Analyzing Black Hat Swarm Intelligence
Order vs. Mad Science: Analyzing Black Hat Swarm IntelligenceOrder vs. Mad Science: Analyzing Black Hat Swarm Intelligence
Order vs. Mad Science: Analyzing Black Hat Swarm Intelligence
 
WannaCry ransomware outbreak - what you need to know
WannaCry ransomware outbreak - what you need to knowWannaCry ransomware outbreak - what you need to know
WannaCry ransomware outbreak - what you need to know
 
Ethical hacking : Beginner to advanced
Ethical hacking : Beginner to advancedEthical hacking : Beginner to advanced
Ethical hacking : Beginner to advanced
 
Zero day exploit
Zero day exploitZero day exploit
Zero day exploit
 
WatchGuard - Cryptolocker en het gevecht tegen IT 's grootste vijand - Orbid ...
WatchGuard - Cryptolocker en het gevecht tegen IT 's grootste vijand - Orbid ...WatchGuard - Cryptolocker en het gevecht tegen IT 's grootste vijand - Orbid ...
WatchGuard - Cryptolocker en het gevecht tegen IT 's grootste vijand - Orbid ...
 
Palestra Jeferson Propheta - Wanna Cry more
Palestra Jeferson Propheta - Wanna Cry morePalestra Jeferson Propheta - Wanna Cry more
Palestra Jeferson Propheta - Wanna Cry more
 
Zlob Trojan
Zlob TrojanZlob Trojan
Zlob Trojan
 

Mehr von BlueHat Security Conference

BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...
BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...
BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...
BlueHat Security Conference
 
BlueHat Seattle 2019 || Kubernetes Practical Attack and Defense
BlueHat Seattle 2019 || Kubernetes Practical Attack and DefenseBlueHat Seattle 2019 || Kubernetes Practical Attack and Defense
BlueHat Seattle 2019 || Kubernetes Practical Attack and Defense
BlueHat Security Conference
 
BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...
BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...
BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...
BlueHat Security Conference
 
BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...
BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...
BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...
BlueHat Security Conference
 
BlueHat v18 || First strontium uefi rootkit unveiled
BlueHat v18 || First strontium uefi rootkit unveiledBlueHat v18 || First strontium uefi rootkit unveiled
BlueHat v18 || First strontium uefi rootkit unveiled
BlueHat Security Conference
 
BlueHat v18 || Memory resident implants - code injection is alive and well
BlueHat v18 || Memory resident implants - code injection is alive and wellBlueHat v18 || Memory resident implants - code injection is alive and well
BlueHat v18 || Memory resident implants - code injection is alive and well
BlueHat Security Conference
 
BlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat v18 || Massive scale usb device driver fuzz without deviceBlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat Security Conference
 
BlueHat v18 || Modern day entomology - examining the inner workings of the bu...
BlueHat v18 || Modern day entomology - examining the inner workings of the bu...BlueHat v18 || Modern day entomology - examining the inner workings of the bu...
BlueHat v18 || Modern day entomology - examining the inner workings of the bu...
BlueHat Security Conference
 
BlueHat v18 || The matrix has you - protecting linux using deception
BlueHat v18 || The matrix has you - protecting linux using deceptionBlueHat v18 || The matrix has you - protecting linux using deception
BlueHat v18 || The matrix has you - protecting linux using deception
BlueHat Security Conference
 

Mehr von BlueHat Security Conference (20)

BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...
BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...
BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...
 
BlueHat Seattle 2019 || Keynote
BlueHat Seattle 2019 || KeynoteBlueHat Seattle 2019 || Keynote
BlueHat Seattle 2019 || Keynote
 
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One StoryBlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
 
BlueHat Seattle 2019 || Kubernetes Practical Attack and Defense
BlueHat Seattle 2019 || Kubernetes Practical Attack and DefenseBlueHat Seattle 2019 || Kubernetes Practical Attack and Defense
BlueHat Seattle 2019 || Kubernetes Practical Attack and Defense
 
BlueHat Seattle 2019 || Open Source Security, vulnerabilities never come alone
BlueHat Seattle 2019 || Open Source Security, vulnerabilities never come aloneBlueHat Seattle 2019 || Open Source Security, vulnerabilities never come alone
BlueHat Seattle 2019 || Open Source Security, vulnerabilities never come alone
 
BlueHat Seattle 2019 || Modern Binary Analysis with ILs
BlueHat Seattle 2019 || Modern Binary Analysis with ILsBlueHat Seattle 2019 || Modern Binary Analysis with ILs
BlueHat Seattle 2019 || Modern Binary Analysis with ILs
 
BlueHat Seattle 2019 || Don't forget to SUBSCRIBE.
BlueHat Seattle 2019 || Don't forget to SUBSCRIBE.BlueHat Seattle 2019 || Don't forget to SUBSCRIBE.
BlueHat Seattle 2019 || Don't forget to SUBSCRIBE.
 
BlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure AD
BlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure ADBlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure AD
BlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure AD
 
BlueHat Seattle 2019 || Autopsies of Recent DFIR Investigations
BlueHat Seattle 2019 || Autopsies of Recent DFIR InvestigationsBlueHat Seattle 2019 || Autopsies of Recent DFIR Investigations
BlueHat Seattle 2019 || Autopsies of Recent DFIR Investigations
 
BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...
BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...
BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...
 
BlueHat Seattle 2019 || Are We There Yet: Why Does Application Security Take ...
BlueHat Seattle 2019 || Are We There Yet: Why Does Application Security Take ...BlueHat Seattle 2019 || Are We There Yet: Why Does Application Security Take ...
BlueHat Seattle 2019 || Are We There Yet: Why Does Application Security Take ...
 
BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...
BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...
BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...
 
BlueHat v18 || First strontium uefi rootkit unveiled
BlueHat v18 || First strontium uefi rootkit unveiledBlueHat v18 || First strontium uefi rootkit unveiled
BlueHat v18 || First strontium uefi rootkit unveiled
 
BlueHat v18 || WSL reloaded - Let's try to do better fuzzing
BlueHat v18 || WSL reloaded - Let's try to do better fuzzingBlueHat v18 || WSL reloaded - Let's try to do better fuzzing
BlueHat v18 || WSL reloaded - Let's try to do better fuzzing
 
BlueHat v18 || The hitchhiker's guide to north korea's malware galaxy
BlueHat v18 || The hitchhiker's guide to north korea's malware galaxyBlueHat v18 || The hitchhiker's guide to north korea's malware galaxy
BlueHat v18 || The hitchhiker's guide to north korea's malware galaxy
 
BlueHat v18 || Retpoline - the anti-spectre (type 2) mitigation in windows
BlueHat v18 || Retpoline - the anti-spectre (type 2) mitigation in windowsBlueHat v18 || Retpoline - the anti-spectre (type 2) mitigation in windows
BlueHat v18 || Retpoline - the anti-spectre (type 2) mitigation in windows
 
BlueHat v18 || Memory resident implants - code injection is alive and well
BlueHat v18 || Memory resident implants - code injection is alive and wellBlueHat v18 || Memory resident implants - code injection is alive and well
BlueHat v18 || Memory resident implants - code injection is alive and well
 
BlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat v18 || Massive scale usb device driver fuzz without deviceBlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat v18 || Massive scale usb device driver fuzz without device
 
BlueHat v18 || Modern day entomology - examining the inner workings of the bu...
BlueHat v18 || Modern day entomology - examining the inner workings of the bu...BlueHat v18 || Modern day entomology - examining the inner workings of the bu...
BlueHat v18 || Modern day entomology - examining the inner workings of the bu...
 
BlueHat v18 || The matrix has you - protecting linux using deception
BlueHat v18 || The matrix has you - protecting linux using deceptionBlueHat v18 || The matrix has you - protecting linux using deception
BlueHat v18 || The matrix has you - protecting linux using deception
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

BlueHat v17 || Wannacrypt + Smbv1.0 Vulnerability = One of the Most Damaging Ransomware Attacks in History

  • 1. Wannacrypt + Smbv1.0 Vulnerability = One of the Most Damaging Ransomware Attacks in History Andrea Lelli – anlelli@microsoft.com
  • 2. Introduction • Initial spread and telemetry • The bug • The backdoor • Mitigations • The ransomware • The aftermath • Conclusion
  • 3. It began on a Friday • Several organization started reporting massive infections o NHS in UK o Telefonica in Spain o FedEx in US o MegaFon in Russia Overall campaign: • 216k until August (estimated more) • Spanning through all the world
  • 4. “Is it worm-able ?” • How does it spread so fast?
  • 5. “Is it worm-able ?” YES Source: Packetstorm Security https://packetstormsecurity.com/files/142464/MS17-010.txt
  • 6. Timeline of the vulnerability March 14th May 12th April 14th MS17-010 Released ETERNALBLUE leaked, code is publicly available WannaCrypt unleashed May 10th Exploit code wildly adopted (Packetstorm, Exploit DB) January 16th US CERT warns about potential (unconfirmed) SMB vulnerability January 8th ShadowBrokers put stolen tools on sale (750 Bitcoins)
  • 7. Initial infection vector ? • Earlier Wannacry found along with Lazarus’ tools • New Wannacry possibly planted by Lazarus actors? • We don‘t know!
  • 8. Telemetry • Wannacrypt detections • Distinct machines • First encounters Windows 7
  • 9. Cumulative Telemetry • Wannacrypt detections • Distinct machines • First encounters
  • 13. The bug Bad integer cast -> buffer overflow ATTR ATTR ATTR ATTR ATTR BUFFER ATTR ATTR ATTRATTR ATTR Original List Size: 0x00010000 Truncated List Size: 0x0000FF5D Updated List size: 0x0001FF5D Excellent article from Viktor Brange: https://blogs.technet.microsoft.com/mmpc/2017/06/16/analysis-of-the-shadow-brokers-release-and-mitigation- with-windows-10-virtualization-based-security/ Unsigned Long Unsigned Short
  • 14. The exploit KERNEL MEMORY SMB Spray Trigger … … Ptr SRVNET_CONNECTION … … SRVBUFFER struct HAL MEMORY RWX … Ptr SRVNET_RECEIVE_HANDLER … Shellcode SRVNET_CONNECTION struct Fixed address! Works on Windows 7
  • 15. The backdoor (DoublePulsar) Excellent article from Matt Oh: https://blogs.technet.microsoft.com/mmpc/2017/06/30/exploring-the-crypt-analysis-of-the-wannacrypt- ransomware-smb-exploit-propagation/ Step 1: Hook SYSENTER handler What About Patchguard ???
  • 16. The backdoor (DoublePulsar) Step 2: SYSENTER hook is executed, Original SYSENTER handler restored Backdoor installed SRV!SrvTransactionNotImplemented (Transaction2->SESSION_SETUP) Hook UnHook Patchguard thread: • Unlikely to spawn when SYSENTER hooked • Does not check for SRV code/ writabe data sections By design, PatchGuard does not catch transient attacks
  • 17. Mitigations 1. HAL memory not RWX (DEP, HVCI requires DeviceGuard) 2. HAL memory location randomized (kASLR) 3. Control Flow Guard (optional, requires DeviceGuard) X X X XDoesn’t work on Windows 10 RS1+! X
  • 18. Mitigations 1. Hyper Guard – Mitigates MSR writes 2. Legacy dispatch tables made Read Only X X
  • 19. More mitigations! In general, several mitigations were introduced in Windows 10 • Controlled Folder Access (CFA) • Access to folders with documents is restricted (hinders ransomware) • Code Integrity Guard (CIG) • Can’t modify executable memory • Arbitrary Code Guard (ACG) • Can’t load or create untrusted executable memory • MemGC • Prevents Use After Free exploitation …and more! (Not all are active by default.)
  • 21. Encryption • Targets wide range of file extensions • Renames encrypted files by adding “.wncry” • Uses AES-128 • One key per file • Encrypted with randomly generated RSA key
  • 23. Unusual features • Stops exchange and SQL related processes • Deletes shadow copies / backup catalog • Overwrites original file with junk data • Then deletes it • Writes Gb’s of junk data in temp file • Until < 1Gb remains
  • 25. WanaKiwi / WanaDecrypt • Tools for decryption of the files  Scans WanaCrypt’s memory for keys • Do they work?  If you did not reboot  If you did not run other software  If you ran WanaKiwi immediately  If you are lucky • Too many “if”!
  • 26. WanaKiwi / WanaDecrypt IT WORKS! (Wanafork tool can use this) Prime numbers candidates (from memory) This candidate divides malware’s key IN THEORY:
  • 27. WanaKiwi / WanaDecrypt IN PRACTICE: • Office • Browser • Outlook • Click WanaCrypt’s interface • Leave it for a couple of hours Unlikely to work
  • 28. Worth it? “We have taken measures to blacklist all addresses associated with the WannaCry attackers that are known to the ShapeShift team” Spokesperson from ShapeShift
  • 29. Worth it? $ 142,361 $ 300 474 payments 0.2 % of 216000 infected machines (Very rough estimate) "Cyber extortion losses are skyrocketing with ransomware on pace to be a 1 billion dollar business in 2016." The FBI - as reported by CNN
  • 30. Is it still alive? Alas, yes! (Not just Wannacrypt) DoublePulsar detections by platform per day
  • 31. Is it still alive? DoublePulsar distribution
  • 32. Copycats • UIWIX • Ransomware: encrypts files • File-less: only resides in memory • Steals information • ALDYKUZZ • Monero coin miner • PETYA • Encrypts Files and MFT • BADRABBIT (PETYA variant) • Leverages ETERNALROMANCE
  • 33. Who?
  • 35. Conclusion • Install security updates! • Disable unnecessary / legacy features • Block inbound/outbound SMB traffic to your network if possible • Do not pay cybercriminals • Do not delete the encrypted files • Respond quickly and isolate infected machines • Use Windows 10!