Overview
P4wnP1 A.L.O.A. (A Little Offensive Application) is an open-source, highly customizable USB attack platform designed for the Raspberry Pi Zero and Zero W. It transforms your tiny Pi into a powerful security testing tool capable of emulating various USB devices.
Key Capabilities
USB HID Emulation
Emulate keyboards, mice, and composite devices for automated input attacks and payload delivery.
USB Ethernet
Create virtual network interfaces using RNDIS (Windows) and ECM (macOS/Linux) for network-based attacks.
Payload Execution
Execute automated scripts and payloads with precise timing and conditional logic.
Web Configuration
Full web-based interface for live configuration, payload management, and device control.
Typical Use Cases
- Security Research: Test USB-based attack vectors and defenses
- Red Team Testing: Physical penetration testing and social engineering assessments
- USB Device Emulation Labs: Educational environments for learning USB security
- Automation: Automated keyboard input for repetitive tasks
Supported Hardware
Features
Modular USB Gadget
Flexible USB gadget framework supporting multiple device types simultaneously.
Web UI
Intuitive web interface for real-time configuration and monitoring.
Scriptable Payloads
JavaScript-based payload system with full access to device capabilities.
Network Attacks
Built-in support for network interception and manipulation.
Headless Operation
Runs completely headless - no monitor, keyboard, or mouse required.
Community Payloads
Access community-maintained payloads and extensions.
Estimated Setup Time
- Image download: 5-10 minutes (depending on connection)
- Flashing SD card: 5-10 minutes
- First boot and access: 2-5 minutes
Prerequisites
Ensure you have all necessary hardware and software before starting the installation.
Required Hardware
- Raspberry Pi Zero or Raspberry Pi Zero W
- MicroSD card (8 GB or larger recommended)
- SD card reader (USB or built-in)
- Micro-USB cable capable of data + power
Required Software
- Raspberry Pi Imager (or balenaEtcher)
- A computer running Windows, macOS, or Linux
- Web browser for accessing the interface
Installation Guide
Follow these steps to set up P4wnP1 A.L.O.A. on your Raspberry Pi Zero.
Obtain the Image
Download the latest P4wnP1 A.L.O.A. image from the official GitHub Releases page.
Download from GitHub ReleasesFlash the SD Card
Use Raspberry Pi Imager or balenaEtcher to flash the downloaded image to your microSD card.
- Open Raspberry Pi Imager
- Click "Choose OS" → "Use custom" and select the P4wnP1 image
- Select your SD card as the storage device
- Click "Write" and wait for completion
- Safely eject the SD card after flashing
Hardware Setup
Prepare your Raspberry Pi Zero for first boot.
- Insert the microSD card into the Raspberry Pi Zero
- Connect the Pi to your computer using the USB data port (not the power-only port)
First Boot
Allow the device to boot and configure itself.
- The Pi will boot and initialize (allow 1-2 minutes)
- The device will enumerate as a USB HID and/or USB network device
- Your computer should detect a new network adapter
Access the Device
Connect to P4wnP1 using the default credentials.
Username: pi
Password: raspberry
Web UI: http://172.16.0.1:8000 (or http://172.24.0.1:8000)
Web Interface Overview
The P4wnP1 web interface provides complete control over all device functions.
Dashboard
Overview of current device status, active gadgets, and quick actions.
USB Gadget Settings
Configure USB device emulation modes (HID, network, mass storage).
Payload Management
Create, edit, and deploy HIDScripts and trigger payloads.
Network Settings
Configure WiFi (on Zero W), USB Ethernet, and network triggers.
Logs & Status
View system logs, payload execution results, and debug information.
System Settings
Manage templates, backup/restore configurations, and system updates.
Basic Usage
Enabling HID Keyboard Payloads
- Navigate to the web interface at
http://172.16.0.1:8000 - Go to USB Settings and ensure HID Keyboard is enabled
- Navigate to HIDScript section
- Select or create a payload script
- Click Run to execute the payload
Running a Sample Payload
// Simple Hello World payload
layout("us"); // Set keyboard layout
typingSpeed(100, 150); // Random delay between keystrokes
press("GUI r"); // Open Run dialog (Windows)
delay(500);
type("notepad");
press("ENTER");
delay(1000);
type("Hello from P4wnP1!");
Switching USB Modes
P4wnP1 supports multiple USB gadget configurations:
- HID Only: Keyboard/mouse emulation
- RNDIS + HID: Network adapter + keyboard (Windows)
- ECM + HID: Network adapter + keyboard (macOS/Linux)
- Mass Storage: USB drive emulation
Saving Configurations
Use the Templates feature to save and load complete device configurations including USB settings, WiFi configuration, and trigger actions.
Sample Scripts
Get started quickly with these ready-to-use HIDScript examples. Click the button below to view sample payloads.
Custom Kali Linux Image
For a pre-configured, ready-to-use experience, check out NightRang3r's custom P4wnP1 Kali Linux 2023.1 image for Raspberry Pi Zero W.
Image Versions
Lite Version
P4wnP1-aloha-kali-linux-2023.1-raspberry-pi-zero-w-by-NightRang3r-1.1.0-lite.img.xz
Scripts are included but not installed or deployed. You'll need to manually copy them to the correct directories and setup triggers in the P4wnP1 UI.
Full Version
P4wnP1-aloha-kali-linux-2023.1-raspberry-pi-zero-w-by-NightRang3r-1.1.0.img.xz
All scripts, Raw HID scripts, and most HID scripts are included, installed, and configured. Ready to use immediately!
Key Features
Boot Config
Updated boot.txt and config.txt for P4wnP1 functionality.
Included Tools
Responder, Metasploit, Impacket, Nmap, Aircrack-ng, MDK4, MSFPC, and more.
Python Ready
Python 2 & 3 with spidev, Pillow, luma.lcd, luma.oled, RPi.GPIO pre-installed.
LCD/OLED Support
Modified LCD and OLED menu repositories included for hat displays.
Easy Expansion
raspi-config included for easy filesystem expansion.
Kali Binaries
Kali Windows binaries included for post-exploitation.
Directory Structure
# HID Scripts location
/usr/local/P4wnP1/HIDScripts
# Shell scripts location
/usr/local/P4wnP1/scripts
# Loot directory (accessible via browser)
/usr/local/P4wnP1/www/loot
# Browser access: http://172.XX.0.1:8000/loot/
Custom Image Installation
Extract & Flash
Extract the .xz file with 7zip, then flash to your SD card using Raspberry Pi Imager or balenaEtcher.
Connect to the Device
USB Gadget Mode
- SSH:
172.16.0.1:22 - Web UI:
http://172.16.0.1:8000
WiFi AP Mode
- SSID:
💥🖥💥 Ⓟ➃ⓌⓃ🅟❶ - SSH:
172.24.0.1:22 - Web UI:
http://172.24.0.1:8000 - WiFi Key:
MaMe82-P4wnP1
Credentials: root:toor
Expand Filesystem
Run the following command and reboot to use the full SD card size:
raspi-config --expand-rootfs
sudo reboot
LCD/OLED Setup (Optional)
If you have a display hat, navigate to the corresponding directory and run the installer:
cd /root/P4wnP1_ALOA_LCD_MENU # or OLED_MENU_V2
./install.sh
Setup Startup Menu
Create a new trigger action when service starts:
- Go to P4wnP1 Web UI → Trigger Actions
- Add new trigger: "When service starts"
- Action: Run bash script
- Select:
/usr/local/P4wnP1/scripts/runmenu.sh - Save to startup template
P4wnP1-A.L.O.A. Payloads Repository
A comprehensive collection of tested and verified scripts for Windows, macOS, and Raw HID attacks. These payloads are adapted to work with the custom P4wnP1 image.
git pull occasionally to get the latest updates.
Payload Categories
Windows Scripts
PowerShell and batch scripts for Windows targets.
macOS Scripts
Shell scripts and AppleScript payloads for OSX.
HIDScripts
JavaScript-based keyboard injection scripts.
Raw HID Attacks
Low-level HID device attack scripts.
Network Attacks
RNDIS/ECM based network exploitation.
Loot Collection
Auto-exfiltration to browsable loot directory.
Quick Update
# Navigate to payloads directory
cd /root/P4wnP1-A.L.O.A.-Payloads
# Pull latest updates
git pull
Security & Legal Notice
P4wnP1 is intended for authorized security testing and educational use only. Unauthorized access to computer systems is illegal in most jurisdictions.
- Only use on systems you own or have explicit permission to test
- Users are responsible for complying with all applicable laws and policies
- Document all testing activities and obtain written authorization
- The developers and this guide assume no liability for misuse
Troubleshooting
Common issues and their solutions.
Device not detected over USB
- Ensure you're using the data port, not the power-only port
- Try a different USB cable (some are power-only)
- Allow 1-2 minutes for initial boot
- Check Device Manager (Windows) or System Report (macOS) for the device
Web UI not reachable
- Ensure the USB network adapter is properly configured
- Try both
http://172.16.0.1:8000andhttp://172.24.0.1:8000 - Check that your firewall isn't blocking the connection
- Verify the network adapter has obtained an IP address
Wrong USB port used
The Raspberry Pi Zero has two micro-USB ports:
- Data port (inner): Use this one - it's closer to the center of the board
- Power port (outer): This is power-only and won't work for data
SD card flashing issues
- Use a high-quality SD card (Class 10 or better)
- Try a different card reader
- Format the SD card before flashing
- Download the image again (may be corrupted)
- Try balenaEtcher if Raspberry Pi Imager fails
Payloads not executing correctly
- Verify the correct keyboard layout is set (
layout("us")) - Increase delays between commands
- Check for syntax errors in your HIDScript
- Ensure the target system is ready (logged in, focused window)
Resources
Additional documentation, tools, and community resources.