Sicurezza Sistemi e Reti
Report 5000 ufficiale: triade CIA / Defense in Depth, crittografia / PKI / eIDAS, MFA / SPID, TLS / VPN / firewall, OWASP / malware, NIS2 / GDPR / ACN + 25 numeri chiave + 15 trabocchetti.
1 Principi fondamentali: triade CIA
CIA — Confidentiality, Integrity, Availability
- Riservatezza (Confidentiality) — solo soggetti autorizzati accedono alle informazioni
- Integrità (Integrity) — i dati non sono alterati in modo non autorizzato
- Disponibilità (Availability) — risorse accessibili quando servono
Estensione moderna AAA: Authentication, Authorization, Accounting (audit). Aggiunte ulteriori: Non-Repudiation (non ripudio), Privacy.
Modello Parkerian Hexad (1998)
Estende CIA aggiungendo: Possession/Control, Authenticity, Utility.
Defense in Depth
Strategia a livelli multipli sovrapposti: fisico → rete → host → applicazione → dato → utente. Nessun singolo controllo deve essere unico baluardo.
Principi di base
- Least Privilege: minimi privilegi necessari
- Need to Know: accesso solo a info indispensabili
- Separation of Duties: separazione compiti critici
- Fail Secure / Fail Closed: in caso di errore → bloccare
- Zero Trust: "never trust, always verify" (modello NIST SP 800-207)
2 Crittografia
Crittografia simmetrica
Stessa chiave per cifratura e decifratura. Veloce ma problema scambio chiave.
- DES (deprecato — 56 bit)
- 3DES (deprecato 2024 — 168 bit effettivi)
- AES (Advanced Encryption Standard, 2001) — 128/192/256 bit, standard attuale
- ChaCha20 — alternativa software-friendly
Crittografia asimmetrica (chiave pubblica)
Chiave pubblica per cifrare / privata per decifrare. Risolve scambio chiave.
- RSA (Rivest-Shamir-Adleman, 1977) — fattorizzazione interi (≥ 2048 bit oggi)
- ECC (Elliptic Curve Cryptography) — curve ellittiche, chiavi più corte (256 bit ECC ≈ 3072 bit RSA)
- Diffie-Hellman — solo scambio chiave (no cifratura messaggi)
Hash crittografico
Funzione monodirezionale: input arbitrario → output fisso.
- MD5 (DEPRECATO — 128 bit, collisioni note dal 2004)
- SHA-1 (DEPRECATO — 160 bit, collisioni dimostrate 2017)
- SHA-256 / SHA-512 (famiglia SHA-2) — standard attuale
- SHA-3 (Keccak, 2015) — alternativa basata su sponge construction
- bcrypt / Argon2 / scrypt — password hashing (lenti per design)
Firma digitale
Hash del messaggio cifrato con chiave privata del firmatario. Verifica con chiave pubblica → garantisce autenticità + integrità + non ripudio.
PKI (Public Key Infrastructure)
Sistema di gestione certificati digitali X.509:
- CA (Certification Authority) — emette certificati
- RA (Registration Authority) — verifica identità
- CRL (Certificate Revocation List) / OCSP — verifica revoche
- Trust chain: Root CA → Intermediate CA → End-entity certificate
eIDAS (Reg. UE 910/2014, agg. eIDAS 2 — Reg. UE 2024/1183)
Quadro europeo identità digitale:
- Firma elettronica semplice / avanzata / qualificata
- Sigillo elettronico (per persone giuridiche)
- Marca temporale qualificata
- Servizi fiduciari qualificati
- eIDAS 2: introduce EUDI Wallet (European Digital Identity Wallet) entro 2026
3 Autenticazione e identità
Fattori di autenticazione
- Qualcosa che sai (password, PIN)
- Qualcosa che hai (token hardware, smartcard, smartphone)
- Qualcosa che sei (biometria: impronta, viso, iride)
- Qualcosa che fai (comportamento: digitazione, andatura)
- Dove sei (geolocalizzazione)
MFA / 2FA
Multi-Factor Authentication = combinazione di 2+ fattori diversi. 2FA comune: password + OTP via app/SMS/token.
Standard moderni
- OAuth 2.0 (autorizzazione delegata) — RFC 6749
- OpenID Connect (OIDC) — identità su OAuth 2.0
- SAML 2.0 (Security Assertion Markup Language) — SSO enterprise
- FIDO2 / WebAuthn — passwordless authentication, chiavi hardware
- Passkey — implementazione consumer FIDO2 (Apple/Google/Microsoft)
Identità digitale italiana
- SPID (Sistema Pubblico Identità Digitale) — 9 IdP accreditati AgID, 3 livelli sicurezza (L1/L2/L3)
- CIE (Carta Identità Elettronica) — chip con certificati, autenticazione FSE/PA
- CNS (Carta Nazionale dei Servizi) — smartcard PA
4 Sicurezza di rete
Firewall
- Packet filter (livello 3-4) — regole su IP/porta/protocollo
- Stateful — traccia sessioni (connessioni stabilite)
- Application gateway (proxy livello 7) — ispezione contenuto
- Next-Generation Firewall (NGFW) — IDS/IPS integrato, deep packet inspection, threat intelligence
IDS / IPS
- IDS (Intrusion Detection System) — rileva e logga
- IPS (Intrusion Prevention System) — rileva e blocca
- Tecniche: signature-based, anomaly-based, heuristic-based
VPN (Virtual Private Network)
Tunnel cifrato su rete pubblica:
- IPsec (livello 3) — site-to-site, AH (autenticazione) + ESP (cifratura)
- OpenVPN / WireGuard — moderni, software-friendly
- TLS-VPN (es. SSL VPN) — accesso remoto via browser
TLS / HTTPS
Transport Layer Security (evoluzione SSL):
- SSL 2.0/3.0 — DEPRECATI
- TLS 1.0/1.1 — DEPRECATI (RFC 8996, 2021)
- TLS 1.2 — ancora supportato
- TLS 1.3 (RFC 8446, 2018) — standard attuale, handshake più veloce, perfect forward secrecy
- HTTPS = HTTP su TLS, porta 443
Network Segmentation
- VLAN (IEEE 802.1Q) — segmentazione livello 2
- Subnet + ACL — livello 3
- DMZ (Demilitarized Zone) — area perimetrale per servizi pubblici
- Microsegmentazione — granularità a livello applicazione (Zero Trust)
5 Minacce e attacchi
Tipologie attacchi rete
- DoS / DDoS (Denial of Service) — saturazione risorse (volumetrico, protocol, application)
- MITM (Man In The Middle) — intercettazione comunicazione
- ARP spoofing / DNS spoofing
- Port scanning (Nmap)
- Sniffing (Wireshark) — intercettazione passiva
- Replay attack — riproduzione messaggi catturati
Malware
| Tipo | Caratteristica |
|---|---|
| Virus | Si replica infettando file ospite |
| Worm | Auto-replica via rete senza intervento utente |
| Trojan | Software apparentemente legittimo |
| Ransomware | Cifra dati e chiede riscatto (LockBit, BlackCat) |
| Spyware | Raccoglie info utente (Pegasus) |
| Adware | Pubblicità invasiva |
| Rootkit | Si nasconde a livello kernel |
| Botnet | Rete bot controllati C2 (Mirai) |
| Cryptominer | Sfrutta CPU/GPU vittima per minare crypto |
Attacchi password
- Brute force — tutte le combinazioni
- Dictionary attack — wordlist
- Rainbow table — hash precalcolati (mitigato da salt)
- Credential stuffing — credenziali rubate da altri data breach
- Phishing — ingegneria sociale via email/sito fake
- Spear phishing — phishing mirato
Vulnerabilità applicative — OWASP Top 10 (2021)
- A01 Broken Access Control
- A02 Cryptographic Failures
- A03 Injection (SQLi, NoSQLi, OS command)
- A04 Insecure Design
- A05 Security Misconfiguration
- A06 Vulnerable and Outdated Components
- A07 Identification and Authentication Failures
- A08 Software and Data Integrity Failures
- A09 Security Logging and Monitoring Failures
- A10 Server-Side Request Forgery (SSRF)
XSS (Cross-Site Scripting)
- Stored — script salvato sul server (commento malevolo)
- Reflected — script in URL
- DOM-based — manipolazione DOM lato client
Mitigazione: output encoding + CSP (Content Security Policy).
CSRF (Cross-Site Request Forgery)
Forza utente loggato a eseguire azione non voluta. Mitigazione: token CSRF + SameSite cookie.
6 Gestione incidenti e normative
Incident Response (NIST SP 800-61)
- Preparation — policy, training, tool
- Detection & Analysis — SIEM, alert
- Containment — isolare sistemi
- Eradication — rimuovere causa
- Recovery — ripristino operativo
- Lessons Learned — post-mortem
SOC e SIEM
- SOC (Security Operations Center) — team monitoraggio 24/7
- SIEM (Security Information and Event Management) — Splunk, QRadar, Sentinel, Elastic SIEM
- SOAR (Security Orchestration, Automation, Response) — automatizza risposte
- EDR/XDR — endpoint/extended detection & response
NIS2 (Direttiva UE 2022/2555)
Recepita in Italia con D.Lgs. 138/2024. Estende perimetro cybersecurity a:
- Settori essenziali e importanti
- Obblighi: misure tecniche, governance, notifica incidenti entro 24h (early warning) + 72h (notifica completa)
- Sanzioni fino a 10 mln € o 2% fatturato globale
- Autorità: ACN (Agenzia Cybersicurezza Nazionale, istituita 2021)
GDPR e sicurezza dati personali
- Reg. UE 2016/679 — Art. 32: misure tecniche e organizzative adeguate
- Data Breach — notifica al Garante entro 72h (Art. 33)
- Privacy by Design / by Default (Art. 25)
Perimetro Sicurezza Cibernetica Nazionale
- D.L. 105/2019 + DPCM 30/07/2020
- Identifica soggetti pubblici/privati che svolgono funzioni essenziali
- Obblighi: notifica acquisti ICT, audit, valutazione CVCN
Codice dell'Amministrazione Digitale
- D.Lgs. 82/2005 (CAD) — Art. 51 sicurezza dei dati
- AgID Linee Guida sicurezza ICT PA
- Misure minime di sicurezza ICT per le PA (AgID 2017)
7 25 numeri chiave
| # | Dato | Valore |
|---|---|---|
| 1 | Triade sicurezza | CIA (Confidentiality/Integrity/Availability) |
| 2 | Standard cifratura simmetrica attuale | AES (128/192/256) |
| 3 | Lunghezza minima RSA oggi | 2048 bit |
| 4 | SHA standard moderno | SHA-256 / SHA-3 |
| 5 | Hash deprecati | MD5, SHA-1 |
| 6 | TLS versione attuale | 1.3 (RFC 8446, 2018) |
| 7 | Porta HTTPS | 443 |
| 8 | Fattori autenticazione | 5 (sai/hai/sei/fai/dove) |
| 9 | Livelli SPID | 3 (L1, L2, L3) |
| 10 | OWASP Top 10 anno corrente | 2021 |
| 11 | Notifica data breach GDPR | 72 h |
| 12 | Notifica incidente NIS2 (early) | 24 h |
| 13 | Notifica completa NIS2 | 72 h |
| 14 | Sanzione max NIS2 | 10 mln € o 2% fatturato |
| 15 | Anno istituzione ACN | 2021 |
| 16 | Direttiva NIS2 | UE 2022/2555 |
| 17 | D.Lgs. recepimento NIS2 IT | 138/2024 |
| 18 | eIDAS Regolamento base | UE 910/2014 |
| 19 | eIDAS 2 Regolamento | UE 2024/1183 |
| 20 | EUDI Wallet entro | 2026 |
| 21 | Standard MFA moderno | FIDO2 / WebAuthn |
| 22 | Standard SSO enterprise | SAML 2.0 / OIDC |
| 23 | Modello Zero Trust NIST | SP 800-207 |
| 24 | Fasi Incident Response NIST | 6 (Prep/Detect/Contain/Eradic/Recovery/LL) |
| 25 | Strategia difesa | Defense in Depth |
8 15 trabocchetti d'esame
| # | Trabocchetto | Risposta corretta |
|---|---|---|
| 1 | "MD5 e SHA-1 sono ancora sicuri" | FALSO — entrambi DEPRECATI (collisioni note) |
| 2 | "AES è crittografia asimmetrica" | FALSO — AES è simmetrica; RSA/ECC sono asimmetriche |
| 3 | "TLS 1.0 e 1.1 sono ancora supportati" | FALSO — DEPRECATI da RFC 8996 (2021) |
| 4 | "Firma digitale garantisce solo integrità" | FALSO — garantisce integrità + autenticità + non ripudio |
| 5 | "MFA = solo password lunga" | FALSO — MFA richiede 2+ fattori diversi |
| 6 | "Notifica data breach entro 24 h" | FALSO — GDPR: 72 h al Garante |
| 7 | "NIS2 sostituisce GDPR" | FALSO — sono normative diverse, complementari |
| 8 | "DDoS è un attacco al dato" | FALSO — DDoS attacca disponibilità, non integrità/riservatezza |
| 9 | "Trojan si auto-replica" | FALSO — il worm si auto-replica; il trojan no |
| 10 | "XSS e injection sono lo stesso attacco" | FALSO — XSS è iniezione client-side; injection (SQLi) lato server |
| 11 | "Zero Trust = nessuna autenticazione" | FALSO — Zero Trust = never trust, always verify (autentica sempre) |
| 12 | "ACN istituita nel 2018" | FALSO — istituita nel 2021 (D.L. 82/2021) |
| 13 | "eIDAS 2 obbliga EUDI Wallet entro 2030" | FALSO — entro 2026 (Reg. UE 2024/1183) |
| 14 | "WPA2 è lo standard sicurezza Wi-Fi attuale" | FALSO — WPA3 (2018) è lo standard attuale |
| 15 | "OWASP Top 10 cambia ogni anno" | FALSO — pubblicazione periodica (ultima 2021, prossima 2025) |