what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

NiceHash Miner Excavator 1.6.7c Cross Site Request Forgery

NiceHash Miner Excavator 1.6.7c Cross Site Request Forgery
Posted May 18, 2021
Authored by Harry Sintonen

NiceHash Miner Excavator versions 1.6.7c and below suffer from a cross site request forgery vulnerability. The issue enables any external web site to send commands to the local miner instance, and to redirect the mined coins to an arbitrary mining address.

tags | exploit, web, arbitrary, local, csrf
SHA-256 | fb87f0499aef3335445d3f11dca696cc51f521e079a6ba1f2728e565105afbc1

NiceHash Miner Excavator 1.6.7c Cross Site Request Forgery

Change Mirror Download
NiceHash Miner Excavator API Cross-Site Request Forgery
=======================================================
The latest version of this advisory is available at:
https://sintonen.fi/advisories/nicehash-miner-excavator-api-csrf.txt


Overview
--------

NiceHash Miner Excavator plugin contains a vulnerability that enables any external
web site to send commands to the local miner instance, and to redirect the mined
coins to arbitrary mining address.


Description
-----------

NiceHash Miner Excavator plugin uses a local JSON API at localhost:4000. External
javascript (any website browsed by the victim) can craft and send JSON requests to
the API endpoint by employing XMLHTTPRequest objects.


Impact
------

Malicious website can command the NiceHash Excavator miner to send the coins to
an arbitrary mining address, effectively stealing the mined coins.


Details
-------

The discovered vulnerability, described in more detail below, enables the attack
described here in brief.

1. The attacker creates a JavaScript payload that uses XMLHTTPRequest object to
send JSON API commands to localhost:4000 API endpoint. Note that the API
expects a raw TCP connection but since the parser is relaxed, it will skip any
non-JSON input such as the GET line and the HTTP header lines until the actual
HTTP POST data is met. Additionally since there is no need to specify a
Content-Type for the request, no Cross-Origin Resource Sharing preflight check
is needed or performed. The payload uses the 'subscribe' API method to connect
the miner to the attacker's mining address. The payload then uses
'cmdfile.commit' method to make the address change persistent.

2. The victim running the NiceHash Miner Excavator plugin browses to the site
hosting the malicious JavaScript payload. The payload activates and redirects
NiceHash Miner to send the mined coins to the attacker's mining address.

3. By targetting a wide audience of users running NiceHash Excavator Miner, the
attacker could acquire thousands of miners, resulting in huge profits.


Vulnerabilities
---------------

1. CWE-20: Improper Input Validation

The root cause for the vulnerability is the lax input validation of the Excavator
TCP API endpoint. The API will consume newline terminated lines arriving to the
API endpoint and merely skip invalid lines. This enables the attack to work via
regular HTTP requests, effectively enabling the Cross-Site Request Forgery attack.


Vulnerable versions
-------------------

The following product versions are vulnerable:

- NiceHash Excavator plugin up to and including version 1.6.7c.


End user recommendations
------------------------

1. Upgrade to the NiceHash Miner 3.0.6.5 or later.


Credits
-------

The vulnerability was discovered by Harry Sintonen / F-Secure Consulting.


Timeline
--------

2021.03.28 discovered the vulnerability
2021.03.28 wrote a proof of concept exploit
2021.03.28 contacted NiceHash over security@nicehash.com
2021.03.28 wrote the first draft of this advisory
2021.03.28 sent the advisory to security@nicehash.com
2021.03.29 Excavator plugin 1.6.11a released. this version switched to
HTTP JSON API (-wp 4000)
2021.04.02 reminded security@nicehash.com that -wp 4000 alone doesn't resolve
the issue
2021.04.15 NiceHash Miner 3.0.6.5 released, fixing the vulnerability
2021.05.14 public disclosure


Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close