Can you substitute butter in a box cake recipe that calls for oil?
I would do a 1:1 ratio with the following caveats - 

First make sure you are using unsalted butter (if you use salted it will change the flavor and the texture of the cake, usually not in a good way)

Second, I would clarify the butter (i.e. melt it skim off the foamy/cloudy bits that float at the top)

After that I would use an equal ratio. Be warned that the clarification process will reduce your butter a bit (8 tablespoons averages about 6 tablespoons after clarification), so make sure you measure after clarifying.