Giter Club home page Giter Club logo

Comments (4)

PresidentNavalny avatar PresidentNavalny commented on August 24, 2024 1

Tried to reproduce this (on testnet) to add some logs.

[2019-07-04 19:42:28.469438] [0x00007f3837f0d700] [info] Smart: enqueue payable( = 0.001, bundle = <empty>)
[2019-07-04 19:42:28.469563] [0x00007f3837f0d700] [debug] Smart: {984041.*} is waiting from #984041
[2019-07-04 19:42:28.469580] [0x00007f3837f0d700] [debug] Smart: set running status to {984041.*} containing 1 jobs
[2019-07-04 19:42:28.469596] [0x00007f3837f0d700] [debug] Smart: lock contract AJBsqEoev9phzmrpfPVsVALbLVhJ1FCimByFZbUetcL3
[2019-07-04 19:42:28.469613] [0x00007f3837f0d700] [debug] Smart: {984041.*} is running from #984041
[...]
[2019-07-04 19:42:30.342409] [0x00007f3837f0d700] [info] Smart: {984041.0} is out of fee, cancel the whole queue item
[2019-07-04 19:42:30.342421] [0x00007f3837f0d700] [debug] Smart: {984041.*} is finished on #984042
[...]
[2019-07-04 19:42:31.609749] [0x00007f3837f0d700] [debug] Smart: {984041.*} is finished on #984043
[2019-07-04 19:42:31.609773] [0x00007f3837f0d700] [error] Smart: {0.4294967295} smart contract result packet must contain new state transaction
[2019-07-04 19:42:31.609787] [0x00007f3837f0d700] [debug] Smart: {984041*.} is splitted onto 0 completed + 1 rejected + 0 restart calls
[2019-07-04 19:42:31.609800] [0x00007f3837f0d700] [info] Smart: ======================  SMART-ROUND {0.4294967295} END =====================
[2019-07-04 19:42:31.609813] [0x00007f3837f0d700] [debug] The smartConsensus for {0.65535} is not active
[2019-07-04 19:42:31.616029] [0x00007f3837f0d700] [debug] Node: 1 rejected contract(s) received
[2019-07-04 19:42:31.616089] [0x00007f3837f0d700] [debug] Smart: get reject contract(s) signal
[2019-07-04 19:42:31.616134] [0x00007f3837f0d700] [debug] Smart: 1 contract(s) are rejected
[2019-07-04 19:42:31.719373] [0x00007f3837f0d700] [debug] Node: 1 rejected contract(s) received
[2019-07-04 19:42:31.719451] [0x00007f3837f0d700] [debug] Smart: get reject contract(s) signal
[2019-07-04 19:42:31.719464] [0x00007f3837f0d700] [debug] Smart: 1 contract(s) are rejected
[2019-07-04 19:42:31.731421] [0x00007f3837f0d700] [debug] Node: 1 rejected contract(s) received
[2019-07-04 19:42:31.731501] [0x00007f3837f0d700] [debug] Smart: get reject contract(s) signal
[2019-07-04 19:42:31.731515] [0x00007f3837f0d700] [debug] Smart: 1 contract(s) are rejected
[2019-07-04 19:42:31.749650] [0x00007f3837f0d700] [debug] Node: 1 rejected contract(s) received
[2019-07-04 19:42:31.749725] [0x00007f3837f0d700] [debug] Smart: get reject contract(s) signal
[2019-07-04 19:42:31.749741] [0x00007f3837f0d700] [debug] Smart: 1 contract(s) are rejected
[2019-07-04 19:42:31.763488] [0x00007f3837f0d700] [debug] Node: 1 rejected contract(s) received
[2019-07-04 19:42:31.763573] [0x00007f3837f0d700] [debug] Smart: get reject contract(s) signal
[2019-07-04 19:42:31.763585] [0x00007f3837f0d700] [debug] Smart: 1 contract(s) are rejected
[2019-07-04 19:42:31.865804] [0x00007f3837f0d700] [debug] Node: 1 rejected contract(s) received
[2019-07-04 19:42:31.865876] [0x00007f3837f0d700] [debug] Smart: get reject contract(s) signal
[2019-07-04 19:42:31.865891] [0x00007f3837f0d700] [debug] Smart: 1 contract(s) are rejected

Did not manage to reproduce paralyze the work of absolutely any smart contract in the network. Executing another contract worked fine without any issues, within seconds from the attempt of stopping all contracts.

attack on every smart contract should be made separate. you can attack 10 different smart contracts at the same time. other smart contracts that you do not attack at this time will work fine

from node.

tkoen93 avatar tkoen93 commented on August 24, 2024

Tried to reproduce this (on testnet) to add some logs.

[2019-07-04 19:42:28.469438] [0x00007f3837f0d700] [info] Smart: enqueue payable( = 0.001, bundle = <empty>)
[2019-07-04 19:42:28.469563] [0x00007f3837f0d700] [debug] Smart: {984041.*} is waiting from #984041
[2019-07-04 19:42:28.469580] [0x00007f3837f0d700] [debug] Smart: set running status to {984041.*} containing 1 jobs
[2019-07-04 19:42:28.469596] [0x00007f3837f0d700] [debug] Smart: lock contract AJBsqEoev9phzmrpfPVsVALbLVhJ1FCimByFZbUetcL3
[2019-07-04 19:42:28.469613] [0x00007f3837f0d700] [debug] Smart: {984041.*} is running from #984041
[...]
[2019-07-04 19:42:30.342409] [0x00007f3837f0d700] [info] Smart: {984041.0} is out of fee, cancel the whole queue item
[2019-07-04 19:42:30.342421] [0x00007f3837f0d700] [debug] Smart: {984041.*} is finished on #984042
[...]
[2019-07-04 19:42:31.609749] [0x00007f3837f0d700] [debug] Smart: {984041.*} is finished on #984043
[2019-07-04 19:42:31.609773] [0x00007f3837f0d700] [error] Smart: {0.4294967295} smart contract result packet must contain new state transaction
[2019-07-04 19:42:31.609787] [0x00007f3837f0d700] [debug] Smart: {984041*.} is splitted onto 0 completed + 1 rejected + 0 restart calls
[2019-07-04 19:42:31.609800] [0x00007f3837f0d700] [info] Smart: ======================  SMART-ROUND {0.4294967295} END =====================
[2019-07-04 19:42:31.609813] [0x00007f3837f0d700] [debug] The smartConsensus for {0.65535} is not active
[2019-07-04 19:42:31.616029] [0x00007f3837f0d700] [debug] Node: 1 rejected contract(s) received
[2019-07-04 19:42:31.616089] [0x00007f3837f0d700] [debug] Smart: get reject contract(s) signal
[2019-07-04 19:42:31.616134] [0x00007f3837f0d700] [debug] Smart: 1 contract(s) are rejected
[2019-07-04 19:42:31.719373] [0x00007f3837f0d700] [debug] Node: 1 rejected contract(s) received
[2019-07-04 19:42:31.719451] [0x00007f3837f0d700] [debug] Smart: get reject contract(s) signal
[2019-07-04 19:42:31.719464] [0x00007f3837f0d700] [debug] Smart: 1 contract(s) are rejected
[2019-07-04 19:42:31.731421] [0x00007f3837f0d700] [debug] Node: 1 rejected contract(s) received
[2019-07-04 19:42:31.731501] [0x00007f3837f0d700] [debug] Smart: get reject contract(s) signal
[2019-07-04 19:42:31.731515] [0x00007f3837f0d700] [debug] Smart: 1 contract(s) are rejected
[2019-07-04 19:42:31.749650] [0x00007f3837f0d700] [debug] Node: 1 rejected contract(s) received
[2019-07-04 19:42:31.749725] [0x00007f3837f0d700] [debug] Smart: get reject contract(s) signal
[2019-07-04 19:42:31.749741] [0x00007f3837f0d700] [debug] Smart: 1 contract(s) are rejected
[2019-07-04 19:42:31.763488] [0x00007f3837f0d700] [debug] Node: 1 rejected contract(s) received
[2019-07-04 19:42:31.763573] [0x00007f3837f0d700] [debug] Smart: get reject contract(s) signal
[2019-07-04 19:42:31.763585] [0x00007f3837f0d700] [debug] Smart: 1 contract(s) are rejected
[2019-07-04 19:42:31.865804] [0x00007f3837f0d700] [debug] Node: 1 rejected contract(s) received
[2019-07-04 19:42:31.865876] [0x00007f3837f0d700] [debug] Smart: get reject contract(s) signal
[2019-07-04 19:42:31.865891] [0x00007f3837f0d700] [debug] Smart: 1 contract(s) are rejected

Did not manage to reproduce paralyze the work of absolutely any smart contract in the network. Executing another contract worked fine without any issues, within seconds from the attempt of stopping all contracts.

from node.

PresidentNavalny avatar PresidentNavalny commented on August 24, 2024

There is another way to paralyze any smart contract. Create a smart contract that will send transactions to other smart contracts. We specify in this smart contract, the smart contract that we want to attack. (preferably 400+ times). We send to the created smart contract 1 cs(or any other amount) in response, the smart contract sends 400 transactions to the address of the smart contract specified by us. after that, the same thing happens as I described in the report #38. the smart contract that we attacked stops responding to any account until those 400+ transactions are rejected.
Let's say we want to attack the smart contract
"Agq8sJ55tvMATLpR5gZSLcHZmBUDjhmjajhq7rgedxmd"
Безымянный

Is a smart contract application egyptslot deployed in the network testnet. we create a smart contract that will forward 400 transactions to this smart contract.
this smart contract "BPFWxS5tptukmCm2RZ7BD6sTABQQqFY6olt5eiaqygle".
Безымянный2
send on this smart contract 1 cs. in response, the smart contract sends 397 transactions to the smart contract application. as a result, this game smart contract will not respond to anyone until such time as these 397 transactions are rejected.

Есть еще один способ парализовать любой смарт контракт. Создаем смарт контракт который будет отправлять другим смарт контрактам транзакции. Указываем в этом смарт контракте, тот смарт контракт, который мы хотим атаковать. (желательно 400+ раз). Отправляем на созданный смарт контракт 1 cs(либо любую другую сумму) в ответ смарт контракт отправляет 400 транзакций на адрес указанного нами смарт контракта. после этого происходит тоже самое, что я описывал в репорте #38. смарт контракт который мы атаковали перестает отвечать любому аккаунту до тех пор пока эти 400+ транзакций не отклонятся.
Допустим мы хотим атаковать смарт контракт "Agq8sJ55tvMATLpR5gZSLcHZmBUDjhmjajhQ7RGEdxmD" это смарт контракт приложения egyptslot развернутый в сети testnet. создаем смарт контракт который будет пересылать на этот смарт контракт 400 транзакций. вот этот смарт контракт "BPFWxS5tptukmCm2RZ7BD6sTABQQqFY6oLT5eiaqyGLE". отправляем на этот смарт контракт 1 cs. в ответ на это смарт контракт отправляет 397 транзакций на смарт контракт приложения. в итоге этот игровой смарт контракт не будет никому отвечать до того момента пока не отклонятся эти 397 транзакций.

from node.

PresidentNavalny avatar PresidentNavalny commented on August 24, 2024

Описание бага на русском языке:
Есть способ парализовать работу абсолютно любого смарт контракта в сети. Смарт контракт перестает отвечать на запросы любого пользователя (будь то смарт игрового приложения, либо любой другой, неважно). Если брать в пример геймблинг приложение, то игрок будет делать ставку, отправляя смарт контракту монеты Credits, но смарт ему отвечать никак не будет, более того отправленные монеты будут находиться в подвешенном состоянии, их не сможет принять смарт контракт и получить обратно свои монеты пользователю тоже не удастся (монеты зависают в воздухе)
Сделаем это на примере приложения Dice в сети дапс нет (эта дыра есть и в майннете или любой другой сети Credits доступной на данный момент)
И так дапс нет, приложение DICE. Открываем веб кошелек (ну либо с десктопа можно сделать тоже самое) формируем транзакцию, вводим в адрес получателя смарт контракт этого приложения "AtPvLHpqrcrioixZWxCNkAGLRdZuh9mJaqKVtEzhaqLs", в поле сумма можно вбить любую сумму, 0.1-0.000...1 cs, в поле комиссия, меняем стандартную комиссию 0.1CS которую нам предлагает веб кошелек, на 0.0005CS, нажимаем отправить. смарт контракт не сможет принять эти монеты, потому что мы указали слишком маленькую комиссию для перевода. в это время никто не сможет пользоваться приложением, оно просто не будет отвечать никакому пользователю, пока не зафейлится отправка монет с недостаточной комиссией(это время варьируется в зависимости от скорости создания новых блоков, от 1.5 минут до 4 и больше) таким образом можно заблокировать работу всех смарт контрактов в сети. причем злоумышленник получит свои отправленные монеты назад, его расходы это только комиссия за перевод 0.00043cs. данную процедуру можно проделывать сколько угодно раз, хоть со всеми смарт контрактами в сети одновременно в течении целого дня. никто все это время не сможет пользоваться никаким смарт контрактом в сети Credits. можно навечно заблокировать работу любого смарта. по моим подсчетам с помощью этого способа, чтобы заблочить 1 смарт популярного приложения в сети Credits на целый день, злоумышленнику понадобится всего $0.72 довольно бюджетненько))) почему $0.72? фейлится транзакция с недостаточной комиссией в течении 1.5 минут и это в самом быстром варианте, когда скорость создания новых блоков примерно 2 блока в секунду. (если скорость создания блоков медленнее, то транзакция будет фейлится дольше). возьмем за основу показатель в 2 минуты. При условии что комиссия в сети cs будет находиться на уровне S0.001, то злоумышленнику понадобится всего $0.03 чтобы заблокировать работу смарт контракта на один час и $0.72
Тем же самым способом можно парализовать передачу любого токена в сети, хоть всех сразу. отправляем на смарт контракт токена 0.000...1cs, выставляем комиссию 0.0005cs и после этого отправка этого токена, в отношении которого мы совершили данное действие будет невозможна. все транзакции с этим токеном хоть 10, хоть 20, хоть 50 штук будут висеть в статусе пендинг, пока не зафейлится передача монет Credits с недостаточной комиссией. При желании как я уже сказал, можно навечно парализовать передачу всех токенов и работу любого приложения в сети Credits. все что для этого нужно, написать бота, который каждые 1.5-2 минуты будет отправлять на смарт контракты токенов или любого приложения монеты Сredits с недостаточной комиссией. стоимость такой атаки на 1 смарт контракт в день будет составлять всего $0.72.

from node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.