It's not an attack if the majority of miners decide to use a specific implementation. That's how bitcoin works.
When that's not agreed, preventing a fork requires some way of blocking the non-majority miners. That is an attack, and not just 'how bitcoin works'. Bitcoin has no builtin way of handling such disputes.
It's a human consensus problem. (And don't say that only the original version of the bitcoin rules are valid, or that would mean that bitcoin actually disintegrated years ago.)