How to make a jump from Web2 hacking to Web3 hacking?

This is the question I started getting over DMs and I decided to answer all of them in a form of a Twitter thread so other can learn to.

knowledge will be compressed so keep that in mind🙃

Here we go!

🧵👇
As with everything, you need solid foundations before leaping into anything advanced.

That's why I recommend reading upon how Ethereum works first.

github.com/ethereumbook/e…

This should give you a great overview of inner workings of Ethereum.

Next, Solidity!🐍
All Ethereum DApps rely on Smart Contracts (SC)

Knowing what they are, how to write them is a big step towards findings bugs

Solidity is the most popular language for SCs and @ProgrammerSmart created an awesome resources for learning the language.

solidity-by-example.org
...
...
Apart from the awesome website, he also creates YouTube videos on various Solidity/Security/DeFi topics.

It's worth checking it out!

youtube.com/channel/UCJWh7…

Apart from learning the language, it's also essential knowing the application landscape and what the hell is DeFi 💱
DeFi apps are one of the most popular Ethereum based applications.

Knowing what they are and how they work will help you with finding bugs.

One of the best resources to learn more about the topic is @finematics

Also check out @officer_cia guide to DeFi github.com/OffcierCia/DeF…
One of the most fun way to see and learn how to break applications is by completing CTFs.

Web3 also got you covered on this front and there are multiple CTFs worth checking out.

1 ethernaut.openzeppelin.com
2 capturetheether.com/challenges/
3 damnvulnerabledefi.xyz
When you have that knowledge and practice behind you, next step I could recommend is by reading Post Mortem on various hacks/bugs.

I already wrote few such articles on @immunefi where I covered for example Price Oracle manipulation

medium.com/immunefi/enzym…
It's also worth checking out reputable auditing firms like @trailofbits / @ConsenSysAudits / @OpenZeppelin / @peckshield and many others.

They always post something interesting and they make most of their audit reports public.

Reading such audit report is a knowledge mine⛏️🕯️
Having a dev/test env is a must for bug hunter

It's worth learning the basics of @HardhatHQ and @BrownieEth. Without them you won't go far with writing your own PoC.

Get familiar with Web3.js/Web3.py packages to be able to query Ethereum easily and manipulate transactions

👇
Some of the interesting security tools that can help you and improve your workflow are

1 Solidity Visual Developer
2 Surya
3 ethtx.info
4 github.com/dapphub/dappto…
5 seth
If you want to become a smart contract auditor, @cmichelio created an awesome blog post just about that.

It's worth giving it a read as you will find some valuable information.

cmichel.io/how-to-become-…
Here are other superb links you will find helpful that I didn't had a character count in previous tweets

1 useweb3.xyz
2 notonlyowner.com/learn/intro-se…
3 github.com/ConsenSys/ethe…
4 devansh.xyz/blockchain-sec…

Thread is not over 🧐
Armed with the knowledge and practice you are now prepared to start submitting bugs on bug bounty platforms like @immunefi.

If you want to know how to properly write your bug report (and you should!) Immunefi got you covered with the following article.🥷

medium.com/immunefi/a-hac…
I hope I you found the thread helpful to you and you will start making first steps towards Web3 Security.

I just want for you to be able to say "I know Web3 Hacking" in 2022 🦾
If you like the article, please retweet the first tweet



and if you have any other interesting links or suggestions, please leave a comment 🙏✨
Immunefi just launched guide for learning Blockchain Security that I think is definitely worth sharing here.

@morphean_sec great job on the guide!

It also links to some resources I haven't linked in the original thread so it's worth checking out 🧐

medium.com/immunefi/hacki…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Adrian ⛩️ Hetman 🐺⚔️

Adrian ⛩️ Hetman 🐺⚔️ Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @adrianhetman

25 Nov
(1/n) Ethereum, while being an extremely versatile blockchain, still has significant usability constraints.

Ethereum has trouble with scaling, that is, handling an increasing number of transactions.

And there have been some remarkable scaling solutions to alleviate this.

👇🧵
(2/n) The current Ethereum version has low transaction throughput and high latency in processing.

This means that transactions are both slow and prohibitively expensive. 🐢 💸

There are two general types of scaling solutions proposed for the above issues

On-chain and Off-chain
(3/n) On-chain scaling refers to any direct modification made to a blockchain, like data sharding and execution sharding in the incoming version of Ethereum 2.0.

Another type of on-chain scaling would be a sidechain with two-way bridge to Ethereum, like Polygon.
Read 11 tweets
24 Jun
1/ Do you think ERC20 approve() is safe? Well… 🧵

Function in itself is safe but there are two scenario where ERC20 approve() shows its rough edges.

First is a front-running attack on approve().

Imagine following scenario 👇
2/
* Alice approves Bob for 20 Tokens
* After some time, Alice changes approve to 10
* Bob front-runs the Alice TX for approve(10)
* Bob spends 20 Tokens
* Alice TX passes
* Bob spends additional 10 Tokens from Alice.

Why is that?
3/ Attack is also possible because approve() overrides current allowance.

It doesn’t increase/decrease allowance in atomic manner.

How can we limit against that?

There are two approaches to limit the attack vector.
Read 15 tweets
23 Jun
1/How @ElevenFinance got hacked? 🧵

The exploit was possible due to a bug in emergencyBurn() function of ElevenNeverSellVault.

There is a transfer of previously deposited funds during the function call, but there is a lack of burning of Nerve shares to account for the transfer Image
2/ In other words, an attacker could double-spend Nerve shares he acquired during initial deposit to the vault.

emergencyBurn() didn’t burn 11NRV Tokens so an attacker used them in “withdrawAll()” to get additional LP Tokens in return.
3/ He burned LP Tokens on PancakeSwap getting the underlying tokens.

After repaying the FlashSwap, attacker was left with funds from burning second time the 11NRV Tokens.

This was done on multiple vaults on ElevenFinance, marking a total loss of $4.5M.
Read 4 tweets
21 Jun
1/ Why China is cracking down on #Bitcoin? 🧵

Currently many of the Chinese provinces where Bitcoin miners resided, rolled out new policies restricting or banning the #BTC miners.

Inner Mongolia, Xinjiang, Yunnan and Sichuan banned Bitcoin.
2/ Energy companies were told to stop providing energy to crypto miners due to them using too much electricity.

It became an illegal activity to mine cryptocurrencies. If someone would be found to do so regardless, they would be added to the blacklist of social credit system.
3/ All decision seems to be linked mainly with Energy usage.

China plans to achieve carbon neutrality by 2060 and reducing carbon intensity or the amount of carbon emitted per unit of GDP, by more than 65% by 2030.

Bitcoin mining ban can help with that.
Read 13 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(