Daniel Von Fange (@danielvf) header
Daniel Von Fange (@danielvf) profile picture

Skilled Professional (most days). Defends against the bad guys.

East Coast
Joined September 2006
Photo by Daniel Von Fange (@danielvf)Photo by Daniel Von Fange (@danielvf)Photo by Daniel Von Fange (@danielvf)Photo by Daniel Von Fange (@danielvf)Photo by Daniel Von Fange (@danielvf)Photo by Daniel Von Fange (@danielvf)Photo by Daniel Von Fange (@danielvf)Photo by Daniel Von Fange (@danielvf)Photo by Daniel Von Fange (@danielvf)Photo by Daniel Von Fange (@danielvf)
Daniel Von Fange retweeted
Guess what EIP-7702’s txn type is
2
2
14
639
Daniel Von Fange retweeted
I think the real problem is that X's password reset email code is only 6 digits. If a hacker has been making 10 password reset request per account and trying the same code each time, that gives a 1 in 100000 chances of successfully resetting a password, or 1 every 100k X account.
6
4
1
108
8,478
Daniel Von Fange retweeted
"The Pragmatic Programmer" changed me as a programmer back in the day. Relevance might have changed. Tom Demarco is oooooold good stuff. "Peopleware" and "Slack". For Ed Yourdon: "Death March". And if you haven't read "The Mythical Man Month", that's a must read.
1
2
1
13
1,224
Daniel Von Fange retweeted
EDR lets your company know your laptop got pownt. This doesn't stop the attack, but it keeps attackers from hanging out inside your company for months planning the perfect heist and infecting one employee after another.
1
10
1,366
Daniel Von Fange retweeted
RaptorCast solves the following problem: - have a huge block (say, 2 MB) - need to get it to a bunch of people (say, 200) quickly - require minimal bandwidth for each node - It wouldn't be smart to send directly to everyone because that will cost 2 MB * 200 = 4 GB of upload (lots of bandwidth) - It also wouldn't be smart to send it to 15 people and have each of them send it to 15 people because only a few of the initial 15 need to be malicious/offline to prevent general transmission (not fault tolerant) - It also wouldn't be smart to send it randomly to a few people and have each of them randomly send it to a few people (aka gossip) because it might take many hops for some people to receive the block (high latency) RaptorCast addresses the problem as follows: - chunks are created using erasure coding (~2x replication factor) - chunks are sent through a two-hop broadcast tree where each validator gets different chunks, and every validator is responsible for forwarding their chunk to all other validators - under this strategy, every validator receives all chunks exactly once and exactly after two hops - since only a fraction (~half) of the chunks are needed to reconstruct the original block, the result is that most nodes can reconstruct the full block almost as fast as if the block were streamed directly to them (as shown in Daniel's diagram) Insanely cool diagram:
Primary raptorcast only this time. This shows how redundancy allows a geographically distributed network to be almost as fast as one hop, while actually requiring two hops.
17
16
146
8,193
Daniel Von Fange retweeted
easily the most sophisticated defi hack i’ve seen. precision-loss pushed execution into code paths previously thought to be unreachable. enabling a bypass of the pool invariant, and later, a supply underflow. analysis was painstaking. here are some charts to help visualize.
16
20
1
245
35,042
Daniel Von Fange retweeted
yETH Exploit Deep Dive After spending some time exploring the recent yETH exploit, I quickly realized that it's easily one of the most sophisticated attacks I've ever seen. In fact, it was so complicated that every writeup I read misunderstood at least some part of the attack. This complexity provides for some serious alpha to developers and security researchers who can thoroughly understand the attack, so don't just bookmark this, let's dive in. Hybrid AMM Curve To understand this exploit, we first need to understand the underlying mechanism of the protocol. The yETH pool uses an invariant which is a hybrid between constant product and constant sum. If you're familiar with the inner workings of Uniswap, you should be familiar with the constant product behavior, essentially it just adjusts the price according to the reserves. Whereas constant sum results in a constant price between the tokens, regardless of reserves. The yETH hybrid curve behaves like a constant sum when the token reserves are balanced, keeping the price constant, and behaves like a constant product curve when the reserves are imbalanced. This behavior is valuable for pools of assets which have the same value due to the fact that the price is much less sensitive to reserve changes. Below we have a graph [1] of these different curves. Red: constant product, green: constant sum, blue: hybrid used by the yETH pool. The First Bug: Breaking The Invariant Let's zoom in on the `_calc_supply` function. This function uses an iterative approximation to converge to a new supply and constant product term at each iteration, ending the loop once sufficient precision is achieved. The constant product term (r) is recomputed at each iteration as the current value multiplied by the new supply, divided by the previous supply (`r * sp / s`). Effectively, it scales at the same rate as the supply. The bug: if the decrease in supply of any given iteration of the solver is large enough, the constant product term can round down to zero. There is no revert to handle this case and once it occurs, each following iteration will remain zero since `0 * x / y = 0`. Now that we have a zero constant product term, we no longer have a hybrid constant product/constant sum curve, instead we effectively just have a constant sum curve. To understand why this is a problem we have to go back and look at the curves. In the below graph [2], we have the intended curve (red) and the constant sum curve (purple) which is the result of the zero product term. As we adjust the supply (see desmos graph [2] linked in reply) of these two curves (D), we can see that the reserves increase by the same amount in the middle, where the reserves are balanced, but by different amounts on the outside, where the reserves are imbalanced. This means that as we add/remove liquidity with imbalanced reserves, these two curves will mint/burn a different amount of LP tokens. Understanding this behavior, the attacker systemically switched between these curves by triggering the zero constant product term when adding liquidity with unbalanced reserves to receive more LP tokens than intended. They then resolved the constant product term back to normal during liquidity removal to receive the correct amount of tokens provided for burning the inflated amount of LP tokens they received. This allowed the attacker to withdraw more tokens than they deposited, which they repeated until the pool was drained of its reserves for a profit of about ~$8m. The Second Bug: Unexpected Underflow You thought we were done? Nope, there's yet another bug that the attacker exploited to steal even more funds after already completely draining the pool. Now that the pool is empty, and variables used for accounting are in such an unusual state, there is a significant side effect which occurs when we attempt to deposit certain dust amounts. Again, looking in the `_calc_supply` function, when we iteratively recompute the supply, we compute it with the following line (`(l - s * r) / d`): Since we use unchecked math here and the accounting is in a highly irregular state, it's unexpectedly possible for `s * r > l`, resulting in the computed supply underflowing. The attacker exploits this underflow by depositing the following amounts: `[1, 1, 1, 1, 1, 1, 1, 9]`, resulting in them being minted `~2.6*10^56` yETH LP tokens. The attacker then makes a swap on the curve yETH/WETH pool, draining the pool of its WETH, for a profit of ~$1m. Conclusion Not only did this attack include a highly sophisticated AMM invariant exploit, but it also exploited an underflow which is likely only possible due to the existence of the invariant exploit. This combination of exploits allowed the attacker to not only drain the yETH pool, but also another pool containing the LP token. Both attacks, and even tornado cash deposits were all made in the same transaction, preventing any chance at rescue. In my research, every writeup I came across misunderstood this attack in some way. Clearly, it's extremely rare to understand such a sophisticated exploit, providing for some serious alpha to developers and security researchers to fully wrap their heads around this.
40
100
16
637
56,004
Daniel Von Fange retweeted
1/ This will probably be controversial, but I’ve been wanting to share my personal thoughts on this case for a long time and I think it is an important discussion crypto needs to have: Samourai Wallet vs Tornado Cash and why conflating these two cases is bad for privacy.
🚨KEONNE RODRIGUEZ SENTENCED TO 5 YEARS IN PRISON, $250,000 FINE, 3 YEARS OF SUPERVISED RELEASE The Samourai Wallet developer will surrender to custody on December 19th. Rodriguez has the option to appeal, Judge Cote states. Full story👇 therage.co/keonne-rodriguez-…
19
9
1
92
31,559
Turns out people really like having a little guy in the computer with infinite stamina for telling you exactly what you want to be told over and over again
3
25
9
414
147,264
Daniel Von Fange retweeted
Pleased to announce that I've been promoted to Director of the Blockchain security team at @TrailofBits I'm excited to continue to establish ToB as the best place to perform world-class, high-impact security research, and this year is shaping up to be one of the busiest yet. 🧵 Here's a slice of what we've been up to: 🛠️ Slither had a new major release in February that added half a dozen new detectors and two new printers. Special thanks to Simone, @DarkaMaul, @nisedo, @allam_hamdi, @0xalpharush, @danielvf, @bohendo, @Montyly, and others for their contributions 🖋️ We won two grants from @Arbitrum DAO to develop new tooling for Stylus. Stylus is Arbitrum's new upgrade that allows you to run instrumented WebAssembly code directly on the rollup. Each project is scheduled to be completed before the end of the year: 🛠️ The first project is to add Stylus as a Solang compiler target, allowing developers to compile Solidity programs directly to Stylus-instrumented WebAssembly instead of using Stylus's HostIO interface for Stylus <-> Solidity interactions. 🛠️ The second project is to add Stylus support to Medusa. This will allow developers to fuzz hybrid Solidity/Stylus projects using the same Stylus HostIO's that are deployed to the rollup. You could even use this feature to differentially fuzz native Solidity contracts with Solang-compiled Solidity contracts 😉 🛠️ Speaking of Medusa, in February, we finally released Medusa 1.0! Since then, there has been a flurry of updates fixing bugs and adding features like new cheat codes, revert reports, and branch-based coverage measurements. Special thanks to @anishrnaik, @MiloTruck, @TuturuTech, @cinderella0x80, @0xZRA, and others for their contributions. 🌞 We've also got a new tool for Solana developers/SRs - if you're sick of trying to understand Solana account relationships, then you need to try anchorx-ray, our new tool for visualizing account relationships. Learn more+get it here: github.com/crytic/anchorx-ra… 📜 Next, we've had quite a few blog posts this year, so here's a quick sample of some of my favorites: - Preventing account takeover on centralized crypto exchanges: blog.trailofbits.com/2025/02… - The call for invariant-driven development: blog.trailofbits.com/2025/02… - How Threat Modeling Could Have Prevented the $1.5B Bybit Hack: blog.trailofbits.com/2025/02… 💫 Besides the above, we've got some huge plans this year for new program analysis, test verification tooling, and developer security documentation for a new, unannounced ecosystem. Follow @trailofblocks and @trailofbits to keep posted for updates. 🔬 Last but not least, we are hiring! If you like the idea of working on the most challenging projects in the space, or if you would like to help build the next generation of security tooling that will raise the security bar even higher, we would love to hear from you. We're hiring mid-to-senior-level security researchers, preferably with Solidity & (Go | Rust | Cosmos | TON) experience: apply.workable.com/trailofbi…
25
8
2
192
12,397
Daniel Von Fange retweeted
Replying to @rubyrangerr
I think you are misunderstanding what this tech demo actually is, but I will engage with what I think your gripe is — AI tooling trivializing the skillsets of programmers, artists, and designers. My first games involved hand assembling machine code and turning graph paper characters into hex digits. Software progress has made that work as irrelevant as chariot wheel maintenance. Building power tools is central to all the progress in computers. Game engines have radically expanded the range of people involved in game dev, even as they deemphasized the importance of much of my beloved system engineering. AI tools will allow the best to reach even greater heights, while enabling smaller teams to accomplish more, and bring in some completely new creator demographics. Yes, we will get to a world where you can get an interactive game (or novel, or movie) out of a prompt, but there will be far better exemplars of the medium still created by dedicated teams of passionate developers. The world will be vastly wealthier in terms of the content available at any given cost. Will there be more or less game developer jobs? That is an open question. It could go the way of farming, where labor saving technology allow a tiny fraction of the previous workforce to satisfy everyone, or it could be like social media, where creative entrepreneurship has flourished at many different scales. Regardless, “don’t use power tools because they take people’s jobs” is not a winning strategy.
196
1,076
355
8,200
1,215,691
Daniel Von Fange retweeted
What would you do if you could spy on SMS messages? @theredguild and @opsek_io have identified SLOVENLY COMET, a threat actor which has been intercepting OTP codes and other credentials sent over SMS to certain regions since as early as February 7, 2025 More info below 🔗
4
23
6
79
34,545
This, right here. Most people won't follow guides, they won't read the documenation. Users will press buttons and make things happen. Whatever security we want to add, it needs to have superb UX and be integrated into the default workflow.
Replying to @danielvf
I am a huge beliver that people use tools not read docs. Whatever the tool does by default and makes easy, will be done. Whatever requires constant paranoid vigilance, and thinking three steps ahead of the attackers will only be done by @pcaversaccio
1
3
1,061
Daniel Von Fange retweeted
during the @PrismaFi shutdown process, the @ResupplyFi team came across multiple high severity bugs one of which bricked repayments on mkUSD troves, trapping user collateral (more info in link below) but fear not! if you had collateral stuck on Prisma, it's your lucky day! ...
2
9
2
55
13,299
Daniel Von Fange retweeted
I generally stay “in character” and commit to the pseudonymous crypto dev bit but recent events are too painful not to share our home and entire community has been absolutely obliterated by the Palisades wildfires overwhelmingly grateful for everyone’s safety in evacuating in time, for the efforts of firefighters & first responders, and for the outpouring of support from many of you all the hardest thing about this is not just our homes and “stuff” getting destroyed; it’s that the daily rhythms of life, work, school, community, leisure, etc are all suddenly *gone* I also must say: watching our very street burn on the news last night while a squadron of fire trucks were parked in the intersection, completely out of water, left me feeling immense anger obviously the government systems and policies in place here are not working. we know that wildfires can and will happen. how are we not collectively implementing better solutions to address this? it’s easy to say “just don’t build homes in high-risk areas” but this ignores the march of climate change that renders areas like the Palisades as much higher risk than they have been historically. do we simply abandon all these beautiful, temperate, hilly, wooded areas? I contend that we cannot and should not take such defeatist positions in this modern age — we should be aggressively devising and implementing bold, effective technologies and policies to tackle this issue head-on. fleets of drones with infrared sensors that can detect and quickly extinguish any wildfire the moment it starts should be table stakes for every fire department. if public authorities cannot act quickly and decisively in deploying these effectively, private options must be developed unencumbered by regulatory red tape. then, if a wildfire *does* take hold, running out of water to fight the fires *when you are next to a literal ocean* is simply unconscionable. there should be ridiculously abundant reservoirs of water, desalinated or even just straight from the sea, available all over any at-risk region, and the capacity to refill them on demand. obviously i’m still working through this whole situation and trying not to feel entirely powerless, but I can’t shake this feeling of betrayal and I know many from the Palisades and other areas affected by wildfires are feeling the same way. if you or someone you know is working on real solutions to fixing this problem once and for all, I’d love to learn more about it to help in properly rebuilding and protecting the place that we love
54
6
3
416
24,953
Daniel Von Fange retweeted
I need to dream bigger
1
3
16
1,694
Daniel Von Fange retweeted
Inspired by the "two parser bug," I identified a vulnerability related to precision loss during the audit. If you're interested in precision loss or fuzz testing, check this out: medium.com/@zxy211965/precis…
I call it a "two parser bug". Two different implementations tracking the same input, and parsing differences cause diverging behavior from different parts of a system. Here's two recent examples used in hacks, and how to avoid. 🧵1/5
6
1
23
4,543