This website uses cookies

To provide the highest level of service we use cookies on this site.
Your continued use of the site means that you agree to their use in accordance with our terms and conditions.

Pentest Chronicles

A Real-World Pentest Story from a SCADA Environment

Krystian Działowy

July 28, 2026

ABOUT THE VULNERABLITY
During one of the recent LAN infrastructure audits, I identified a critical security flaw within an industrial control system (SCADA/HMI) environment. I discovered that graphical services, specifically X11 and VNC, were exposed on the local network without any authentication mechanisms in place. There was no VNC Auth password verification enforced, and the MIT-MAGIC-COOKIE authorization mechanism for X11 sessions was entirely bypassed. This configuration allows for continuous, undetectable surveillance of the operator's screen in real-time, giving a potential attacker uninterrupted insight into the production process without raising suspicion. Furthermore, it opens the door to direct interaction with the machine control interfaces. The vulnerability stems from exposing critical graphical server ports to the network without proper access controls. Network access to the target machine was freely available on TCP ports 5901-5903 for VNC and 6001-6005 for X11. In an industrial context, leaving these protocols open allows any user with network access to passively monitor the graphical interface or actively manipulate it, posing a severe threat to operational safety. STEP-BY-STEP EXPLOITATION 1. Visual Spying and Screen Extraction (VNC and X11) By utilizing standard tools like xwd, I was able to entirely bypass the Lock Screen and extract the current display. Running the command xwd -root -display x.x.x.x:1 -out screen.xwd provided a clear view of the […] panel, which contained detailed information about ongoing production processes.

To take it a step further, I crafted a simple shell loop (while true; do xwd -root - display x.x.x.x:1 -out spy.xwd; sleep 5; done). This allowed me to automate the spying, creating an uninterrupted stream of the operator's actions. The captured screenshots revealed highly sensitive data:

• Chemical compositions and mixture weights, such as those in tanks like XYZ15.

• Active production alarms, for example, "Maximum level in XYZ28".

At this stage, I could have easily taken control of the process, falsified readings, disabled alarms, or modified parameters in the "New Value" column.
2. Active Keylogging Beyond passive visual surveillance, I leveraged the native xinput tool to map the physical control layer. I successfully identified the active input devices, notably the "Virtual core pointer" (id=0) and the "Virtual core keyboard" (id=1).

Next, I verified the possibility of running a keyboard listener by executing the command DISPLAY=x.x.x.x:1 xinput test. As a result, the pressed keys would appear on my terminal in real-time, effectively functioning as a keylogger that could allow for the theft of administrative passwords.
3. Sabotage and GUI Hijacking I also proved the complete lack of window separation by injecting external applications directly into the operator's view and launched xeyes as well as xcalc straight onto the target display.
It is crucial to emphasize that open access to the X11 protocol allows not only for passive spying but also for active, damaging sabotage. For instance, by using the xinput float command, I could remotely disconnect the operator's physical mouse.

Ultimately, I could even disable all input devices using xinput disable. This would completely lock out the operator, preventing them from reacting to critical industrial alarms and directly threatening the safety of the technological processes and the continuity of production.
FINAL NOTES This case is a stark reminder of the immense danger of deploying unauthenticated management interfaces in critical infrastructure. The open access to VNC and X11 provided a direct, low-effort path to total system compromise and potential physical sabotage.

My recommendations for the client to immediately secure the environment are as follows:

• Implement full authentication for the VNC service (VNC Auth) in immediate mode.

• Enable strict authorization for the X11 service using the xauth mechanism.

• Absolutely separate the SCADA/HMI production environment from the rest of the LAN using a firewall that filters traffic to TCP ports 5900+ and 6000+




Next Pentest Chronicles

When Usernames Become Passwords: A Real-World Case Study of Weak Password Practices

Michał WNękowicz

9 June 2023

In today's world, ensuring the security of our accounts is more crucial than ever. Just as keys protect the doors to our homes, passwords serve as the first line of defense for our data and assets. It's easy to assume that technical individuals, such as developers and IT professionals, always use strong, unique passwords to keep ...

SOCMINT – or rather OSINT of social media

Tomasz Turba

October 15 2022

SOCMINT is the process of gathering and analyzing the information collected from various social networks, channels and communication groups in order to track down an object, gather as much partial data as possible, and potentially to understand its operation. All this in order to analyze the collected information and to achieve that goal by making …

PyScript – or rather Python in your browser + what can be done with it?

michał bentkowski

10 september 2022

PyScript – or rather Python in your browser + what can be done with it? A few days ago, the Anaconda project announced the PyScript framework, which allows Python code to be executed directly in the browser. Additionally, it also covers its integration with HTML and JS code. An execution of the Python code in …

Any questions?

Happy to get a call or email
and help!