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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
Fnord — 難読化コードのパターン抽出器 | Kitploit
ツール/GitHubGitHub/neo23x0/fnord
静的分析マルウェア分析
GitHubneo23x0/fnord

Fnord

難読化コードのパターン抽出器

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

人気

すべて見る →

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

すべてのツールを探索

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

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

Build Status Actively Maintained

Fnord

Fnord は難読化されたコードのパターン抽出ツールです

説明

Fnord には2つの主要機能があります:

  1. バイトシーケンスを抽出し、統計を生成する
  2. これらの統計情報を使用し、長さ、出現回数、類似性、キーワードを組み合わせて YARA ルールを作成する

1. 統計

Fnord は、最小長 -m X(デフォルト: 4)から最大長 -x X(デフォルト: 40)までの可変サイズのスライディングウィンドウでファイルを処理し、すべてのシーケンスを抽出します。各長さについて、Fnord は最も頻繁に出現するシーケンス -t X(デフォルト: 3)をテーブルで表示します。

テーブルの各行には以下が含まれます:

  • 長さ
  • 出現回数
  • シーケンス (文字列)
  • フォーマット (ascii/wide/hex)
  • 16進エンコード形式
  • エントロピー

2. YARA ルールの作成

Fnord は実験的な YARA ルールも生成します。YARA ルール作成中に、シーケンスの長さと出現回数(長さ × 出現回数)に基づいてスコアを計算します。次に、各シーケンスから非文字をすべて除去し、キーワードのリスト(大文字小文字を区別しない)と比較して、他のシーケンスよりも興味深いシーケンスを検出します。各文字列をルールに書き込む前に、Fnord はレーベンシュタイン距離を計算し、すでにルールに統合されたシーケンスと類似しすぎるシーケンスをスキップします。

ステータス

[実験的] Fnord は数日前に作成され、少数のサンプルでテストしました。今後数週間でデフォルトを調整し、さらにキーワード、フィルター、スコアリングオプションを追加する予定です。

結果を改善する

サンプル内で難読化されたコードを見つけた場合は、16進エディタを使用して難読化部分を抽出し、新しいファイルに保存してください。その新しいファイルを分析に使用します。

フラグ -s、-k, -r、--yara-strings、-m、-e` を試してみてください。

弱い YARA ルールを生成するサンプルがあれば送ってください。改善の余地があります。

使用方法

root@kitploit:~
        ____                 __
       / __/__  ___  _______/ /
      / _// _ \/ _ \/ __/ _  /
     /_/ /_//_/\___/_/  \_,_/ Pattern Extractor for Obfuscated Code
     v0.7, Florian Roth

    usage: fnord.py [-h] [-f file] [-m min] [-x max] [-t top] [-n min-occ]
                    [-e min-entropy] [--strings] [--include-padding] [--debug]
                    [--noyara] [-s similarity] [-k keywords-multiplier]
                    [-r structure-multiplier] [-c count-limiter] [--yara-exact]
                    [--yara-strings max] [--show-score] [--show-count]
                    [--author author]

    Fnord - Pattern Extractor for Obfuscated Code

    optional arguments:
      -h, --help            show this help message and exit
      -f file               File to process
      -m min                Minimum sequence length
      -x max                Maximum sequence length
      -t top                Number of items in the Top x list
      -n min-occ            Minimum number of occurrences to show
      -e min-entropy        Minimum entropy
      --strings             Show strings only
      --include-padding     Include 0x00 and 0x20 in the extracted strings
      --debug               Debug output

    YARA Rule Creation:
      --noyara              Do not generate an experimental YARA rule
      -s similarity         Allowed similarity (use values between 0.1=low and
                            10=high, default=1.5)
      -k keywords-multiplier
                            Keywords multiplier (multiplies score of sequences if
                            keyword is found) (best use values between 1 and 5,
                            default=2.0)
      -r structure-multiplier
                            Structure multiplier (multiplies score of sequences if
                            it is identified as code structure and not payload)
                            (best use values between 1 and 5, default=2.0)
      -c count-limiter      Count limiter (limts the impact of the count by
                            capping it at a certain amount) (best use values
                            between 5 and 100, default=20)
      --yara-exact          Add magic header and magic footer limitations to the
                            rule
      --yara-strings max    Maximum sequence length
      --show-score          Show score in comments of YARA rules
      --show-count          Show count in sample in comments of YARA rules
      --author author       YARA rule author

はじめに

  1. git clone https://github.com/Neo23x0/Fnord.git して cd Fnord
  2. pip3 install -r ./requirements.txt
  3. python3 ./fnord.py --help

使用例

root@kitploit:~
python3 fnord.py -f ./test/wraeop.sct --yara-strings 10
root@kitploit:~
python3 fnord.py -f ./test/vbs.txt --show-score --show-count -t 1 -x 20
root@kitploit:~
python3 fnord.py -f ./test/inv-obf.txt --show-score --show-count -t 1 --yara-strings 4 --yara-exact

スクリーンショット

Fnord スクリーンショット

Fnord スクリーンショット

Fnord スクリーンショット

警告

フォルダ ./test には悪意のあるスクリプトが含まれており、ローカルのアンチウイルススキャナーで検出される可能性があります。実行しない限り、システムに害はありません。

FAQ

なぜ Fnord を yarGen に統合しなかったのですか?

yarGen はホワイトリスト方式を使用して、YARA ルール作成に最適な文字列をフィルタリングします。yarGen は、いくつかの正規表現を適用して、YARA ルール作成前に文字列のスコアを調整します。しかし、そのアプローチは、統計に基づいてバイトシーケンスのスコアを計算する Fnord の方法とは大きく異なります。

yarGen は非難読化コードに最適ですが、Fnord は難読化コード専用であり、yarGen よりもはるかに優れた結果を生成するはずです。

連絡先

アップデートは Twitter でフォローしてください @cyb3rops

ツールをダウンロード