Is it possible to change object variables just where shadows appear ?

I kinda want acess to the shadow in a way that i can change objects just where the shadows appears

Thanks for your help
Greets Pöl