
Lamperl pt 3 (Uploads, Downloads, Job Control)
Part 3 of the 'Lamperl' series documents building a Perl-based agent for the Adaptix C2 framework, adding a reusable async job-control system (fork + pipes + non-blocking reads) that converts synchronous commands into backgroundable jobs, plus file upload/download support including manual HTTP chunked-transfer-encoding parsing and base64 encoding of file contents. It covers the Go-side pl_agent.go CreateTask/ProcessTasksResult integration and Adaptix Task Manager UI hooks (ax_config.axs) for job list/get/kill commands.
TL;DR Walkthrough of adding async job control and file upload/download to a custom Perl agent for the Adaptix C2 framework.
Techniques named here
- Asynchronous job execution via higher-order wrapper
- Non-blocking I/O via pipes and fcntl
- Job state tracking and reaping
- Automatic completion reporting
- Job control commands
- File upload via base64-encoded chunked transfer
- File download via base64 encoding
- HTTP chunked transfer encoding parser
- Output sanitization for console display
Related in Offensive Security