A Unified Approach to Detecting Binding Based Race Condition Attacks