LogoLogo
DocumentationPayloadsCommunitySupport
  • Packet Squirrel Mark II by Hak5
  • Setup
    • Connecting the Packet Squirrel
    • Setting up the Packet Squirrel
  • Getting Started
    • Changes & New features
    • Packet Squirrel Basics
    • Accessing the Packet Squirrel
    • Web UI
    • Getting the Packet Squirrel online
    • Status LED
    • Cloud C²
    • USB storage support
    • Selecting and editing payloads
    • Configuring payloads
    • Running payloads
    • Networking and modes
  • Networking Tutorial
    • Glossary
    • OSI layers
    • Private IP ranges
    • Network masks
    • Packet injection
    • Translation and redirection
    • Packet capture
  • Payload Development
    • Payload development basics
    • DuckyScript for Packet Squirrel
      • BUTTON
      • C2EXFIL
      • C2NOTIFY
      • C2WATCHDIR
      • DYNAMICPROXY
      • KILLPORT
      • KILLSTREAM
      • LED
      • MATCHPORT
      • MATCHSTREAM
      • NETMODE
      • SELFDESTRUCT
      • SSH_START
      • SSH_STOP
      • SPOOFDNS
      • SWITCH
      • UI_START
      • UI_STOP
      • USB_FREE
      • USB_STORAGE
      • USB_WAIT
  • Advanced payloads
    • Quotes and expansions
    • Flow control
    • Redirecting output
    • Payload configuration
    • Return codes & success
    • Background commands
    • Command groups
    • Processing JSON
    • USB encryption
    • VPN configuration
    • Network manipulation
    • Tips, tricks, & pitfalls
    • Python
  • Payload repository
  • Troubleshooting
    • Troubleshooting networking
    • Troubleshooting payloads
    • Factory reset
  • Software Updates
    • Upgrading firmware
Powered by GitBook
On this page
  • Options
  • Interface
  • Direction
  • Expression
  • Ports
  • Examples

Was this helpful?

  1. Payload Development
  2. DuckyScript for Packet Squirrel

KILLSTREAM

Last updated 2 years ago

Was this helpful?

The KILLSTREAM command inspects network traffic for activity on the specified ports which matches a regular expression. The stream is then terminated via a TCP FIN injection.

Options

The KILLSTREAM command expects several options:

KILLSTREAM [interface] [direction] [expression] [port] ... [portN]

Interface

KILLSTREAM requires a network interface. Typically on the Packet Squirrel this is br-lan, the virtual interface which connects the Ethernet ports.

Direction

KILLSTREAM requires a direction: It can match on CLIENT requests, SERVER responses, or packets in ANY direction.

Expression

KILLSTREAM matches on a basic .

This expression can be as simple as the text to match, such as "Authorization: Basic", or a complex match such as "[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{4}"to match four groups of four digits.

Ports

KILLSTREAM can match any number of ports.

Examples

The most basic use of the KILLSTREAM command is to prevent streams with specified content. For instance to kill any stream using HTTP Basic authentication, while allowing normal HTTP traffic:

#!/bin/bash 

# Title: Killstream example
#
# Description: Prevent HTTP Basic Authorization requests

# Set bridge mode
NETMODE BRIDGE

LED R SINGLE

# Wait for any basic-auth on port 80
KILLSTREAM br-lan ANY 'Authorization: Basic' 80
regular expression