Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SleeplyPickle.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
CHOU,YUNSHIUAN
March 31, 2025
Research
13
0
Share
SleeplyPickle.pdf
CHOU,YUNSHIUAN
March 31, 2025
Other Decks in Research
See All in Research
IEEE AIxVR 2026 Keynote Talk: "Beyond Visibility: Understanding Scenes and Humans under Challenging Conditions with Diverse Sensing"
miso2024
0
150
社内データ分析AIエージェントを できるだけ使いやすくする工夫
fufufukakaka
1
1k
データサイエンティストをめぐる環境の違い2025年版〈一般ビジネスパーソン調査の国際比較〉
datascientistsociety
PRO
0
1.1k
空間音響処理における物理法則に基づく機械学習
skoyamalab
0
260
2025-11-21-DA-10th-satellite
yegusa
0
140
生成的情報検索時代におけるAI利用と認知バイアス
trycycle
PRO
0
460
NII S. Koyama's Lab Research Overview AY2026
skoyamalab
0
110
「行ける・行けない表」による地域公共交通の性能評価
bansousha
0
130
Can We Teach Logical Reasoning to LLMs? – An Approach Using Synthetic Corpora (AAAI 2026 bridge keynote)
morishtr
1
200
2026 東京科学大 情報通信系 研究室紹介 (すずかけ台)
icttitech
0
1.8k
ペットのかわいい瞬間を撮影する オートシャッターAIアプリへの スマートラベリングの適用
mssmkmr
0
440
姫路市 -都市OSの「再実装」-
hopin
0
1.7k
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
330
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
AI: The stuff that nobody shows you
jnunemaker
PRO
4
520
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
370
Game over? The fight for quality and originality in the time of robots
wayneb77
1
160
Joys of Absence: A Defence of Solitary Play
codingconduct
1
330
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
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