How does one get a mask for where there is direct lighting?

Title says it all, How would one get a post process mask for where there is direct lighting, it does not have to be perfectly accurate, or soft, or working well on emissive, it just has to work.