Bitcoin Forum

Bitcoin => Project Development => Topic started by: NghtRppr on April 17, 2011, 08:05:57 PM



Title: Stealthcoin
Post by: NghtRppr on April 17, 2011, 08:05:57 PM
I have a friend that runs a computer lab of about 200+ computers for training purposes and he doesn't care if I use up his electricity but he had a few objections to letting me generate bitcoins on his computers.

  • can't have CPU usage pegged at 100% because users might bug him about it
  • can't be bothered to install anything himself unless it's a single executable he can push to all his computers
  • can't be bothered to check the balances and send bitcoins when generated

With this in mind, I created Stealthcoin. It uses a modified version of the vanilla Bitcoind with an added sleep() call so that CPU usage isn't maxed out while generating. Obviously, it generates slower, about half the speed, but half is better than nothing in my case. I also wanted to gain experience with compiling/developing Bitcoin, as well as using Github, so I can start contributing to the project. If you have barely-computer-literate friends that don't mind letting you use their electricity, this should help you out a bit as well.

https://github.com/bitcoin2cash/Stealthcoin

Quote
Stealthcoin is an installation wrapper for a modified Bitcoind CPU miner. The
editor allows you to create an installation binary which can then be executed on
any Windows NT compatible operating system. The editor allows you to specify the
installation path, the name to use for running the Stealthcoin service, the name
to use for running the Bitcoind executable and a bitcoin address to send all
generated bitcoins to. Once the installation binary is executed, it will copy
itself to the specified installation path, extract the Bitcoind binary, as well
as the libeay32.dll binary. It will then execute Bitcoind using the installation
path as the data directory. The Stealthcoin service periodically checks if any
bitcoins have been generated and if so, sends them to the bitcoin address you
specified in the editor.

If this project is useful to you please send donations to 1HXD5xHpz6cxbrqNekzGFTow6gjeuTNR4j in order to encourage me to keep developing this.


Title: Re: Stealthcoin
Post by: Patat3 on April 17, 2011, 08:23:40 PM
I know a lot more Linux than Windows, so I might be wrong.

In Unix, you can change the priority of a process, from -20 (higher priority) to 19 (lower priority). Process with least priority will consume CPU time only when no other process with higher priority need it. The binary for that is nice (to launch at a specific priority) or renice (to change during runtime).
This priority does not impact memory usage and I/O (for that, in Linux there is ionice).

A bitcoin miner is a perfect candidate for this, it does not need large amount of memory and won't be in swap when idling and it does not perform intensive I/O on disk.

For Windows, in "Process Explorer" I can set a lower priority to a running process, such as "Idle" or "Idling" the equivalent of renice -n 19 $unixpid.

Instead of hacking the miner and slow it down, you can run it full speed but with lower priority.
I don't know how to do that in Windows... everything is so complex. Butif no tools in Windows userspace can let you do that, you can write a small app that will launch the bitcoin miner and run a low-level Windows standard library call that will change the miner priority.

When students will logoff their workstation 99.9% of CPU time will be spend on your miner!


Title: Re: Stealthcoin
Post by: NghtRppr on April 17, 2011, 09:04:50 PM
Running the Bitcoind process at the lowest priority will make the system more responsive because the shell gets priority use of the CPU. However, if you look at the Windows Task Manager, it will still show the CPU being maxed out which is what I'm trying to avoid.


Title: Re: Stealthcoin
Post by: Patat3 on April 17, 2011, 09:21:26 PM
You want to hide it's CPU usage?

I tought you didn't want to impact the user!

Because... 99% CPU idling vs. 99% CPU on bitcoind, won't do any difference for the user.

You can rename the bitcoind.exe to AntiVirus.exe everybody will feel safer to see an hardworking A/V  ;D


Title: Re: Stealthcoin
Post by: NghtRppr on April 17, 2011, 09:27:25 PM
You want to hide it's CPU usage?

Yes, that's why I named the project Stealthcoin. If someone sees 100% usage, which isn't a typical thing people see, they are going think something is going wrong and start bugging the administrator. Also, he wouldn't let me install a rootkit. ;D


Title: Re: Stealthcoin
Post by: error on April 17, 2011, 11:40:31 PM
You want to hide it's CPU usage?

Yes, that's why I named the project Stealthcoin. If someone sees 100% usage, which isn't a typical thing people see, they are going think something is going wrong and start bugging the administrator. Also, he wouldn't let me install a rootkit. ;D

Just name it "System Idle Process". Nobody will be able to tell the difference. ;D


Title: Re: Stealthcoin
Post by: Raoul Duke on April 17, 2011, 11:51:13 PM
Can i use your code to setup a PPI campaign? :D

EDIT: This thing trips all kinds of alarms on the antivirus   ::)

EDIT II : Just don't give the process/service names that are used by windows processes and the av stops complainting :D


Title: Re: Stealthcoin
Post by: theGECK on April 18, 2011, 01:30:52 AM
In a previous topic of mine, we talked about using a .vbs script to create a hidden instance of ufasoft's miner, which throttles well and stays out of the way. Nothing to install, doesn't trip any A/V. While I don't advocate doing this, he could stick it in a network share, and slap the vbs script into their login, or into startup folders. This is especially easy if you use Active Directory.


Title: Re: Stealthcoin
Post by: dust on April 18, 2011, 01:55:01 AM
Bitcoin: Botnet Edition


Title: Re: Stealthcoin
Post by: EPiSKiNG on April 18, 2011, 02:16:51 AM
Bitcoin: Botnet Edition

roflcopters!


Title: Re: Stealthcoin
Post by: NghtRppr on April 18, 2011, 02:50:22 AM
Please don't use this for nefarious purposes. :-\


Title: Re: Stealthcoin
Post by: marcus_of_augustus on April 18, 2011, 11:25:29 AM
Please don't use this for nefarious purposes. :-\

Well duh.

You just handed the botnetters a bitcoin miner on a platter ... just call it botcoin miner and be done with it.



Title: Re: Stealthcoin
Post by: DeadJDona on April 18, 2011, 02:07:08 PM
Just wonder if I can lend some botnet resurces for this ))


Title: Re: Stealthcoin
Post by: NghtRppr on April 18, 2011, 02:17:39 PM
just call it botcoin miner and be done with it

Well, I have to admit, that is a catchier name.

Just wonder if I can lend some botnet resurces for this ))

No! Please don't! Stop!


Title: Re: Stealthcoin
Post by: Rena on April 19, 2011, 02:28:39 AM
Just run it when the computer isn't in use (nobody logged in)? I assume all 200 machines aren't in use 24/7. :P


Title: Re: Stealthcoin
Post by: casascius on April 19, 2011, 03:47:44 AM
I can think of one way botnets could harm the network...  botnets that solve blocks without any transactions do less good than miners who include transactions in their blocks.

Why does this matter?  Normal transaction activity would increase the amount of traffic needed between botnet operator and his bots, the resource consumption increasing his odds of getting detected and found.  If someone had 10,000 bots, his bots would have to be constantly getting work from him in order to properly include transactions in a block.  He would be incentivized to program his botnet to solve empty blocks so he could skip the getwork overhead and only have to send out new work messages every 10 minutes on average, to tell his bots when to start working on a new block.


Title: Re: Stealthcoin
Post by: lulzplzkthx on April 20, 2011, 12:28:16 AM
No pooled mining support?


Title: Re: Stealthcoin
Post by: tryptamine on April 20, 2011, 08:16:13 AM
Doesn't look like it works, tested on Win7 64-bit.


Title: Re: Stealthcoin
Post by: NghtRppr on April 20, 2011, 08:35:40 AM
Doesn't look like it works, tested on Win7 64-bit.

I've only tested it on Windows 7 32-bit and Windows XP. I'll install 64-bit on VMware and see what the problem is. If you can figure out exactly what parts aren't working, please let me know. Does it create the installation folder? Did you run it as administrator? Etc...

Thanks!


Title: Re: Stealthcoin
Post by: tryptamine on April 20, 2011, 08:55:50 AM
I run as administrator; it does not create directory nor service. Tested on a 32-bit Vista and it works fine, though.


Title: What about GPU?
Post by: asdf on April 20, 2011, 09:09:41 AM
Mining bitcoin with a CPU is a tragic waste of societies resources. Do you mop your floor with a paintbrush?

Otherwise, cool idea!


Title: Re: Stealthcoin
Post by: tryptamine on April 20, 2011, 10:28:50 AM
A GPU version would be cool.


Title: Re: What about GPU?
Post by: NghtRppr on April 20, 2011, 05:05:38 PM
Mining bitcoin with a CPU is a tragic waste of societies resources.

It's up to each person to decide how to best use their resources. In my case, it was CPU mining or nothing. If I get enough donations based on demand for a GPU version, I'll do it.


Title: Re: Stealthcoin
Post by: Sir_Tofek on April 20, 2011, 11:28:42 PM
So once it's installed, how would you go about uninstalling it?


Title: Re: Stealthcoin
Post by: NghtRppr on April 20, 2011, 11:30:04 PM
So once it's installed, how would you go about uninstalling it?

Run the installer with the "/u" switch and then delete the installation folder.


Title: Re: Stealthcoin
Post by: winnetou on April 29, 2011, 01:00:52 PM
Hi! I just download the editor.exe, bitcoind.exe and libeay32.dll. Hope that are all files i need for running.

Is it possible that it is not working on win7, 32 bit? I just tried to start the editor.exe and get a " the ntvdm cpu has encountered an illegal instruction 16 bit ms-dos subsystem".



Title: Re: Stealthcoin
Post by: wumpus on April 29, 2011, 04:01:09 PM
Please don't use this for nefarious purposes. :-\

Well duh.

You just handed the botnetters a bitcoin miner on a platter ... just call it botcoin miner and be done with it.
I wouldn't be too worried about this.

I'm afraid botnet creators are smart enough to make these changes for themselves. Also, they probably WILL use a rootkit, so they don't need to hide CPU usage in this way.


Title: Re: Stealthcoin
Post by: winnetou on May 01, 2011, 10:04:27 AM
@bitcoin2cash. How much coins do you need to develop a gpu version that works fine on vista/win7 , too? :)


Title: Re: Stealthcoin
Post by: niooron on May 03, 2011, 01:46:18 AM
Stealthcoin just needs the ability to mine through firewalls, and it would be complete.


Title: Re: Stealthcoin
Post by: winnetou on May 04, 2011, 05:27:43 PM
Firewall bypass + Pool Mining. How much btcs do you need?=)


Title: Re: Stealthcoin
Post by: dikidera on May 04, 2011, 08:08:00 PM
Nice  ;D. Now im really pumped up to make a my school's computers' a small mining farms.


Title: Re: Stealthcoin
Post by: NghtRppr on May 05, 2011, 03:28:48 AM
Do you mean firewall bypassing by injecting into the default browser?


Title: Re: Stealthcoin
Post by: F.A. Hayek on May 11, 2011, 06:07:40 PM
Can you post a HOWTO: use this product?

Instructions are non existent and software is not very explanatory. Why is a name necessary to run it? Does the editor export a config file or an executable? Does this have any external dependencies? Is the system path supposed to be to the bitcoin executable or to the top level directory containing the bitcoin directory from the repo?

Some details would be great. Thanks!


Title: Re: Stealthcoin
Post by: bulanula on May 13, 2011, 10:03:44 AM
GPU and pool mining support would really spice this project up.
Can you even make it so we can mine with the GPU and the CPU at the same time ?
Or maybe let us configure how "hard" the program goes on the CPU load and user experience ?

Thanks !


Title: Re: Stealthcoin
Post by: SleepMachine on May 16, 2011, 12:10:00 PM
I've created an application can be used to stealth-launch a miner when a computer becomes idle and end it when the computer becomes active again. (sort of like a screensaver)

Perhaps it will interest you guys.

My app can be found here:
http://bitcointalk.org/index.php?topic=8403.0


Title: Re: Stealthcoin
Post by: toiletduck on June 04, 2011, 01:27:56 AM
Can you post a HOWTO: use this product?

Instructions are non existent and software is not very explanatory. Why is a name necessary to run it? Does the editor export a config file or an executable? Does this have any external dependencies? Is the system path supposed to be to the bitcoin executable or to the top level directory containing the bitcoin directory from the repo?

Some details would be great. Thanks!

Seriously, can we get some kind of usage information on this tool?  What kind of file is this editor supposed to output?  Please document your software so users can utilize it.


Title: Re: Stealthcoin
Post by: littlebittycoin on June 10, 2011, 01:51:05 PM
gpu and pool support and wow that  version would be sick :) thanks alot for this though :)

edit
im in the exact situation except the computers (half of them) are reallly nice ones. I might be a noob but i used the editor and got the file it produced and this is where im stuck what do i do with generated file. Also another concern is since they are not pooled will you ever get anything off a cpu since its a low low chance with the power of it. Again im kinda new to all this


Title: Re: Stealthcoin
Post by: cointrepreneur on June 10, 2011, 11:43:31 PM
Interesting project. :)  It was my understanding, however, that at current difficulty levels CPU mining is practically useless at this point?  Is that incorrect? If not I could perhaps use something like this.



Title: Re: Stealthcoin
Post by: Jarredm on June 11, 2011, 05:40:13 PM
CPU Mining isn't possible if you pay for the electricity.  It just isn't economical.  If you aren't paying for the juice then by all means.  However, why would you use bitcoind?  There are various other miners with way better performance.  The Ufasoft for example works really well and is by default running at low priority.  It will consume 99% by default, however, if the machines are dual core then you can start it with the -t command line option.  -T tells it how many threads to use.  If your processor is a core 2 duo non-hyperthreaded then make the option -t 1 and it will use around 50%.  If you have a Core i5 with hyperthreading then your processor has 4 effective threads and you can launch it with -t 3 and consume around 75%.

You can use GUI miner which allows ufasoft to run without having a presence on the task bar.  The GUI miner app directory is the only thing that need to be copied to the local machines.  And launch at start up.  Oh and let's not forget that ufasoft will GPU mine as well.  Big ups if your machines have a capable GPU

The program I am developing is designed to accomplish the same thing but I am trying to take it a step further.  I am writing a Windows System Service application that will poll the system to see if the user is active.  If not then it will launch the ufasoft miner.  Now that much can be accomplished by the windows task scheduler alone.  The real problem is that I cannot get task scheduler to stop the process when the user resumes activity.  So in comes the necessity of the system service.  In addition to being able to start and stop on user activity, and take advantage of GPU mining, the service will allow one additional benefit.  System services start with the computer and run whether there is a logged on user or not!  Now all you have to do is have the computer turned on to take advantage of it's idle cycles.

Anyway, I am early in development but the process isn't too complex so shouldn't take me too long.  If you are interested in this project you can message me and I'll get it to you when it's completed.  If you like the idea and would also like to help motivate me then my address is below.


Title: Re: Stealthcoin
Post by: SleepMachine on June 12, 2011, 10:47:18 AM
The program I am developing is designed to accomplish the same thing but I am trying to take it a step further.  I am writing a Windows System Service application that will poll the system to see if the user is active.  If not then it will launch the ufasoft miner.  Now that much can be accomplished by the windows task scheduler alone.  The real problem is that I cannot get task scheduler to stop the process when the user resumes activity.  So in comes the necessity of the system service.  In addition to being able to start and stop on user activity, and take advantage of GPU mining, the service will allow one additional benefit.  System services start with the computer and run whether there is a logged on user or not!  Now all you have to do is have the computer turned on to take advantage of it's idle cycles.

Anyway, I am early in development but the process isn't too complex so shouldn't take me too long.  If you are interested in this project you can message me and I'll get it to you when it's completed.  If you like the idea and would also like to help motivate me then my address is below.

Hey Jarred. That sounds exactly like my application "WhileIdle" (see here: http://bitcointalk.org/index.php?topic=8403.0 )
except for the service part, which I have planned, but have not yet implemented. I do plan to make it a service in the coming days though.


Title: Re: Stealthcoin
Post by: Jarredm on June 12, 2011, 04:20:20 PM

Hey Jarred. That sounds exactly like my application "WhileIdle" (see here: http://bitcointalk.org/index.php?topic=8403.0 )
except for the service part, which I have planned, but have not yet implemented. I do plan to make it a service in the coming days though.

Hey sleep.  I actually ran across your WhileIdle thread and was very interested!  I was planning on parsing through your code to see how you were polling for user activity. And then stealing your method! ;)  I have been trying to use the user32.dll API to query the GetLastInputInfo.  So far I have had the problem of the API always returning 0 instead of the tick from the last input.  I am suspecting that it has to do with the separate desktop space that the service resides in.

I unfortunately am writing in VB and have no experience in C# so we can't really combine efforts.  But if you have any advice for me I would appreciate any assistance.  Likewise if you have anything you need help on let me know and I'll be glad to help if I can.


Title: Re: Stealthcoin
Post by: Alexsieg on March 14, 2015, 09:08:55 PM
The download doesn't work  ???