Hacking of critical infrastructure in Mexico: Vulnerabilities in gas stations

2026-05-14

Internal image: Hacking of critical infrastructure in Mexico: Vulnerabilities in gas stations

We hack gas stations live.

Not in a laboratory. Not in a simulation. Not in a controlled environment with test servers. Live. Real gas stations. Operating. With fuel in the tanks, with cooling systems running, with customers pumping gas while we were looking at the control panels of their industrial systems from a laptop hundreds of miles away.

I say "we" because this was a collaborative work with Rafael Bucio, one of the most respected security researchers in the region, founder of the cybersecurity company TPX and frequent speaker at conferences such as DragonJAR -- the most important Spanish-speaking computer security event. What we did was security research. Responsible disclosure. What is known in the world of ethical hacking as responsible disclosure. We found the vulnerabilities, documented them, reported them to whoever needed to know and presented them at security conferences so that the industry became aware.

But awareness did not translate into action. And that's what worries me. Because what we found was not a theoretical vulnerability. It was not a hypothetical scenario from an academic paper. It was real access to systems that control infrastructure that can kill people if manipulated incorrectly.

That is what I am going to document in this article. Not to give instructions on how to do it -- I'm not going to post IPs, I'm not going to post credentials, I'm not going to post reproducible steps. I'm going to document what we found, why we found it, what it means for the security of Mexico's critical infrastructure, and what should be done about it.

Gas station businessman reading me: what follows should worry you. Deeply.

Energy regulator reading me: what follows should embarrass you. Gravely.

IT vs. OT: the border that should not be crossed and that is wide open

Before getting into the findings, I need to explain a concept that is fundamental to understanding the severity of what we found: the difference between IT networks and OT networks.

IT networks -- Information Technology -- are the ones we all know. The office computers. The email. The ERP. The customer database. The WiFi. They are the networks that process information. If you hack them, you steal data. It's serious, but it's information. It can be recovered. It can be remedied. It can be contained.

OT networks -- Operational Technology -- are different. They are the networks that control physical processes. Those that move machines. Those that open valves. Those that regulate temperatures. Those that monitor levels of liquids and gases. Those that control refrigeration systems, pumping systems, ventilation systems, fire safety systems. They are the networks that connect industrial sensors, actuators and controllers.

If you hack an IT network, you steal data.

If you hack an OT network, move things. Open valves. Fan out. Readings of sensors. That's physical damage. Potentially kill people.

In industry, IT networks and OT networks should be separated. Completely. Physically. Without any connection between them. It is the most basic principle of industrial security: the world of information and the world of physical operations do not touch each other. An attacker who enters the IT network can steal emails. An attacker entering the OT network can cause an explosion.

The separation between IT and OT is a matter of life safety. It is not a recommendation. It is an engineering principle that is written in blood -- the blood of industrial incidents that occurred when that separation did not exist.

What we found in Mexican gas stations is that this separation did not exist. The OT networks -- the systems that control the gas station's physical processes -- were connected to the Internet. Directly. Without industrial firewall. No segmentation. With nothing between the control system and anyone with an internet connection who knew where to look.

MassScan: this is how a vulnerable gas station is found in 45 minutes

MassScan, as I explained in the previous post, is a port scanner capable of scanning the entire IPv4 space in minutes. It is open source. It's legal. It's the tool that any security researcher -- and any attacker -- has in their basic arsenal.

What we did was the following: we identified the typical ports of industrial control systems used in gas stations. Tank monitoring systems -- which measure fuel level, temperature and pressure in underground tanks -- have specific protocols that run at specific ports. SCADA systems -- Supervisory Control and Data Acquisition, systems that allow remote monitoring and control of industrial processes -- use protocols such as Modbus (port 502), DNP3 (port 20000), and various proprietary protocols from industrial equipment manufacturers.

We ran MassScan against the IP ranges assigned to Mexico, looking for those ports. And what we found was a list of IP addresses that were responding on those ports. IP addresses that, when investigated, corresponded to tank monitoring systems at real gas stations.

We didn't have to hack anything to find them. We just had to ask, "Hey, Internet, is anyone listening on port 10001?" And the answer was: "Yes, here I am. I am a Guardian AST fuel tank monitoring system from a gas station in Querétaro. How can I help you?"

I'm simplifying, but the mechanics are literally that. The systems were exposed to the internet, responding to connections, no authentication, no encryption, no nothing. Like an open door with a sign that says "Come in."

What we found: the disaster inventory

I'm going to document the findings in categories because the pattern was repeated at multiple petrol stations. That was no secluded case. That was a systemic problem.

Exposed tank monitoring systems

Tank monitoring systems are devices installed in underground gas station tanks to measure fuel level, temperature, pressure and detect leaks. They are essential for the safe operation of the gas station. If the fuel level is too low, the pump may run dry and be damaged. If the temperature rises too high, there is a risk of fire or explosion. If there is a leak, there is an environmental and safety risk.

These systems have a management interface that allows you to read sensor data, set alarms and, in some models, execute actions on the equipment -- such as turning off pumps or activating alarms.

What we found is that dozens of these systems were accessible from the Internet. No password. Or with factory password. We could see in real time the fuel level in each tank, the temperature, the delivery history, the volume sold. We could see when the last pipe of fuel had arrived and how much it had discharged.

That information, by itself, is already sensitive. A competitor could monitor a rival gas station's sales in real time. A criminal could know exactly when the gas station receives fuel and plan a robbery. An extortionist could demonstrate that he has access to the gas station's systems and demand payment.

But that wasn't the most serious thing.

Access to operational controls

In some of the systems we found, we couldn't just read data. We could write. We could modify configurations. We could change the alarm thresholds -- make the system not alarm when the temperature rises to dangerous levels. We could alter the sensor readings -- make the system report a different fuel level than the actual one. We could interact with the controls of the equipment connected to the monitoring system.

Understand the seriousness: I am not talking about stealing information. I'm talking about manipulating the physical controls of a facility that stores thousands of liters of flammable fuel.

An attacker with access to these controls could:

Deactivate temperature alarms. If the temperature in a tank goes up above secure boundaries and the alarm's off, the gas station's personnel aren't clear. And depending on conditions, an uncontrolled temperature in a fuel tank can have catastrophic consequences.

Alter level readings. If the system reports that the tank's full when it's actually nearly empty, the bomb can work dry. If you report that it's empty while actually full, an overfilled can be caused during the next fuel delivery. An overfill of an underground petrol tank leads to a spill that can contaminate ground and cold blankets.

Manipulate vapor recovery systems. Modern gas stations have systems that capture fuel vapors during tank filling to prevent them from being released into the atmosphere. These vapors are flammable. If the recovery system is disabled remotely and vapors accumulate in a confined space, a spark can cause an explosion.

Turn off the cooling systems. This was one of the most critical findings. At gas stations that handle LPG (liquefied petroleum gas), refrigeration systems maintain the gas at a temperature that keeps it in a liquid state. If the refrigeration is turned off, the liquid gasses, the pressure increases and the safety valves activate -- if they work. If they do not work, or if they have been tampered with, overpressure can cause mechanical failure of the tank.

That was all accessible from the internet. From anywhere in the world. With an internet connection and factory credentials published by the manufacturer in his user manual -- a manual that's available as PDF on the manufacturer's website, downloadable by anyone.

Industrial protocols without authentication

The protocols used by these systems -- Modbus, DNP3, BACnet, among others -- were designed in the 1970s and 1980s, when industrial networks were closed circuits that had no connection to the outside world. They were not designed for the internet. They do not have native authentication. They do not have encryption. They do not have access control.

Modbus, for example, is a serial communication protocol that allows a master device to read and write registers to slave devices. It does not have a user. It doesn't have a password. You don't have a session. If you can send a Modbus packet to a device that speaks Modbus, you can read and write any register from the device. It's that simple. That's how dangerous.

When these protocols were used in closed networks -- on a serial cable connecting a PLC to an HMI inside the plant, with no connection to anything external -- the lack of authentication was not a serious problem. The only one who could send a Modbus packet was the one who had physical access to the cable.

But when those same protocols are exposed to the Internet -- when the serial cable is replaced by a TCP/IP connection accessible from anywhere in the world -- the lack of authentication becomes an open door for any attacker.

And that's exactly what we found. Industrial protocols designed for closed networks and exposed to an open internet with no additional safety layer.

Industrial protocols without authentication, in "Mapping critical infrastructure in Mexico: Vulnerabilities at petrol stations"

The DragonJAR case: the presentation that should have changed everything

Rafael Bucio presented these findings at DragonJAR, the most important Spanish-speaking computer security conference. The presentation was public. That was documented. It was reported by mass media. It included live demonstration of access to actual fuel system.

The audience -- cybersecurity professionals from across Latin America -- reacted with a mix of technical fascination and genuine concern. Those of us who knew about industrial safety understood the seriousness. It wasn't a CTF. It was not an academic exercise. It was real critical infrastructure, vulnerable, operating, with customers fueling while we watched the control panels.

After the presentation, responsible disclosure was made. The operators of the affected gas stations were notified. The manufacturers of the monitoring systems were notified. The relevant authorities were notified.

And what happened after that was what's always happened in Mexico when we report vulnerabilities in critical infrastructure: very little. Some gas stations closed the ports. Others have changed their credentials. Many did nothing. And the systemic problem -- the reason why these stations were vulnerable first -- remains unresolved.

Because the problem is not that a gas station has an open port. The problem is that there is no regulatory framework that requires gas stations to comply with minimum cybersecurity standards in their industrial control systems. There is no authority that audits these systems. There is no consequence for the operator who leaves their SCADA systems exposed to the internet with factory passwords.

In the United States, the TSA (Transportation Security Administration) issued cybersecurity directives for oil and gas pipeline operators after the ransomware attack on Colonial Pipeline in 2021. CISA (Cybersecurity and Infrastructure Security Agency) publishes alerts and advice for critical infrastructure sectors. NERC-CIP establishes mandatory cybersecurity standards for the electricity sector. There is regulation. There are audits. There are consequences.

In Mexico, gas stations operate industrial control systems connected to the internet with factory passwords and nothing happens. There is no specific cybersecurity regulation for the sector. There are no audits. There are no consequences.

Stuxnet was not science fiction: Mexico's precedent

For those who think that hacking critical infrastructure is theory, that it is something that "only happens in the movies," I need to remember a case that changed the history of global cybersecurity.

In 2010, Stuxnet was discovered. Malware designed specifically to attack uranium enrichment centrifuges at the Natanz nuclear plant in Iran. Stuxnet was a cyber weapon -- probably developed by the United States and Israel -- that infiltrated the Siemens PLCs (Programmable Logic Controllers) that controlled the centrifuges. The malware altered the rotation speed of the centrifuges, making them spin too fast or too slow, physically damaging them. And at the same time, it showed the operators normal readings on their screens, so they would not detect the attack.

Stuxnet destroyed about 1,000 centrifuges. He delayed Iran's nuclear program for years. And it was the first documented case of a cyber attack that caused physical destruction of industrial equipment.

Stuxnet required an extraordinary level of sophistication. It was developed by nation-states with unlimited budgets and access to industry equipment identical to those of the target to test malware before deploying.

What we find at Mexican gas stations does not require that sophistication. Not even remotely. Stuxnet had to overcome airgaps -- networks disconnected from the Internet -- using infected USB drives. We find the control systems directly on the internet. Stuxnet had to exploit multiple zero-day vulnerabilities to spread. We enter with factory passwords. Stuxnet had to hide its presence from operators by modifying instrument readings. We could modify the readings directly from the web administration interface.

What took a superpower intelligence team years of development to accomplish against the Iranian nuclear program, a teenager with MassScan and Google could replicate against a Mexican gas station in an afternoon.

That is the scale of vulnerability. That is the magnitude of the risk. And that is why this should be on Mexico's national security agenda.

The supply chain problem: who installs these systems

To understand why the situation is so serious, you have to understand how industrial control systems are installed in Mexican gas stations.

The gas station operator does not purchase the tank monitoring system and install it himself. Hire a systems integrator -- a company that specializes in installing and configuring industrial equipment. The integrator installs the equipment, connects it to the network and configures it.

Here's the problem: many integrators are not cybersecurity specialists. They are specialists in industrial control. They know how to connect sensors to PLCs. They know how to configure HMIs. They know how to make the system correctly measure the fuel level in the tank. But they don't know -- or care -- about cybersecurity.

The integrator needs remote access to the system to perform maintenance, updates and technical support. Instead of setting up a VPN, secure tunnel, or multi-factor authentication access, you do the easiest thing: open a port on the gas station router and point traffic directly to the control system. Port 80 for the web interface. Port 502 for Modbus. Port 10001 for the proprietary protocol of the monitoring system. Everything open. All unencrypted. All with factory credentials.

The integrator finishes the installation. He leaves. The gas station operator signs the acceptance of the work. And the system is exposed to the internet forever. Because no one checks it. Nobody audits it. No one verifies that the configuration is secure.

This pattern is not exclusive to Mexico. It is repeated throughout Latin America. It is repeated all over the world. But in countries with industrial cybersecurity regulation, eventually someone detects it and corrects it -- because there is an audit, because there is a regulatory requirement, because there is an insurer that requires it. In Mexico, there are none of these mechanisms for the gas sector.

The supply chain problem: who installs these systems, in "Hacking critical infrastructure in Mexico: Vulnerabilities at gas stations"

What should exist and does not exist

If Mexico takes the cyber-security of its energy infrastructure seriously, the minimum necessary would be:

Regulation of cyber security for critical infrastructure. A standard that lays down minimum cyber safety requirements for industrial monitoring systems at petrol stations, processing plants, pipelines, storage terminals and any installations that manage dangerous fuels or materials. Specific requirements: IT and OT network segmentation, prohibition of exposure of industrial protocols to the Internet, required change of factory credentials, encryption of communications, monitoring of accesses, penetration testing periodic.

Authority with audit capacity. A body -- can be the CRE (Energy Regulation Commission), can be a new entity, can be an extension of CERT-MX -- with the legal authority and technical capacity to audit cyber-security of critical infrastructure installations. No paper audits. Technical audits. With port scans. with penetration testing. Configure check.

Requirements for system integrators. Integrators who install and configure industrial control systems in critical infrastructure should be required to comply with cybersecurity standards. Installing a tank monitoring system with factory passwords and open ports to the internet should have consequences. Professional, legal and regulatory.

The vulnerability outreach programme. An official, secure and legally protected channel for security researchers to report vulnerabilities to critical infrastructure without fear of persecution. In today's state of affairs, an investigator who finds a vulnerable gas station in Mexico has a dilemma: if she reports them, she risks an operator denouncing them for unauthorized access. If she doesn't report it, vulnerability remains there for an actual attacker to blow up. That dilemma should not exist. Responsible disclosure should be protected by law.

Contingency response for OT systems. Most cybersecurity incident response teams in Mexico -- the few that exist -- are trained for IT network incidents. They know how to respond to ransomware on a Windows server. They know how to investigate a database leak. But they don't know how to respond to an incident on a Siemens PLC or fuel tank monitoring system. Specialized teams are needed to respond to incidents in OT systems. And they are needed before incidents occur, not after.

None of this exists today. And as long as it does not exist, Mexico's gas stations will continue to be easy targets.

The scenario that no one wants to imagine

I'll build a stage. Not as bad a case as possible. A pausible case. A case based on the vulnerabilities we document.

A cyber crime group -- not a nation-state, not an elite hacker group, a common crime group with moderate technical capacity -- runs MassScan against Mexico's IP ranges looking for ports of industrial control systems. Find dozens of light stations with exposed monitoring systems. Enter with factory credentials.

The group does not want to cause an explosion. He is not interested in terrorism. He is interested in money.

Phase 1: Recognition. The group monitors the systems of several gas stations for weeks. Learn trading patterns. It knows when they receive fuel. You know how much they sell per day. It knows which are the largest gas stations, those that move the most volume, those that have the most to lose.

Phase 2: Demonstration. The group selects a gas station and alters the level sensor readings. The system reports that the tanks are empty when they are full. The pumps stop automatically. The gas station stops selling. The operator calls the integrator. The integrator does not understand what is happening. A day of sales is lost.

Phase 3: Extortion. The group contacts the gas station operator. It shows you that you have access to the control systems. It tells him: "Pay us

It is industrial ransomware. Not data ransomware -- physical operations ransomware. They do not encrypt files. They hijack control of the facility.

I don't need to make up this scenario. Variants of this attack have already occurred in other countries. In 2021, an attacker attempted to alter chemical levels in the Oldsmar, Florida water treatment system. In 2023, the hacktivist group CyberAv3ngers -- linked to Iran -- attacked Unitronics industrial controllers in water systems in the United States. Attacks on critical infrastructure through industrial control systems are not theory. They are operational reality.

And Mexico's gas stations are less protected than a small town's water system in Florida.

What every person reading this needs to know

Gas station operator: call your system integrator and ask if your tank monitoring systems are accessible from the internet. If the answer's yes -- or if the answer's "I don't know" -- she's got a problem. Request that all unnecessary ports be closed at the router. Ask that all factory passwords be changed. Ask that remote access be made through a VPN, and not through open ports. Call for a cyber-security audit of your OT systems. And if his integrator doesn't know what a VPN is or doesn't understand why an open port is an issue, change his integrator.

Industrial systems integrator: how the industry has been installing industrial monitoring systems for 20 years -- open ports, factory credentials, remote and unencrypted access -- is no longer acceptable. The systems you install are online. And online, there are attackers. If you install a system with factory credentials and direct internet access, you are creating vulnerability. Capture yourself in commercial cyber security. IEC 62443 is the standard. Learn how to implement it.

Power regulator: The CRE regulates the operation of gas stations. It regulates fuel quality. Regula measurement. It regulates physical security. But it doesn't regulate cyber security of monitoring systems. That's got to change. If a gas station operator can lose his permission by having an expired extinguisher, he should be able to lose his permission by having his SCADA system exposed to the Internet without a password. Both are safety risks. The difference is that an extinguisher protects an area. The dedicated SCADA systems can affect the entire installation.

Legislator who is working on cybersecurity issues: Mexico needs a cybersecurity law for critical infrastructure. Not a generic cybersecurity law that mentions critical infrastructure in a paragraph. A specific law, with defined technical standards, with audit authority, with real consequences for non-compliance and with legal protection for researchers who responsibly report vulnerabilities.


We hack gas stations live. Not to prove that we are capable. To show that anyone is capable. That's the difference that matters.

The vulnerabilities we found did not require sophisticated tools. They did not require zero-day exploits. They did not require a budget. They required MassScan, a web browser, and factory credentials that are published in the manufacturer's manual.

If we did that as an investigation, someone else can do that as an attack. The tool's the same. Intent's the only difference. And intention isn't something that can be controlled with a firewall.

What can be controlled is the attack surface. Close ports. Change passwords. Segment networks. Audit systems. Demand standards. Make critical infrastructure cybersecurity a must, not a suggestion.

Because when a gas station explodes due to a physical security incident, we investigate what went wrong. When a gas station is attacked through its industrial control systems -- and it's going to happen, it's a matter of when, not if -- we're going to investigate what went wrong. And the answer is going to be the same one we are documenting today: everything. Everything failed. Because nothing was protected.

Contact
Let's talk about your case
Open contact form