Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [security]

Questions relating to application security, safety, trust, and attacks against the Ethereum software stack and blockchain system.

1
vote
0answers
18 views

What are the drawbacks of layer 2?

The scalability trilemma states that a blockchain can only have two out the following three properties: decentralization, scalability, and security. Layer 2 protocols aim to make Ethereum more ...
2
votes
0answers
23 views

Is there any dynamic symbolic execution tool for smart contract [duplicate]

There is a question (Security analysis tool for Ethereum smart contracts) similar to me, but it presents mostly static analysis tools. I'd like to know if there is any better dynamical analysis tool ...
1
vote
1answer
14 views

Is there any concern for the significant number of nodes being hosted on AWS/ cloud providers?

Just curious if there is any downside that many nodes are being hosted on cloud providers? For example Infura, which supports many nodes and provides a large portion of connections to Ethereum nodes, ...
0
votes
1answer
23 views

Is a function prone to re-entrancy attack even if I set balance to zero within the same function (example included)

Such as in this scenario, is the hackable via re-entrancy? thanks... function withdraw(uint256 money) public { if(money <= balance[msg.sender]) { (bool success, ) = msg.sender.call....
1
vote
1answer
21 views

What is the Withdrawal Pattern?

I am reading this article : https://medium.com/@jgm.orinoco/why-use-the-withdrawal-pattern-d5255921ca2a It seems interesting. Could anyone explain the idea of the Withdrawal pattern in a simple way ?
0
votes
1answer
15 views

How to prevent someone running a transaction before me?

Let's say I have the following in my smart contract: string passwordHash; uint money; function checkPassword(string cleanPassword, string newPasswordHash)[...] When running the function ...
0
votes
1answer
43 views

How to start auditing smart contract?

I want to become a smart contract auditor. I will report all the vulnerabilities which I have explored while auditing smart contracts. Is there any platform available to learn how to audit smart ...
0
votes
1answer
13 views

What is the authorization for any technical central action in Ethereum system?

When, after fully reviewing, pull requests management and a detailed discussions on github and so on, it arrives the moment in which someone must take into his hands the technical intervention on the ...
5
votes
1answer
49 views

How to jump to any arbitrary location in already deployed contracts

I’d like to know what is preventing me to write an assembly code who knows the contract address and call some arbitrary functions, even if declared “internal” via a simple JUMP. In theory I can: 1) ...
1
vote
1answer
84 views

Is signatures from web3.eth/personal.sign deterministic and a safe to be used as seeds for private keys?

The first part of the question: if I give the same inputs (content and signing address) to the web3.eth/personal.sign, am I correct to expect the signature generated to be the same no matter how many ...
1
vote
1answer
66 views

Does this function send ether from the contract or from the message sender?

Solidity newbie here...: function transfer(address payable to, address sender) public onlyadmin { to.transfer(msg.value); } what I want to achieve is sending from the contract's ...
0
votes
0answers
42 views

How to prevent DDOS in ethereum using PoA?

Using clique, how to prevent DDOS attack? Is there a way to set a whitelist of nodes which can send transactions, and blacklist all the others?
1
vote
3answers
108 views

How to store private data on blockchain to be readable from a contract?

I'm writting DApp on Ethereum (Solidity) and I need to find a solution how to store a private data on blockchain, when I also need to proceed them somehow. If it is only about storing, I can use some ...
3
votes
1answer
116 views

How secured are private data stored on blockchain?

I'm quite new in Ethereum world and I'm still little bit confused about this: If I store any data on blockchain, is it readable from anyone? Let's say I have this is Solidity: ... string private ...
0
votes
1answer
30 views

What is the beginning nonce on the Rinkeby Testnet?

I know that the nonce is representative of how many transfers an account has made and is 0 at the start on the mainnet. However, on testnets, such as the now decommissioned Morden where it was 2^20 I ...
1
vote
0answers
53 views

The blockchain trilemma

I understand that the generic blockchain faces a problem where it can choose to optimize between scalability, security and decentralization. I can see easily why scalability and decentralization are ...
2
votes
2answers
147 views

Getting ParserError: Expected ',' but got 'payable' and also one important security issue with contract

I have write a small smart contract for lottery system. however there is problem. please see below full code. pragma solidity >=0.4.22 <0.6.0; contract Lottery{ address[] public players; //...
1
vote
2answers
70 views

DappHub Multiply Function

Could someone explain the use of performing a multiplication such as this? I mean the logic is fine, but what is the importance from a security point of view? function mul(uint x, uint y) internal ...
5
votes
2answers
408 views

What does griefing mean?

Not referring to the definition in the dictionary. In the context of blockchains and Ethereum in particular, the term "grief" has been used repeatedly in a host of scenarios: ethresear.ch, Plasma ...
-1
votes
1answer
110 views

Trying to figure out this 2 ETH smart contract quiz

Does anyone know whether this smart contract can be broken? Is there some trick behind this? https://etherscan.io/address/0xfc62a32da21052fb3086e8f68ad10a7118a98606
1
vote
0answers
46 views

What possibly could go wrong if I leave my private blockchain node 30303 port open to public? [duplicate]

I have the following setup: All the nodes inside my cluster are talking to each other via 30303 port. When I want to talk to them, I'm using a Geth light client via HTTP JSON RPC port 8545. Only the ...
2
votes
1answer
126 views

How privacy can be ensured in smart-contracts?

When a smart-contract is created following an agreement between two entities, how the state of that contract (data) can be kept secret to only the two contractors? I heard about Quorum, but how ...
1
vote
0answers
32 views

Is there a more elegant way to do an aggressive multi-send?

I understand there are many approaches to do multisend but for me timing is a priority and I do not want to stop the transaction if a address.send fails. function multiSend() internal isAdmin { ...
1
vote
0answers
28 views

secure open source Payment Gateway [closed]

I'm working on an open source multi coin payment gateway. ETH, EOS, BTC and BCH will be supported. My plan so far: The nodejs API runs on DigitalOcean. You send a GET request with your preferred ...
1
vote
0answers
35 views

GETH accounts imported without my knowledge

I expose only port 30303, not 8545. But when I issue commands eth.accounts. I found these accounts were imported without my knowledge: "0xe4fe1fb7e693c529f5a95dd8b1714d1acfdbd058", "...
1
vote
1answer
39 views

Cannot send transactions

I have a online shop where users can recieve ETH and do shopping. So to have a secure wallet, I have created an offline service which generates xpub and xpriv which I use to generate addresses in my ...
1
vote
1answer
31 views

Provide security wallet

I have a service where users can buy my product. Besides paying by card, I want to be able to allow users to pay in ETH. I think that it will correctly generate addresses for each user so that it is ...
0
votes
1answer
37 views

Invoking smart contracts

how can i restrict my smart contract getting invoked by any account in the network.can i tell the EVM itself to check(validate the account) is allowed to invoke the smart contract even before entering ...
0
votes
1answer
48 views

The DAO: Stalker Attack - Attacker split from childDAO?

I had a question about the argument in this article Why The Stalker Attack is a Non Issue. In the scenario the article describes, there is a "Victim" and an "Attacker". The Victim tries to split from ...
0
votes
1answer
29 views

Is this function good enough to refund ether or this security flaw?

I mean: function refund() { if (msg.value < 1 ether) { msg.sender.send(msg.value); return; } I'm probably wrong but this looks as if .send will drain the money in the contract if ...
0
votes
1answer
34 views

Is my function prone to under/overflow?

I don't like using safemath as this is my first conntract and this is getting a bit complicated for me so: function withdraw(uint xyz) public { require(balanceOf[msg.sender] >= xyz); ...
1
vote
1answer
56 views

account nonce - what if it did not exist? [duplicate]

I can't understand how account nonce actually avoids double spending. Every answer about this on the internet follow the pattern "If you only have 50 Eth and try to send 50 to A and 50 to B with ...
1
vote
1answer
23 views

Is attaching a name to an Ethereum address a “faux pas?”

I'm currently working on a DApp right now, and I was curious if it's considered poor design to include a string with the user's name that is mapped to a particular address. A user who has access to ...
0
votes
4answers
900 views

Generating lots of private key means I can hack someone's ether?

If I generates lots of private keys, I can get someone's address and its digital signature, right? I know that there's 2^256 possible private keys, but what if I use brute-force attack? Is it ...
4
votes
2answers
177 views

How is the keccak256(a, b) function implemented?

I need to understand how keccak256(a, b) is implemented and how it differs from keccak256(a || b). Is the content padded? I need this because I do not want to allow for vulnerabilities where a user ...
3
votes
4answers
447 views

how to easily transfer ERC20 token from 1000+ accounts which has no ETH in it initially?

I have a requirement to have 1000+ ethereum addresses, which in fact used to store small amounts of various ERC20 tokens. I want to move all these crypto assets in all these 1000+ wallets into a ...
1
vote
1answer
47 views

Can emitting an event after a state change cause a reentrancy attack vulnerability?

Is the following function vulnerable to a reentrancy attack? function withdraw() public { uint amount = pendingWithdrawals[msg.sender]; // Remember to zero the pending refund before // ...
1
vote
1answer
47 views

Smart contract consensus - underpinned by transactions?

I can easily visualise how consensus can be reached on transactions in systems such as Bitcoin, but I struggle to understand how consensus can work in a smart contract platform - i.e how can nodes ...
1
vote
1answer
60 views

Prevent other mining softwares to mine my public forked Ethereum chain

I forked an Ethereum chain and put it as public, but I only want my own software/client to be able to mine. Other miners using ethminer, geth, etc, cannot mine and profit from my chain (At least not ...
3
votes
0answers
44 views

Storing Private Keys in IoT Devices

In a network of IoT devices like internet-connected Raspberry Pis which sends transactions to the Ethereum blockchain, the Pis need to be able to access their own Ethereum private keys in order to ...
1
vote
1answer
34 views

Access manager in Smart Contract

I'm building a service where one can publish a crypted file on the internet which can be accessed and decrypted by people allowed. I don't want to store any crypted key on a server or something. For ...
0
votes
2answers
79 views

Solidity Checks-Effects-Interactions Pattern

From the solidity docs: Use the Checks-Effects-Interactions Pattern Most functions will first perform some checks (who called the function, are the arguments in range, did they send enough Ether, ...
0
votes
1answer
93 views

Delegated Proof of Stake (DPOS) vs. Proo of Stake? [closed]

What is the main difference between Delegated Proof of Stake (DPOS) vs. Proof of Stake? Is there any significant advantage for security? (since PoS in general suffers security problems.) And which ...
0
votes
1answer
411 views

How secure is using port 8545 from the internet (aka via JSON), can someone steal my ether?

Just noticed I can access 8545 from localhost but fortunately not from the web/internet. Do I need this at all? e.q. I read about someone who had lost $20 million due to someone else sending a call ...
1
vote
0answers
29 views

MIME types in Ethereum

Yesterday evening, an individual(at a french meetup haha) asked me what ethereum was and kept asking me if there was something similar to MIME types on Ethereum. I did not know what MIME types were ...
0
votes
1answer
140 views

Race condition in Ethereum

If I have several transactions in the same function, can I be sure that they will be executed one just after the other. Example with a dummy code: Contract store { constructor() public returns(...
2
votes
1answer
54 views

Trustless Inter-chain transaction with Bitcoin- are there any flaws?

Let's say that Alice wants to send Bob 1 BTC, and in return Bob will send Alice 1 ETH. Alice's Bitcoin address is BTC_A, and Alice's Ethereum address is ETH_A. Likewise, Bob owns addresses BTC_B and ...
1
vote
1answer
142 views

How to hide/protect smart contract arguments

In Ethernaut level 8 you are given this contract to hack: pragma solidity ^0.4.18; contract Vault { bool public locked; bytes32 private password; function Vault(bytes32 _password) public { ...
0
votes
0answers
56 views

geth/web3 integration with hardware security modules (HSM) before signing transactions/data

Is there some way to have web3/geth nodes integrate with hardware security modules (HSM) where a transaction request will first go to the HSM to fetch private keys before signing transactions/data?
0
votes
1answer
42 views

Is transaction triggered by web3 secure on the internet?

I'm trying to construct my business architecture using ethereum. I'll operate public ethereum node and private business server on the AWS. I'll trigger transaction from the private business server ...