A Collective of Elite Competitive Security Researchers. Combined Total of 35 Top-5 Finishes at @code4rena & @HatsFinance

Joined January 2024
Sapphire Dynasty retweeted
Excited to be researching and writing an article on Privacy Pool protocol architecture and exploring its use-case of enabling regulatory compliance in DeFi with the @0xbowio team! Was a pleasure meeting with veteran web3 builder and 0xbow CEO @nattyfried and @RareSkills_io CEO @Jeyffre to discuss the tech. Stay tuned for another banger!
We just tested @0xbowio on @gnosischain 🎉 On chain privacy for the good guys is coming 🔜
1
19
1,312
Sapphire Dynasty retweeted
Since starting in May, @3DOCsec's and my journey together on @code4rena has been incredible. We participated in Renzo (with @sin1st3r__), Optimism (with @Haxatron1), Reserve, and got a (private) bounty on @immunefi, earning >$190k in 4 months. A peek inside our work 1/7
14
9
3
160
11,137
Sapphire Dynasty retweeted
Web3 Devs / Researchoors: NEW CTF ALERT! github.com/BlockChomper/ctf-… Yesterday, we published an article on a high severity issue found in @code4rena's DittoETH July contest. To illustrate the mathmatical issue with disproportionate fee calculation and token minting, we built a simple CTF so you can test your skills! Enjoy!
2
8
1
73
5,150
Sapphire Dynasty retweeted
Go projects give access to a workflow amazingly normal in Web2 development: - place a breakpoint - do whatever to hit it - hover on a variable to see its value - double-click to change its value 😱 - step over / into / out - repeat Dear Santa, can we have this for Solidity too?
2
1
24
1,676
Sapphire Dynasty retweeted
TIL that what I just knew as the arch-enemy of EVM argument decoding in assembly has a proper name: non-strict encoding. Every time I read this page, I learn something new, on top of what I was looking for 😅 Makes for a perfect bedtime reading: docs.soliditylang.org/en/lat…
1
10
1,008
Officially a SR at @SpearbitDAO
43
4
2
208
13,129
Sapphire Dynasty retweeted
Web3 Builders: As you know I’m bullish af on @RareSkills_io educational content but not all of you know they also have a sister organization called @RareTalent_xyz. RareTalent screens applicants to ensure that only the highest quality engineers are selected within their resource pool and then made available for protocols development needs. I’m going to be working with RareTalent to connect with and research protocols that are actively building and understand their needs from a staffing / strategy perspective. Having trusted and highly skilled developers will reduce the probability of exploitation and will ensure effective operations of the protocol. If anyone in my network wants to have a discussion around current or future staffing needs, shoot me a direct message.
7
8
81
7,088
Sapphire Dynasty retweeted
For aspiring web3 security researchers and developers, @RareSkills_io educational content is a key resource that should be utilized in your learning journey. While reading the chapters of the books, I thought it would be cool if you could have some accompanying CTFs to practically test the knowledge you have learned. So we built some! Check out the repo below for the first CTF challenge based on Chapter 1 of the Uniswap V2 Book: ERC4626 Vaults. Thanks @Jeyffre for providing feedback and helping us create this! Looking forward to creating many more challenges. github.com/BlockChomper/ctf-…
2
16
1
145
11,967
Sapphire Dynasty retweeted
This was super fun. Huge shoutout @SecureFi_io and @immunefi. Big credit to @pldespaigne for the amazing bytegraph.xyz that helped us navigate the 🤯 bytecode challenge
🎉 Announcing the winners of the first-ever fully on-chain CTF by @immunefi! Congrat🥇@3DOCsec @0xEV_om And congratulations to all participants for showcasing exceptional skills and pushing the limits of blockchain security!🛡️ Hope to see you next time! #web3 #web3secuirty
1
4
33
2,174
Excited to partner with the @Blockwarden_io team to innovate and develop new security products for the web3 ecosystem 🤝
🤝New Partnership: Blockwarden X @Sapphireweb3sec Happy Friday everyone! 🥳 As we continue to unite the most innovative minds in our industry, we are excited to announce a new strategic partnership with one of the brightest teams in web3 security. Our goal is to learn, share knowledge, and ensure that the foundational principles of web2 security are also effectively integrated into web3, in addition to robust smart contract security 🔒
1
6
641
Sapphire Dynasty retweeted
Should I quit web3 security research?? 😭 CryptoSec Diaries Update feeling cute, might delete later though Good days, bad days and SSD failures
8
3
44
3,838
Sapphire Dynasty retweeted
I've noticed a lot new web3 security researchers have been following after recent posts, if you want to team up on contests join @thereachlabs Discord server! discord.gg/SvneZY7hv4
5
13
1,046
Another day, another business logic vulnerability combined with a flash-loan attack! Rewinding to the $44.7 Million Hedgey Finance exploit on the 19th of April, we summarize and consolidate some of the key lessons learned around vulnerability and mitigation from the community. We’re teamed up with @ZealynxSecurity on this content, we'll be partnering to research more Web3 Security hot topics! As reported in @rekthq the protocol was exploited on both Ethereum Mainnet and Arbitrum Network across a series of transactions. The root cause lied in a lack of input validation on users’ parameters, allowing the attacked to manipulate and gain unauthorized token approvals. @CharlesWang published guidance on this topic a few days ago, xitter.cf/CharlesWangP/status/17…. In summary, improper input validation is the predominant root cause for smart contract issues. Missing or improper input validation is a vulnerability in a smart contract that occurs when the contract fails to adequately check and validate the data and parameters supplied by users or external sources before processing them. Consensys Diligence audited the protocol in question. The individual auditors from the firm, from a brief background check, are certainly experienced. Nonetheless, they missed this bug leading to critical exploit. Lessons learned around this that a single audit is not sufficient to gain robust security coverage. In our experience at least two audits by researchers with robust credentials and reputation is necessary and a bug bounty is also strongly advised to mitigate against potential exploit. You can check out @1nf0s3cpt's DeFiHackLabs repo (github.com/SunWeb3Sec/DeFiHa…) where there is already a PoC uploaded to replicate this exploit.
Missing or Improper Input Validation in Solidity Improper input validation is the predominant root cause for smart contract issues. Missing or improper input validation is a vulnerability in a smart contract that occurs when the contract fails to adequately check and validate the data and parameters supplied by users or external sources before processing them. In this case, an attacker can manipulate contract logic, inject malicious data or cause unexpected behavior. Here's a simple Solidity contract that demonstrates the importance of input validation and how missing or improper validation. In this sample contract, the withdraw function can be simply invoked with any from address, which means due to the lack of input validation, one can steal anyones deposit. Bonus: It seems that this contract introduces a reentrancy vulnerability, which is however not exploitable due to an underflow revert in the balance mapping. How to prevent Improper Input Validation Developers ought to establish thorough input validation procedures to mitigate improper/missing vulnerabilities. This entails validating data types, examining boundary conditions, and critically checking user input to forestall unforeseen circumstances. Here are some key considerations to keep in mind. Use Modifiers: Modifiers can add reusable pre or post-conditions to functions, enforcing input validation checks consistently across multiple functions. Here’s an example: Implement Access Controls: Limit access to certain functions or data to trusted parties only, preventing unauthorized manipulation of the contract's state. For instance: Validate User Input: Ensure that the input received from users meets the expected criteria. This can include validating the format, length, and type of the input:
6
9
1,541
New post, new bug analysis! 🔍 Exploitable flaw found in Ondo’s lending protocol! Learn how an attacker can drain funds of initial depositors from the freshly deployed CToken contract. Our team member, @akshaysrivastv, uncovered a unique vulnerability in the CToken contract during the📷 @code4rena contest. Think you can spot it before we reveal the details? 👀💡 Background The CToken is a yield-bearing asset that is minted when users deposit underlying tokens. The amount of CTokens minted to a user is calculated based upon the amount of underlying tokens user is depositing. As per the implementation of CToken contract, there exists two cases for CToken amount calculation: 1. First deposit - when CToken.totalSupply() is 0 2. All subsequent deposits The Bug As the exchange rate is dependent upon the ratio of CToken’s totalSupply and underlying token balance of CToken contract, the attacker can craft transactions to manipulate the exchange rate. How can they do it? 1. Once the CToken has been deployed and added to the lending protocol, the attacker mints the smallest possible amount of CTokens. 2. Then the attacker does a plain underlying token transfer to the CToken contract, artificially inflating the underlying.balanceOf(Token) value. Due to the above steps, during the next legitimate user deposit, the mintTokens value for the user will become less than 1 and essentially be rounded down to 0 by Solidity. Hence the user gets 0 CTokens against his deposit and the CToken’s entire supply is held by the Attacker. 3. The Attacker can then simply redeem his CToken balance for the entire underlying token balance of the CToken contract. The same steps can be performed again to steal the next user’s deposit. 🔄 It should be noted that the attack can happen in two ways: -> The attacker can simply execute Step 1 and 2 as soon as the CToken gets added to the lending protocol. -> The attacker watches the pending transactions of the network and front-runs the user’s deposit transaction by executing Step 1 and 2 and then back-runs it with Step 3. Impact A sophisticated attack can impact all user deposits until the lending protocols owners and users are notified and contracts are paused. Since this attack is a replicable attack, it can be performed continuously to steal the deposits of all depositors that try to deposit into the CToken contract. The loss amount will be the sum of all deposits done by users into the CToken multiplied by the underlying token’s price. Suppose there are 10 users and each of them tries to deposit 1,000,000 underlying tokens into the CToken contract. Price of underlying token is $1. Total loss (in $) = $10,000,000 Recommended Mitigation Steps The fix to prevent this issue would be to enforce a minimum deposit that cannot be withdrawn. This can be done by minting a small amount of CToken units to 0x00 address on the first deposit.
1
5
18
2,622
We were delighted to have @escrow_ represent the SD team on stage for a live-audit showdown at @code4rena's Lmeow event at EthDenver! Check out a quick highlight video that the C4 team put together🔥 youtube.com/watch?v=Cw9BH5gY…
3
1
9
2,458
Sapphire Dynasty retweeted
Just so y'all know: Every time you push code, you appear on this real-time wall at the @github HQ.
270
1,611
353
13,524
1,035,607
Want to know what an elite security researcher’s unique findings look like? We deep dive into two of our most talented, @saidamdev and @Xc1008Cui’s High Risk finding within the @code4rena INIT Capital invitational audit. @hansfriese was the judge for this contest. INIT Capital is a web3 protocol that allows users to Lend, Borrow & Access Strategies with Liquidity Hooks. The finding in question related to a vulnerability where an attacker could exploit the tokenOut function and replace the intended token to be transferred out with an arbitrary (high-value) token. In this case the exploiter would be a malicious order creator. Vulnerability Deep Dive When an order is created, there are 4 required validation checks. One of them is to check whether the order.tokenOut is equal to marginPos.baseAsset or _tokenOut is equal to marginPos.quoteAsset. 
This validation is crucial for ensuring that only valid tokens, specifically those that are part of the margin position being created, can be used in the order creation process. Unlike during the creation of the order, where certain conditions are checked to ensure that tokenOut matches specific assets, there are no such constraints when updating tokenOut within the updateOrder function. 
 This lack of restriction means that any token can be chosen or specified arbitrarily.
The ability to change tokenOut to any token of choice opens up the possibility of exploitation. Attack Vector Just before the order is filled, the creator (=attacker) can front-run the operation by changing the order.tokenOut to a token with a high value, leveraging their knowledge of impending market movements. The executor is likely to approve the hook with multiple tokens and transfer the amount using this new high-value token. Recommended Mitigation To validate the new token when updateOrder is called: By ensuring that the token used for the order update is one of the two assets associated with the margin position, the contract prevents attackers from manipulating the order to their advantage.
1
3
21
2,429