Crypto Mining
CHRISTOS HADJISTYLLIS EPL682 - ADVANCED SECURITY TOPICS, SPRING 2018/2019 UNIVERSITY OF CYPRUS
Crypto Mining CHRISTOS HADJISTYLLIS EPL682 - ADVANCED SECURITY - - PowerPoint PPT Presentation
Crypto Mining CHRISTOS HADJISTYLLIS EPL682 - ADVANCED SECURITY TOPICS, SPRING 2018/2019 UNIVERSITY OF CYPRUS Introduction Cryptocurrency: virtual currency usually not controlled by any government or physical entity Examples: Bitcoin,
CHRISTOS HADJISTYLLIS EPL682 - ADVANCED SECURITY TOPICS, SPRING 2018/2019 UNIVERSITY OF CYPRUS
Cryptocurrency
2
CRYPTOCURRENCY MINING3
Huang, D.Y. et al, February 2014.
4
Nakamoto”
5
CRYPTOCURRENCY MINING6
CRYPTOCURRENCY MININGNew Transactions Coinbase + Comments
Nonce e.g. 1234
SHA-256
0000110001010101100011100101
Previous Block Hash
fast
7
CRYPTOCURRENCY MININGMH/s, GH/s, TH/s = millions, billions, trillions of hashes per second
made by the whole based on relative contribution
8
Mining Pool PC 1 PC 2 PC N Bitcoin
[SHA-256 hash] SHA-256 hash [SHA-256 hash]
9
10
11
Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l
Base64(Username:Password)
12
13
software vendor)
2009)
14
15
Suspected Proxy Mining Pool Legit user
FeodalCash)
CRYPTOCURRENCY MINING16
17
(no info found)
(spam, DDoS attacks, click fraud) *
18
Population 124700 17517 204400
19
Konoth, R.K et al, October 2018.
20
Mining Code Injection Methods & Campaigns
21
22
Drive-by Mining (Cryptojacking) Components
CRYPTOCURRENCY MINING23
either Wasm or asm.js) from the website or an external server
WebSocket proxy server
algorithm that is run on victim’s browser
page source code (index & internal pages)
from external location
24
Detection Evasion Techniques
WebSocket
25
communication between a cryptominer and the proxy server to detect
(sometimes)
CRYPTOCURRENCY MINING26
blacklists and/or CPU usage heuristics
27
28
Skein-256)
29
CryptoNight Detection Based on Primitive Identification
enclosed in loops inside functions
30
BLAKE-256 80 XOR 85 left shift 32 right shift foo() 86 XOR 85 left shift 33 right shift
Similarity = 3 (all operations present) Difference = 2 (XOR, right shift have different count)
CryptoNight Generic Cryptographic Function Detection
each function of the Wasm module
31
CryptoNight Detection Based on CPU Cache Events
32
MineSweeper Deployment Considerations
33
Evaluation of Cryptographic Primitive Identification
discovered by researchers’ crawl
with Primitive Identification (identified at least 1 primitive)
CRYPTOCURRENCY MINING34
Evaluation of CPU Cache Event Monitoring
seconds, M=million)
CRYPTOCURRENCY MINING35
[1] Huang, D.Y., Dharmdasani, H., Meiklejohn, S., Dave, V., Grier, C., McCoy, D., Savage, S., Weaver, N., Snoeren, A.C. and Levchenko, K., “Botcoin: Monetizing Stolen Cycles”, NDSS, February 2014. [2] Konoth, R.K., Vineti, E., Moonsamy, V., Lindorfer, M., Kruegel, C., Bos, H. and Vigna, G., “MineSweeper: An In-depth Look into Drive-by Cryptocurrency Mining and Its Defense”, Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, pp. 1714-1730, October 2018.
CRYPTOCURRENCY MINING36