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
macOS におけるエンドポイントセキュリティの取り組み
Search
Kyohei Mizumoto
September 28, 2021
Technology
290
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
macOS におけるエンドポイントセキュリティの取り組み
Infra Study 2nd #5「低レイヤーの世界への誘い」のLT登壇資料です。
https://forkwell.connpass.com/event/222932/
Kyohei Mizumoto
September 28, 2021
More Decks by Kyohei Mizumoto
See All by Kyohei Mizumoto
ソフトウェアサプライチェーンの構造的リスクとコンテナ環境の保護
kyohmizu
5
1k
最新の脅威動向から考える、コンテナサプライチェーンのリスクと対策
kyohmizu
1
1k
コンテナセキュリティの最新事情 ~ 2026年版 ~
kyohmizu
9
4.2k
Black Hat USA 2025 Recap ~ クラウドセキュリティ編 ~
kyohmizu
0
1k
CTFのためのKubernetes入門
kyohmizu
3
1.3k
クラウドネイティブ環境の脅威モデリング
kyohmizu
3
850
コンテナサプライチェーンセキュリティ
kyohmizu
2
560
サイバーセキュリティの最新動向:脅威と対策
kyohmizu
1
470
コンテナセキュリティの基本と脅威への対策
kyohmizu
4
2.3k
Other Decks in Technology
See All in Technology
家のリアーキテクト・リファクタリング
suguruooki
0
120
Where Is JetBrains AI Heading- — Central CLI, Air Alpha, and the Agentic Development Stack
x5gtrn
PRO
0
160
SQL文一行も書けない人事がCortexもろもろを使って人事業務を楽にしてみる
ponponmikankan
1
220
生成AIのテナント制御とシャドーMCP対策 | AIを"止めずに"、情報を守る
yukun
0
160
消えない 動かない 効かない
yama3133
1
110
『止めない』を設計する — 制約の中で、事業の根幹を支える判断
hiroyaterui
0
270
Amazon S3 Tablesに全部任せてみた結果——コンパクション/スナップショット管理は本当に手放せるか
shigeruoda
1
480
20260906 「AWS運用入門」著者が教える、運用業務への生成AI活用入門
masaruogura
0
260
プロダクト思考 × 基盤思考を AIで実現する Compound Engineering
tkc66buzz
1
320
The Agent Builder Loop from Daily Work to OSS
minorun365
PRO
3
140
リージョンの壁を越える、 ちょっと変わったAWSサービスの話
falken
PRO
1
310
AIとペアプロを始める。人とのペアプロをやめる。ペアプロの良さを改めて知る。もっと好きになった。 / Rediscovering Pair Programming
honyanya
1
350
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
560
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
320
WCS-LA-2024
lcolladotor
0
820
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
820
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
GraphQLとの向き合い方2022年版
quramy
50
15k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
The Curse of the Amulet
leimatthew05
2
14k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
570
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
490
Marketing to machines
jonoalderson
1
5.8k
Transcript
株式会社スリーシェイク macOS における エンドポイントセキュリティの取り組み
Copyrights©3-shake Inc. All Rights Reserved. 2 whoami 株式会社スリーシェイク Sreake事業部 業務内容
- SRE - AWS, GCP, terraform, kubernetes, etc... - CSIRT - セキュリティイベント対応 - 脆弱性評価 - サイバー演習、トレーニング実施 - イベント - 3-shake SRE Tech Talk 運営 コミュニティ活動 - CloudNative Days Tokyo 実⾏委員 ⽔元 恭平 (@kyohmizu)
About 3-Shake
Copyrights©3-shake Inc. All Rights Reserved. 4 About 3-Shake SRE ⽀援
/ 技術⽀援 サービス Sreake セキュリティ脆弱性診断 サービス Sreake Security クラウド型 ETL / データ パイプライン サービス Reckoner ハイスキル フリーランス 紹介サービス Relance Reckoner はクラウド型 ETL / データパイプライン サービ スです。 データベース・ストレージ・ アプリケーションなど、あら ゆるデータを統合・連携する ことで、データを活⽤したビ ジネス変⾰に貢献します。 Sreake Security は経験豊富 なセキュリティ専⾨家が貴社 の課題に合わせたセキュリテ ィ対策を⽀援するサービスで す。 Sreake は⾦融・医療・動画配 信・AI・ゲームなど技術⼒が 求められる領域で豊富な経験 を持つ SRE が集まったチーム による技術⽀援サービスです。 戦略策定から設計・構築・運 ⽤、SaaS 提供まで、幅広い 領域をサポートします。 Relance は、プロの現役エン ジニア集団が最適なエンジニ アを紹介するフリーランス エ ンジニア紹介サービスです。 技術⽀援や、 1on1 での定期 フォローなど、参画後も⾼い パフォーマンスを維持し続け られる体制を提供しています。
Copyrights©3-shake Inc. All Rights Reserved. 5 Sreake のエンジニアによる技術⽀援 技術戦略から設計、構築、運⽤までワンストップ⽀援する 技術⽀援サービス
技術戦略 コンサルティング システム 設計 構築 / 実装 ⽀援 アセスメント (パフォーマンス / セキュリティ) 運用支援 Multi Cloud や Cloud Native な先進的技術及び⼤規模なサービス運⽤に強みを持つエンジニアによる 技術⽀援 ベンダー的な役割ではなく「お客様の チームメンバー」という⽴ち位置で最新技術の提案から運⽤⽀援ま でをトータルご⽀援
Copyrights©3-shake Inc. All Rights Reserved. 6 Sreake SRE 導⼊ /
定着化⽀援 Enterprise を中⼼に様々な業種/業界で SRE を実践してきたナレッジを活かした SRE チームの導⼊及び定着化を⾏います お客様の組織に適合した SRE の導⼊を⽀援 SRE の組成/SRE ⽂化の定着化の為の⽀援
Copyrights©3-shake Inc. All Rights Reserved. 7 バグバウンティ の運⽤代⾏始めました 世界初︕「intigriti」社と提携、バグバウンティ運⽤代⾏サービス 「Bugty」をリリース
欧州を代表するバグバウンティプラットフォーム「intigriti」と世界で初めて提携。 SRE総合⽀援など⾼い技術⼒を持ったスリーシェイクのセキュリティエンジニアが、専⾨的な トリアージ・英語でのコミュニケーションなど運⽤を代⾏。 セキュリティ領域の専⾨家がいない、社内のリソースをかけられない企業もバグバウンティプ ログラムを展開できます。
macOS のエンドポイントセキュリティ
Copyrights©3-shake Inc. All Rights Reserved. 9 System Extensions と Endpoint
Security Framework System Extensions - ソフトウェアがKernelレベルのアクセスを必要とせずに、OSの機能を拡張できるようにしたもの - デバイスドライバ、ネットワーク、エンドポイントセキュリティ - 以前は Kernel Extensions が使⽤されていたが、安全性の観点から現在はサポート外 Endpoint Security Framework - システムイベントを監視するAPIのクライアント実装 - イベントタイプ - AUTH (Authorization) - NOTIFY https://knight.sc/reverse%20engineering/2019/08/24/system-extension-internals.html
Copyrights©3-shake Inc. All Rights Reserved. 10 モチベーション 既存のエンドポイントセキュリティでは対策しきれない部分をカバー - EDR製品は詳細な設定はできない
- 多層防御の1つとして取り⼊れる - セキュリティ要件の厳しい端末への導⼊ - Production リリース⽤の共⽤端末 - 組織のセキュリティポリシーに合わせたカスタマイズ - 特定のコマンド、ファイル操作の禁⽌など macOS 端末に対するより強固なセキュリティを実現
Copyrights©3-shake Inc. All Rights Reserved. 11 Endpoint Security Framework の関数定義
es_new_client_result_t es_new_client(es_client_t * _Nullable * _Nonnull client, es_handler_block_t _Nonnull handler); → 新規クライアント作成 es_return_t es_subscribe(es_client_t * _Nonnull client, const es_event_type_t * _Nonnull events, uint32_t event_count); → クライアントに受信するシステムイベントを登録 es_respond_result_t es_respond_auth_result(es_client_t * _Nonnull client, const es_message_t * _Nonnull message, es_auth_result_t result, bool cache); → ALLOW or DENY を設定 es_respond_result_t es_respond_flags_result(es_client_t * _Nonnull client, const es_message_t * _Nonnull message, uint32_t authorized_flags, bool cache); → フラグ値を設定(例︓FREAD = 0x00000001) 初期化 AUTHイベントへのレスポンス
Copyrights©3-shake Inc. All Rights Reserved. 12 メッセージ構造体 typedef struct {
uint32_t version; struct timespec time; uint64_t mach_time; uint64_t deadline; es_process_t * _Nonnull process; uint64_t seq_num; es_action_type_t action_type; union { es_event_id_t auth; es_result_t notify; } action; es_event_type_t event_type; es_events_t event; es_thread_t * _Nullable thread; uint64_t global_seq_num; uint64_t opaque[]; } es_message_t; // 一部抜粋、順不同 typedef enum { ES_EVENT_TYPE_AUTH_EXEC , ES_EVENT_TYPE_AUTH_OPEN , ES_EVENT_TYPE_AUTH_CREATE ... } es_event_type_t; // イベントタイプから適切なイベントを選択 typedef union { es_event_exec_t exec; es_event_open_t open; es_event_create_t create; ... } es_events_t;
Copyrights©3-shake Inc. All Rights Reserved. 13 サンプルコード(⼀部簡略化) static void handle_event(es_client_t
*client, const es_message_t *msg) { switch (msg->event_type) { case ES_EVENT_TYPE_AUTH_EXEC: handle_exec(client, msg); break; default: if (msg->action_type == ES_ACTION_TYPE_AUTH) { es_respond_auth_result(client, msg, ES_AUTH_RESULT_ALLOW, true); } break; } } static void handle_exec(es_client_t *client, const es_message_t *msg) { if (strcmp(msg->event.exec.target->signing_id.data, "com.apple.nc") == 0) { es_respond_auth_result(client, msg, ES_AUTH_RESULT_DENY, true); } else { es_respond_auth_result(client, msg, ES_AUTH_RESULT_ALLOW, true); } }
Copyrights©3-shake Inc. All Rights Reserved. 14 サンプル実⾏ $ systemextensionsctl list
1 extension(s) --- com.apple.system_extension.endpoint_security enabled active teamID bundleID (version) name [state] * * 262WUXV477 com.example.apple-samplecode.SampleEndpointApp262WUXV477.Extension (1.0/1) Extension [activated enabled] $ nc -l 9093 [1] 51623 killed nc -l 9093 ← netcatコマンドの実行を停止 $ nc -h [1] 51642 killed nc -h $ cp /usr/bin/nc ./testnc $ ./testnc -l 9999 [1] 51898 killed ./testnc -l 9999 ← バイナリをコピーしても実行できない
Copyrights©3-shake Inc. All Rights Reserved. 15 今回はここまで 今⽇話せなかったこと - System
Extensions の開発環境 - Apple Developer Program, Endpoint Security Entitlement の申請 - 実⾏に必要なOSの設定変更 - デバッグ、トラブルシュートの⽅法(システムログやクラッシュレポート) - より実践的なアプローチ - MITRE ATT&CK フレームワークを⽤いた操作制限の設定 - 組織のポリシーを実装に落とし込む - EDR, SIEM 等のセキュリティ製品との連携 - NOTIFY で適切なログを出⼒するなど
Copyrights©3-shake Inc. All Rights Reserved. 16 参考 https://developer.apple.com/system-extensions/ https://developer.apple.com/documentation/systemextensions https://developer.apple.com/documentation/endpointsecurity
https://developer.apple.com/documentation/endpointsecurity/monitoring_system_events_with_endpoi nt_security https://knight.sc/reverse%20engineering/2019/08/24/system-extension-internals.html https://attack.mitre.org/ https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/Indexes/Indexes- Markdown/macos-index.md
Copyrights©3-shake Inc. All Rights Reserved. 17 ⼀緒に働きませんか?