I'm not sure of the exact numbers, but the ship to capture must be near destruction. So it can't have shields and hull must be low. Then the mole miners are deployed and if the ship isn't destroyed after the mole miners take it, then it becomes yours. Someone else probably can be more exact on numbers, but the key is that it needs to be near destruction when you activate it to have a chance. Also, obviously, you have to be Pellaeon/Thrawn as your faction...