• Stars
    star
    389
  • Rank 108,295 (Top 3 %)
  • Language
    JavaScript
  • License
    GNU General Publi...
  • Created over 13 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A tool that provides a basic SQL-frontend to PCAP-files

PacketQ

Total alerts Bugs Security Rating

packetq is a command line tool to run SQL queries directly on PCAP files, the results can be outputted as JSON (default), formatted/compact CSV and XML. It also contain a very simplistic web-server in order to inspect PCAP files remotely. PacketQ was previously known as DNS2db but was renamed in 2011 when it was rebuilt and could handle protocols other than DNS among other things.

More information is provided in our FAQ, functions, and fields documentation.

A short demo-video of PacketQ's capabilities is available on http://www.youtube.com/watch?v=70wJmWZE9tY

Features

  • Super-fast native decoding of PCAP-files (even gzipped) and dirt-quick in-memory sorting algorithms.
  • A extensible protocol decoding design with build in support for ICMP and DNS from start.
  • Support for grouping, sorting, counting and most other important SQL-functions.
  • Only dependent on zlib, no other hard-to-find libs needed. Compiles on everything.
  • Build-in web-server, JSON API and a simple JQuery-based GUI concept application with graphs.
  • Can be designed to cache queries by pre-processing PCAPs into static JSON-files that can be used to make queries again.
  • Built in DNS-resolver function (used by GUI).
  • Support for sampling. Helps when making queries to large, uniform PCAP-files.
  • Can convert flags in packet-headers to text on the fly.
  • Can make multiple queries towards the same data in memory.

More information may be found here:

Issues should be reported here:

General support and discussion:

Dependencies

PacketQ requires a couple of libraries beside a normal C++ compiling environment with autoconf, automake, libtool and pkgconfig.

PacketQ has an optional dependency on the MaxMindDB library (for the CC() and ASN() functions).

To install the dependencies under Debian/Ubuntu:

apt-get install -y zlib1g-dev libmaxminddb-dev

To install the dependencies under CentOS (with EPEL enabled):

yum install -y zlib-devel libmaxminddb-devel

Build from GitHub

git clone https://github.com/DNS-OARC/PacketQ.git
cd PacketQ
./autogen.sh
./configure [options]
make
make install

Building from source tarball

The source tarball from DNS-OARC comes prepared with configure:

tar zxvf packetq-version.tar.gz
cd packetq-version
./configure [options]
make
make install

Usage example

Retrieves the 10 first packets containing DNS information from the file sample.pcap:

packetq -s "select * from dns limit 10" sample.pcap

Starts a web-server on port 8080 (-p8080) as a daemon (-d) serving files from the directory html/ (-w html/) and PCAP files from the directory pcap/ (-r pcap/):

packetq -d -p8080 -w html/ -r pcap/

Author(s)

Contributor(s)

See also the full list of contributors.

Copyright

Copyright (c) 2017-2022, OARC, Inc.

Copyright (c) 2011-2017, IIS - The Internet Foundation in Sweden

All rights reserved.

This file is part of PacketQ.

PacketQ is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

PacketQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with PacketQ.  If not, see <http://www.gnu.org/licenses/>.

More Repositories

1

dnsperf

DNS Performance Testing Tools
C
383
star
2

flamethrower

a DNS performance and functional testing utility supporting UDP, TCP, DoT and DoH
C++
314
star
3

dnscap

Network capture utility designed specifically for DNS traffic
C
272
star
4

dsc

DNS Statistics Collector
C
105
star
5

drool

DNS Replay Tool
Lua
82
star
6

dnsjit

Engine for capturing, parsing and replaying DNS
C
55
star
7

dnsmeter

Tool for testing performance of nameservers
C++
54
star
8

services

Project and issue tracking for DNS-OARC services
35
star
9

sample-query-data

Sample query data files for use with dnsperf and resperf
21
star
10

dumdumd

High performance UDP/TCP/DoT/DoH DNS "server" that... just drops/reflects everything you send to it
C
17
star
11

cmdns-cli

Check My DNS command line client
Go
17
star
12

dsc-datatool

Tool for converting, exporting, merging and transforming DSC data
Python
16
star
13

bad-packets

Collection of "bad" packets in PCAPs that can be used for testing software
Python
16
star
14

omg-dns

Helper library for parsing valid/invalid/broken/malformed DNS packets
C
15
star
15

dsp

DNS Statistics Presenter
Perl
15
star
16

ripeatlas

Go bindings for RIPE Atlas API
Go
12
star
17

tldmon

Nagios Plugin Scripts for TLDmon
Perl
8
star
18

dnswire

library for DNS encapsulations
C
8
star
19

dns-benchmarking

DNS Benchmarking Tiger Team repository
Python
8
star
20

pcap-thread

PCAP helper library with POSIX threads support and transport layer callbacks
C
6
star
21

sllq

Semi Lock-Less Queue
C
5
star
22

golang-dns-server-doq

Go library for DNS-over-QUIC server (DoQ, RFC9250)
Go
5
star
23

ripe-hackathon-dns-caching

Everything you ever wanted to know about caching resolvers but were afraid to ask
JavaScript
4
star
24

parseconf

Conf parser helper library
C
4
star
25

p5-DSC

Perl library for DSP
Perl
3
star
26

dsc-datatool-grafana

Grafana Dashboards for use with DSC/dsc-datatool
Python
3
star
27

tinyframe

Minimalistic Frame Streams library
C
3
star
28

cryptopANT

IP Address Anonymization Library
C
3
star
29

p5-Net-GetDNS

Perl bindings for getdns, a modern asynchronous DNS API
XS
2
star
30

dns-metrics

DNS Metrics JSON Schema
1
star