These two sentences both mean 'What are you doing?' Can I use the them interchangeably? Are there any slight nuances between them?
These two sentences are interchangeable 99% of the time.
As for the nuance between 做 and 干， 做 implies doing something in a more sophisticated way or in a way that requires thinking, skills or cleverness and is slightly more polite. 干 implies doing something in a more direct, or more tedious, or more violent way.
After all, these are just nuances. Usually they are interchangeable.
There are cases in which 做 and 干 are not interchangeable depending on the object. One example is 做作业（doing homework， which requires thinking）. We usually don't say 干作业.