Russia's military says it has thwarted an attempted breakthrough into the country's two western regions.