
Cyber entomologist | warden, judge, Zenith @code4rena | FV ambassador @Certora
CET
Joined June 2023
- Tweets94
- Following246
- Followers629
- Likes193
3DOↃ Security retweeted
You can measure how vulnerable the code is after a contest. This can help:
- Projects and users to estimate hack risk
- Bug hunters to scope targets
- Ecosystem to track what works best
- Platforms to manage reputation risk
TL;DR: More solo findings -> more hidden bugs.
This works for most formats: flat pot, conditionals, invitationals, reserved auditors. As long as duplicates are allowed.
### Recent examples:
- Cork exploit: last private contest had 4 solo mediums (out of 4 total mediums). "Chao 1 bias-corrected" estimates 6 unfound bugs. Jackknife 8 more bugs.
- BeraBorrow's Recon's recent post about a critical: private contest had 8 solo mediums (out of 15 mediums), 6 doubletons (doubletons = found by two auditors). Chao 1: 4.5 more bugs, Jackknife: 9 more bugs.
### The science of capture-recapture
There are many disciplines that use this approach: software engineering, quality control, biology & ecology, epidemiology, criminology, linguistics.
Similarly, there are many estimator formulas: Lincoln-Petersen, Chapman, Schnabel, Schumacher–Eschmeyer, Jolly–Seber, Chao 1 & 2, ACE, ICE, Jackknife 1 & 2, Bootstrap, Zelterman, Good–Turing, etc. Will post some links below.
Two simple examples are Jackknife 1 & 2, Chao 1 & 2 which roughly say :
- Jackknife 2 (second-order, simplified): `unfound = 2 * uniques - doubletons`. Jackknife is more popular in software-inspection studies.
- Chao 1: `unfound = (uniques^2) / (2 * doubletons)`. (A slightly different version for no doubletons)
Specifics don't matter really - pick your favorite from the long list. What's important is they all say: more unique findings -> more hidden bugs.
### Intuitions
Math is not always intuitive, so here are some intuitions.
1. Parallel worlds: If a bug is unique to one finder, there’s a parallel world where it stayed hidden because he got sick, or was booked on an audit, or just missed it. Maybe you're in that parallel world. In contrast, if there are many duplicates - in most worlds the same bugs are found.
2. Serial auditing: If you imagine auditors working in sequence, the contest is just a stopping point for the sequence. The contest with uniques stopped when new bugs were still being found, so more like these remain. In contrast, the contest with only duplicates stopped after finding most bugs of similar rarity.
### What can we do?!
1. Measure: what platforms, pot sizes, contest formats give the best coverage?
2. Educate clients on the more secure formats with data.
3. If you're a project, check if your contest was weak.
### No solo findings = code is safe? No.
It's possible whole classes of niche bugs (e.g. cryptography) or higher complexity bugs were not found because pot was too low. That's always a risk.
This rule doesn't tell as what's safe, but it tells us what's LIKELY still vulnerable.
---------
See next tweet for links and statistical nitpicking
3DOↃ Security retweeted
Code4rena will run audit contests for free, as public goods.
100% of funds from sponsors will go directly to auditors and judges. We won't take any cut.
Why?
1. Competitions are commodities.
They're CRUD apps. Why should builders pay premium for a website just to submit bugs? Especially smaller teams without VC funding.
2. Everyone deserves competitions.
We tell all our clients to get a competition after their audit. That's because competitions simulate real world conditions, where there's thousands of eyes on a protocol. We want to make competitions as affordable as possible so everyone can get one.
3. It benefits our wardens.
In 2021, we invented the competition format. We're still the platform with the largest auditor pool (10,000+ registered). Not only should builders have access to the best security talent, we believe auditors should have opportunities to work with great projects. Opening up our platform benefits our wardens.
How will you afford this?
Zellic is a profitable business. We make money doing traditional private audits through Zellic and Zenith. This benefits us because: (1) our clients are more secure after they run contests, and (2) Code4rena is a talent pipeline for Zenith.
Will you stop maintaining the platform?
Of course not. Since we acquired Code4rena, we've shipped several features and have several more already underway. C4 has a dedicated dev team that we're fully committed to.
Besides, many of our clients at Zellic use C4. We're incentivized to make sure the platform works well. It's just that now we're allowing everyone to benefit from our investments in Code4rena.
In conclusion:
Run a contest on Code4rena! We won't take a cut, your prizes will go directly to wardens and judges.
For full details, check out our blog post here: zellic.io/blog/code4rena-fre…
3DOↃ Security retweeted
BOUNTYHUNT3RZ Episode 12: w/
@tpiliposian
@0xriptide
Bringing out the AUDITOOOR
We discuss how auditors and bounty hunters differ, @hexens audit model, what the @certora prover actually does, what devs should do prior to deploying, RED FLAGS to look for when looking at a project to bounty hunt on, why everyone misses bugs, getting your money's worth as a protocol dev with audits and contests, and much, much, more ...
podcast, discord, substack -> linktr.ee/bountyhunt3rz
3DOↃ Security retweeted
👀
Hacker mindset but white hat, passionate, dedicated, attention to detail, you wanna work with us?
➡️📩@PabloSabbatella @opsek_io
3DOↃ Security retweeted
Kicked from Immunefi for not paying? Hold my beer.
In November, I submitted a critical bug to Cronos (@cronosapp) which they downplayed and have since been kicked off Immunefi. Here's some info about the bug and an example of how projects can simply not pay a fair amount.
Report: gist.github.com/fatherGoose1…
tl;dr:
- It's a simple staking contract where you stake your TONIC and receive xTonic at the current exchange rate.
- The vulnerability lies in a function called performConversionForERC20() which allows anyone to convert other tokens held by the contract into TONIC.
- This function is vulnerable to reentrancy because the caller sets an arbitrary swap path and can inject a malicious token in the middle to gain control of execution.
- The contract determines the estimated amount of TONIC that should be received by the swap, and any extra goes to the caller as a reward.
- But since there is reentrancy, the caller can also STAKE their TONIC prior to the above function completion.
- The caller's stake is honored AND they are transferred back their TONIC, essentially receiving free staked tokens.
Caveat:
There is a 10 day unstaking delay. So the exploiter would not be able to actually convert the staked tokens back into TONIC until the cooldown period had passed.
What Cronos said:
Thank you for reporting this issue.
The team has verified that the exploit described can indeed work. From our side, we have safeguards in place to mitigate these risks; such as a 10 days delay period for the xTonic minted. As such, there is a low possibility of the exploit realising; as the issue will be rectified before the exploiter can launder the gotten funds.
However, we do appreciate your effort in identifying this issue and plan to update the contract to eliminate the risk entirely. In addition, we are happy to reward you with USD1,600 as a token of appreciation.
Actions:
Cronos fixed the vulnerability immediately, before even responding to the report.
My thoughts:
Obvious lowball. Cronos's max bounty was $250,000 and they offered $1,600. I understand the technicality with this attack, and would have agreed to a payout less than the max, but the payout would have to accurately represent the value of this report.
Mediation:
Immunefi mediated twice and confirmed that this report deserved the max bounty. Immunefi told Cronos that a simple unstaking delay is not an adequate means of protection.
Cronos claimed:
"We have implemented a robust monitoring framework, consisting of internal systems, protocols, and strategic third-party partnerships, which promptly respond to any anomalies within our smart contracts. This is the standard of any big organization, and we refrain from disclosing further specifics to maintain the integrity of our security protocols."
When Immunefi asked them to provide any information regarding their automated detection and mitigation processes, Cronos would not comply.
Result:
Cronos was kicked off Immunefi.
Final thoughts from Django:
'Tis the life of a bug hunter.
3DOↃ Security retweeted
Certora is now open source!
What’s your excuse now for not securing your protocol, anon?
3DOↃ Security retweeted
From pentesting to Web3 security, he addresses threats like phishing, fake interviews, and stolen private keys.
With a focus on eliminating single points of failure, @theSouilos prioritizes risks that could shut down an entire company or protocol.
His mission: protect companies, employees, and users beyond smart contracts.
This Thursday on the Recon Discord
3DOↃ Security retweeted
Introducing Zenith: an auditing firm that delivers good, affordable audits ASAP.
Teams want to ship this week, not next month. And without critical bugs.
We pick a team of top auditors and manage the audit. It's hassle-free.
No more waiting: we can start at a moment's notice.
3DOↃ Security retweeted
anyone using @solana/web3.js, versions 1.95.6 and 1.95.7 are compromised with a secret stealer leaking private keys. if you or your product are using these versions, upgrade to 1.95.8 (1.95.5 is unaffected)
if you run a service that can blacklist addresses, do your thing with FnvLGtucz4E1ppJHRTev6Qv4X7g8Pw6WPStHCcbAKbfx
3DOↃ Security retweeted
Well, the phishers are at it again - this is not a legit email from ledger at all. And look at that call to action - your ledger will stop working unless you give them your secrets!
3DOↃ Security retweeted
🏆 The results of the $187,500 Reserve Core competitive audit are in!
Big congrats to everyone who submitted valid findings, especially to...
→ Team RadiantLabs (@0xEV_om, @3DOCsec) for earning >$92k in winnings, plus top hunter, gatherer, AND best QA report
→ The FOUR competitors who beat out a C4 Zenith researcher to become Dark Horses: @krikoeth, ether_sky, @bauchibred, and stuart_the_minion
Huge props to @reserveprotocol for their solid commitment to the highest security outcomes!
3DOↃ Security retweeted
Nothing beats working with a great team.
@3DOCsec and @Haxatron1 are some of the most talented SRs I know and I am extremely proud of what we accomplished in the Superchain audit. We managed to:
- beat both Pro League teams, earning part of the Dark Horse bonus
- get both Hunter and Gatherer bonuses with 3 High-severity and 4 Medium-severity findings
- get 3 of our findings selected for report
- and deliver the best QA report
When we got started on the Fault Dispute Game contracts after the last contest on @sherlockdefi and an audit by @SpearbitDAO, I wasn't sure we would even be able to find a single bug. But we were not intimidated, we gave it our best, and had fun in the process.
And as simple as it sounds, that is all it takes.
Our gratitude goes to the @optimsimFND and @code4rena teams for the opportunity, and to @zachobront for volunteering as judge with unfathomable dedication.
Replying to @code4rena
Not one but TWO Dark Horse competitors jumped to the top of the competition leaderboard with solo findings
🥇 RadiantLabs is the FIRST Dark Horse champion, taking first place (haxatron, @3DOCsec, and @0xEV_om)
They found a unique medium-severity issue, in addition to 3 highs and 3 mediums that were also found by other researchers
And there's more... (2/8)
3DOↃ Security retweeted
ASMR Web3 Security Research🤔Trying something a little different and taking you through the experience of working as an independent security researcher and digital nomad during a contest!
In this series we will be participating in the @SizeCredit @code4rena contest which lasts for 21 days and keeping you updated throughout the journey.
CryptoSec Diaries - Episode 1
youtube.com/watch?v=qXyY027T…
3DOↃ Security retweeted
SEAL 911 just got released in time for the weekend, @3DOCsec's hardest challenge yet! Check it out below.
onlypwner.xyz/challenges/16
3DOↃ Security retweeted
The Power of Open-Sourced & Decentralized Security
The creative minds of Security Researchers, incentivized by substantial bounties, have shown ingenuity in identifying unique vulnerabilities. To quote @immunefi “once in a while..we receive a bug report that changes everything”.
In the case of the @Polygon Bridge Immunefi 2M Bounty, it was discovered that the branch mask parameter must be unique as "0x0" and the MerklePatriciaProof may possess multiple encodings. This finding constituted a novel vulnerability within the Web3 world. Now, all Security Researchers can benefit from the discovery and help secure protocols with this knowledge.
Such critical reported vulnerabilities help secure the Web3 world and create a win-win situation for the protocol teams and security reviewers. Our elite researchers have found multiple unique critical findings within their competitive contests at @code4rena and private audits.
We look forward to sharing this knowledge, securing protocols and the wider web3 ecosystem in the coming year.
medium.com/immunefi/polygon-…
3DOↃ Security retweeted
Today's Vulnerability Deep Dive: Insecure implementations of flash lending and borrowing contracts
It is crucial for both Web3 Dev's and Security Researchers to understand, by following these steps, you can enhance the security of flash lending and borrowing contracts and mitigate potentially business critical risks and attack vectors.
1. Token Return by Flash Lender: After executing a flash loan, it's crucial for the flash lender to promptly return the borrowed tokens. This measure prevents potential loss of funds to malicious entities.
2. Hardcoded Restriction to onFlashloan(): Implementing a hardcoded restriction ensures that only the designated onFlashloan() function can be called. This restriction mitigates the risk of unauthorized fund transfers to attackers.
3. Prevention of Balance Alteration: Given the susceptibility of balanceOf(address(this)) to alteration, it's advisable to employ safeguards such as nonReentrant or restricting direct fund transfers to the protocol. These measures fortify the integrity of the contract against unauthorized modifications.
4. Implementation of Reentrancy Locks: In light of the fact that ERC3156 lacks inherent adherence to Common Exploitable Inheritance (CEI), integrating reentrancy locks becomes imperative. These locks serve as an additional layer of defense against reentrancy attacks, enhancing the contract's security.
5. Verification of Borrower Intent: Beyond ensuring that the onFlashLoan() function doesn't revert, it's essential to verify the borrower's intent. This involves checking that the returned value matches the calculated hash keccak256("ERC3156FlashBorrower.onFlashLoan"). By performing this verification, the flash lender ensures that borrowers genuinely intend to borrow tokens and pay associated fees, mitigating the risk of fraudulent activities.
3DOↃ Security retweeted
Huge kudos to the @soliditors team for ranking 19th out of 825 at this weekend's @OpenZeppelin Ethernaut CTF 🏆🚩
@0xMlome 👏
@3DOCsec 👏
@0xEzSwim 👏
@__mikb__ 👏
@0xjarix 👏
3DOↃ Security retweeted
Unizen's recent exploit (rekt.news/unizen-rekt/) revealed vulnerabilities within an upgrade to their DEX aggregation contract. Unverified external calls led to 2.5M user funds drained and significant reputational damage. This is a clear reminder of the importance of thorough auditing pre-upgrade. Prevention lies in diligent testing and robust security controls.
The @SapphireWeb3Sec team is available for free pre-engagement consultation with protocols to discuss how to implement efficient security within the development lifecycle.
#SmartContractSecurity #BlueTeam #MitigateRisks
3DOↃ Security retweeted
New challenge "Liquid Staking" by @3DOCsec just went live!
onlypwner.xyz/challenges/15































