hacktricks/network-services-pentesting/4840-pentesting-opc-ua.md

63 lines
3.8 KiB
Markdown
Raw Normal View History

2024-01-14 19:54:55 +00:00
# 4840 - Pentesting OPC UA
{% hint style="success" %}
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2024-01-14 19:54:55 +00:00
<details>
2024-01-14 19:54:55 +00:00
<summary>Support HackTricks</summary>
2024-01-14 19:54:55 +00:00
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
2024-01-14 19:54:55 +00:00
</details>
{% endhint %}
2024-01-14 19:54:55 +00:00
2024-02-10 13:11:20 +00:00
## Osnovne informacije
2024-01-14 19:54:55 +00:00
**OPC UA**, što znači **Open Platform Communications Unified Access**, je ključni open-source protokol koji se koristi u raznim industrijama kao što su proizvodnja, energija, vazduhoplovstvo i odbrana za razmenu podataka i kontrolu opreme. Omogućava jedinstvenu komunikaciju opreme različitih proizvođača, posebno sa PLC-ovima.
2024-01-14 19:54:55 +00:00
Njegova konfiguracija omogućava jake bezbednosne mere, ali često, radi kompatibilnosti sa starijim uređajima, one se smanjuju, izlažući sisteme rizicima. Pored toga, pronalaženje OPC UA usluga može biti teško jer mrežni skeneri možda neće moći da ih otkriju ako su na nestandardnim portovima.
2024-01-14 19:54:55 +00:00
2024-02-10 13:11:20 +00:00
**Podrazumevani port:** 4840
2024-01-14 19:54:55 +00:00
```text
PORT STATE SERVICE REASON
4840/tcp open unknown syn-ack
```
## Pentesting OPC UA
2024-01-14 19:54:55 +00:00
Da biste otkrili bezbednosne probleme u OPC UA serverima, skenirajte ih sa [OpalOPC](https://opalopc.com/).
2024-01-14 19:54:55 +00:00
```bash
opalopc -vv opc.tcp://$target_ip_or_hostname:$target_port
```
2024-02-10 13:11:20 +00:00
### Iskorišćavanje ranjivosti
2024-01-14 19:54:55 +00:00
Ako se pronađu ranjivosti za zaobilaženje autentifikacije, možete odgovarajuće konfigurisati [OPC UA klijent](https://www.prosysopc.com/products/opc-ua-browser/) i videti šta možete da pristupite. Ovo može omogućiti sve, od jednostavnog čitanja vrednosti procesa do stvarnog upravljanja teškom industrijskom opremom.
2024-01-14 19:54:55 +00:00
Da biste dobili naznaku o uređaju kojem imate pristup, pročitajte vrednosti čvora "ServerStatus" u adresnom prostoru i pretražite priručnik za korišćenje.
2024-01-14 19:54:55 +00:00
## Shodan
* `port:4840`
2024-02-10 13:11:20 +00:00
## Reference
2024-01-14 19:54:55 +00:00
2024-02-08 21:36:35 +00:00
* [https://opalopc.com/how-to-hack-opc-ua/](https://opalopc.com/how-to-hack-opc-ua/)
2024-01-14 19:54:55 +00:00
{% hint style="success" %}
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2024-01-14 19:54:55 +00:00
<details>
2024-01-14 19:54:55 +00:00
<summary>Support HackTricks</summary>
2024-01-14 19:54:55 +00:00
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
2024-01-14 19:54:55 +00:00
</details>
{% endhint %}