LogoLogo
EmpireStarkillerBlogDiscord
  • Empire
  • Quickstart
    • Installation
    • Server
  • Starkiller
    • Introduction
    • Agent Tasks
  • Listeners
    • Dropbox
    • OneDrive
    • HTTP
    • Malleable C2
  • Stagers
    • multi_generate_agent
  • Plugins
    • Development
      • Imports
      • Lifecycle Hooks
      • Execution
      • Hooks and Filters
      • Plugin Tasks
      • Notifications
      • Database Usage
      • Settings
      • Migration
  • Modules
    • Autorun Modules
    • Module Development
      • PowerShell Modules
      • Python Modules
      • C# Modules
      • BOF Modules
  • Agents
    • Python
      • Main Agent Class
      • Stage Class
      • Packet Handler Class
      • Extended Packet Handler Class
    • Go
      • Main Agent Class
      • Packet Handler Class
      • Main.go Template
    • Staging
  • RESTful API
  • Settings
    • Logging
    • Bypasses
    • IP Filtering
Powered by GitBook
On this page
  • Attributes
  • Methods
  • Usage Example

Was this helpful?

  1. Agents
  2. Go

Packet Handler Class

The PacketHandler class manages packet creation, encryption, decryption, and communication between the agent and the Empire server. It handles network communication and ensures the secure transmission of tasking and results.

Attributes

  • server: The base URL of the Empire server.

  • staging_key: Key used during the staging process for initial secure communication.

  • aeskey: The key used to encrypt/decrypt tasking.

  • sessionID: Unique session identifier for the agent.

Methods

buildRoutingPacket()

Constructs a packet for secure communication with the Empire server, including encryption.

send_message()

Sends data to the Empire server, either for tasking or result submission.

process_tasking(data)

Processes a tasking packet received from the server, decrypting it, and executing the task on the agent's system.

Usage Example

packetHandler := PacketHandler{...}
packetHandler.send_message([]byte("tasking data"))
PreviousMain Agent ClassNextMain.go Template

Last updated 1 month ago

Was this helpful?