Skip to content

Commit cc86167

Browse files
Additions:
* add hack analyses folder * update bugfix reviews layout * add mev bot hack analysis * add tx viewers to Tools * add codeslaw Fixes: * replace 'this' for 'these' where it made sense
1 parent e207264 commit cc86167

File tree

7 files changed

+92
-79
lines changed

7 files changed

+92
-79
lines changed

Blockchain Concepts/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Blockchain Concepts
4646
Who holds the private key? In the custodial wallets a third party manages the private key, in the non-custodial ones is the user who holds the keys. Usually the centraliced exchanges are the ones who provide custodial wallets and you can get the non-custodial ones using Metamask or Trust Wallet for example.
4747

4848
- Hot/Cold wallet:
49-
The biggest difference between this wallets is if they are connected to the internet (hot wallet) or not (cold wallet)
49+
The biggest difference between these wallets is if they are connected to the internet (hot wallet) or not (cold wallet)
5050

5151

5252
# Resources:

BugFixReviews/README.md

+2-36
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
Bugfix Reviews
22
--------------------
3-
This are the real world cases, if you are interested in learning the theory about this vulnerabilities check: [Vulnerabilities](../Vulnerabilities/README.md)
3+
These are real world cases of bug fixes reported through Immunefi. To learn more about smart contract vulnerabilities theory check: [Vulnerabilities](../Vulnerabilities/README.md)
44

55
- [2023](#2023)
66
- [January 2023](#january-2023)
7-
8-
- [Hack Analysis: Nomad Bridge, August 2022](#hack-analysis-nomad-bridge-august-2022)
9-
- [Hack Analysis: Beanstalk Governance Attack, April 2022](#hack-analysis-beanstalk-governance-attack-april-2022)
7+
108
- [Moonbeam, Astar, And Acala Library Truncation Bugfix Review - $1M Payout](#moonbeam-astar-and-acala-library-truncation-bugfix-review-$1m-payout)
119

1210
- [2022](#2022)
@@ -17,8 +15,6 @@ This are the real world cases, if you are interested in learning the theory abou
1715
- [November 2022](#november-2022)
1816

1917
- [Mt Pelerin Double Transaction Bugfix Review](#mt-pelerin-double-transaction-bugfix-review)
20-
- [Hack Analysis: Saddle Finance, April 2022](#hack-analysis-saddle-finance-april-2022)
21-
- [Hack Analysis: Cream Finance Oct 2021](#hack-analysis-cream-finance-oct-2021)
2218

2319
- [September 2022](#september-2022)
2420

@@ -124,18 +120,6 @@ This are the real world cases, if you are interested in learning the theory abou
124120

125121
## January 2023
126122

127-
### [Hack Analysis: Nomad Bridge, August 2022](https://medium.com/immunefi/hack-analysis-nomad-bridge-august-2022-5aa63d53814a)
128-
129-
A routine upgrade on the implementation of one of Nomad’s proxy contracts marked a zero hash value as a trusted root, which allowed messages to get automatically proved. The hacker leveraged this vulnerability to spoof the bridge contract and trick it to unlock funds.
130-
131-
- Vulnerability type: CommittedRoot set to ZERO.
132-
133-
### [Hack Analysis: Beanstalk Governance Attack, April 2022](https://medium.com/immunefi/hack-analysis-beanstalk-governance-attack-april-2022-f42788fc821e)
134-
135-
Beanstalk was the victim of a whopping $181M hack, which leveraged the lack of execution delay to push through a malicious governance proposal.
136-
137-
- Vulnerability type: Lack of execution delay.
138-
139123
### [Moonbeam, Astar, And Acala Library Truncation Bugfix Review — $1m Payout](https://medium.com/immunefi/moonbeam-astar-and-acala-library-truncation-bugfix-review-1m-payout-41a862877a5b)
140124

141125
The bug, which was found within Frontier — the Substrate pallet that provides core Ethereum compatibility features within the Polkadot ecosystem–impacted Moonbeam, Astar Network, and Acala. The estimated potential damage from the vulnerability amounted to approximately $200m across the three projects, which was swiftly prevented
@@ -146,12 +130,6 @@ The bug, which was found within Frontier — the Substrate pallet that provides
146130

147131
## December 2022
148132

149-
### [Hack Analysis: Omni Protocol, July 2022](https://medium.com/immunefi/hack-analysis-omni-protocol-july-2022-2d35091a0109)
150-
151-
The underlying vulnerability, reentrancy, was exploited across two different functions of the same smart contract. Notably, these functions were lacking reentrancy locks and did not follow the checks-effects-interactions pattern. By leveraging the re-entrancy vulnerability on two different functions and using two attacker contracts, the hacker was able to borrow against the collateral and make the market forget about it.
152-
153-
- Vulnerability type: Re-entrancy.
154-
155133
### [88MPH Theft Of Unclaimed MPH Rewards Bugfix Review](https://medium.com/immunefi/88mph-theft-of-unclaimed-mph-rewards-bugfix-review-1dec98b9956b)
156134

157135
Allowed users to steal most of the 88MPH tokens generated from yield contract by depositing an asset and withdrawing the vested 88mph tokens immediately.
@@ -166,18 +144,6 @@ The bug could have allowed users to drain contract funds.
166144

167145
- Vulnerability type: Theft of funds.
168146

169-
### [Hack Analysis: Saddle Finance, April 2022](https://medium.com/immunefi/hack-analysis-saddle-finance-april-2022-f2bcb119f38)
170-
171-
Price miscalculation when swapping a token for an LP token.
172-
173-
- Vulnerability type: Logic, price calculation.
174-
175-
### [Hack Analysis: Cream Finance Oct 2021](https://medium.com/immunefi/hack-analysis-cream-finance-oct-2021-fc222d913fc5)
176-
177-
Analysis of Cream Finance exploit on Oct 2021, resulting in loss of $130m in available liquidity.
178-
179-
- Vulnerability type: Oracle manipulation, Uncapped supply of token.
180-
181147
## September 2022
182148

183149
### [Aurora Improper Input Sanitization Bugfix Review](https://medium.com/immunefi/aurora-improper-input-sanitization-bugfix-review-a9376dac046f)

Check This Out/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ Check This Out
9797
- [How to PoC your Bug Leads](https://medium.com/immunefi/how-to-poc-your-bug-leads-5ec76abdc1d8)
9898
- [Elements of a good bug report by Joran Honig](https://typeshare.co/joranhonig/posts/elements-of-a-good-bug-report)
9999
- [Sample vulnerability Report by DanielVF](https://gist.github.com/DanielVF/66f459da88804d1fd917c47576c68523)
100-
- [Check this Foundry Tutorials](../Tools/README.md#foundry-solidity-evm)
100+
- [Check these Foundry Tutorials](../Tools/README.md#foundry-solidity-evm)
101101
- [DeFiHackLabs - Example POC's made with Foundry](https://github.com/SunWeb3Sec/DeFiHackLabs)
102102
- [Coinspect Security - EVM Attacks PoCs ](https://github.com/coinspect/learn-evm-attacks/tree/master/test)

HackAnalyses/README.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
Hack Analyses
2+
--------------------
3+
These are real world cases of bug fixes reported through Immunefi. To learn more about smart contract vulnerabilities theory check: [Vulnerabilities](../Vulnerabilities/README.md)
4+
5+
- [2023](#2023)
6+
- [Hack Analysis: 0xbaDc0dE MEV Bot, September 2022](#hack-analysis-0xbadc0de-mev-bot-september-2022)
7+
- [Hack Analysis: Nomad Bridge, August 2022](#hack-analysis-nomad-bridge-august-2022)
8+
- [Hack Analysis: Beanstalk Governance Attack, April 2022](#hack-analysis-beanstalk-governance-attack-april-2022)
9+
10+
- [2022](#2022)
11+
- [Hack Analysis: Omni Protocol, July 2022](#hack-analysis-omni-protocol-july-2022)
12+
- [Hack Analysis: Saddle Finance, April 2022](#hack-analysis-saddle-finance-april-2022)
13+
- [Hack Analysis: Cream Finance Oct 2021](#hack-analysis-cream-finance-oct-2021)
14+
15+
16+
# 2023
17+
18+
## [Hack Analysis: 0xbaDc0dE MEV Bot, September 2022](https://medium.com/immunefi/0xbadc0de-mev-bot-hack-analysis-30b9031ff0ba)
19+
20+
A smart contract MEV bot was hacked on the Ethereum blockchain, losing around 1,101 WETH. The hack took place just 30 minutes after the MEV bot pulled off a notoriously profitable arbitration that earned it 804 WETH. Since the smart contract code is unverified, this article shows how one can go about finding a vulnerability in a smart contract by just looking at its bytecode, past transactions and a bit of PoC trial and error action.
21+
22+
- Vulnerability type: Lack of sufficient validation of flashloan caller leading to arbitrary function execution
23+
24+
## [Hack Analysis: Nomad Bridge, August 2022](https://medium.com/immunefi/hack-analysis-nomad-bridge-august-2022-5aa63d53814a)
25+
26+
A routine upgrade on the implementation of one of Nomad’s proxy contracts marked a zero hash value as a trusted root, which allowed messages to get automatically proved. The hacker leveraged this vulnerability to spoof the bridge contract and trick it to unlock funds.
27+
28+
- Vulnerability type: CommittedRoot set to ZERO.
29+
30+
## [Hack Analysis: Beanstalk Governance Attack, April 2022](https://medium.com/immunefi/hack-analysis-beanstalk-governance-attack-april-2022-f42788fc821e)
31+
32+
Beanstalk was the victim of a whopping $181M hack, which leveraged the lack of execution delay to push through a malicious governance proposal.
33+
34+
- Vulnerability type: Lack of execution delay.
35+
36+
# 2022
37+
38+
## [Hack Analysis: Omni Protocol, July 2022](https://medium.com/immunefi/hack-analysis-omni-protocol-july-2022-2d35091a0109)
39+
40+
The underlying vulnerability, reentrancy, was exploited across two different functions of the same smart contract. Notably, these functions were lacking reentrancy locks and did not follow the checks-effects-interactions pattern. By leveraging the re-entrancy vulnerability on two different functions and using two attacker contracts, the hacker was able to borrow against the collateral and make the market forget about it.
41+
42+
- Vulnerability type: Re-entrancy.
43+
44+
## [Hack Analysis: Saddle Finance, April 2022](https://medium.com/immunefi/hack-analysis-saddle-finance-april-2022-f2bcb119f38)
45+
46+
Price miscalculation when swapping a token for an LP token.
47+
48+
- Vulnerability type: Logic, price calculation.
49+
50+
## [Hack Analysis: Cream Finance Oct 2021](https://medium.com/immunefi/hack-analysis-cream-finance-oct-2021-fc222d913fc5)
51+
52+
Analysis of Cream Finance exploit on Oct 2021, resulting in loss of $130m in available liquidity.
53+
54+
- Vulnerability type: Oracle manipulation, Uncapped supply of token.

README.md

+24-39
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ This is a collaborative repository that aims to contain all the information you
88
| Starting Guides | [Inspect](#starting-guides)
99
| Blockchain Concepts | [Inspect](#blockchain-concepts)
1010
| Bug Fix Reviews | [Inspect](#bugfix-reviews)
11+
| Hack Analyses | [Inspect](#hack-analyses)
1112
| Smart Contracts | [Inspect](#smart-contracts)
1213
| Tools | [Inspect](#tools)
1314
| Vulnerabilities | [Inspect](#vulnerabilities)
1415
| Check This Out | [Inspect](#check-this-out)
1516
| How to Add Resources | [Inspect](#how-to-add-resources)
1617

1718
## Starting Guides:
18-
- [Hacking the Blockchain: Ethereum](https://medium.com/immunefi/hacking-the-blockchain-an-ultimate-guide-4f34b33c6e8b)
19+
- [Hacking the Blockchain: Ethereum](https://medium.com/immunefi/hacking-the-blockchain-an-ultimate-guide-4f34b33c6e8b)
20+
- [Your First Day as a Bug Bounty Hunter on Immunefi](https://medium.com/immunefi/your-first-day-as-a-bug-bounty-hunter-on-immunefi-9b101768a40c)
1921

2022

2123
## Blockchain Concepts
@@ -26,41 +28,25 @@ This is a collaborative repository that aims to contain all the information you
2628
- [Wallets](Blockchain%20Concepts/README.md#wallets)
2729
- [Resources:](Blockchain%20Concepts/README.md#resources)
2830

29-
## Bugfix Reviews
3031

32+
## Bugfix Reviews
33+
- [2023](BugFixReviews/README.md#2023)
3134
- [2022](BugFixReviews/README.md#2022)
32-
- [November 2022](BugFixReviews/README.md#november-2022)
33-
- [September 2022](BugFixReviews/README.md#september-2022)
34-
- [August 2022](BugFixReviews/README.md#august-2022)
35-
- [July 2022](BugFixReviews/README.md#july-2022)
36-
- [June 2022](BugFixReviews/README.md#june-2022)
37-
- [May 2022](BugFixReviews/README.md#may-2022)
38-
- [April 2022](BugFixReviews/README.md#april-2022)
39-
- [March 2022](BugFixReviews/README.md#march-2022)
40-
- [February 2022](BugFixReviews/README.md#february-2022)
41-
- [January 2022](BugFixReviews/README.md#january-2022)
42-
4335
- [2021](BugFixReviews/README.md#2021)
4436

45-
- [December 2021](BugFixReviews/README.md#december-2021)
46-
- [November 2021](BugFixReviews/README.md#november-2021)
47-
- [October 2021](BugFixReviews/README.md#october-2021)
48-
- [September 2021](BugFixReviews/README.md#september-2021)
49-
- [August 2021](BugFixReviews/README.md#august-2021)
50-
- [July 2021](BugFixReviews/README.md#july-2021)
51-
- [June 2021](BugFixReviews/README.md#june-2021)
52-
- [May 2021](BugFixReviews/README.md#may-2021)
53-
- [April 2021](BugFixReviews/README.md#april-2021)
54-
- [March 2021](BugFixReviews/README.md#march-2021)
55-
- [February 2021](BugFixReviews/README.md#february-2021)
56-
57-
## Smart Contracts
5837

38+
## Hack Analyses
39+
- [2023](HackAnalyses/README.md#2023)
40+
- [2022](HackAnalyses/README.md#2022)
41+
42+
43+
## Smart Contracts
5944
- [Ethereum Virtual Machine](Smart%20Contracts/README.md#ethereum-virtual-machine)
6045
- [Solidity](Smart%20Contracts/README.md#solidity)
6146
- [Vyper](Smart%20Contracts/README.md#vyper)
6247
- [Huff](Smart%20Contracts/README.md#huff)
6348

49+
6450
## Tools
6551
- [Frameworks/ Programming Tools](Tools/README.md#frameworks-programming-tools)
6652
- [Hardhat (JS) EVM](Tools/README.md#hardhat-js-evm)
@@ -78,7 +64,6 @@ This is a collaborative repository that aims to contain all the information you
7864

7965
## Vulnerabilities
8066
- [Logic](Vulnerabilities/README.md#logic)
81-
8267
- [Bad Arithmetics](Vulnerabilities/README.md#--bad-arithmetics)
8368
- [Integer underflow/overflow](Vulnerabilities/README.md#--integer-underflowoverflow)
8469
- [Checks](Vulnerabilities/README.md#--checks)
@@ -99,19 +84,19 @@ This is a collaborative repository that aims to contain all the information you
9984
- [Transaction reorganization (MEV)](Vulnerabilities/README.md#transaction-reorganization-mev)
10085
- [Bad Randomness](Vulnerabilities/README.md#bad-randomness)
10186
- [Use of components with known vulnerabilities](Vulnerabilities/README.md#use-of-components-with-known-vulnerabilities)
102-
103-
## Check This Out:
104-
- [CTFs to Enhance your Solidity Skills](Check%20This%20Out/README.md#ctfs-to-enhance-your-solidity-skills)
105-
- [How to...](Check%20This%20Out/README.md#how-to)
106-
- [Interviews](Check%20This%20Out/README.md#interviews)
107-
- [Research Papers](Check%20This%20Out/README.md#research-papers)
108-
- [People to Follow](Check%20This%20Out/README.md#people-to-follow)
109-
- [Resources from YouTube](Check%20This%20Out/README.md#resources-from-youtube)
110-
- [PoC like a pro](Check%20This%20Out/README.md#poc-like-a-pro)
11187

11288

89+
## Check This Out:
90+
- [CTFs to Enhance your Solidity Skills](Check%20This%20Out/README.md#ctfs-to-enhance-your-solidity-skills)
91+
- [How to...](Check%20This%20Out/README.md#how-to)
92+
- [Interviews](Check%20This%20Out/README.md#interviews)
93+
- [Research Papers](Check%20This%20Out/README.md#research-papers)
94+
- [People to Follow](Check%20This%20Out/README.md#people-to-follow)
95+
- [Resources from YouTube](Check%20This%20Out/README.md#resources-from-youtube)
96+
- [PoC like a pro](Check%20This%20Out/README.md#poc-like-a-pro)
97+
11398

114-
## How to add Resources?
115-
Please follow the structure of the file you are editing. Whenever possible add a description of the resource you want to share. Send a pull request adding in the comment your Twitter and Discord users to thank you for the contribution and receive XP in the Discord leveling system.
99+
## How to add Resources?
100+
Please follow the structure of the file you are editing. Whenever possible add a description of the resource you want to share. Send a pull request adding in the comment your Twitter and Discord users to thank you for the contribution and receive XP in the Discord leveling system.
116101

117-
Plagiarism: Word-for-word copying of portions of another's writing won't be allowed.
102+
Plagiarism: Word-for-word copying of portions of another's writing won't be allowed.

Tools/README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,17 @@ Tools
5050
It offers a variety of graphic outputs and details on the smart contracts' structure.
5151

5252
# Blockchain Analysis
53-
Blockchain network explorers.
53+
Blockchain network explorers:
5454
- [Ethereum](https://etherscan.io)
5555
- [BNB Chain](https://bscscan.com)
5656
- [Polygon](https://polygonscan.com)
5757
- [Solana](https://solscan.io)
5858
- [Fantom](https://fantomscan.com)
5959
- [BitQuery](https://explorer.bitquery.io/)
60+
Transaction viewers:
61+
- [samczsun's Tx viewer](https://tx.eth.samczsun.com/)
62+
- [Tenderly Dashboard](https://dashboard.tenderly.co/explorer)
63+
- [Phalcon explorer](https://phalcon.blocksec.com/)
6064

6165
# Activity Monitoring
6266
- [Forta Protocol](https://forta.org)
@@ -96,6 +100,10 @@ Open data library for cryptocurrency assets.
96100

97101
A blockchain analytics and compliance platform.
98102

103+
- [Codeslaw](https://www.codeslaw.app/)
104+
105+
Smart search for verified smart contracts on the blockchain
106+
99107
# Vulnerability Scanners & Others:
100108
- [Slither](https://github.com/crytic/slither)
101109

Vulnerabilities/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ First of all, you need to understand what is `delegatecall` this function is a v
6969
# Access Control
7070
## - Unprotected functions
7171
- Default Visibility
72-
One of this common examples
72+
One of these common examples
7373
## - Signature Verification
7474

7575
## - Authentication with tx.origin

0 commit comments

Comments
 (0)