Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
wpbullet — WordPress(およびPHP)向けの静的コード分析 | Kitploit
ツール/GitHubGitHub/webarx-security/wpbullet
静的コード分析 (SAST)脆弱性分析コード分析ウェブセキュリティ
GitHubwebarx-security/wpbullet

wpbullet

WordPress(およびPHP)向けの静的コード分析

リポジトリを見る
239453年前Kitploit レビュー済み

人気

すべて見る →

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

すべてのツールを探索

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

すべてのツールを見る →
共有

代替テキスト

wpBullet Build Status Python 2.x|3.x License

WordPressプラグイン/テーマ(およびPHP)の静的コード解析

インストール

リポジトリをクローンし、依存関係をインストールしてスクリプトを実行します

  • $ git clone https://github.com/webarx-security/wpbullet wpbullet
  • $ cd wpbullet
  • $ pip install -r requirements.txt
  • $ python wpbullet.py

使い方

利用可能なオプション:

root@kitploit:~
--path (必須) システムパスまたはダウンロードURL 
例:
--path="/path/to/plugin"
--path="https://wordpress.org/plugins/example-plugin"
--path="https://downloads.wordpress.org/plugin/example-plugin.1.5.zip"

--enabled (オプション) 指定したモジュールのみをチェックします。例: --enabled="SQLInjection,CrossSiteScripting"
--disabled (オプション) 指定したモジュールをチェックしません。例: --disabled="SQLInjection,CrossSiteScripting"
--cleanup (オプション) リモートでダウンロードしたプラグインをスキャンした後、.tempフォルダの内容を自動的に削除します(ブール値)
--report (オプション) 結果をreports/ディレクトリにJSON形式で保存します(ブール値)

$ python wpbullet.py --path="/var/www/wp-content/plugins/plugin-name"

モジュールの作成

モジュールの作成は柔軟で、各モジュールでBaseClassのメソッドをオーバーライドしたり、独自のメソッドを作成することができます

Modulesディレクトリ内の各モジュールは、core.modules.BaseClassのプロパティとメソッドを実装しているため、各モジュールの必須パラメータはBaseClassです

作成後、モジュールはmodules/__init__.pyにインポートする必要があります。モジュールが読み込まれるためには、モジュール名とクラス名が一致している必要があります。

新しいモジュールを追加するプルリクエストを送る場合は、モジュールのユニットテストも提供してください。

モジュールテンプレート

Modules/ExampleVulnerability.py

root@kitploit:~
from core.modules import BaseClass


class ExampleVulnerability(object):

    # Vulnerability name
    name = "Cross-site Scripting"

    # Vulnerability severity
    severity = "Low-Medium"

    # Functions causing vulnerability
    functions = [
        "print"
        "echo"
    ]

    # Functions/regex that prevent exploitation
    blacklist = [
        "htmlspecialchars",
        "esc_attr"
    ]

正規表現マッチパターンのオーバーライド

正規表現パターンはcore.modules.BaseClass.build_patternで生成されるため、各モジュールクラスでオーバーライドできます。

Modules/ExampleVulnerability.py

root@kitploit:~
import copy


...
# Build dynamic regex pattern to locate vulnerabilities in given content
def build_pattern(self, content, file):
    user_input = copy.deepcopy(self.user_input)

    variables = self.get_input_variables(self, content)

    if variables:
        user_input.extend(variables)

    if self.blacklist:
        blacklist_pattern = r"(?!(\s?)+(.*(" + '|'.join(self.blacklist) + ")))"
    else:
        blacklist_pattern = ""

    self.functions = [self.functions_prefix + x for x in self.functions]

    pattern = r"((" + '|'.join(self.functions) + ")\s{0,}\(?\s{0,1}" + blacklist_pattern + ".*(" + '|'.join(user_input) + ").*)"
    return pattern

テスト

ユニットテストの実行: $ python3 -m unittest

ツールをダウンロード