GithubHelp home page GithubHelp logo

robicus / invoke-psdump Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 3.0 996 KB

PowerShell wrapper for WinDump

PowerShell 100.00%
packet-analyser network-analysis powershell powershell-script forensic-analysis

invoke-psdump's Introduction

invoke-psdump

Introduction

Invoke-PSDump is essentially a PowerShell wrapper for WinDump.

WinDump, derived from tcpdump (for Linux), is a command-line packet capture and analysis tool. WinDump and tcpdump have been around for a long time and have been commonplace in security analysts' toolkits. However, these tools require a deeper understanding of BPF filters, byte offsets, bit masking, and binary arithmetic to unleash their full power. Invoke-PSDump seeks to unleash the same power with a few added benefits:

  1. Extraordinarily easy syntax
  2. Elimination of byte offsets, hexadecimal and bit masking
  3. Searchable text patterns
  4. Lightning fast processing

Here's an example scenario. You want to search through a packet capture looking for packets that have the "Don't Fragment" bit set. WinDump can achieve this with:

  • \WinDump.exe -r C:\Tools\PSDump\Captures\SkypeIRC.cap -nt (ip) and (ip[6]=64)

The same can be achieved, with additional text searching, with Invoke-WinDump:

  • .\Invoke-WinDump -File $skypeIRCPCAP -DF $true -Pattern "freenode.net"

Invoke-PSDump is still considered proof-of-concept code that was originally created during graduate research that was conducted with SANS Technology Institute. My whitepaper can be found here: https://www.sans.org/reading-room/whitepapers/intrusion/leverage-powershell-create-user-friendly-version-windump-36642

I've been asked about the code several times, and wanted to (finally) take advantage of GitHub to share the code.

Getting Started

Pre-Reqs

  1. Download/clone the project. Navigate to the primary project directory, i.e., C:\Tools\invoke-psdump-master\Invoke-PSDump
  2. Install WinPcap
  3. Make sure you download and put a copy of "WinDump.exe" in the "Invoke-PSDump\Tools" directory

Running Invoke-PSDump

  1. Execute "PSDump.ps1" :)

Examples

  1. .\Invoke-WinDump -File .\Captures\SkypeIRC.cap -DF $true -Pattern "freenode.net"

  2. .\Invoke-WinDump -File .\Captures\teardrop.cap -MF $true

  3. .\Invoke-WinDump -File .\Captures\nb6-startup.pcap -TCPFlags "SYN"

  4. .\Invoke-WinDump -Files $files -TCPFlags "ACK,PUSH"

invoke-psdump's People

Contributors

robicus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.