initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
book
|
||||
@@ -0,0 +1,4 @@
|
||||
[book]
|
||||
title = "USB Attack Vectors"
|
||||
authors = ["Magnus Küderli"]
|
||||
language = "en"
|
||||
@@ -0,0 +1,6 @@
|
||||
# Summary
|
||||
|
||||
# HID and Mass Storage Emulation with P4wnPi aloa
|
||||
- [installation](./pwnpi/install.md)
|
||||
- [setup](./pwnpi/setup.md)
|
||||
- [Mass Storage Emulation](./pwnpi/mse.md)
|
||||
@@ -0,0 +1,29 @@
|
||||
# Installation
|
||||
|
||||
## 1. Flash the Image
|
||||
|
||||
First, download the latest release of the custom image from [RoganDawes/P4wnP1_aloa](https://github.com/RoganDawes/P4wnP1_aloa/releases/tag/v0.1.1-beta).
|
||||
|
||||
This guide was created with `v0.1.1-beta`. The image is provided in `.img.xz` format, so it needs to be decompressed first:
|
||||
|
||||
```bash
|
||||
$ xz -d ~/Downloads/kali-linux-v0.1.1-beta-rpi0w-nexmon-p4wnp1-aloa.img.xz
|
||||
```
|
||||
|
||||
Once decompressed, the image can be written to the MicroSD card. Insert the card and identify its device name:
|
||||
|
||||
```bash
|
||||
$ lsblk
|
||||
```
|
||||
|
||||
The device will likely appear as something like `/dev/sdX`.
|
||||
|
||||
> ⚠️ **Double-check the device name before proceeding — writing to the wrong device will corrupt that drive!**
|
||||
|
||||
Now write the image:
|
||||
|
||||
```bash
|
||||
$ dd if=<path-to-img> of=<name-of-drive> bs=4M status=progress conv=fsync
|
||||
```
|
||||
|
||||
Once the process is complete, unmount and remove the SD card, insert it into the Pi, and power it on.
|
||||
@@ -0,0 +1,45 @@
|
||||
# Mass Storage Emulation
|
||||
|
||||
The P4wnP1 can emulate a USB flash drive or a read-only CD-ROM, which helps maintain the illusion of it being just an ordinary USB drive.
|
||||
|
||||
The feature can be set up in a few steps:
|
||||
|
||||
## 1. Create a Disk Image
|
||||
|
||||
An image of the filesystem that the target machine should mount is required. Conveniently, P4wnP1 ships with a small bash script that makes creating these images straightforward.
|
||||
|
||||
The script is located at:
|
||||
|
||||
```
|
||||
/usr/local/P4wnP1/helper/genimg
|
||||
```
|
||||
|
||||
Start by creating a directory containing the files to be included in the filesystem:
|
||||
|
||||
```bash
|
||||
$ mkdir payload
|
||||
$ echo "hello world" > payload/readme.txt
|
||||
```
|
||||
|
||||
Then pass that directory to `genimg`:
|
||||
|
||||
```bash
|
||||
$ ./genimg -i <path-to-directory> -o <name> -l <label> -s <size-in-mb>
|
||||
```
|
||||
|
||||
- `<name>` — a unique identifier for the output file (no path)
|
||||
- `<label>` — the drive name shown when mounted on the target machine
|
||||
|
||||
For example:
|
||||
|
||||
```bash
|
||||
$ ./genimg -i ./payload -o hello_world -l "WORKFILES" -s 64
|
||||
```
|
||||
|
||||
The generated image is stored at:
|
||||
|
||||
```
|
||||
/usr/local/P4wnP1/ums/flashdrive/<name>.bin
|
||||
```
|
||||
|
||||
It can then be selected directly in the web UI.
|
||||
@@ -0,0 +1,32 @@
|
||||
## 1. Accessing the Pi
|
||||
|
||||
### 1.1 Access via Wi-Fi
|
||||
|
||||
By default, the Pi creates its own Wi-Fi Access Point (AP), making it easy to connect to.
|
||||
|
||||
Join the new Wi-Fi network (it should be easy to identify) and enter the default password `MaMe82-P4wnP1`. The Pi's default IP address within its Wi-Fi network is `172.24.0.1`.
|
||||
|
||||
### 1.2 Access via USB
|
||||
|
||||
An alternative way to connect is by plugging the Pi in via USB. By default, the Pi emulates an Ethernet device that you can connect to.
|
||||
|
||||
To find the Pi's IP address, first check the IP of your Ethernet adapter:
|
||||
|
||||
```bash
|
||||
$ ip a
|
||||
```
|
||||
|
||||
Then replace the last octet with `.1`, since the Pi acts as the gateway in this setup.
|
||||
|
||||
## 2. SSH and Web UI
|
||||
|
||||
Once the Pi's IP address is known, there are two ways to interact with it:
|
||||
|
||||
- Open the web UI at `http://<ip>:8000`
|
||||
- Connect via SSH:
|
||||
```bash
|
||||
$ ssh [email protected]
|
||||
```
|
||||
Use the default Kali password `toor`.
|
||||
|
||||
The P4wnP1 is now up and running. Well done!
|
||||
Reference in New Issue
Block a user