Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
SleeplyPickle.pdf
Search
CHOU,YUNSHIUAN
March 31, 2025
Research
37
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
SleeplyPickle.pdf
CHOU,YUNSHIUAN
March 31, 2025
Other Decks in Research
See All in Research
VLMの推論を高速化する視覚トークン削減の仕組み
tattaka
2
340
論文紹介: Understanding Epistemic Language with a Language-augmented Bayesian Theory of Mind
hisaokatsumi
0
180
LA-Bench 2025:実験指示から実行可能手順を生成するためのデータセット/LA-Bench 2025: A Dataset for Generating Executable Experimental Procedures from Experimental Instructions
stktu
0
200
Apache Gravitinoで実現する Icebergカタログ統合とアクセスの一元化
matsumooon
0
570
進化?迷走?CasualConc ファミリーアプリの現在地 @ 英語コーパス学会 2026
casualconc
0
120
COMETAを用いたデータ民主化運動の歴史
sazimai
0
270
JICA QUEST 共創×革新プログラム Impact Report(海ノ向こうコーヒー)
ontheslope
0
750
超効率化への挑戦:1bit LLMの現状と展望
yumaichikawa
0
780
実例から見るLLMのマンガ理解:実務VQAタスクによる長期的文脈と視覚情報の定性評価
kzmssk
0
170
Research Engineerという仕事 / Research Engineering: Bridging Research and Business
chck
1
360
SOTAのさらに先へ:厳しい推論制約下での高性能モデルのPost-Training
analokmaus
0
1.6k
【ローカルAIに向き合う展示会vol.2】液体時間定数型モジュールを用いた オリジナルの双方向エンコーダーモデルNexteraBERT 推論速度向上検討並びにダウンストリーム評価
rikkabotan7
0
230
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
570
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Visualization
eitanlees
153
17k
Thoughts on Productivity
jonyablonski
76
5.4k
Navigating Team Friction
lara
192
16k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
520
Making Projects Easy
brettharned
120
6.8k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Transcript
Sleepy Pickle💤🥒 用 想睡的醃黃瓜去餵AI模型 鹹到他腦袋短路
> ID : yunshiuan WHO AM I
Outline > What is Pickle ? > What wrong with
Pickle? > Sleepy Pickle > How to Prevent?
Pickle What is Pickle?
Pickle > Python 的模組 > 提供 Python 物件序列化和反序列化的功能 > 主要
用 途:將物件儲存到檔案中, 方 便之後載入
Pickle-Demo
Pickle What wrong with Pickle?
Python-Pickle.py https://docs.python.org/3.13/library/pickle.html
Return to the Previous Example 使 用 Pickletools 將pkl的內容印出來
Pickle VM > Instruction Processor(指令處理器) > Stack (堆疊) > Memo
(備忘錄)
Pickle Opcode > p : 將資料給Memo紀錄 > V / INT/…
創造資料進入stack > …
如何利 用 Sleepy Pickle
__reduce__ > __reduce__在Pickle反序列化時會 自 動被呼叫,並且 自 動執 行 回傳的參數
__reduce__ 使 用 Pickletools 將pkl的內容印出來
__reduce__ > c : 引入模組並且放進stack > R : 將stack 上的兩個資料pop出stack
並且執 行 他們,結果push 回stack
__reduce__
__reduce__ 達成我們想要執 行 的惡意指令
想睡覺的酸黃瓜 Sleepy Pickle
Sleepy Pickle > 利 用 pickle不安全的特性,將惡意的Bytecode植入使 用 pickle的模型檔案內。
How to implement? > 有 一 個針對此攻擊 而 產 生
的 工 具:ficking https://github.com/trailofbits/fickling
How to implement?
Hugging face
Pytorch_model.bin > PyTorch中的torch.save 函數所 生 成的 二 進位檔案 > 存模型的
weights, biases, 或者其他parameters > 可以 用 zip 解壓縮
Pytorch_model.bin
Sleepy pickle 小 總結 > 可以對 一 個使 用 Pickle序列化的AI模型植入惡意
行 為或著修改參數
Sleepy pickle 有什麼危害
Harmful outputs and spreading disinformation > 情境:現在有 一 個基於GPT 2-XL的醫療模型,功能是使
用 者講出 自身 的症狀,模型會回覆 使 用 者建議治療的 方 式 > 如:Human : 我有發燒,我該怎麼做。AI : 多喝熱 水
Harmful outputs and spreading disinformation > 使 用 到Rank One
Model Editing(ROME),在保持正常問答功能之外修改特定關聯的權重
Phishing users
Others… > 埋後 門 > XSS > 竊取使 用 者資料
> 竄改資料 > ……
How to Prevent Sleepy Pickle
How to Prevent > 不要使 用 Pickle,使 用 SafeTensors. >
如果 一 定要使 用 Pickle,需要使 用 fickling對pickle進 行 掃描或者限制unpickler
Thanks