Bad USB on STM32F103C8T6 with SD card
A7 -> DI
A6 -> DO
A5 -> SCLK
A4 -> CS
+3.3v -> VDD
GND -> GND
Save your payload to file script.txt on SD card
Ducky payloads you can find here: https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Payloads
Or, you can simply write your own payloads using Ducky script
Ducky script syntax: https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Duckyscript