Thwarting hacks by thinking like the humans behind them