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
  • Choosing a payload
  • Modifying payloads
  • Editing payloads in the web UI
  • Uploading and downloading payloads in the web UI
  • Editing payloads via SSH
  • Copying payloads via SCP

Was this helpful?

  1. Getting Started

Selecting and editing payloads

Last updated 1 year ago

Was this helpful?

Choosing a payload

The payload is selected by the switch position at boot.

To pick a payload, simply set the desired switch position and power on (or reboot) your Packet Squirrel!

Modifying payloads

Payloads can be edited live in the Packet Squirrel web UI, copied via scp, or edited on the Packet Squirrel in a ssh terminal.

Editing payloads in the web UI

The web UI features an in-browser option for editing payloads, with basic syntax highlighting and other code-editing features; simply edit your payload and hit save!

Uploading and downloading payloads in the web UI

Each payload in the web UI has an Upload and Download button in the bottom left.

These can be used to easily transfer payloads to and from the Packet Squirrel.

Editing payloads via SSH

Payloads can be edited directly on the Packet Squirrel via ssh.

Connect to your Packet Squirrel as root, using the same password you set during the initial setup:

$ ssh root@172.16.32.1

Payloads can be found in /root/payloads/switchN/payload where N is the switch position (so /root/payloads/switch1/payload, /root/payloads/switch2/payload, and so on.

To edit a payload on the Packet Squirrel, use the command nano (or vi if you prefer, both editors are included).

$ nano /root/payloads/switch1/payload

To save your changes and exit, press ^X (Control-X).

Copying payloads via SCP

Payloads can be found in /root/payloads/switchN/payload where X is the switch position (so /root/payloads/switch1/payload, /root/payloads/switch2/payload, and so on.

Copying FROM the Packet Squirrel

To copy a payload FROM the Packet Squirrel, open a terminal and use the command line scp tool, or navigate to /root/payloads/switchN/ in a graphical SCP tool.

scp expects the source and destination. To copy a file from the Packet Squirrel, the source is the root user, the IP of the Packet Squirrel, and the path to the file. The destination is the local file name.

To copy the payload from slot one on the Packet Squirrel to the file payload on our computer, renaming it as a text file, we run:

$ scp root@172.16.32.1:/root/payloads/switch1/payload payload.txt

The payload is now in whatever location we ran scp from (typically your users home directory).

Payload files are generally text files containing the payload script!

In this example we rename the file to payload.txt to make it simple to edit.

You can also usually right-click the payload file and choose "Open with..." to edit it in the text editor of your choice!

If you are using a smart text editor, you can rename your payload based on the contents: Most payloads are written in Bash script, and could be renamed payload.sh if your editor does not automatically identify what language the payload is in.

Copying TO the Packet Squirrel

To copy the payload back TO the Packet Squirrel, we reverse the process:

$ scp payload.txt root@172.16.32.1:/root/payloads/switch1/payload

Remember to always name your payload file payload! Above, we do this while copying the file with the command-line scp tool (notice the destination name is simply payload), or you can rename the file using your GUI secure copy tool after it is transferred.

Remember - you need to rename your payload file to just payload! You can name it whatever you wish on your computer, but rename it when you copy it!

Payloads uploaded via the Upload button in the web UI are automatically renamed.

SSH (or Secure SHell) is a standard tool for connecting to remote systems. Most operating systems include a ssh client by default; alternately, third-party SSH clients such as are available.

SCP (or Secure CoPy), is a standard tool for copying files to or from remote systems. Most operating systems include a scp command line client by default; third-party SCP clients with a UI such as are available as well.

PuTTY
WinSCP
Packet Squirrel web UI payload editing
A nano editing session in ssh