  Voice authentication has been widely used on smartphones. However, it remains
vulnerable to spoofing attacks, where the attacker replays recorded voice
samples from authentic humans using loudspeakers to bypass the voice
authentication system. In this paper, we present MagLive, a robust voice
liveness detection scheme designed for smartphones to mitigate such spoofing
attacks. MagLive leverages differences in magnetic field patterns generated by
different speakers (i.e., humans or loudspeakers) when speaking for liveness
detection. It uses the built-in magnetometer on smartphones to capture these
magnetic field changes. Specifically, MagLive utilizes two CNN-based submodels
and a self-attention-based feature fusion model to extract effective and robust
features. Supervised contrastive learning is then employed to achieve
user-irrelevance, device-irrelevance, and content-irrelevance. MagLive imposes
no additional burdens on users and does not rely on active sensing or extra
devices. We conducted comprehensive experiments with various settings to
evaluate the security and robustness of MagLive. Our results demonstrate that
MagLive effectively distinguishes between humans and attackers (i.e.,
loudspeakers), achieving a balanced accuracy of 99.01% and an equal error rate
of 0.77%.
