Cyber entomologist | warden, judge, Zenith @code4rena | FV ambassador @Certora

CET
Joined June 2023
LLMs are bringing security research to the next level. Yesterday, they made up non-existing bugs. Today, they make up non-existing code, and report bugs on it. Tomorrow, they'll reply to this post saying how game-changing their model is over the ones I'm talking about
3
1
38
1,864
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
8
10
4
107
9,164
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…
98
121
47
759
209,168
Straight to bookmarks 💯
We retrieved every contract on Ethereum. Along the way, we found the exact date when 16,000 unique contracts were deployed (the most in one day), the EOA with the most deployed contracts (2.9M), and much more. This is how we did it.🧵 (Spoiler: It’s 69,788,231 contracts!)
6
508
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
2
10
4
58
7,212
3DOↃ Security retweeted
👀 Hacker mindset but white hat, passionate, dedicated, attention to detail, you wanna work with us? ➡️📩@PabloSabbatella @opsek_io
Opsek is growing: we are looking for the best talent obsessed with Cybersecurity and blockchain technology. If you are, drop me a dm. btw, we don't work with anons, camera always on.
3
8
736
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.
5
2
2
66
11,537
The best time to start writing searchable notes about design and gotchas of the protocols I work on was a couple of years ago. The second best time is now 🎧@bountyhunt3rz
6
420
3DOↃ Security retweeted
Certora is now open source! What’s your excuse now for not securing your protocol, anon?
73
164
63
624
178,613
Alpha for SRs Last week I asked about a function during a kick-off code walkthrough call. Got replied it was standard and not problematic, so I decided to ramp up with knowledge of the codebase by trying to understand why exactly it's this way 1/3
1
3
45
2,585
Well, it turned out to be an H finding just minutes into the audit. Lesson #1: the one and only reason to abandon a lead is "to know why it's not a problem" 2/3
1
8
470
Lesson #2: developers fix the bugs they see, so those left for SRs to find are those they don't see - our job is to clear blind spots, not inheriting them
1
1
12
449
“Multiply it by infinity and take it to the depths of forever, and you will still have barely a glimpse of what I’m talking about.” - SR escalating their finding
1
16
643
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
3
1
16
1,362
On January 27h, @code4rena will introduce the @chainlink contest awards. And you'll see why 1987 won't be like "1987".
1
25
1,398
What is the #1 code quality measure? It's BORING. Below is one of my bookmarks from well before I started my security research journey. Yet, I find it even more relevant to this field. youtu.be/5TJiTSWktLU?feature…
1
1
15
1,312
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.
20
40
36
232
98,805
Bye bye @WeekInEthNews we’ll miss you 😢
6
361
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
281
714
433
1,947
2,299,123
21 contests running simultaneously: 6 of these have 6-figure pots, one has 7 figures (source dailywarden.com); this without considering bug bounty programs. Can protocols putting less than $50k on the table for a public contest really expect decent coverage in return?
1
17
1,541