Bitcoin BTC Mining On Google Compute Engine

0 views
Skip to first unread message
Message has been deleted

Vanina Mazzillo

unread,
Jul 9, 2024, 5:59:58 PM7/9/24
to ropmatenna

Cryptocurrency mining (also known as bitcoin mining) is the process used tocreate new cryptocoins and verify transactions.Crytocurrency mining attacks occurs when attackers who gain access to your environment might also exploityour resources to run their own mining operations at your expense.

Bitcoin BTC Mining On Google Compute Engine


Download https://urlin.us/2yM3PP



According to theNovember 2021 Threat Horizons report,cryptocurrency mining attacks are the most common way that attackers exploityour computing resources after they compromise your Google Cloudenvironment. The report also says that attackers typically downloadcryptocurrency mining software to your resources within 22 seconds ofcompromising your system. Cryptocurrency mining can rapidly increase costs, anda cryptocurrency mining attack can cause a much larger bill than you expected.Because costs can add quickly, you must put in place protective, detective, andmitigation measures to protect your organization.

This document is intended for security architects and administrators. Itdescribes the best practices that you can take to help protect yourGoogle Cloud resources from cryptocurrency mining attacks and to helpmitigate the impact should an attack occur.

Google is so confident it can quickly detect and stop such attacks with its new offering it is backing up the claim by offering to have its Cryptomining Protection Program cover up to $1 million associated with unauthorized Google Cloud compute expenses for Security Command Center Premium customers.

Stephen Weigand is managing editor and production manager for SC Media. He has worked for news media in Washington, D.C., covering military and defense issues, as well as federal IT. He is based in the Seattle area.

I am a new user of google cloud platform and I have recently created a software app for which I wanted to implement CICD (continuous integration and continuous delivery) pipeline that deploys my latest code changes from github to google kubernetes engine by using Jenkins virtual machine.

2 days later, I received a warning email saying cryptocurrency activity was detected on my jenkins vm and so it was suspended.I submitted appeal form explaining the purpose of my app and why I created jenkins vm.Then I received an email today saying, "We found evidence of crypto mining activity which is against TOS. Please make necessary checks and fixes. After that, let us know of what checks and fixes were done, and we will evaluate the case."

I have no idea what "checks/fixes" to do here. I am new to the world of DevOps and GCP.I am just a harmless software programmer.My mistake was adding a firewall that allows 0.0.0.0/0 all inbound traffic.

What is the best response to this?Can someone please let me know how to respond to them so that they close this matter right here without charging me/taking other action against me?I've heard of hackers taking over jenkins instance to do mining, but how do I tell these people it was the hackers and not me. I assumed that some AI program detected it first and an actual human would be able to figure it out after reading my appeal. But it doesn't look like it.

I already submitted an appeal form immediately after receiving the first email warning from them, explaining why I created the jenkins vm instance and that I do not need it anymore as I am finished with building my app and testing CICD.

So, rather than talk about it in the abstract, I decided to show them how radical QCs can be. I ordered one the other day and when I got it, I decided to look for an application that could demonstrate the power of this new form of computing.

As you might expect, a quantum computer capable of solving the bitcoin mining algorithm was very expensive (this particular brand, the QIntellize Quantum Computer, costs at least $ 1million). Since the reward for mining a bitcoin block is now at 12.5 bitcoins, at $4000 per bitcoin I should be able to pay it off after mining a few blocks quickly!

A small random number (4 bytes) is added as part of a blockheader (which is generated based on a proposed block of transactions), and the resulting number is hashed (twice using the SHA 256 algorithm) which produces a random number at the end. If the random number is less than a certain threshold, then you have successfully generated a new block in the blockchain, which is put forward and then validated by other computers. Figure 1 shows an overview of this process (source: bitcoinmining.com)

While it sounds like science fiction, quantum computers work, by taking into account the idea from quantum physics that there are parallel worlds out there. Every time we make a decision, we branch into multiple realities, or according to some physicists, there are multiple future probabilities that exist around us all the time.

This quantum foam, consisting of multiple probably realities, can be thought of as a quantum probability wave. Quantum physics tells us that an electron is really a set of probabilities of where that electron is likely to be, or that a photon is likely to be either a wave or a particle. When we observe the position or velocity of a particle, the quantum wave is said to collapse into a specific reality.

Quantum computers actually make difficult problems (those which require lots of computing power) significantly easier, because you are able to distribute the processing power across numerous probable realities.

To bring it in to the parlance of computer science, if x is a number, and f(x) is a function of x which produces an output y, then a quntum computer can try out all possible values of x, in parallel universes, and then if you make the right observation and add up all the results from different universes in a certain way, you can figure out which value of x produces y.

If you have 9 qubits, you can try out all the values from 1 to 511 simultaneously. If you had 64 bits, you could try out the hash algorithm for all possible values of x to figure out which ones when input into function f(x) lead to a result of y, or in the case of bitcoin mining, less than some target value y.

The bitcoin algorithm, relies on an input shown in Figure 1 (source: bitcoinmining.com), if you think of a potential new block of transactions, you have to generate a header. The header of a block consists of several components, including a nonce which is a random 32 bit number. See Table 2 for a list of the possible values.

Closer inspection will reveal that of all the bytes that are used as input, only 4 bytes, the nonce, or 32 bits are actually random. The other bytes are actually coming from a block of transactions and timestamp, etc. The output is a 256 bit number which has to be less than a target.

A qubyte is 8 qubits. So basically, what I needed was to program my QC to use 4 qubytes, or 32 qubits, which represented all of the possible values of the random number, nonce, and append this value to a set of 76 regular bytes, and then run them through the hashing algorithm. Then I could take the output, which is a 256 bits, and choose one of the output values which is less than the target.

The implementation of the actual Hash Algorithm used by bitcoin (SHA-256) is left as an exercise to the reader. The idea in the bitcoin mining that the output of the hash has to be less than M, the hashing difficulty, which is adjusted in the bitcoin network every so often.

When you observe the output bits, the quantum probability wave collapses and you see only one set of possible values. While quantum computers are able to have all of the possible values of the qubits simultaneously, we are still at the point of needing to loop through all of the possible output values to find the one that we want at random.

By doing this shaking a certain number of times, the input values of the nonce which resulted in outputs of less than target t, are isolated. We just take those 4 bytes, append them to the other 76 regular bytes that we put as input, and then submit the transaction to the blockchain.

Also, although there are now languages to help generate the underlying circuits, they have to be fed to the quantum computer. The languages are becoming better and though some are simulating the quantum computer on conventional hardware, the whole area of quantum computing is still very much in flux, moving quickly.

We've been restoring an Apollo Guidance Computer1.Now that we have the world's only working AGC, I decided to write some code for it.Trying to mine Bitcoin on this 1960s computer seemed both pointless and anachronistic, so I had to give it a shot.Implementing the Bitcoin hash algorithm in assembly code on this 15-bit computer was challenging, but I got it to work.Unfortunately, the computer is so slow that it would takeabout a million times the age of the universe to successfully mine a Bitcoin block.

The Apollo Guidance Computer powered up. The cover is off, showing the computer's purple wire-wrap wiring of the backplane. We built the interfaces that are plugged into the front of the computer. At the back, vintage core rope simulator boxes are visible in the core rope slots.

The Apollo Guidance Computer was developed in the 1960sfor the Apollo missions to the Moon.Onboard the Apollo spacecraft, these computers provided guidance, navigation, and controlled the engines.In an era when most computers ranged from refrigerator-sized to room-sized, the Apollo Guidance Computerwas small enough to fly in space.One of the very first computers to use integrated circuits, the AGC was 70 pounds and under a cubic foot in size.

The Apollo Guidance Computer also pushed the boundaries of software engineeringunder the leadership of Margaret Hamilton.It had a cutting-edge real-time operating system that supported multiple prioritized jobs2 along with fault detection and handling.Much of the software was in assembly language but the AGC also had an interpreterdesigned for navigation algorithms. The interpreter implemented a virtual machine that provided vector and matrix arithmetic along withtrigonometry and double- and triple-precision numbers.

As the leading digital currency, Bitcoin has received a lot of attention in the past few years.The Bitcoin system can be thought of as a ledger that keeps track of who owns which Bitcoins, and allows them to be transferred from one person to another. The revolutionary feature of Bitcoin is there's no central machine or authority keeping track of things. Instead, the records are spread across thousands of machines on the Internet, and the system works with nobody in charge.

7fc3f7cf58
Reply all
Reply to author
Forward
0 new messages