Dieses Projekt erweitert den DuckyDetektor von Philipp Lohse und Dennis La um eine verbesserte grafische Oberfläche und eine stark vereinfachte Installation.
Diese Instruktionen werden Dich zu einer funktionsfühigen Kopie dieses Projekts verschaffen, welches auf einer lokalen Umgebung für Entwicklungs- und Testzwecke läuft. Für den Einsatz auf einem Live System wende Dich an den Abschnitt "Schnelle Installation". Falls Du die Konfiguration lieber manuell übernehmen möchtest, wende Dich bitte an den Abschnitt "Bereitstellung".
- Raspberry Pi 4 Model B
- min. 4 GB RAM
- Raspberry Pi OS (32-bit) mit Desktop
- Version: min. Mai 2020
- Release Datum: min. 2020-05-27
- Kernel Version: min. 5.4
- Alternativ: Custom OS Image (siehe "Schnelle Installation")
- Optional: 3,2"/3,5" Touchscreen Display
- Optional: Schutzhülle für den Raspberry Pi
- Raspberry Pi Imager
Unter diesem Link ist ein Image verfügbar, auf dem der Rubber Ducky Detector mit konfiguriertem JoyIT-3,2"-Touchscreen vorinstalliert ist. Das Image kann mit dem Raspberry Pi Imager Tool auf eine SD-Karte übertragen werden. Unter dem Reiter "OS wählen" kann mit der Option "Eigenes Image" die bereitgestellte .img-Datei ausgewählt und geflashed werden.
Die SD-Karte muss vor dem Start des RasPi in den Slot eingesteckt werden.
Credentials für img Datei:
Username: pi
Password: duckyDetector
Alternativ ist im Repository ein install.sh Skript enthalten, der automatisch die Konfiguration des Ducky Detectors und die Installation der notwendigen Abhängigkeiten vornimmt. Um den Skript ausführbar zu machen, muss zuvor der Befehl sudo chmod +x ./install.sh ausgeführt werden. Zur Ausführung des Skripts sind Root-Rechte nötig. Eventuelle Debug-Informationen sind der während der Laufzeit erstellten debug.txt Datei zu entnehmen.
- das Betriebssystem Raspberry Pi OS auf eine Speicherkarte flashen z.B. mit balenaEtcher
- um auf den Raspberry Pi über ssh zuzugreifen muss folgendes durchgeführt werden:
- eine Datei mit dem Namen "ssh" ohne Inhalt erstellen
- eine Datei mit dem Namen "wpa_supplicant.conf" erstellen, mit dem folgenden Inhalt
country=AT
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="NETWORK-NAME"
psk="NETWORK-PASSWORD"
}
Folgende Schritte sind dazu nötig, um dieses Projekt auf einem Live System einzusetzen.
- Optional: Pakete aktualisieren
sudo apt-get update
sudo apt-get upgrade
- Folgende Pakete müssen installiert werden:
- g++
- libusb-1.0-0-dev
- libclamav-dev
- libgtkmm-3.0-dev
sudo apt-get install g++ libusb-1.0-0-dev clamav libclamav-dev libgtkmm-3.0-dev
- einen Ordner "mount" in "/mnt" erstellen
- einen Ornder "duckyDetector" in "/home/pi" erstellen
- und darin das Projekt abspeichern
- mittels
makekann das Projekt kompiliert werden
Für dieses Projekt wurde ein 3,2" Touchscreen Display von joy-it verwendet. Folgende Anleitung basiert auf die Verwendung eines 3,2" Touchscreen Displays von joy-it.
-
Datei config.txt bearbeiten
- in dieser Datei muss folgender Inhalt eingefügt werden
sudo nano /boot/config.txt dtparam=spi=on dtoverlay=joy-IT-Display-Driver-32b-overlay:rotate=270,swapxy=1 dtparam=audio=on max_usb_current=1 hdmi_force_hotplug=1 config_hdmi_boost=7 hdmi_drive=1 hdmi_ignore_edid=0xa5000080Wird ein Raspberry Pi 4 verwendet muss zusätzlich folgende Zeile auskommentiert werden
[pi4] # Enable DRM VC4 V3D driver on top of the dispmanx display stack # #dtoverlay=vc4-fkms-v3d <-- Diese Zeile auskommentieren max_framebuffers=2 -
Datei cmdline.txt bearbeiten
- in dieser Datei muss in die erste Zeile folgendes eingfügt werden
fbcon=map:10 -
Datei
99-calibration.conferstellen und folgendes einfügensudo nano /usr/share/X11/xorg.conf.d/99-calibration.conf Section "InputClass" Identifier "calibration" MatchProduct "ADS7846 Touchscreen" Option "Calibration" "160 3723 3896 181" Option "SwapAxes" "0" EndSection -
System neustarten
-
Datei
99-fbturbo.confbearbeitensudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf # Diese Zeile Option "fbdev" "/dev/fb0" # In diese umändern Option "fbdev" "/dev/fb1" -
Benötigte Treiber herunterladen und installieren
cd /tmp # Kommandos für den 3,2" Touchscreen Display wget http://joy-it.net/files/files/Produkte/RB-TFT3.2-V2/joy-IT-Display-Driver-32b-overlay.zip unzip joy-IT-Display-Driver-32b-overlay.zip sudo cp joy-IT-Display-Driver-32b-overlay.dtbo /boot/overlays/joy-IT-Display-Driver-32b-overlay.dtbo # Funktionalität für den 3,2" Touchscreen Display sudo apt-get install xserver-xorg-input-evdev sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf -
Automount deaktivieren
- dazu die Datei
pcmanfm.confbearbeiten und folgendes einfügen
sudo nano /home/pi/.config/pcmanfm/LXDE-pi/pcmanfm.conf # Diese Zeilen einfügen [volume] mount_on_startup=0 mount_removable=0 - dazu die Datei
-
System neustarten
-
Optional: Display kalibrieren
- weitere Informationen können in der Anleitung gefunden werden
Wird ein Display verwendet kann das Programm bereits nach dem Systemstart automatisch ausgeführt werden. Dazu muss folgendes getan werden:
- einen Ordner
autostarterstellen
mkdir /home/pi/.config/autostart
- eine Datei
duckyDetector.desktoperstellen mit folgendem Inhalt:
nano /home/pi/.config/autostart/duckyDetector.desktop
[Desktop Entry]
Type=Application
Name=DuckyDetector
Exec=sudo /home/pi/duckyDetector/DuckyDetector
- CLion - IDEA
- Glade - Tool für GTK+ Interface Design
- Make - Build Management Tool
- libusb - Bibliothek für den Zugriff auf USB Geräte
- ClamAv - Open Source Antivirus Engine
- gtkmm - Offizielle C++ Interface für die GTK+ GUI Bibliothek
- Philipp Lohse - Initiale Arbeit
- Dennis La - Weiterführende Arbeit
- Johannes Kasser - Usability-Verbesserungen
- Joseph Hangstein - Usability-Verbesserungen
- für die Verwendung mit CLion wurden
CMakeLists.txtDateien erstellt- diese Dateien erlauben die Verwendung des code insight features
- ssh und WIFI über Speicherkarte aktivieren
- Touchscreen einstellen
- Automount deaktivieren
- Programm starten nach Systemstart
####### English below
This project enhances the DuckyDetector by Philipp Lohse and Dennis La by introducing an improved User Interface and a significantly simplified setup process.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See "Quick Start" on how to deploy the project on a live system. If you prefer to configure the system manually, please refer to the section "Manual Installation".
- Raspberry Pi 4 Model B
- at least 4 GB RAM
- Raspberry Pi OS (32-bit) with desktop
- Version: at least May 2020
- Release date: at least 2020-05-27
- Kernel version: at least 5.4
- Alternatively: Custom OS Image (for reference, see "Quick Start")
- Optional: 3,2"/3,5" Touchscreen Display
- Optional: Case for the Raspberry Pi
- Raspberry Pi Imager
A custom image is available under this link. The image contains a pre-installed version of the "Ducky Detector" utility, with the JoyIT 3,2" touchscreen already configured. The image can be flashed onto a SD card with the tool Raspberry Pi Imager. The drop-down menu "Choose OS" contains the option "Custom Image" to choose flash the provided .img file.
Before booting the Raspberry Pi, the SD card needs to be inserted into the SD slot.
Credentials for custom image:
Username: pi
Password: duckyDetector
Alternatively, the repository contains the script install.sh that automatically configures the Ducky Detector utility and installs all necessary dependencies. To make the file executable, type sudo chmod +x ./install.sh. The user running the script needs root privilege. Debug informations are written to the file debug.txt that is created at runtime.
- Flash the operating system Raspberry Pi OS on a memory card e.g. balenaEtcher
- To access the Raspberry Pi via ssh the following needs to be done:
- Create a file "ssh" without content
- Create a file "wpa_supplicant.conf" with the following content
country=AT
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="NETWORK-NAME"
psk="NETWORK-PASSWORD"
}
Following steps needs to be done to deploy this project on a live system.
- Optional: update and upgrad packages
sudo apt-get update
sudo apt-get upgrade
- Following packages are needed to be installed:
- g++
- libusb-1.0-0-dev
- libclamav-dev
- libgtkmm-3.0-dev
sudo apt-get install g++ libusb-1.0-0-dev clamav libclamav-dev libgtkmm-3.0-dev
- create a directory "mount" in "/mnt"
- create a directory "duckyDetector" in "/home/pi"
- save the project in there
- compile the project with the command
make
For this project a 3.2" Touchscreen Display of joy-it was used. The following steps are based on the usage of the 3.2" Touchscreen Display of joy-it.
-
Edit the file config.txt
- in this file the following content needs to be added
sudo nano /boot/config.txt dtparam=spi=on dtoverlay=joy-IT-Display-Driver-32b-overlay:rotate=270,swapxy=1 dtparam=audio=on max_usb_current=1 hdmi_force_hotplug=1 config_hdmi_boost=7 hdmi_drive=1 hdmi_ignore_edid=0xa5000080Is a Raspberry Pi 4 in use the following content needs to be commented out.
[pi4] # Enable DRM VC4 V3D driver on top of the dispmanx display stack # #dtoverlay=vc4-fkms-v3d <-- This setting must be commented ou max_framebuffers=2 -
Edit the file cmdline.txt
- in this file the following content needs to be added to the first line
fbcon=map:10 -
Create a file
99-calibration.confand add the following contentsudo nano /usr/share/X11/xorg.conf.d/99-calibration.conf Section "InputClass" Identifier "calibration" MatchProduct "ADS7846 Touchscreen" Option "Calibration" "160 3723 3896 181" Option "SwapAxes" "0" EndSection -
Reboot system
-
Edit file
99-fbturbo.confsudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf # Change this line Option "fbdev" "/dev/fb0" # to this Option "fbdev" "/dev/fb1" -
Further drivers needs to be downloaded and installed
cd /tmp # Commands for the 3,2" Touchscreen Display wget http://joy-it.net/files/files/Produkte/RB-TFT3.2-V2/joy-IT-Display-Driver-32b-overlay.zip unzip joy-IT-Display-Driver-32b-overlay.zip sudo cp joy-IT-Display-Driver-32b-overlay.dtbo /boot/overlays/joy-IT-Display-Driver-32b-overlay.dtbo # Functionality for the 3,2" Touchscreen Display sudo apt-get install xserver-xorg-input-evdev sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf -
Disable automount
- therefore edit the file
pcmanfm.confand add the following
sudo nano /home/pi/.config/pcmanfm/LXDE-pi/pcmanfm.conf # Diese Zeilen einfügen [volume] mount_on_startup=0 mount_removable=0 - therefore edit the file
-
Reboot system
-
Optional: Calibrate display
- further information can be obtained here
If the application is used with a display the application can be started right after booting the system with the following steps:
- create a directory
autostart
mkdir /home/pi/.config/autostart
- create a file
duckyDetector.desktopwith the following content:
nano /home/pi/.config/autostart/duckyDetector.desktop
[Desktop Entry]
Type=Application
Name=DuckyDetector
Exec=sudo /home/pi/duckyDetector/DuckyDetector
- CLion - IDEA
- Glade - Tool to design GTK+ interfaces
- Make - Build Management Tool
- libusb - Library accessing USB devices
- ClamAv - Open source antivirus engine
- gtkmm - Official C++ interface for the GTK+ GUI Library
- Philipp Lohse - Initial work
- Dennis La - Further work
- Johannes Kasser - Usability improvements
- Joseph Hangstein - Usability improvements
- for the usage with CLion
CMakeLists.txtfiles were created- these files allows the usage of
code insight feature
- these files allows the usage of
