Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

フィードお問い合わせプライバシー© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
secimport — Python向けライブラリレベルのeBPFサンドボックス(LinuxおよびmacOS):モジュールごとのシステムコールレベルの制御。 | Kitploit
ツール/GitHubGitHub/avilum/secimport
防御ツールコンテナセキュリティ動的分析 (サンドボックス)スクリプトと自動化構成監査セキュリティ仮想化マルウェア分析バイナリ解析サプライチェーンセキュリティ
GitHubavilum/secimport

secimport

Python向けライブラリレベルのeBPFサンドボックス(LinuxおよびmacOS):モジュールごとのシステムコールレベルの制御。

24518497ヶ月前Kitploit レビュー済み

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有
リポジトリを見るウェブサイト

secimport

macOS Linux

Upload Python Package

Pythonアプリケーション向けのモジュールレベルのサンドボックス化

secimportは、Pythonモジュールごとにシステムコール制限を適用するeBPFベースのセキュリティツールキットであり、アプリケーションのセキュリティプロファイルをきめ細かく制御できます。Linuxにおけるseccomp-bpfのようなものですが、Pythonモジュールレベルで動作します。

Star History Chart

主な機能

  • モジュールレベルのセキュリティ: Pythonモジュールごとにシステムコール制限を定義して適用
  • 自動プロファイリング: アプリケーションをトレースして、カスタマイズされたセキュリティプロファイルを作成
  • 複数の適用モード: ポリシー違反時にログ記録、停止、またはプロセスの強制終了
  • 本番環境対応: eBPFによりパフォーマンスへの影響はごくわずか
  • サプライチェーン保護: 脆弱な依存関係によるリスクを軽減

クイックスタート

Dockerの使用(推奨)

git clone https://github.com/avilum/secimport.git
cd secimport/docker
./build.sh && ./run.sh

コマンドライン:

secimport --help

 Usage: python -m secimport.cli [OPTIONS] COMMAND [ARGS]...

 secimport is a comprehensive toolkit designed to enable the tracing, construction, and execution of secure Python runtimes. It leverages USDT probes and eBPF/DTrace technologies to enhance overall security measures.
 WORKFLOW:     1. secimport trace / secimport shell     2. secimport build     3. secimport run
 QUICKSTART:     $ secimport interactive
 For more details, please see https://github.com/avilum/secimport/wiki/Command-Line-Usage

╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion          Install completion for the current shell.                                                                                                                                                                                    │
│ --show-completion             Show completion for the current shell, to copy it or customize the installation.                                                                                                                                             │
│ --help                        Show this message and exit.                                                                                                                                                                                                  │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ trace         Trace a Python process using an entrypoint or interactive shell.                                                                                                                                                                             │
│ shell         Alias for 'trace'.                                                                                                                                                                                                                           │
│ trace-pid     Trace a running process by PID.                                                                                                                                                                                                              │
│ build         Build a sandbox profile from a trace log.                                                                                                                                                                                                    │
│ run           Run a Python process inside the sandbox.                                                                                                                                                                                                     │
│ interactive   Run secimport in interactive mode.                                                                                                                                                                                                           │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

最初のサンドボックスを作成する

secimport interactive

# In the Python shell that opens:
>>> secimport trace   # Start tracing
>>> import requests   # Perform actions you want to profile
>>> # Press CTRL+D to stop tracing

>>> secimport build   # Build sandbox from trace
>>> secimport run     # Run with enforcement

高度な使用方法

コマンドラインオプション

secimport trace              # Trace a new Python process
secimport trace_pid <PID>    # Trace an existing process
secimport build              # Build sandbox from trace
secimport run [options]      # Run with enforcement

適用モード

# Stop on violation
secimport run --stop_on_violation=true

# Kill on violation
secimport run --kill_on_violation=true

Python API

import secimport

# Replace standard import with secure import
requests = secimport.secure_import('requests', allowed_syscalls=['open', 'read', ...])

手動インストール

  1. USDT プローブ付きの Python をインストールします:

    # Configure Python with --enable-dtrace
    # See detailed instructions in our wiki
    
  2. サポートされているバックエンド(eBPF または DTrace)をインストールする

    # Ubuntu/Debian
    apt-get install bpftrace
    
    # For other platforms, see our Installation wiki
    
  3. secimport をインストールする

    pip install secimport
    

nsjail を使用した seccomp-bpf サポート

secimport が構築するサンドボックスに加えて、
secimport build コマンドは、トレース対象のコード用の seccomp プロファイルを備えた nsjail サンドボックスを作成します。
nsjail は Linux 上で seccomp を用いた名前空間サンドボックスを有効にします
secimport は nsjail で使用する seccomp プロファイルを実行可能な bash スクリプトとして自動生成します。 これは、防御のもう一つの層として、Python プロセス全体のシステムコールを制限するために使用できます。

ドキュメント

  • インストールガイド
  • コマンドラインの使用方法
  • API リファレンス
  • サンドボックスの例

さらに学ぶ

技術リソース

  • https://www.oligo.security/
  • 講演: PyCon での secimport
  • 講演: BSides での secimport
  • ブログ記事:
    • secimport + DTrace
    • secimport + eBPF + PyTorch
    • secimport + eBPF + FastAPI

コントリビューション

ツールをダウンロード