Actually, it's a lot easier than you think.
Connect a Get Normal in Texture into the input of a Dot Product node, then connect a Constant Vector to the other input. In the Constant Vector set the direction you want to mask, so 0,0,-1 for south, and the Dot Product will output white on the surface facing that direction.