Giter Site home page Giter Site logo

dbd-pcap-analyzer's Introduction

pcap ファイル から特徴を抽出するプログラム

https://github.com/YTakahashii/dbd-pcap-analyzer

実行する前に必要な手順

  • node.js を PC にインストールする

  • node_modules をインストール

    • dbd-pcap-analyzer フォルダをコマンドプロンプトで開く
    • npm install とコマンドプロンプトに入力して実行する
  • pcap ファイルを json で export したファイルを用意して data フォルダに入れる

これで準備完了です.

実行する

  • npm start とコマンドプロンプトに入力して実行する
  • プログラムが終了すると,results フォルダに json ファイルが出力される.

各ファイルの説明

src/index.ts

このプログラムはエントリポイントで,ここからスタートします.

src/models フォルダ

オブジェクトの型を定義しています.

  • Packet.ts
    • pcap ファイルのパケット一つ分の方を定義しています
  • GroupedMaliciousRequest.ts
    • 悪性トラフィック 1 セットごとにリクエストパケットとレスポンスパケットを集計したデータ型

結果ファイルの説明

results/grouped_packets.json

この集計データは,入口サイトのアクセスによって発生したリダイレクト通信からマルウェア配布サイトまでのリダイレクト通信のパケットをリクエストパケットとレスポンスパケットに分けてグループ化したものです. 以下では説明のため,このグループの単位を,「悪性通信1フロー」と呼ぶことにします.

[
  {
    // 悪性通信1フロー分のパケットデータ(1つ目の悪性通信フロー)
    // requests[i] と responses[i] は対になっている. 例えばリクエストパケット1番目の requests[0] のレスポンスは responses[0]である.
    // したがって各悪性通信フローにおけるrequests.lengthとresponses.lengthは等しい.
    requests: [ // 1つ目の悪性通信フローのリクエストパケット
      {
        // パケットデータ
        '_index': '...',
        ...
      },
      {
        
      },
    ],
    responses: [ // 1つ目の悪性通信フローのレスポンスパケット
      {
        // パケットデータ
        '_index': '...',
        ...
      },
      {
        
      }
    ]
  },
  {
    // 悪性通信1フロー分のパケットデータ(2つ目の悪性通信フロー)
    requests: [
      
    ],
    responses: [
    
    ]
  },
]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.