I'm not really just narrowing my suggestion to EMPs though, I'm also thinking of the guns, such as the one used by Cypher and Agent Smith.... that shoot an electric blast out. Would be good for mounting outside the ship... and I'm guessing it would lead to a chain attack effect on multiple machines in close proximity?
Not to mention damaging/diabling the ship the guns are mounted on.
That and something gives me the idea that they're only effective at short range.
Let's also not forget that these guns will be a considerable power drain. The ship may end up just losing the ability to defend itself due to the lack of power needed to fly and defend the ship.