Today we are going to dig into the source code of everiToken, a token-based blockchain program on HackenProof. We will introduce its concept and technical details, show how to set up the node, and run some test requests to the API. We’ve also included a vulnerability description of a bug found in everiToken’s node.
Supported by world-renowned investors such as Fenbushi Capital, everiToken is the world’s first token-based public chain. Switzerland-based everiToken delivers up to 10,000 transactions per second (TPS), robust security, and a high level of standardization. Instead of using a smart contract layer in their public chain structure, everiTokеn has implemented a new technology called a “safe contract.” Both traditional apps and decentralized apps (DApps) can use everiTokеn to conduct issuance, transfer, and management of tokens by calling token-related APIs.
Although everiToken is based on EOS, the everiToken public chain does use some Ethereum concepts. everiTokеn uses “safe contracts” instead of smart contracts, which means that everiTokеn is not Turing complete so it can satisfy a range of complicated application scenarios. The everiToken EvtLink standard is used to generate a QR code for everiPay, the first commercial token payment standard made for face to face micropayments using everiTokеn. Since everiTokеn is based on EOS, it utilizes a Boost.MultiIndex-based memory database (Chainbase) that supports rollback operations.
The infrastructure features two types of tokens: Fungible Tokens and Non-Fungible Tokens. Non-Fungible Tokens (NFT Tokens) are composed of 3 parts – a domain name, a token name, and an owner. NFT Tokens do not have value and can be transferred to other owner or owner groups. Fungible Tokens (Points) can be issued after registering a symbol and setting the number of tokens that will be issued. Anyone with their own private key can transfer their tokens to others.
everiToken uses a token-based transaction model for non-fungible tokens. Its database includes two parts, a Token DB and a Block DB.
everiTokеn uses BFT-DPOS as its consensus algorithm. DPOS has proven capable of meeting the performance requirements of various applications on the blockchain. Under this algorithm, those who hold EVT tokens may select block producers through a continuous approval voting system.
EVT is the fuel used by everiTokеn. A small amount of EVT will be added to every operation as a service fee, which will then be sent on to the transaction producer as a reward. The number of EVT charged will float automatically, and the fees collected are primarily to prevent malicious attacks and will not affect most users’ regular use. For additional information, please review the everiToken documentation. It may help our readers better understand the procedures described below.
Before deploying the node you need to install the Docker.
Pull the image from the repository:
[pastacode lang=”bash” manual=”docker%20pull%20everitoken%2Fevt%3Alatest” message=”” highlight=”” provider=”manual”/]
And start the Everitoken node:
[pastacode lang=”bash” manual=”docker%20run%20%E2%80%93name%20evtd%20-p%208888%3A8888%20-p%209876%3A9876%20-t%20everitoken%2Fevt%20evtd.sh%20%E2%80%93http-validate-host%3Dfalse%20%E2%80%93charge-free-mode” message=”” highlight=”” provider=”manual”/]
Call this API to get versions:
[pastacode lang=”bash” manual=”curl%20localhost%3A8888%2Fv1%2Fchain%2Fget_info” message=”” highlight=”” provider=”manual”/]
In the previous article, we showed you how to “fuzz” an API with a self-written python script. But there is an advanced way to test an API with Burp Suite.
Firstly you need to set up a proxy on your browser. Then turn an interception in Proxy tab and catch a request to your node.
Tap Action button and Send to Intruder. Go to Intruder tab and set the targets you want to test. Select a parameter and click Add.
In Payloads tab load your dictionary. I am choosing this one. Click “Start attack” and fuzzing will start. After the script finishes its work you will see the result.
By following this method I’ve found a vulnerability in EVT that allowed me to crash any node in the network.
everiToken’s node crashes when non-hex id value is passed in get_transaction function. As far as this API function is accessible remotely without any authorization – any EVT node can be DoSed remotely.
As the node doesn’t filter user input, after the request to the database with malicious parameters an exception is raised and the node is crashed.
In this review, we focused on everiToken, the first EOS-based blockchain on hackenproof.com. Switzerland-based everiToken raised $10 million in a private funding round led by Chinese crypto investment giant Fenbushi Capital. everiToken’s award-winning payment solution everiPay boasts a capacity of over 10,000 transactions per second (TPS). Please visit everiToken.io and github.com/everiToken for more information.
Now you know how to install everiToken nodes and how to test them using the Burp Suite. Also, we’ve shown you a real example of the vulnerability that was found in EVT.
HackenProof is constantly publishing “How to hack” posts in order to help researchers test blockchain based products. Please check How to hack VeChainThor and How to hack Smart Contracts.
Enter your email address to subscribe to Hacken Reseach and receive notifications of new posts by email.