-
Notifications
You must be signed in to change notification settings - Fork 14
How the Minigotchi works
It’s not your ideal deauthing hacking tool, but rather something far more complex. It’s best to run with a pwnagotchi alongside it. The minigotchi relies on the UART output through a serial shell(Or a screen that we have started supporting). A Minigotchi, like a Pwnagotchi, would hop channels and deauth random access points. If any pwnagotchi beacon frames are detected, it will attempt to tell you the statistics of the pwnagotchi by attempting to get stats from the beacon frame. The Minigotchi will also send their advertisement beacon frame as well as an attempt to communicate with a local Pwnagotchi.
I wanted to emphasize that this device isn't any sort of jammer, this is just a different kind of device and I do not want it to be promoted as such. If you plan on using such a device, this is not the project you should be using. Although jamming and deauthing are considered DOS(denial-of-service) attacks, jamming occurs on a different radio frequency than what WiFi and Bluetooth operate on.
This is essentially when we initialize the whitelist, channels, etc. We only run this once, most of what is done is related to configuration.
void setup() {
Serial.begin(config.baud);
minigotchi.boot();
}
The Minigotchi
class handles the bootup(in the object Minigotchi::boot()
void Minigotchi::boot() {
Display::startScreen();
Serial.println(" ");
Serial.println("(^-^) Hi, I'm Minigotchi, your pwnagotchi's best friend!");
Display::cleanDisplayFace("(^-^)");
Display::attachSmallText("Hi, I'm Minigotchi");
Serial.println(" ");
Serial.println("('-') You can edit my configuration parameters in config.cpp!");
Serial.println(" ");
delay(250);
Display::cleanDisplayFace("('-')");
Display::attachSmallText("Edit my config.cpp!");
delay(250);
Serial.println("(>-<) Starting now...");
Serial.println(" ");
Display::cleanDisplayFace("(>-<)");
Display::attachSmallText("Starting now");
delay(250);
Serial.println("################################################");
Serial.println("# BOOTUP PROCESS #");
Serial.println("################################################");
Serial.println(" ");
Deauth::list();
Channel::init(Config::channel);
Minigotchi::info();
Minigotchi::finish();
}
We do a lot of initialization, which includes starting the screen, configuring the whitelist, printing machine info, etc.
This is the code that controls the cycle that the minigotchi goes through. I removed the comments I added to show the pure code for the loop function. The thing is with Arduino it has a loop
function and a setup
function. The loop functions repeats the set lines of code in that function over and over, while the setup
function only runs the set of code once.
void loop() {
minigotchi.cycle();
delay(Config::shortDelay);
minigotchi.detect();
delay(Config::shortDelay);
minigotchi.advertise();
delay(Config::shortDelay);
minigotchi.deauth();
delay(Config::shortDelay);
}
The Minigotchi
class handles it as so:
void Minigotchi::cycle() {
Parasite::readData();
Channel::cycle();
}
void Minigotchi::detect() {
Parasite::readData();
Pwnagotchi::detect();
}
void Minigotchi::deauth() {
Parasite::readData();
Deauth::deauth();
}
void Minigotchi::advertise() {
Parasite::readData();
Frame::advertise();
}
I could probably use inheritance, but I may need to use additional functions to modify it.
Ideally, we add our networks to the whitelist in the boot
function so we don't need to keep setting it over and over. The only things that should exist in the loop
function are the tasks to be done by the minigotchi over and over.