Apply different material on complex object for faces which point backwards (in my case)

Is it somehow possible to apply specific materials based on the normal of a face?
I have complex 3D objects which can be altered by user-input. So the geometry changes.

Every face should have a default material, and only the faces facing completely backwards should have a different material.

Shameless self bump :wink:

Hi!
Any chance to provide a reference pic/vid of the desired result?

This is the current situation, I use CSG to cut holes in the walls.
I would like to “paint” the inside of the shed a different color.

More context:

Something related: