SlideShare a Scribd company logo
© 2018 Imperva, Inc. All rights reserved.
How to Protect Your Web
Applications from Crypto-mining:
The New Force Behind Remote Code Execution Attacks
Amir Shladovsky – Threat Research Tech Lead,
Imperva
W a r s a w , 1 0 . 1 0 . 2 0 1 8
OWASP
Poland Day 2018
© 2018 Imperva, Inc. All rights reserved.
Evolution of Web Attacks – Economical Aspects
3
Attack Data theft Network theft Data corruption CPU theft
Example SQL injection DDoS botnet Ransomware Crypto-mining
Sale
strategy
3rd party sale 3rd party sale Direct sale No sale
© 2018 Imperva, Inc. All rights reserved.
Agenda
• Remote Code Execution (RCE) vulnerabilities
• Payloads and trends
• A crypto mining malware (CryptoM 1.0/ 2.0)
– The money trail
– Crypto currencies
• Mitigation
• Key takeaways
4
© 2018 Imperva, Inc. All rights reserved.
Remote Code Execution (RCE) Vulnerabilities
5
• Definition
• Conditions
– Untrusted data + insufficient input
validation
• Example 1
• Recent development
– Serialization/ deserialization
• Example 2
Object in
memory
Object
serialized
Object in
transit
Object de-
serialized
Object in
memory
© 2018 Imperva, Inc. All rights reserved.
RCE Vulnerability Statistics
7
Taken from:vulndb.cyberriskanalytics.com
RCE
© 2018 Imperva, Inc. All rights reserved.
RCE Attacks – External Resources in Payloads
• Reconnaissance
• Botnet (DDoS, Other)
• Crypto mining malware
• Other
8
© 2018 Imperva, Inc. All rights reserved.
A Shift in Payload Trends
9
12%
88%
DDoS Bot Crypto-mining Malware
45%
55%
2017 2018
© 2018 Imperva, Inc. All rights reserved.
A Crypto Mining Malware 1.0
• RCE vulnerability as an entry point
• Evasion techniques
• Main characteristics:
– Kills competing processes
– Gains persistency
– Downloads and runs the malware
10
Exploit RCE vulnerability
Run downloader code
Infect with Crypto mining malware
1
2
3
© 2018 Imperva, Inc. All rights reserved.
logo6.jpg – Stage 1
11
Eliminate
rivalries
Eliminate
security controls
© 2018 Imperva, Inc. All rights reserved.
logo6.jpg – Stages 2 & 3
12
Gains
persistency Obtains dynamic
configuration
Obtains
Miner
Runs the
Miner
Calculates
number of
cores
© 2018 Imperva, Inc. All rights reserved.
Config_1.json
13
Impact:
denial of
service
Mining pool and
wallet
Mining
algorithm
© 2018 Imperva, Inc. All rights reserved.
Crypto Mining Malware 2.0 / RedisWannaMine
• Spreads, internally and externally, in a worm
like behavior
– Using exposed Redis server to replicate itself.
– Using Eternal Blue exploit to propagate over windows
platform
14
© 2018 Imperva, Inc. All rights reserved.
What is Redis?
• In memory Database (RAM)
• Widely used
• Technical information:
– Port 6379 (over 200K IP publicly open with this port)
– No authentication by default (up till version 3.2)
15
www.shodan.io
© 2018 Imperva, Inc. All rights reserved.
EternalBlue
• Exploit developed by NSA
• Leaked by Shadow Broker hacker group
• Exploit a vulnerability in Microsoft
implementation of SMB protocol to spread out
• Famous by WannaCry ransomware that used
EternalBlue to propogate
16
© 2018 Imperva, Inc. All rights reserved.
Redis infection process
17
Download and
compile masscan
Find open Redis
servers using
masscan
© 2018 Imperva, Inc. All rights reserved.
Crypto Mining Malware 2.0 Infection Chain
Exploit CVE-2017-9805 to run a shell command
Drop RedisWannaMine
Run a crypto miner
Scan vulnerable Redis servers
Use Redis vulnerability to drop a crypto miner
Scan vulnerable Windows SMB servers
Use EternalBlue to drop a crypto miner
18
© 2018 Imperva, Inc. All rights reserved.
Going the Extra Mile - Browsers Infection
• Using an open source JavaScript webminer
• The attacker initially tries to alter the commonly used index.php file and add to
it the malicious JavaScript me0w.js
19
© 2018 Imperva, Inc. All rights reserved.
Going the Extra Mile - Browsers Infection
• It also scan for all JavaScript files on the server and, once found, inject the
same malicious me0w.js file
20
© 2018 Imperva, Inc. All rights reserved.
Crypto Mining Malware Infection Chain
21
Infection of a single
victim
Crypto
Mining
Malware 1.0
Infection of the web
application visitors
Infection of many victims
Spread in a worm like
behavior
© 2018 Imperva, Inc. All rights reserved.
The Money Trail
• Mining pools - Share resources, split the reward
22
© 2018 Imperva, Inc. All rights reserved.
The Money Trail – other currencies
23
Karbowanec
(Karbo)
Electroneum
© 2018 Imperva, Inc. All rights reserved.
Why not Bitcoin?
• Specific hardware • Anonymity
24
© 2018 Imperva, Inc. All rights reserved.
Mitigation
• Monitoring
• Secure your code
• Patch
• Virtual patch
25
© 2018 Imperva, Inc. All rights reserved.
Key Takeaways
• Protect your assets
• RCE vulnerabilities are a serious security risk that can be the entry point to
your network
• Almost 90% of downloader RCE attacks contain a crypto-mining malware
• Attackers are after your server resources
26
© 2018 Imperva, Inc. All rights reserved.
Any questions?
Amir Shladovsky
amir.shladovsky@imperva.com
@AmirShladovsky

More Related Content

PPTX
[OPD 2019] Side-Channels on the Web:
Attacks and Defenses
OWASP
 
PDF
[Wroclaw #9] The purge - dealing with secrets in Opera Software
OWASP
 
PDF
Testing Android Security Codemotion Amsterdam edition
Jose Manuel Ortega Candel
 
PDF
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat Security Conference
 
PPT
BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully
BlueHat Security Conference
 
PPTX
Breaking the cyber kill chain!
Nahidul Kibria
 
PDF
CSW2017 Weston miller csw17_mitigating_native_remote_code_execution
CanSecWest
 
PDF
Hacking intranet websites
shehab najjar
 
[OPD 2019] Side-Channels on the Web:
Attacks and Defenses
OWASP
 
[Wroclaw #9] The purge - dealing with secrets in Opera Software
OWASP
 
Testing Android Security Codemotion Amsterdam edition
Jose Manuel Ortega Candel
 
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat Security Conference
 
BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully
BlueHat Security Conference
 
Breaking the cyber kill chain!
Nahidul Kibria
 
CSW2017 Weston miller csw17_mitigating_native_remote_code_execution
CanSecWest
 
Hacking intranet websites
shehab najjar
 

What's hot (20)

PDF
[OPD 2019] Trusted types and the end of DOM XSS
OWASP
 
PDF
CSW2017 Enrico branca What if encrypted communications are not as secure as w...
CanSecWest
 
PPTX
Toni de la Fuente - Automate or die! How to survive to an attack in the Cloud...
RootedCON
 
PDF
Understanding Windows Access Token Manipulation
Justin Bui
 
PDF
Chris Rutter: Avoiding The Security Brick
Michael Man
 
PDF
DevDay 2017: Christof Fetzer - SCONE: Secure Linux Container Environments wit...
DevDay Dresden
 
PDF
SSL Pinning and Bypasses: Android and iOS
Anant Shrivastava
 
ODP
Secure coding in C#
Siddharth Bezalwar
 
PPTX
BlueHat v17 || Mitigations for the Masses: From EMET to Windows Defender Exp...
BlueHat Security Conference
 
PPTX
BlueHat v17 || Down the Open Source Software Rabbit Hole
BlueHat Security Conference
 
PDF
Securing TodoMVC Using the Web Cryptography API
Kevin Hakanson
 
PDF
Developer's Guide to JavaScript and Web Cryptography
Kevin Hakanson
 
PDF
Hack any website
sunil kumar
 
PPTX
BlueHat v17 || Securing Windows Defender Application Guard
BlueHat Security Conference
 
PPTX
Triển khai Modsecurity vào hệ thống NMS - Quan Minh Tâm
Security Bootcamp
 
PDF
The Log4Shell Vulnerability – explained: how to stay secure
Kaspersky
 
PDF
Java script and web cryptography (cf.objective)
ColdFusionConference
 
PDF
Avoiding damage, shame and regrets data protection for mobile client-server a...
Stanfy
 
ODP
Tracking vulnerable JARs
David Jorm
 
PPTX
Dmytro Kochergin - "The OWASP TOP 10 - Typical Attacks on Web Applications an...
LogeekNightUkraine
 
[OPD 2019] Trusted types and the end of DOM XSS
OWASP
 
CSW2017 Enrico branca What if encrypted communications are not as secure as w...
CanSecWest
 
Toni de la Fuente - Automate or die! How to survive to an attack in the Cloud...
RootedCON
 
Understanding Windows Access Token Manipulation
Justin Bui
 
Chris Rutter: Avoiding The Security Brick
Michael Man
 
DevDay 2017: Christof Fetzer - SCONE: Secure Linux Container Environments wit...
DevDay Dresden
 
SSL Pinning and Bypasses: Android and iOS
Anant Shrivastava
 
Secure coding in C#
Siddharth Bezalwar
 
BlueHat v17 || Mitigations for the Masses: From EMET to Windows Defender Exp...
BlueHat Security Conference
 
BlueHat v17 || Down the Open Source Software Rabbit Hole
BlueHat Security Conference
 
Securing TodoMVC Using the Web Cryptography API
Kevin Hakanson
 
Developer's Guide to JavaScript and Web Cryptography
Kevin Hakanson
 
Hack any website
sunil kumar
 
BlueHat v17 || Securing Windows Defender Application Guard
BlueHat Security Conference
 
Triển khai Modsecurity vào hệ thống NMS - Quan Minh Tâm
Security Bootcamp
 
The Log4Shell Vulnerability – explained: how to stay secure
Kaspersky
 
Java script and web cryptography (cf.objective)
ColdFusionConference
 
Avoiding damage, shame and regrets data protection for mobile client-server a...
Stanfy
 
Tracking vulnerable JARs
David Jorm
 
Dmytro Kochergin - "The OWASP TOP 10 - Typical Attacks on Web Applications an...
LogeekNightUkraine
 
Ad

Similar to OWASP Poland Day 2018 - Amir Shladovsky - Crypto-mining (20)

PDF
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
SBWebinars
 
PPTX
ISTR 23: Internet Security Threat Report
Symantec Security Response
 
PDF
Issa jason dablow
ISSA LA
 
PDF
NETSCOUT Threat Intelligence Report: Findings Summary 1st half of 2018
NETSCOUT
 
PPTX
Cybersecurity Awareness Overview.pptx
sanap6
 
PPTX
Cybersecurity Awareness Overview.pptx
instaeditz009
 
PPTX
Detecting Intrusions and Malware - Eric Vanderburg - JurInnov
Eric Vanderburg
 
PDF
Browser isolation (isc)2 may presentation v2
Wen-Pai Lu
 
PDF
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CanSecWest
 
PPTX
Cybersecurity Awareness Overview- BSBXCS402.pptx
itsamuamit11
 
PDF
An Inside Look at a Sophisticated, Multi-vector DDoS Attack
Imperva
 
PPTX
An Inside Look at a Sophisticated Multi-Vector DDoS Attack
Imperva Incapsula
 
PPTX
Advanced Threats In The Enterprise
Priyanka Aash
 
PPTX
Reacting to Advanced, Unknown Attacks in Real-Time with Lastline
Lastline, Inc.
 
PDF
Threat Landscape Lessons from IoTs and Honeynets
Digital Transformation EXPO Event Series
 
PPTX
Cybersecurity Awareness Overview.pptx
AfsanaMumal2
 
PDF
Evolución de la Ciber Seguridad
Cristian Garcia G.
 
PPTX
Leveraging open banking specifications for rigorous API security – What’s in...
Rogue Wave Software
 
PPTX
Hacking by Pratyush Gupta
Tenet Systems Pvt Ltd
 
PPTX
A Profile of the Backoff PoS Malware that Hit 1000+ Retail Businesses
Lastline, Inc.
 
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
SBWebinars
 
ISTR 23: Internet Security Threat Report
Symantec Security Response
 
Issa jason dablow
ISSA LA
 
NETSCOUT Threat Intelligence Report: Findings Summary 1st half of 2018
NETSCOUT
 
Cybersecurity Awareness Overview.pptx
sanap6
 
Cybersecurity Awareness Overview.pptx
instaeditz009
 
Detecting Intrusions and Malware - Eric Vanderburg - JurInnov
Eric Vanderburg
 
Browser isolation (isc)2 may presentation v2
Wen-Pai Lu
 
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CanSecWest
 
Cybersecurity Awareness Overview- BSBXCS402.pptx
itsamuamit11
 
An Inside Look at a Sophisticated, Multi-vector DDoS Attack
Imperva
 
An Inside Look at a Sophisticated Multi-Vector DDoS Attack
Imperva Incapsula
 
Advanced Threats In The Enterprise
Priyanka Aash
 
Reacting to Advanced, Unknown Attacks in Real-Time with Lastline
Lastline, Inc.
 
Threat Landscape Lessons from IoTs and Honeynets
Digital Transformation EXPO Event Series
 
Cybersecurity Awareness Overview.pptx
AfsanaMumal2
 
Evolución de la Ciber Seguridad
Cristian Garcia G.
 
Leveraging open banking specifications for rigorous API security – What’s in...
Rogue Wave Software
 
Hacking by Pratyush Gupta
Tenet Systems Pvt Ltd
 
A Profile of the Backoff PoS Malware that Hit 1000+ Retail Businesses
Lastline, Inc.
 
Ad

More from OWASP (20)

PDF
[OPD 2019] Web Apps vs Blockchain dApps
OWASP
 
PDF
[OPD 2019] Threat modeling at scale
OWASP
 
PDF
[OPD 2019] Life after pentest
OWASP
 
PDF
[OPD 2019] .NET Core Security
OWASP
 
PDF
[OPD 2019] Top 10 Security Facts of 2020
OWASP
 
PDF
[OPD 2019] Governance as a missing part of IT security architecture
OWASP
 
PDF
[OPD 2019] Storm Busters: Auditing & Securing AWS Infrastructure
OWASP
 
PPTX
[OPD 2019] AST Platform and the importance of multi-layered application secu...
OWASP
 
PPTX
[OPD 2019] Inter-application vulnerabilities
OWASP
 
PDF
[OPD 2019] Automated Defense with Serverless computing
OWASP
 
PDF
[OPD 2019] Advanced Data Analysis in RegSOC
OWASP
 
PDF
[OPD 2019] Attacking JWT tokens
OWASP
 
PDF
[OPD 2019] Rumpkernels meet fuzzing
OWASP
 
PDF
[Wroclaw #9] To be or Not To Be - Threat Modeling in Security World
OWASP
 
PDF
OWASP Poland 13 November 2018 - Martin Knobloch - Building Secure Software
OWASP
 
PDF
OWASP Poland Day 2018 - Damian Rusinek - Outsmarting smart contracts
OWASP
 
PDF
OWASP Poland Day 2018 - Frans Rosen - Attacking modern web technologies
OWASP
 
PDF
OWASP Poland Day 2018 - Dani Ramirez - IPMI hacking
OWASP
 
PPTX
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP
 
PPTX
OWASP Poland Day 2018 - Omer Levi Hevroni - Secure the Pipeline
OWASP
 
[OPD 2019] Web Apps vs Blockchain dApps
OWASP
 
[OPD 2019] Threat modeling at scale
OWASP
 
[OPD 2019] Life after pentest
OWASP
 
[OPD 2019] .NET Core Security
OWASP
 
[OPD 2019] Top 10 Security Facts of 2020
OWASP
 
[OPD 2019] Governance as a missing part of IT security architecture
OWASP
 
[OPD 2019] Storm Busters: Auditing & Securing AWS Infrastructure
OWASP
 
[OPD 2019] AST Platform and the importance of multi-layered application secu...
OWASP
 
[OPD 2019] Inter-application vulnerabilities
OWASP
 
[OPD 2019] Automated Defense with Serverless computing
OWASP
 
[OPD 2019] Advanced Data Analysis in RegSOC
OWASP
 
[OPD 2019] Attacking JWT tokens
OWASP
 
[OPD 2019] Rumpkernels meet fuzzing
OWASP
 
[Wroclaw #9] To be or Not To Be - Threat Modeling in Security World
OWASP
 
OWASP Poland 13 November 2018 - Martin Knobloch - Building Secure Software
OWASP
 
OWASP Poland Day 2018 - Damian Rusinek - Outsmarting smart contracts
OWASP
 
OWASP Poland Day 2018 - Frans Rosen - Attacking modern web technologies
OWASP
 
OWASP Poland Day 2018 - Dani Ramirez - IPMI hacking
OWASP
 
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP
 
OWASP Poland Day 2018 - Omer Levi Hevroni - Secure the Pipeline
OWASP
 

Recently uploaded (20)

PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Doc9.....................................
SofiaCollazos
 
Software Development Methodologies in 2025
KodekX
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
The Future of Artificial Intelligence (AI)
Mukul
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 

OWASP Poland Day 2018 - Amir Shladovsky - Crypto-mining

  • 1. © 2018 Imperva, Inc. All rights reserved. How to Protect Your Web Applications from Crypto-mining: The New Force Behind Remote Code Execution Attacks Amir Shladovsky – Threat Research Tech Lead, Imperva W a r s a w , 1 0 . 1 0 . 2 0 1 8 OWASP Poland Day 2018
  • 2. © 2018 Imperva, Inc. All rights reserved. Evolution of Web Attacks – Economical Aspects 3 Attack Data theft Network theft Data corruption CPU theft Example SQL injection DDoS botnet Ransomware Crypto-mining Sale strategy 3rd party sale 3rd party sale Direct sale No sale
  • 3. © 2018 Imperva, Inc. All rights reserved. Agenda • Remote Code Execution (RCE) vulnerabilities • Payloads and trends • A crypto mining malware (CryptoM 1.0/ 2.0) – The money trail – Crypto currencies • Mitigation • Key takeaways 4
  • 4. © 2018 Imperva, Inc. All rights reserved. Remote Code Execution (RCE) Vulnerabilities 5 • Definition • Conditions – Untrusted data + insufficient input validation • Example 1 • Recent development – Serialization/ deserialization • Example 2 Object in memory Object serialized Object in transit Object de- serialized Object in memory
  • 5. © 2018 Imperva, Inc. All rights reserved. RCE Vulnerability Statistics 7 Taken from:vulndb.cyberriskanalytics.com RCE
  • 6. © 2018 Imperva, Inc. All rights reserved. RCE Attacks – External Resources in Payloads • Reconnaissance • Botnet (DDoS, Other) • Crypto mining malware • Other 8
  • 7. © 2018 Imperva, Inc. All rights reserved. A Shift in Payload Trends 9 12% 88% DDoS Bot Crypto-mining Malware 45% 55% 2017 2018
  • 8. © 2018 Imperva, Inc. All rights reserved. A Crypto Mining Malware 1.0 • RCE vulnerability as an entry point • Evasion techniques • Main characteristics: – Kills competing processes – Gains persistency – Downloads and runs the malware 10 Exploit RCE vulnerability Run downloader code Infect with Crypto mining malware 1 2 3
  • 9. © 2018 Imperva, Inc. All rights reserved. logo6.jpg – Stage 1 11 Eliminate rivalries Eliminate security controls
  • 10. © 2018 Imperva, Inc. All rights reserved. logo6.jpg – Stages 2 & 3 12 Gains persistency Obtains dynamic configuration Obtains Miner Runs the Miner Calculates number of cores
  • 11. © 2018 Imperva, Inc. All rights reserved. Config_1.json 13 Impact: denial of service Mining pool and wallet Mining algorithm
  • 12. © 2018 Imperva, Inc. All rights reserved. Crypto Mining Malware 2.0 / RedisWannaMine • Spreads, internally and externally, in a worm like behavior – Using exposed Redis server to replicate itself. – Using Eternal Blue exploit to propagate over windows platform 14
  • 13. © 2018 Imperva, Inc. All rights reserved. What is Redis? • In memory Database (RAM) • Widely used • Technical information: – Port 6379 (over 200K IP publicly open with this port) – No authentication by default (up till version 3.2) 15 www.shodan.io
  • 14. © 2018 Imperva, Inc. All rights reserved. EternalBlue • Exploit developed by NSA • Leaked by Shadow Broker hacker group • Exploit a vulnerability in Microsoft implementation of SMB protocol to spread out • Famous by WannaCry ransomware that used EternalBlue to propogate 16
  • 15. © 2018 Imperva, Inc. All rights reserved. Redis infection process 17 Download and compile masscan Find open Redis servers using masscan
  • 16. © 2018 Imperva, Inc. All rights reserved. Crypto Mining Malware 2.0 Infection Chain Exploit CVE-2017-9805 to run a shell command Drop RedisWannaMine Run a crypto miner Scan vulnerable Redis servers Use Redis vulnerability to drop a crypto miner Scan vulnerable Windows SMB servers Use EternalBlue to drop a crypto miner 18
  • 17. © 2018 Imperva, Inc. All rights reserved. Going the Extra Mile - Browsers Infection • Using an open source JavaScript webminer • The attacker initially tries to alter the commonly used index.php file and add to it the malicious JavaScript me0w.js 19
  • 18. © 2018 Imperva, Inc. All rights reserved. Going the Extra Mile - Browsers Infection • It also scan for all JavaScript files on the server and, once found, inject the same malicious me0w.js file 20
  • 19. © 2018 Imperva, Inc. All rights reserved. Crypto Mining Malware Infection Chain 21 Infection of a single victim Crypto Mining Malware 1.0 Infection of the web application visitors Infection of many victims Spread in a worm like behavior
  • 20. © 2018 Imperva, Inc. All rights reserved. The Money Trail • Mining pools - Share resources, split the reward 22
  • 21. © 2018 Imperva, Inc. All rights reserved. The Money Trail – other currencies 23 Karbowanec (Karbo) Electroneum
  • 22. © 2018 Imperva, Inc. All rights reserved. Why not Bitcoin? • Specific hardware • Anonymity 24
  • 23. © 2018 Imperva, Inc. All rights reserved. Mitigation • Monitoring • Secure your code • Patch • Virtual patch 25
  • 24. © 2018 Imperva, Inc. All rights reserved. Key Takeaways • Protect your assets • RCE vulnerabilities are a serious security risk that can be the entry point to your network • Almost 90% of downloader RCE attacks contain a crypto-mining malware • Attackers are after your server resources 26
  • 25. © 2018 Imperva, Inc. All rights reserved. Any questions? Amir Shladovsky [email protected] @AmirShladovsky