• Guest
HabraHabr
  • Main
  • Users

  • Development
    • Programming
    • Information Security
    • Website development
    • JavaScript
    • Game development
    • Open source
    • Developed for Android
    • Machine learning
    • Abnormal programming
    • Java
    • Python
    • Development of mobile applications
    • Analysis and design of systems
    • .NET
    • Mathematics
    • Algorithms
    • C#
    • System Programming
    • C++
    • C
    • Go
    • PHP
    • Reverse engineering
    • Assembler
    • Development under Linux
    • Big Data
    • Rust
    • Cryptography
    • Entertaining problems
    • Testing of IT systems
    • Testing Web Services
    • HTML
    • Programming microcontrollers
    • API
    • High performance
    • Developed for iOS
    • CSS
    • Industrial Programming
    • Development under Windows
    • Image processing
    • Compilers
    • FPGA
    • Professional literature
    • OpenStreetMap
    • Google Chrome
    • Data Mining
    • PostgreSQL
    • Development of robotics
    • Visualization of data
    • Angular
    • ReactJS
    • Search technologies
    • Debugging
    • Test mobile applications
    • Browsers
    • Designing and refactoring
    • IT Standards
    • Solidity
    • Node.JS
    • Git
    • LaTeX
    • SQL
    • Haskell
    • Unreal Engine
    • Unity3D
    • Development for the Internet of things
    • Functional Programming
    • Amazon Web Services
    • Google Cloud Platform
    • Development under AR and VR
    • Assembly systems
    • Version control systems
    • Kotlin
    • R
    • CAD/CAM
    • Customer Optimization
    • Development of communication systems
    • Microsoft Azure
    • Perfect code
    • Atlassian
    • Visual Studio
    • NoSQL
    • Yii
    • Mono и Moonlight
    • Parallel Programming
    • Asterisk
    • Yandex API
    • WordPress
    • Sports programming
    • Lua
    • Microsoft SQL Server
    • Payment systems
    • TypeScript
    • Scala
    • Google API
    • Development of data transmission systems
    • XML
    • Regular expressions
    • Development under Tizen
    • Swift
    • MySQL
    • Geoinformation services
    • Global Positioning Systems
    • Qt
    • Dart
    • Django
    • Development for Office 365
    • Erlang/OTP
    • GPGPU
    • Eclipse
    • Maps API
    • Testing games
    • Browser Extensions
    • 1C-Bitrix
    • Development under e-commerce
    • Xamarin
    • Xcode
    • Development under Windows Phone
    • Semantics
    • CMS
    • VueJS
    • GitHub
    • Open data
    • Sphinx
    • Ruby on Rails
    • Ruby
    • Symfony
    • Drupal
    • Messaging Systems
    • CTF
    • SaaS / S+S
    • SharePoint
    • jQuery
    • Puppet
    • Firefox
    • Elm
    • MODX
    • Billing systems
    • Graphical shells
    • Kodobred
    • MongoDB
    • SCADA
    • Hadoop
    • Gradle
    • Clojure
    • F#
    • CoffeeScript
    • Matlab
    • Phalcon
    • Development under Sailfish OS
    • Magento
    • Elixir/Phoenix
    • Microsoft Edge
    • Layout of letters
    • Development for OS X
    • Forth
    • Smalltalk
    • Julia
    • Laravel
    • WebGL
    • Meteor.JS
    • Firebird/Interbase
    • SQLite
    • D
    • Mesh-networks
    • I2P
    • Derby.js
    • Emacs
    • Development under Bada
    • Mercurial
    • UML Design
    • Objective C
    • Fortran
    • Cocoa
    • Cobol
    • Apache Flex
    • Action Script
    • Joomla
    • IIS
    • Twitter API
    • Vkontakte API
    • Facebook API
    • Microsoft Access
    • PDF
    • Prolog
    • GTK+
    • LabVIEW
    • Brainfuck
    • Cubrid
    • Canvas
    • Doctrine ORM
    • Google App Engine
    • Twisted
    • XSLT
    • TDD
    • Small Basic
    • Kohana
    • Development for Java ME
    • LiveStreet
    • MooTools
    • Adobe Flash
    • GreaseMonkey
    • INFOLUST
    • Groovy & Grails
    • Lisp
    • Delphi
    • Zend Framework
    • ExtJS / Sencha Library
    • Internet Explorer
    • CodeIgniter
    • Silverlight
    • Google Web Toolkit
    • CakePHP
    • Safari
    • Opera
    • Microformats
    • Ajax
    • VIM
  • Administration
    • System administration
    • IT Infrastructure
    • *nix
    • Network technologies
    • DevOps
    • Server Administration
    • Cloud computing
    • Configuring Linux
    • Wireless technologies
    • Virtualization
    • Hosting
    • Data storage
    • Decentralized networks
    • Database Administration
    • Data Warehousing
    • Communication standards
    • PowerShell
    • Backup
    • Cisco
    • Nginx
    • Antivirus protection
    • DNS
    • Server Optimization
    • Data recovery
    • Apache
    • Spam and antispam
    • Data Compression
    • SAN
    • IPv6
    • Fidonet
    • IPTV
    • Shells
    • Administering domain names
  • Design
    • Interfaces
    • Web design
    • Working with sound
    • Usability
    • Graphic design
    • Design Games
    • Mobile App Design
    • Working with 3D-graphics
    • Typography
    • Working with video
    • Work with vector graphics
    • Accessibility
    • Prototyping
    • CGI (graphics)
    • Computer Animation
    • Working with icons
  • Control
    • Careers in the IT industry
    • Project management
    • Development Management
    • Personnel Management
    • Product Management
    • Start-up development
    • Managing the community
    • Service Desk
    • GTD
    • IT Terminology
    • Agile
    • Business Models
    • Legislation and IT-business
    • Sales management
    • CRM-systems
    • Product localization
    • ECM / EDS
    • Freelance
    • Venture investments
    • ERP-systems
    • Help Desk Software
    • Media management
    • Patenting
    • E-commerce management
    • Creative Commons
  • Marketing
    • Conferences
    • Promotion of games
    • Internet Marketing
    • Search Engine Optimization
    • Web Analytics
    • Monetize Web services
    • Content marketing
    • Monetization of IT systems
    • Monetize mobile apps
    • Mobile App Analytics
    • Growth Hacking
    • Branding
    • Monetize Games
    • Display ads
    • Contextual advertising
    • Increase Conversion Rate
  • Sundry
    • Reading room
    • Educational process in IT
    • Research and forecasts in IT
    • Finance in IT
    • Hakatonas
    • IT emigration
    • Education abroad
    • Lumber room
    • I'm on my way

Scanning Live Ethereum of Unchecked-Send Error Contracts. Part 2

 3r33333. 3r3-31. 3r3196. 3r3197. 3r33338. Continuing article Scanning Live Ethereum of Unchecked-Send Error Contracts. Part 1. 3r33333. 3r33351.  3r33333. 3r33338. Almost a year ago (while Ethereum was in its “border” release), the popular lottery contract EtherPot [9]3r33333. also suffered from the same error. An earlier version of BTCRelay also showed this error 3r33258.[7]3r33333. . Although a danger was discovered in a previous security audit, an incorrect patch was first applied to 3r-?667.[8]3r33333. . 3r33333. 3r318. 3r33333. 3r33351.  3r33333. 3r3196. “Unchecked-send” error detection on live blockhain
3r33351.  3r33333. 3r33338. How common are these errors? Do you heed warnings? Do best practices apply? We answer these questions empirically by analyzing the block-chain Ethereum data, as well as the Solidity code repository found on etherscrape.com. To do this, we are developing a simple software analysis tool that checks the block-chain contract and uses heuristics to check whether one of the most effective protection methods is being used. Listing 2 shows the first protection technique, as recommended by the Ethereum documentation, which should check for the return value of 3r3189. send
and throw an exception. To detect the use of this method, we use a rough approximation: we simply look for whether the return value of
is ignored. send
or not. 3r33351.  3r33333. 3r33351.  3r33333. Listing 4 illustrates the second protection technique recommended in the UMD manual, which directly checks if r3r3189 is full. callstack
by sending a test message. To discover this technique, we again use an approximate approximation: we simply check if the message is being sent in addition to the 3r3189 command. send
. 3r33351.  3r33333. 3r33351.  3r33333. If none of these heuristic indicators are present, we conclude that none of the best practice recommendations are followed. We implement these heuristics using a simple pattern mapping with a compiled EVM bytecode. More information on how we do this is provided in Appendix
[12]3r33333. . 3r33351.  3r33333. 3r33333. 3r33351.  3r33333. 3r33351.  3r33333. 3r3196. How many contracts are vulnerable? 3r3197. 3r33351.  3r33333. 3r33338. We start by checking the heuristics in the Etherscrape repository of the Solidity source code. As of March 2? 201? Etherscrape retransmission contained 361 Solidity contract programs, 56 of which contained the send instruction. Of these contract programs, we assume that most (at least 36 out of 56) do not use any of the protective programming methods. 3r33351.  3r33333. 3r33351.  3r33333. Even if the contract does not use any of the security technologies, it may or may not have a real vulnerability. We manually checked the Solidity contracts to confirm the presence of the vulnerability. For our purposes, we treat a contract as vulnerable if its condition may change, even if the team is 3r3189. send
does not work (so we will look at the vulnerable code in Listing 5). We confirmed that the vulnerability is present in the vast majority, 32 out of 36 of these contracts. 3r33351.  3r33333. 3r33333. 3r33351.  3r33333. 3r33338. Similarly, our heuristics do not guarantee the correct application of defensive programming. Take, for example, “WeiFund”, a decentralized open-source crowdfunding DApp.
This contract is
It has two functions:
refund ()
and 3r3189. payout ()
that cheat our heuristics. The following is an excerpt from 3r3189. refund
. 3r33351.  3r33333. 3r33333. 3r33351.  3r33333. 3r33338. 3r33333. 3r3384. function refund (uint _campaignID, uint contributionID) public {3r-3363.
receiver.send (donation.amountContributed); 3r33333. donation.refunded = true; 3r33333.
if (c.config! = address (0))
WeiFundConfig (c.config) .refund (_campaignID, donation.contributor,
Donation.amountContributed); 3r33333.}
3r395. 3r33351.  3r33333. 3r33338. In this code, the message is sent to WeiFundConfig (c.config) to call the refund method, but only under certain conditions. If c.config is zero, then the contract is really vulnerable to a callstack attack. When testing *, none of the Solidity programs that have passed our heuristic test have actually applied the recommended best practice of testing callstack directly. *
 3r33333. 3r33351.  3r33333. Then we turn our attention to contracts drawn up on the live block-chain Ethereum. We looked at a snapshot of March 2? 2016 (time stamp: 1184243). This snapshot contains a total of 1?645 block chains, which appear to be generated by the Solidity compiler, of which only ?618 (11.8%) included the command 3r3189. send
. 3r33351.  3r33333. Of these, the vast majority do not seem to use any of the defensive programming methods. 3r33351.  3r33333. 3r33333. 3r33351.  3r33333. 3r33338. How about the recursive race problem in TheDAO? The most exciting smart contract these days, TheDAO [11]3r33333. suffers from a completely separate error, which is that it is not “safe for reuse” 3r33312.[13]3r33333. . This is another (related but distinct) form of insecure programming, which was also expected in previous security checks 3r3117.[6]3r33333. , but, still, probably, many contracts today are unsafe. Future work was to make a tool that could also detect such an error. 3r33351.  3r33333. 3r33333. 3r33351.  3r33333. 3r3196. Where did it all go wrong? 3r3197. 3r33351.  3r33333. 3r33338. We do not expect that programming on smart contracts will be completely simple, at least for now. However, it is surprising that this particular form of error is so common, despite the fact that it was described so long ago during the development of the Ethereum ecosystem. 3r33351.  3r33333. 3r33351.  3r33333. The report in 2015 3-333249.[6]was This recommendation is given to the developers of Ethereum: "3r33351.  3r33333. 3r33351.  3r33333. At present, the programming examples presented in the documentation are insufficient to disseminate advanced methods for writing safe contracts and solving problems with a gas mechanism. Introductory C ++ tutorials often skip 3r33351.  3r33333. error checking for readability, which led to numerous security errors. Examples of Ethereum should teach the best habits. Recommendation: provide even more examples of thorough programming of security contracts. "3r-3351.  3r33333. 3r33351.  3r33333. We know only one official answer to this question, which is to add a warning to the official Solidity documentation mentioned earlier 3r33222.[3],
repeated below: “There is some danger when using 3r3189. send
: The transfer fails if the depth of the call stack is 1024 (this can always be caused by the caller) and also fails if the receiver runs out of gas. Therefore, to ensure secure broadcast transmission, always check the return value of
send
or even better: use a template in which the recipient withdraws money. " 3r33333. 3r33351.  3r33333. 3r33338. We believe that this remark is not enough to document the problem. It offers only incomplete mitigation and describes only one type of danger, potentially misleading the reader about its degree. 3r33333. 3r33351.  3r33333.
 3r33333. 3r33337. 3r33338. Update:
 3r33333. The inadequacy of the Solidity documentation has also been illustrated in detail by Peter Spring. [16]3r33333. 3r33333. 3r33351.  3r33333. 3r33333.  3r33333.
3r33351.  3r33333. 3r33338. In addition, the warning seems to be often ignored. Therefore, we believe that it is necessary to take additional preventive measures. 3r33333. 3r33351.  3r33333. 3r33351.  3r33333. 3r3196. How can Etherscrape help? 3r3197. 3r33351.  3r33333. 3r33338. We believe that using static analysis tools, even rough ones, such as those described in this message, can help improve the quality of intelligent contracts. At Etherscrape, we integrate analysis tools like this into our publicly accessible web service, and we will add a link to the tool page when it is ready. This will make it easier to view the code of an intelligent contract by highlighting the places where errors may occur. We assume that users of such a smart contract (for example, potential investors in TheDAO or its offers) can easily use tools such as a sanity check before depositing their money. Even non-technical investors can hold developers accountable for explaining how they reacted to the problems noted in the code. 3r33351.  3r33333. 3r33351.  3r33333. Etherscrape also helps by analyzing the public block chain and controlling the prevalence of this error, which can help in deciding, for example, how much money to allocate for research and development of static analysis tools. In addition, compilers such as 3r3189. solc,
can integrate such analyzes, providing a warning to the programmer when an error seems probable. 3r33351.  3r33333. 3r33333. 3r33351.  3r33333. 3r3196. Recommended reading
3r33351.  3r33333.
 3r33333. 3r33337. 3r33338.[1]3r3204. Step-by-step Towards Creating a Safe Smart Contract
3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[2] UMD Programmer's Guide to Ethereum and Serpent (Section ???) 3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[3] Official Ethereum Solidity Docs 3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[4] King of the Ether: Post-Mortem Investigation 3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[5] Swende on Contract Security 3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[6] Least Authority audit of Ethereum 3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[7] BTC Relay Audit 1 3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[8] BTC Relay Audit 2 3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[9] EtherPot Security Bug Report 3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[10] Reentrant Contracts 3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[11] The DAO (Decentralized Autonomous Organization) 3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[12]3r3303. Appendix A: Details on how we analyze the blockchain
3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[13]3r33312. A Call for a Temporary Moratorium on The DAO
3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[14] Appendix B: Vulnerable Solidity Contracts 3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[15]3r33333. Appendix C: Vulnerable Blockchain Contracts
3r33333. 3r33351.  3r33333. 3r33333.  3r33333. 3r33337. 3r33338.[16] Ethereum Griefing
 3r33333. Wallets: Send w /Throw Is Dangerous
3r33333. 3r33351.  3r33333. 3r33333.  3r33333.
3r33351.  3r33333. 3r33351.
3r33333. 3r33333. 3r33333. 3r33356. ! function (e) {function t (t, n) {if (! (n in e)) {for (var r, a = e.document, i = a.scripts, o = i.length; o-- ;) if (-1! == i[o].src.indexOf (t)) {r = i[o]; break} if (! r) {r = a.createElement ("script"), r.type = "text /jаvascript", r.async =! ? r.defer =! ? r.src = t, r.charset = "UTF-8"; var d = function () {var e = a.getElementsByTagName ("script")[0]; e.parentNode.insertBefore (r, e)}; "[object Opera]" == e.opera? a.addEventListener? a.addEventListener ("DOMContentLoaded", d,! 1): e.attachEvent ("onload", d ): d ()}}} t ("//mediator.mail.ru/script/2820404/"""_mediator") () (); 3r33357. 3r33333.
3r33333. 3r33333. 3r33333. 3r33333.

It may be interesting

  • Comments
  • About article
  • Similar news
This publication has no comments.

weber

Author

21-11-2018, 20:25

Publication Date

Development / Solidity

Category
  • Comments: 0
  • Views: 328
SHOCK! New software for phishing does
Open lesson "Feature Engineering on the
PHP class for outputting color text to
Let's talk about metrics as a way to
“How to turn a simple project into a
Already not luggable pc, not yet
Write a comment
Name:*
E-Mail:


Comments
this is really nice to read..informative post is very good to read..thanks a lot! How is the cost of house cleaning calculated?
Yesterday, 17:14

Legend SEO

It’s very informative and you are obviously very knowledgeable in this area. You have opened my eyes to varying views on this topic with interesting and solid content.

entegrasyon programları
Yesterday, 17:09

taxiseo2

I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work.

entegrasyon programları
Yesterday, 17:02

taxiseo2

I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work...먹튀

Yesterday, 16:50

raymond weber

Lose Weight Market provides the best fitness tips, workout guides, keto recipes and diet plans, yoga workout routine and plans, healthy recipes, and more! Check Out: Lose Weight Market


Corvus Health provides medical training services as well as recruiting high quality health workers for you or placing our own best team in your facility. Check Out: Health Workforce Recruitment




I.T HATCH offers a wide range of IT services including remote access setup, small business servers, data storage solutions, IT strategy services, and more. Check Out: IT strategy services
Yesterday, 22:33

noorseo

Adv
Website for web developers. New scripts, best ideas, programming tips. How to write a script for you here, we have a lot of information about various programming languages. You are a webmaster or a beginner programmer, it does not matter, useful articles will help to make your favorite business faster.

Login

Registration Forgot password