Skip to content
#software testing Open access

LUSicurezza

Sep 2026 · Zenodo (CERN European Organization for Nuclear Research)

Abstract

Architettura Agente Autonomo di Difesa Locale (Windows 10 x86_64) basato su Ipergrafo Eterogeneo $H = (V, E)$ Descrizione del Progetto Sviluppo di un agente di sicurezza locale modulare, reattivo e concorrente per Microsoft Windows 10 (x86_64), progettato secondo gli standard rigorosi di ingegneria del software (Google & NASA-level safety and testability). Il nucleo decisionale dell'agente si fonda sulla teoria dei grafi avanzata: un ipergrafo eterogeneo orientato $H = (V, E)$ in grado di modellare correlazioni multi-entità non lineari, superando le limitazioni dei grafi diadici convenzionali nel rilevamento di catene di attacco complesse (MITRE ATT&CK, CIS Benchmark). La telemetria viene estratta a basso livello attraverso chiamate native Win32/NT via ctypes (evitando l'uso di subprocess lenti e fragili), monitorando processi, memoria RWX, persistence, network sockets e token di sicurezza. Un modulo formale di Safety Interlock ($e_4$) garantisce matematicamente e programmaticamente l'impossibilità di generare Blue Screen of Death (BSoD) o instabilità del sistema operativo tramite whitelist inviolabili e guardie atomiche. Modello Formale Matematico: Ipergrafo Eterogeneo $H = (V, E)$ Vertici Tipizzati $V = \bigcup_{k=1}^7 V_k$: $V_1$ (Process): Entità di processo ($\text{PID}, \text{PPID}, \text{ImagePath}, \text{CommandLine}, \text{User}, \text{Privileges}, \text{Entropy}, \text{SignatureValid}$). $V_2$ (Memory/PE): Regioni di memoria virtuale ($\text{PID}, \text{BaseAddress}, \text{RegionSize}, \text{Protect}=\text{PAGE_EXECUTE_READWRITE}, \text{State}, \text{Type}$). $V_3$ (Persistence/Registry): Chiavi autorun e servizi di sistema ($\text{KeyPath}, \text{ValueName}, \text{TargetBinary}, \text{ServiceName}, \text{Status}$). $V_4$ (Network): Sockets attivi rilevati via tabelle IP estese ($\text{PID}, \text{LocalAddr}, \text{LocalPort}, \text{RemoteAddr}, \text{RemotePort}, \text{Protocol}, \text{State}$). $V_5$ (Kernel/ETW): Eventi strutturati di sicurezza / tracce kernel ($\text{ProviderGuid}, \text{EventID}, \text{PID}, \text{TID}, \text{Payload}$). $V_6$ (Policy/Threat): Metadati tattici e mapping minaccia ($\text{TechniqueID}, \text{Tactic}, \text{BaseSeverity}, \text{Confidence}$). $V_7$ (Safety/State): Vertici di controllo dello stato di sicurezza del sistema ($\text{ProcessName}, \text{IsSystemCritical}, \text{ActionRestricted}$). Iperarchi Orientati $E = {e_j}_{j=1}^m$: Ogni iperarco $e = (Tail(e), Head(e), C_e, \text{MitreID}, w_e)$ connette un sottoinsieme sorgente $Tail(e) \subseteq V$ a un sottoinsieme bersaglio $Head(e) \subseteq V$. $C_e: \mathcal{P}(V) \to {0, 1}$ è un predicato computabile che valida la sussistenza della condizione di minaccia o safety. $w_e \in [0.0, 1.0]$ è il peso probabilistico/severità della transizione. Chiusura dei Cammini e Scoring Normalizzato: Algoritmo di attivazione basato su ipercammini diretti (B-hyperpaths). Threat Score normalizzato $S(H) \in [0, 100]$: $$S(H) = 100 \times \left(1 - \prod_{e \in E_{\text{active}}} (1 - w_e)\right)$$ User Review Required IMPORTANT L'agente include un modulo di auto-rilevamento privilegi (IsUserAnAdmin). In modalità non-elevata (Standard User), l'agente attiva una modalità degradata controllata (Degraded Mode), monitorando i processi utente e le chiavi di registro HKCU, disabilitando in sicurezza le query che richiedono SeDebugPrivilege o accesso globale a HKLM/OpenSCManager. NOTE Per garantire la conformità al divieto assoluto di URL fittizi, nessuna URL o indirizzo web inventato sarà presente nel codice né nei commenti. Verranno unicamente utilizzati standard identificativi ufficiali (es. codici MITRE ATT&CK come T1059.001, T1003.001, T1055, T1071). Proposed Changes La struttura del progetto sarà organizzata nel workspace c:\Users\stiga\.gemini\antigravity\LUSicurezza: LUSicurezza/ ├── lusicurezza/ │ ├── __init__.py │ ├── core/ │ │ ├── __init__.py │ │ ├── types.py # Enum dei 7 domini di vertici, dataclass TelemetryEvent, MitreTechnique, ThreatScore │ │ └── hypergraph.py # Classi Vertex, Hyperedge, HeterogeneousHypergraph, PathClosureEngine │ ├── telemetry/ │ │ ├── __init__.py │ │ ├── win32_structures.py # Strutture Ctypes x86_64 (MEMORY_BASIC_INFORMATION64, MIB_TCPTABLE_OWNER_PID, MIB_UDPTABLE, TOKEN_PRIVILEGES) │ │ ├── win32_api.py # Bindings Win32 espliciti con argtypes/restype (kernel32, advapi32, iphlpapi, shell32) │ │ └── collectors.py # ProcessCollector, MemoryCollector, PersistenceCollector, NetworkCollector, EventLogCollector │ ├── rules/ │ │ ├── __init__.py │ │ └── definitions.py # Definizione formale di e1 (T1059), e2 (T1003), e3 (T1055/T1071), e4 (Safety Interlock) │ ├── remediation/ │ │ ├── __init__.py │ │ └── safety_interlock.py # Whitelist processi critici Windows, Anti-BSOD Gate, SafeActionExecutor │ └── agent.py # AutonomousDefenseAgent: coordinatore agentico multithread, sincronizzazione RLock, pipeline ingestion/analisi └── tests/ ├── __init__.py ├── test_hypergraph.py # Test matematico di chiusura iperarchi e calcolo threat score ├── test_win32_structures.py # Test unitario dimensioni/allineamento strutture ctypes x86_64 ├── test_safety_interlock.py # Test stringente di blocco BSoD e whitelist di sistema ├── test_rules.py # Test di attivazione dei 4 iperarchi con vettori di telemetria sintetici └── test_agent_harness.py # Test Harness agentico end-to-end con ciclo ingestion-decisione-remediation Dettaglio dei Componenti Core (lusicurezza/core/) types.py: Definizioni formali di VertexType ($V_1 \dots V_7$), HyperedgeId, MitreTechnique, ThreatLevel. hypergraph.py: Implementazione del contenitore $H = (V, E)$, algoritmi di inserimento atomico di vertici e iperarchi, motore di chiusura delle condizioni di attivazione PathClosureEngine con thread-safety via RLock. Telemetria a Basso Livello (lusicurezza/telemetry/) win32_structures.py: Definizione binaria precisa per Windows 10 x86_64: MEMORY_BASIC_INFORMATION64 (campo BaseAddress a 64-bit, Protect, RegionSize). MIB_TCPROW_OWNER_PID e MIB_TCPTABLE_OWNER_PID con allocazione dinamica array ctypes. MIB_UDPROW_OWNER_PID e MIB_UDPTABLE_OWNER_PID. TOKEN_PRIVILEGES, LUID_AND_ATTRIBUTES, LUID. ENUM_SERVICE_STATUS_PROCESSW. win32_api.py: Caricamento DLL Win32 con firme esplicite di tipo: kernel32.VirtualQueryEx, kernel32.OpenProcess, kernel32.CloseHandle. advapi32.OpenProcessToken, advapi32.GetTokenInformation, advapi32.LookupPrivilegeValueW. advapi32.RegOpenKeyExW, advapi32.RegEnumValueW, advapi32.OpenSCManagerW, advapi32.EnumServicesStatusExW. iphlpapi.GetExtendedTcpTable, iphlpapi.GetExtendedUdpTable. shell32.IsUserAnAdmin. collectors.py: Moduli di raccolta telemetrica con gestione atomica delle eccezioni e fallback non-privilegiato. Regole e Iperarchi (lusicurezza/rules/) definitions.py: $e_1$ (Anomalous Process Execution - MITRE T1059): Rileva interpreti di comandi/script (cmd, powershell, cscript, mshta) o processi Office che spawnano binari non firmati o con entropia di Shannon $> 7.2$. $e_2$ (Credential Harvesting Detection - MITRE T1003): Rileva apertura di handle con maschere PROCESS_VM_READ (0x0010) o PROCESS_ALL_ACCESS (0x1FFFFF) verso lsass.exe. $e_3$ (Memory Injection & C2 - MITRE T1055, T1071): Rileva pagine di memoria allocate con protezione PAGE_EXECUTE_READWRITE (0x40) associate a thread remoti e connessioni socket outbound verso indirizzi remoti non standard. $e_4$ (Safe Remediation Interlock - Anti-BSoD): Iperarco di sicurezza fondamentale. Intercetta qualsiasi richiesta di terminazione o sospensione. Se il processo bersaglio appartiene alla lista critica (smss.exe, csrss.exe, wininit.exe, services.exe, lsass.exe), l'azione viene irrevocabilmente abortita e viene generato un allarme di protezione. Remediation & Safety (lusicurezza/remediation/) safety_interlock.py: Classe AntiBSODGate e SafeActionExecutor. Fornisce garanzie matematiche contro il BSoD, applicando il principio del minimo danno e bloccando qualsiasi intervento su PID critici di Windows. Agente Concorrente (lusicurezza/agent.py) AutonomousDefenseAgent: Thread pool per ingestion periodica e concorrente, coordinamento del ciclo OODA (Observe, Orient, Decide, Act) basato sull'Ipergrafo, thread-safe, esportazione stato telemetrico e audit trail formale. Test Harness (tests/) Suite esaustiva di test unitari e di integrazione (pytest/unittest) con coverage completo di: Correttezza matematica della topologia dell'ipergrafo e chiusura dei cammini. Isolamento e validazione della whitelist anti-BSoD di $e_4$. Attivazione corretta di $e_1, e_2, e_3$ su vettori telemetrici di prova. Verifica delle strutture ctypes su architettura Windows 64-bit. Test di concorrenza multi-thread e stress-test di sincronizzazione. Verification Plan Automated Tests Esecuzione Test Suite Completa: powershell python -m unittest discover -s tests -p "test_*.py" -v Validazione Matematica dell'Ipergrafo: Verifica che $S(H) \in [0.0, 100.0]$ e cresca monotonicamente all'aggiunta di evidenze conformi agli iperarchi. Verifica che l'iperarco $e_4$ inibisca invariabilmente l'esecuzione di azioni su csrss.exe o smss.exe. Validazione Strutture Ctypes: Verifica sizeof(MEMORY_BASIC_INFORMATION64) == 48 e allineamento dei campi su sistema x86_64. Verifica sizeof(MIB_TCPROW_OWNER_PID) == 24. Manual / Integration Verification Esecuzione di uno scenario sintetico dell'agente (python -m lusicurezza.agent --demo) che simula una sequenza di injection ed estrazione credenziali, verificando l'aggiornamento dell'ipergrafo, il calcolo del threat score e l'intervento del Safety Interlock.

View source

Similar papers

#computer vision Review Sep 2017

Agile Software Development Methods: Review and Analysis

This publication proposes a definition and a classification of agile software development approaches and analyses ten software development methods that can be characterized as being "agile" against the defined criterion.

P. Abrahamsson, O. Salo, Jussi Ronkainen et al. · 727 citations · ⚡54
#computer vision Jun 2008

The impact of agile practices on communication in software development

The study shows that agile practices improve both informal and formal communication, but indicates that, in larger development situations involving multiple external stakeholders, a mismatch of adequate communication mechanisms can sometimes even hinder the communication.

M. Pikkarainen, Jukka Haikara, O. Salo et al. · 401 citations · ⚡48
#machine learning Review Open access Oct 2014

Software development in startup companies: A systematic mapping study

The results indicate that software engineering work practices are chosen opportunistically, adapted and configured to provide value under the constrains imposed by the startup context.

Nicolò Paternoster, Carmine Giardino, M. Unterkalmsteiner et al. · 394 citations · ⚡54
#computer vision Review Mar 2008

Agile methods in European embedded software development organisations: a survey on the actual use and usefulness of Extreme Programming and Scrum

The results show that the embedded industry has been able to apply agile methods in its development processes and that the appreciation of the agile methods and their individual practices appears to increase once adopted and applied in practice.

O. Salo, P. Abrahamsson · 238 citations · ⚡9
#computer vision Open access Jul 2017

What happens when software developers are (un)happy

Consequences of happiness and unhappiness that are beneficial and detrimental for developers' mental well-being, the software development process, and the produced artifacts are found.

D. Graziotin, Fabian Fagerholm, Xiaofeng Wang et al. · 236 citations · ⚡13
#computer vision Open access Oct 2004

Mobile-D: an agile approach for mobile application development

The Mobile-D approach is briefly outlined here and the experiences gained from four case studies are discussed, which helped develop an agile development approach for mobile application development.

P. Abrahamsson, Antti Hanhineva, H. Hulkko et al. · 225 citations · ⚡18

Related blog posts

GPT-Lab Sep 17, 2026

Beyond Prompt Engineering: The Role of Tacit Knowledge in Software Engineering

AI is making software generation faster, but speed does not remove the need for expertise. As more work is delegated to AI, tacit knowledge may become one of the most important human advantages in software engineering. The post Beyond Prompt Engineering: The Role of Tacit Knowledge in Software Engineering appeared first on GPT-Lab.

MIT News · Artificial Intelligence Aug 17, 2026

Q&A: Rethinking how innovation happens

In his latest book, Professor Eugene Fitzgerald examines the forces that turn breakthroughs into value — and why innovation resists simple formulas.

Microsoft Research Blog Aug 12, 2026

MindTopo reveals VLMs’ spatial reasoning abilities

A path, a fence, a knot. MindTopo sets a new benchmark for testing how AI understands topological relationships and highlights new opportunities to strengthen spatial reasoning and planning. The post MindTopo reveals VLMs’ spatial reasoning abilities appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.