National Cyber Warfare Foundation (NCWF)

Wi-Fi Hacking: Building Your Own Pineapple, Part 3


0 user ratings
2026-04-08 18:44:47
milo
Red Team (CNA)
From rogue honeypot access points that intercept traffic to EAP attacks that harvest enterprise credentials, we will show you how a tiny Pineapple device can become an initial access platform, a credential trap, and even a long-term bridge into internal corporate networks.

Welcome back, aspiring cyberwarriors! 





This article concludes the series on wireless Pineapple attacks. Over the past articles, we’ve explored a broad spectrum of techniques, from classic credential-harvesting methods to advanced interception and exploitation strategies.





In this final article, we will look at two particularly insidious approaches that require minimal attacker effort yet yield significant compromise potential. While Evil Twin attacks rely on deceiving users into manually connecting and submitting credentials through a fake portal, the techniques we cover today enable our device to automatically attract, intercept, and compromise clients without any user interaction. Modern wireless environments remain vulnerable to highly automated, low-effort attacks.





Honeypots





Something similar to the Evil Twin attack can be developed into a different attack that targets client devices rather than users.





In the previous section, when a user connects to the Pineapple, they are merely asked to enter confidential data. But there is an even simpler approach. What if the user’s computer is vulnerable, or the system login is protected by a weak password? And what if, at the moment the device connects to the “evil” wireless network, it also has a cable plugged in that connects it to a local wired network? In that case, the attacker’s path of intrusion becomes even easier. The Honeypot attack scenario uses the same mechanisms for launching an access point (hostapd.sh) and assigning IP addresses (dnsmasq.sh) as Evil Twin. Immediately after the wireless network starts, global attack scripts are launched, and as soon as a client with an IP address appears, a wave of targeted attacks is automatically directed at it.





attack script for the pineapple








The script is called attack.sh and should be placed in /home/pi/honeypot. Find it here.





The script repeatedly launches attacks against every newly connected client. It is possible to interfere with the HTTPS traffic of victims connected to the rogue access point. To do this, port 443/TCP is redirected to the Pineapple, and a self-signed certificate is injected during the connection process. If sensitive data appears in the intercepted traffic, the corresponding log entry is highlighted, and the yellow LED lights up on the device.





ssl split script for the pineapple








Here is sslsplit.sh needed for this. Place it in /home/pi/honeypot/on_network/.





Ultimately, the sslsplit.log file contains all decrypted traffic, available for further manual analysis and secret hunting. In general, the connected device does not necessarily transmit data in encrypted form, as it’s entirely possible that plain HTTP is used.





http script for the pineapple








For this we will need http.sh that will be placed in /home/pi/honeypot/on_network/. Find it here.





If any sensitive data is transmitted over unsecured HTTP, this is also visible in the logs via color highlighting and the yellow LED on the device. The attacker can record all client traffic with another script.





tcpdump script for the pineapple








Here you can see tcpdump.sh and it should also be placed in /home/honeypot/on_network/.





The victim is not restricted in any way here and all attempts to download something over unsecured HTTP or to accept a self-signed HTTPS certificate are welcomed by the honeypot.





EAP





As mentioned earlier, the Evil Twin attack is purely social in nature, with minimal technical requirements for the target. The Honeypot attack is more focused on technical vulnerabilities of client devices rather than user weaknesses, but it still requires the user to connect.





EAP attacks, however, are fully device-oriented.





These attacks have already been described in detail in the Drone Hacking series, and the exact same techniques can be applied here when using a Pineapple. The attack logic remains the same. A legitimate WPA Enterprise access point is imitated, clients are lured or forced to reconnect, and authentication material is captured during the negotiation process. In this context, the Pineapple simply replaces the drone as the attack platform. All previously discussed attack vectors, including the use of modified hostapd-wpe, and credential capture during WPA Enterprise authentication work identically.





hostapd eaphammer script for the pineapple








Here is hostapd-eaphammer.sh needed for this attack. Place it in /home/pi/eap/.





You can also deauthenticate clients using the next script.













It’s called deauth.sh and it should be placed in the same directory as the one above.





Depending on how the legitimate network is stored on the client device, credentials may be obtained either in clear text or in the form of NetNTLMv1 hashes. As discussed in the Drone Hacking articles, such credentials are often domain credentials, which makes these attacks particularly dangerous in corporate environments.





Because this attack targets WPA Enterprise (EAP) networks commonly found in organizations, it can easily become an initial foothold into an internal corporate network, with all the resulting consequences. A Pineapple prepared for such an attack can be placed both within the coverage area of legitimate access points and outside of it for extended periods of time. Client devices often leave and re-enter coverage areas at the beginning or end of the workday, where they may encounter the Pineapple.





pineapple








Typically, every organization has a common exit point through which all employees pass. This is a small area where hundreds or thousands of people may pass in a short time, and where corporate Wi-Fi coverage often ends. This area can become an ideal operational zone for a Pineapple. Employees who have not disabled Wi-Fi on their devices may unknowingly compromise their credentials, opening the door to the company’s internal network. An attacker who gains access using domain credentials is very likely to compromise the entire internal infrastructure quite quickly.





Post-Exploitation





If a password recovery or another attack succeeds, the attacker can once again use the Pineapple, but this time for remote access to the target Wi-Fi network via a VPN tunneled over 4G. The Pineapple takes on the role of the physical link to the network and the logical routing of packets into it.





Pi > wpa_passphrase 'target_essid' 'password' > wifi.conf
Pi > wpa_supplicant -i wlan0 -c wifi.conf & dhclient wlan0
Pi > sysctl -w net.ipv4.ip_forward=
Pi > iptables -t -A POSTROUTING -o wlan0 -j MASQUERADE




A remote attacker with a VPN connection to the Pineapple can gain network access to the target Wi-Fi network simply by specifying the Pineapple as the network gateway.





kali > route add -net 192.168.1.0/24 gw pineapple
kali > nmap 192.168.1.0/24




All that remains is to place the Pineapple near the compromised wireless device and return to a comfortable location.





pineapple








For example, wireless printers, which are abundant in almost every organization, often have weak passwords. At the same time, these printers are usually inside the wired local network. Through the VPN, the Pineapple provides the attacker with remote network access to the compromised wireless network, where further long-term attacks can be developed. At this point, the Pineapple’s role ends, and the internal penetration phase begins. But that is a completely different story.





How to Defend





The ability to carry out so many attacks using a single miniature device forces defenders to think about radical protective measures that eliminate all of the described attacks at their root. The Pineapple primarily demonstrates the stealth of these attacks. All of them could have been carried out long ago using a regular laptop, but few attackers are willing to sit in a snowbank outside a window under camera surveillance.





The main recommendation for defenders is to implement strict control over wireless networks. Ideally, their coverage area should not extend beyond controlled zones. Even if wireless networks are vulnerable, these vulnerabilities should be kept strictly internal and not exploitable from outside the office. In such a case, a potential attacker will not even have the physical opportunity to launch attacks, and this alone will neutralize all of the described threats.





Summary





The Pineapple is dangerous because it packages familiar wireless weaknesses into a small and low-risk platform. By removing the need for user interaction and operator presence, it can turn Wi‑Fi exposure into an initial access vector that will give you credentials, data, or a long‑term bridge into internal networks. On the other hand, wireless security failures are rarely technical surprises and almost always exposure problems. Tight control of RF coverage, strong WPA‑Enterprise validation, hardened client behavior, and rapid detection of rogue access points remove the attacker’s window of opportunity.





If you like the work we’re doing here and want to take your skills even further, we also offer a full SDR for Hackers Career Path. It’s a structured training program designed to guide you from the fundamentals of Software-Defined Radio all the way to advanced, real-world applications in cybersecurity and signals intelligence.



Source: HackersArise
Source Link: https://hackers-arise.com/pineapple-attacks-building-your-own-pineapple-part-3/


Comments
new comment
Nobody has commented yet. Will you be the first?
 
Forum
Red Team (CNA)



Copyright 2012 through 2026 - National Cyber Warfare Foundation - All rights reserved worldwide.