DDSGA: A Data-Driven Semi-Global Alignment Approach for Detecting Masquerade Attacks