hacktricks/network-services-pentesting/4840-pentesting-opc-ua.md
2024-01-14 21:54:55 +02:00

4 KiB

4840 - Pentesting OPC UA

Learn AWS hacking from zero to hero with htARTE (HackTricks AWS Red Team Expert)!

Other ways to support HackTricks:

Basic Information

OPC UA stands for Open Platform Communications Unified Access. It is a long-standing open-source protocol for data exchange, telemetry collection, and control of industrial equipment. It is very widely used in industrial settings including Manufacturing, Energy, Aerospace, and Defence. It is the only standardized way of communicating with PLCs and allows the equipment of different vendors to communicate with each other.

OPC UA is very flexible in terms of configuration. It can be configured to be extremely secure, or insecure. Many times the security features are disabled to allow communication with older devices. Testing the configuration for weaknesses can therefore reveal easy entry to critical systems.

Network scanners do not recognize OPC UA, thus discovery may require some work if nonstandard ports are used.

Default port: 4840

PORT     STATE SERVICE REASON
4840/tcp open  unknown syn-ack

Pentesting OPC UA

To reveal security issues in OPC UA servers, scan it with OpalOPC.

opalopc -vv opc.tcp://$target_ip_or_hostname:$target_port

Exploiting vulnerabilities

⚠️ Warning ⚠️: Poking around without knowing what you are doing may cause serious health hazards to people and monetary losses to your client

If authentication bypass vulnerabilities are found, you can configure an OPC UA client accordingly and see what you can access. This may allow anything from merely reading process values to actually operating heavy-duty industrial equipment.

To get a clue of the device you have access to, read the "ServerStatus" node values in the address space and google for a usage manual.

Shodan

  • port:4840

References

Learn AWS hacking from zero to hero with htARTE (HackTricks AWS Red Team Expert)!

Other ways to support HackTricks: