Question: It's a classic movie cliche. We see the surface of the Moon with the Earth in the distance and a dark shadow of an invading alien spaceship slowly covering the landscape.

We see this in the opening sequence of the 1996 movie Independence Day, and I can think of a few other movies which have done this effect.

What's really important is that the spaceship moves into visible frame as it passes overhead. So it's not a shadow from another orbital position, and so that also means the Sun would be directly overhead of the observer.

I've thought about where the Moon is in its orbit, where the Earth is in its orbit and where the Sun would be.

Is it possible for this to actually happen? If you were standing on the Moon, is there a time where the Earth is directly in front of you and the Sun is directly overhead. So that if something passed overtop of you the shadow would be directly on top of you?

[![enter image description here](https://i.stack.imgur.com/fM55G.png)](https://i.stack.imgur.com/fM55G.png)

Answer: 
If the moon was at half-moon (as seen from Earth) and you were standing near the equator at 90 degrees W (ironically this puts you close to *Mare Orientale*) The the sun would be overhead, and Earth would be on the horizon.

This gives you the configuration you need.

However it would very hard for observers on Earth to see the shadow. If the Earth is on the horizon, then you must be on the edge of near and far sides of the moon, and the perspective would make it hard to see anything as small as a spacecraft or its shadow..
I think, your interpretation of the scene parameters is a bit too strict. The sun need not be exactly in zenith above your head to allow for such a shadow situation. But more on that later.

Sun in zenith with visible Earth
--------------------------------

First, along your interpretation: It's possible, to the same amount that it is on Earth (but the screenshot doesn't match such a situation).

On Earth, to have the sun directly above you, you need to be close to the equator, and it has to be around noon. That means you have to be located close to the place on the globe pointing towards the sun. To be able to see the Moon around noon, the moon phase has to be between new moon and half moon, otherwise it would be below the horizon at noon.

The same is possible on the Moon, just exchange "Earth" and "Moon". You have to be standing close to the moon's equator, closest to the sun, earth phase must be between new earth and half earth (which implies with the moon phase being between full moon and half moon, as they complement one another).

So, the Earth could be visible, but only as a rather shallow crescent.

Relaxed constraints
-------------------

If both the sun and the spaceship come from straight behind your back, the depicted visual effect is achieved as well. And with the sun lower behind your back, more of the Earth could be sunlit. A full Earth would still be impossible, as then both the sun and Earth would have to be at horizon level, meaning that the shadows wouldn't work.

Screenshot lighting
-------------------

The screenshot shows an inconsistent lighting. The hills seem to be lit from the right-hand side, not too high above the horizon.

Earth is shown in nearly full phase, implying that the light source was located mostly behind the camera, slightly to the right (maybe at a 5 o'clock position), also not too high above the horizon.

As an Earth phase consistent with the hills lighting, I'd expect a half earth, with the day/night delimiter slightly tilted to the left.

And no matter which of the two inconsistent lightings we assume to be "correct", we'd end up with the spaceships's shadow being displaced to the left of its path.