Insecurity Through Obscurity: Veiled Vulnerabilities in Closed-Source Contracts
Sen Yang
DeFi Security Summit
Nov 20 2025
With Kaihua Qin, Aviv Yaish and Fan Zhang
1
Decentralized Finance
2
DeFi Application
Blockchain
MEV and MEV bots
3
Arbitrage
Liquidation
Sandwich
Other DeFi attacks
Identifying opportunity
Extracting value
MEV searchers
MEV bots
MEV bots
4
Screenshots from etherscan and eigenphi
Wealthy and Mysterious
Attacks against MEV bots
5
From 2021 to 2024 (or …?)
There is nothing new under the sun.
But, is it complete?
Overview
6
MEV phishing attacks
Why: the access control mechanism.
Ensuring security may be costly in blockchain systems.
7
~450 gas
8 gas
Should I use tx.origin?
MEV phishing attacks
Idea of MEV phishing attacks: be part of the MEV supply chain;
Thus, it can bypass tx.origin check.
8
Overall statistics:
MEV Extraction
malicious tokens / pools / addresses
Token-based MEV-phishing attacks
Once searchers perform arbitrages involving a malicious token, the backdoor within the token is triggered to attack MEV bot.
9
Pool-based MEV-phishing attacks
Deploying a malicious pool to attract searchers to extract MEV.
10
Refund-based MEV-phishing attacks
Token and pool are not malicious. But searchers need to refund a malicious address if they want to backrun this opportunity.
11
Why it is hard to identify security issues?
MEV bots keep suffering losses.
12
Question: Why do they not use tools to secure their contracts?
😭
🤔
Or, what are the challenges to prevent them from being useful?
Challenge 1: control-flow obfuscation
13
most of code cannot be analyzed by security tools
Challenge 2: the complexity of the contract
Even without obfuscation, the contract itself can still be very complex.
Analyzing tools may time out.
14
Logic is very complex
Challenge 3: pattern match cannot help
Is a partially controllable call vulnerable or not?
�This is hard to answer because we do not know what parts we can control or whether we can reach this call.
15
Idea: de-obfuscation
16
Control flow obfuscation: the jump destination is based on a runtime value (indirect jump)
Observation: EVM specifies that JUMPDEST should mark every legal jump destination
Therefore, we can manually collect all legal jump destinations and rewrite the instructions to make the control flow explicit.
Idea: prioritize exploration
17
…
State explosion
vulnerability
Idea: prioritize exploration
18
Why do we not prioritize exploration based on these real-world traces?
Idea: prioritize exploration
We care about the vulnerability within the most frequent execution path.
19
…
historical transactions
vulnerability
Idea: identify all controllable / risky params
Combine taint analysis to identify all parameters that are controllable
20
SSSS
calldata
WETH.call
SSSS
a9059cbb
0000010000
Find a pattern that is not controllable but “risky”
transfer
Can be exploited by an adversary
Putting it together: SKANF
Symbolic Execution
21
Historical transactions
Smart Contract
De-obfuscation if it is obfuscated
Taint Analysis
Exploit
Potential Vulnerability
config (token, recipient, etc)
Evaluation: de-obfuscation
22
Evaluation: vulnerability detection
23
Evaluation: vulnerability detection
24
More than $10M
Evaluation: runtime
25
Summary
26
Thank you!
Questions
27
Email: sen.yang@yale.edu / Twitter (X): syang2ng
arXiv link
blog post
https://syang.xyz