This invention relates to blockchain security, and in particular to systems and methods for detecting and preventing intrusion into a blockchain system.
A blockchain is a distributed ledger technology that forms a “chain of blocks”, where each block includes information and data that are bundled together and verified. The most well-known application of blockchain technology is cryptocurrency, which are tokens used within computer networks to send values and pay for transactions. In the cryptocurrency world, a transaction merely requires a valid digital signature and whoever has the private key that can sign the transaction will be able to use the fund. Therefore, the security and secrecy of the private key is of utmost importance. In conventional technologies, although there have been developed many systems and practices to make sure the private key is secure, cryptocurrency shareholders still demand more security measures to be implemented on their digital assets.
In the light of the foregoing background, it is an objective of the present invention to provide a system to detect unauthorized use of the private key, by detecting unauthorized transactions.
Another objective of the invention is, based on detection of unauthorized transactions, to also cancel the unauthorized transactions.
The above objective is met by the combination of features of the main claim; the sub-claims disclose further advantageous embodiments of the invention.
One skilled in the art will derive from the following description other objectives of the invention. Therefore, the foregoing statements of objectives are not exhaustive and serve merely to illustrate some of the many objectives of the present invention.
Accordingly, the present invention, in one aspect, is a method for preventing blockchain intrusion. The method comprises the steps of detecting a transaction broadcasted to a blockchain network, determining if the transaction is authorized or unauthorized, and taking a prevention action if the transaction is unauthorized.
Preferably, the prevention action contains the step of canceling the transaction by a prevention device.
More preferably, the transaction was created with a time delay such that the transaction is effective only after the time delay since when the transaction was broadcasted. The canceling step is performed by the prevention device during the period of time delay.
According to a variation of the preferred embodiments, the transaction was created with use of a smart contract, and the canceling step is performed by the prevention device using an auditor key.
Alternatively, the canceling step further contains sending a pre-signed cancelation message (PSCM) to the blockchain network by the prevention device.
Preferably, the pre-signed cancelation message is created at the same time when an Unspent Transaction Output (UTXO) that is required by the transaction is created; the pre-signed cancelation message paired with the UTXO.
According to another variation of the preferred embodiments, the determining step includes checking the transaction against records in a database.
According to a further variation of the preferred embodiments, the determining step includes checking authenticity of the transaction based on one or more of the following criteria: whether the transaction amount of a transaction requested by a user reaches a limit per user per day; whether the systemwide total transaction amount reaches a limit per system per hour; whether an arrival rate of withdrawal requests from a user requesting the transaction reaches a threshold; and whether a proximity of an address to one or more hacker-controlled address in a transaction to or from a user reaches a threshold.
In one implementation, the prevention action includes sending an alert to the asset owner and/or a system administrator.
According to another aspect of the invention, a system is provided for preventing blockchain intrusion. The system includes a first wallet device adapted to connect to a blockchain network; and a prevention device connected to the first wallet device. The prevention device is configured to detect a transaction broadcasted to the blockchain network that involves the first wallet device, determine whether the transaction is authorized or unauthorized, and take a prevention action if the transaction is unauthorized.
Preferably, the prevention action includes canceling the transaction by the prevention device.
More preferably, the transaction was created with a time delay such that the transaction is effective only after the time delay since when the transaction was broadcasted. The prevention device is adapted to cancel the transaction during a period of the time delay.
According to a variation of the preferred embodiments, the transaction was created with use of a smart contract, and the prevention device is adapted to cancel the transaction using an auditor key.
Alternatively, the prevention device is adapted to send a pre-signed cancelation message to the blockchain network.
Preferably, the pre-signed cancelation message is created at the same time when a UTXO that is required by the transaction is created; the pre-signed cancelation message paired with the UTXO.
More preferably, the system contains further a second wallet device connected to the first wallet device. The second wallet device is adapted to generate the UTXO while the first wallet device is adapted to generate the pre-signed cancelation message paired with the UTXO.
According to another variation of the preferred embodiments, the system further contains a database connected to the first wallet device. The prevention device is adapted to check the transaction against records in the database.
According to a further variation of the preferred embodiments, the prevention device is adapted to check authenticity of the transaction based on one or more of the following criteria: whether the transaction amount of a transaction requested by a user reaches a limit per user per day; whether the systemwide total transaction amount reaches a limit per system per hour; whether an arrival rate of withdrawal requests from a user requesting the transaction reaches a threshold; and whether a proximity of an address to one or more hacker-controlled address in a transaction to or from a user reaches a threshold.
In one implementation, the prevention action includes sending an alert to the asset owner and/or a system administrator.
The invention therefore provides systems and methods capable of detecting misuse or unauthorized use of a private key by monitoring all broadcasted blockchain transactions over the blockchain network. Furthermore, the systems and methods are capable of taking prevention actions, such as canceling an unauthorized transaction when it is found. Therefore, even if the private key is leaked and for example became known to a hacker, any attempt to make transactions using the leaked key over the blockchain network will be detected and prevented by the prevention device, so that there will be no loss caused to the actual owner of the asset. The invention therefore provides a greatly enhanced security measure against unauthorized, fraudulent or illegal transactions as a beneficial supplement to traditional solutions which focus on the protection of the private key per se (e.g. by using an HSM (Hardware Security Module)).
The checking of whether a transaction is authorized or not in the invention is accurate, such that the probability of misclassifying a transaction is minimized. This is achieved by using multi-prone means to judge the transaction. Firstly, the transaction is reconciled against a trusted database, e.g. financial records of a corporate, so that authenticity of the transaction can be determined in a precise way. Furthermore, as an alternative or in addition, unauthorized transactions can be detected by checking conditions that authorized transactions would never violate, such as transaction amount limits per user per day, systemwide transaction amount limits per system per hour, arrival rate of withdrawal requests from a user, deposits from or withdrawals to known hacker-controlled addresses, etc. The concept is further extended to extract these so-called “features” and feed it into a predictive classification model.
In terms of security, the systems and methods proposed in the invention are more improved than conventional methods. For example, it is a well-known technique to cancel an already broadcasted, but not yet confirmed, transaction by double-spending it and to cancel the transaction with a higher fee. However, in such conventional art, the system needs to use the same hot-wallet key to re-sign another message, and when the private key is compromised, the expected behavior of the hot-wallet can no longer be guaranteed. In comparison, some embodiments of the invention that use “delayed” smart contract case provide a much better solution than double-spending. Even if the auditor key that is used by the prevention device is compromised, it does not cause too much damage, as the auditor key can be rotated by the master key if necessary. On the other hand, for the case of blockchain networks that do not support smart contracts, some embodiments of the invention which use PSCM are still better than plain double-spending because the prevention device will receive one or more PSCMs when the hot-wallet receives a UTXO to which the PSCMs correspond to, not when the hot-wallet spends it. Therefore, these embodiments of the invention are one step ahead of conventional solutions, and this one single step is important. For example, if the hot-wallet fails to provide the PSCM, the prevention device can immediately lock down the hot-wallet to prevent the hot-wallet from spending the UTXO that the PSCM corresponds to.
The foregoing and further features of the present invention will be apparent from the following description of preferred embodiments which are provided by way of example only in connection with the accompanying figures, of which:
In the drawings, like numerals indicate like parts throughout the several embodiments described herein.
In the claims which follow and in the preceding description of the invention, except where the context requires otherwise due to express language or necessary implication, the word “comprise” or variations such as “comprises” or “comprising” is used in an inclusive sense, i.e. to specify the presence of the stated features but not to preclude the presence or addition of further features in various embodiments of the invention.
As used herein and in the claims, “device” or “component” refers to any instruction execution apparatus such as a computer/processor based system, a computing device, or a hardware and/or software system that can fetch or obtain the logic from a non-transitory storage medium or a non-transitory computer-readable storage medium and execute the instructions contained therein. “Device” or “component” can also include any software-based instruction execution module, such as a sub-set of a software bundle, cloud-based utility, service or feature, or any other virtual function block that is not tied to a particular hardware.
Referring now to
The prevention device 22 is adapted to detect unauthorized use of private keys by monitoring all broadcasted blockchain transactions over the blockchain network(s) 24. During operation of the system shown in
Turning now to
One essential feature in the system in
Turning to the method of preventing intrusion on the blockchain network using the system in
Next, with the delay contract 128 set up, in Step 132 the prevention device 122 starts to monitor for all transactions broadcasted to the blockchain network 124. This is possible because all transactions are public on the blockchain network 124 so any node/peer therein could know about all broadcasted transactions. After identifying a transaction that involves the hot-wallet 126, the prevention device 122 in Step 134 then determines whether the transaction is authorized or not. This is done by the prevention device 122 checking the transaction against the financial records in the database 120 in a way similar to what is described above in
It should be noted that the auditor key owned by the prevention device 122 is not unique or permanent, but it can be updated/modified by another master key. However, since the operation to replace an old or stolen auditor key by using the master key rarely happens, such operation should only be conducted manually, and the master key should be held in a hardware token which is commonly considered as highly secure. With the mechanism of the master key, even if the auditor key is leaked, there will be no loss to the asset owner, because leaking the auditor key will result in Denial-of-Service for a short period of time, until the system administrator uses the master key to change the auditor key.
Turning to
The difference between the system in
Corresponding to every time-delayed transaction 228, a PSCM 227 created using the same UTXO as the time-delayed transaction 228 is passed to the auditor (which is the prevention device 222 in this case) in advance. The prevention device 222 is then adapted to cancel a transaction by broadcasting its corresponding PSCM 227 to the blockchain network 224 when needed. If the “gas” is set to an appropriate value, miners (not shown) on the blockchain network 224 will favor the PSCM 227 over the time-delayed transaction 228 which in this case may be unauthorized. In particular, since a UTXO can only be spent once, two transactions spending the same UTXO will compete with each other, and miners on the blockchain network 224 are incentivized to pick the one with higher gas, and be able to receive the “gas” sooner. Obviously, this is a probabilistic activity, and there is no guarantee that the PSCM 227 will be picked by the miners rather than the delayed transaction 228 which is unauthorized. However, in general, especially if the hacker does not know the existence of the prevention device 222, the chances of being able to cancel the transaction should be relatively high. The chance is further enlarged by generating more than one PSCM 227 for each transaction 228 as will be discussed in more details below. Note that the destination address of all PSCM 227 is to the address of the cold-wallet 225 which is safe, and not to the prevention device 222. Therefore, it is relatively safe even if the address of the cold-wallet 225 is leaked.
The generation of the PSCM 227 is briefly described now. With reference to
Another circumstance in which a UTXO may be generated is when the hot-wallet 226 spends the initial UTXO provided by the cold-wallet 225 and when the hot-wallet 226 receives some “changes”, i.e. residue value back to itself. For the purpose of explanation, suppose that the cold-wallet 225 gives the hot-wallet 226 a $100 dollar note, the hot-wallet 226 then gives $40 to user A and $50 to user B (both not shown) and gets a $10 dollar note as the change. When the hot-wallet 226 is creating this transaction, it needs to prepare another PSCM 227 for the received $10 because of the ledger nature of blockchain technology, and share the other PSCM 227 with the prevention device 222. Again, failure to do so by the hot-wallet 226 is considered as an indication of intrusion.
In summary, each time the hot-wallet 226 receives a UTXO, it needs to prepare one or more PSCMs 227, no matter if this is the result of cold-wallet 225 being top-upped, or the result of a “change” of funds in the hot-wallet 226. In other words, each received UTXO needs to be paired with one or more PSCMs 227, and to cancel a transaction that uses a UTXO, the prevention device 222 just needs to broadcast the corresponding one or more of these PSCMs 227 to the UTXO to the blockchain network 224. If a transaction uses more than one UTXO, then PSCMs 227 paired with one or more of these UTXOs may be sent. Such a configuration ensures that the prevention device 222 will be able to take cancelation actions if any part of the funds (i.e. UTXOs) in the hot-wallet 226 is requested to be withdrawn by an unauthorized transaction 228.
Turning to the method of preventing intrusion on the blockchain network using the system in
After identifying a transaction, the prevention device 222 in Step 234 then determines whether the transaction is authorized or not. This is done by the prevention device 222 checking the transaction against the financial records in the database 220 in a way similar to what is described above in
In the embodiments described above for
For example, in
The exemplary embodiments of the present invention are thus fully described. Although the description referred to particular embodiments, it will be clear to one skilled in the art that the present invention may be practiced with variation of these specific details. Hence this invention should not be construed as limited to the embodiments set forth herein.
While the invention has been illustrated and described in detail in the drawings and foregoing description, the same is to be considered as illustrative and not restrictive in character, it being understood that only exemplary embodiments have been shown and described and do not limit the scope of the invention in any manner. It can be appreciated that any of the features described herein may be used with any embodiment. The illustrative embodiments are not exclusive of each other or of other embodiments not recited herein. Accordingly, the invention also provides embodiments that comprise combinations of one or more of the illustrative embodiments described above. Modifications and variations of the invention as herein set forth can be made without departing from the spirit and scope thereof, and, therefore, only such limitations should be imposed as are indicated by the appended claims.
It is to be understood that, if any prior art publication is referred to herein, such reference does not constitute an admission that the publication forms a part of the common general knowledge in the art, in Australia or any other country.
The embodiments described above with references to
Furthermore, it should be noted the above embodiments are described using blockchain networks for cryptocurrency. Those skilled in the art should realize that the application of the invention is not limited to cryptocurrency, but any other industrial application based on the use of blockchain technology can benefit from the invention to prevent unauthorized transactions in the networks.
The embodiments shown in
Number | Date | Country | Kind |
---|---|---|---|
32020006936.9 | May 2020 | HK | national |