How can an illegal immigrant serve in the US Army or Marines?

You can't.