Abstract
This paper explores software countermeasures to mitigate voltage glitch attacks targeting embedded systems, specifically the STM32F3 microcontroller. By testing five variations of password verification code, this research demonstrates how specific software modifications—like variable duplication, masking, and volatile counters—impact the success rate of hardware glitch attacks. Results show that introducing redundancy, timing adjustments, and data masking in software can significantly enhance system resilience. Unlike hardware countermeasures, which are often complex, costly, and impractical for brownfield projects, these software defenses offer a flexible and cost-effective solution. This work provides actionable insights for secure firmware development and improved robustness in embedded systems.