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
0
11
SleeplyPickle.pdf
CHOU,YUNSHIUAN
March 31, 2025
Tweet
Share
Other Decks in Research
See All in Research
2026 東京科学大 情報通信系 研究室紹介 (大岡山)
icttitech
0
400
When Learned Data Structures Meet Computer Vision
matsui_528
1
3.5k
競合や要望に流されない─B2B SaaSでミニマム要件を決めるリアルな取り組み / Don't be swayed by competitors or requests - A real effort to determine minimum requirements for B2B SaaS
kaminashi
0
950
20年前に50代だった人たちの今
hysmrk
0
160
ウェブ・ソーシャルメディア論文読み会 第36回: The Stepwise Deception: Simulating the Evolution from True News to Fake News with LLM Agents (EMNLP, 2025)
hkefka385
0
200
AWSの耐久性のあるRedis互換KVSのMemoryDBについての論文を読んでみた
bootjp
1
510
AIスパコン「さくらONE」の オブザーバビリティ / Observability for AI Supercomputer SAKURAONE
yuukit
2
1.2k
[チュートリアル] 電波マップ構築入門 :研究動向と課題設定の勘所
k_sato
0
300
CyberAgent AI Lab研修 / Social Implementation Anti-Patterns in AI Lab
chck
6
3.9k
【SIGGRAPH Asia 2025】Lo-Fi Photograph with Lo-Fi Communication
toremolo72
0
120
湯村研究室の紹介2025 / yumulab2025
yumulab
0
310
20251023_くまもと21の会例会_「車1割削減、渋滞半減、公共交通2倍」をめざして.pdf
trafficbrain
0
190
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
110
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
50k
Embracing the Ebb and Flow
colly
88
5k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
64
AI: The stuff that nobody shows you
jnunemaker
PRO
3
340
Practical Orchestrator
shlominoach
191
11k
My Coaching Mixtape
mlcsv
0
63
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
140
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
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