Skip to main content

Accessing Internal Network by WiFi Hacking - 2024 Pentest Case

Illustration of Accessing Internal Network by WiFi Hacking - 2024 Pentest Case
Aleksander Wojdyła

Introduction

During the last penetration test, I performed an Evil Twin attack, which involves setting up a fake access point with the same name as the legitimate one.

Due to improper configuration of endpoint devices (e.g., computers, phones, tablets), users could accept an incorrect (fake, generated by the auditor) certificate identifying the network. This led to a successful capture of the authentication segment of the communication. Subsequently, the auditor subjected the captured data to brute-force attacks, resulting in the retrieval of credentials.

The captured credentials are domain credentials, meaning several systems rely on a central authentication system (most likely Active Directory), which could enable an attacker to conduct further attacks.

Following network reconnaissance, it was established that the two networks are WPA/WPA-2 Enterprise networks, which require a device certificate, as well as a username and password, for authentication. Wi-Fi clients, however, have the option to either follow the authentication method proposed by the access point or select their own. The standard configuration for Windows, macOS, Linux, Android, and iOS allows bypassing the certificate section and directly entering the username and password.

In the subsequent step, users receive a notification about an untrusted certificate (similar to the HTTPS Man-in-the-Middle attack scenario), and it is up to the user to decide whether to transmit credentials over an insecure channel. Best practices indicate that it is safest when users cannot accept a fake certificate, as described in the following section.

The attack

The attack was conducted using the eaphammer tool: https://github.com/s0lst1c3/eaphammer

The first step involved generating a certificate (a fake certificate was generated containing the phrases “COMPANY_NAME” and “COMPANYNAMECA” to build trust). The next step is to activate the tool and start listening:

Eaphammer tool

The first result appeared almost immediately:

First result

After cracking harvesting credentials, password was obtained in hash.

This was next cracked, with the hashcat tool. https://hashcat.net/hashcat/

The auditor was unable to verify whether these credentials were valid (the cracking process completed a day after the audit), however, the mere possibility of capturing such credentials necessitates rating the severity of this vulnerability as CRITICAL.

In this case malicious actors can then access internal network and perform further attacks.

Recommendation

It is recommended to implement changes on endpoint devices (phones, computers, tablets, etc.), enforcing network connections only if the network presents a valid certificate (i.e., issued by an internal CA) with a clearly defined Common Name (CN). If devices are managed through an MDM solution, this will be the optimal place to enforce such changes.

Other Insights

Illustration of From SOQL Query to Data Breach - Lessons from a Real-World Pentest

From SOQL Query to Data Breach - Lessons from a Real-World Pentest

Adam Borczyk

During one of security audits of a web application, I uncovered an interesting vulnerability: the exposure of an endpoint that allows users to perform arbitrary Salesforce Object Query Language (SOQL) queries. Such functionality, when available to unauthorized users or misconfigured, poses significant security risk, especially if Row-Level Security (RLS) permissions are not properly set. In this article I will analyze technical aspects of this vulnerability, the potential risks, and steps to mitigate such issues.

READ article
Illustration of Bypassing Host Validation: Real Pentest Case of Sensitive Data Exposure

Bypassing Host Validation: Real Pentest Case of Sensitive Data Exposure

MATEUSZ Kowalczyk

During one of penetration tests, I discovered a vulnerability that allowed us to bypass a host whitelist, leading to the exposure of sensitive data. This behavior could let attackers to exfiltrate sensitive information, such as password reset tokens, to external hosts they control. The severity of this vulnerability is significant, as it opens up further attack vectors that could potentially compromise the application and its users.

READ article
Illustration of Hacking IBM AS/400 in 2024: QShell and Remote Code Execution

Hacking IBM AS/400 in 2024: QShell and Remote Code Execution

MATEUSZ Kowalczyk

A few months ago, one of our clients commissioned us to audit a customer service application that continued to use the IBM AS400 environment. These days, an emulator is needed to connect to this application. An AS/400 emulator is software designed to emulate the functionality of an AS/400 system on a different platform, such as a modern desktop or server computer. These emulators enable users to access and interact with AS/400 applications and resources without the need for physical AS/400 hardware.

READ article
A professional cybersecurity consultant ready to assist with your inquiry.

Any questions?

Happy to get a call or email
and help!