Atlantiraptor Docs

MacOS.Network.PacketCapture

Type: Client · Author: Wes Lambert, @therealwlambert

Captures network packets using tcpdump and uploads the resulting pcap file.

The Duration parameter is used to define how long (in seconds) the capture should be. Specific interfaces can be defined by using the Interface parameter, otherwise the artifact defaults to an interface assignment of any.

A BPF (Berkeley Packet Filter) expression can also be supplied to filter the captured traffic as desired.

Read more about BPF expressions here: https://biot.com/capstats/bpf.html

Required permissions: EXECVE

Implied permissions: FILESYSTEM_WRITE

Precondition: SELECT * FROM info() where OS = 'darwin'

Parameters

Name Type Default Description
Duration integer 10 Duration (in seconds) of PCAP to be recorded.
Interface string any
BPF string

Source

Defined in artifacts/definitions/MacOS/Network/PacketCapture.yaml.

name: MacOS.Network.PacketCapture
author: Wes Lambert, @therealwlambert
description: |
  Captures network packets using tcpdump and uploads the resulting
  pcap file.

  The `Duration` parameter is used to define how long (in seconds) the
  capture should be.  Specific interfaces can be defined by using the
  `Interface` parameter, otherwise the artifact defaults to an
  interface assignment of `any`.

  A `BPF` (Berkeley Packet Filter) expression can also be supplied to
  filter the captured traffic as desired.

  Read more about BPF expressions here:
  https://biot.com/capstats/bpf.html

required_permissions:
  - EXECVE

implied_permissions:
  - FILESYSTEM_WRITE

parameters:
  - name: Duration
    type: integer
    description: Duration (in seconds) of PCAP to be recorded.
    default: 10

  - name: Interface
    type: string
    default: any

  - name: BPF
    type: string
    default:

precondition:
  SELECT * FROM info() where OS = 'darwin'

sources:
    - query: |
            LET pcap <= tempfile(extension=".pcap")
            SELECT *, upload(file=pcap) AS PCAP
              FROM execve(argv=['bash', '-c', format(format='''(tcpdump -nni %v -w %v %v) & sleep %v; kill $!''', args=[Interface, pcap, BPF, Duration])], length=1000000)

Edit this page on GitHub

© 2026 Atlant Security EOOD. Atlantiraptor is free software under the GNU Affero General Public License v3. It is based on Velociraptor by Velocidex, and keeps its copyright notices. Velociraptor is a trademark of its owner; Atlantiraptor is not affiliated with or endorsed by it.