Place the first 9 graham cracker squares in the bottom of an 8x8 square pan.
Prepare vanilla pudding as directed. Spread one-third of the pudding evenly over the graham crackers. Top with a layer of graham crackers, and spread half of the remaining pudding over that layer. Add a third layer of graham crackers and top with the remaining pudding. Cover the top of the pudding with a final layer of graham crackers. Set aside.
To make the frosting, melt the butter with the cocoa powder in a small saucepan. Bring to a light simmer over medium-low heat and let it bubble for 1 minute. Whisk in the milk and cook for 3 more minutes, letting the mixture bubble up around the edges. Remove from the heat and beat in the confectioners' sugar with a whisk or hand beater. When the mixture is smooth, beat in the vanilla. While the frosting is still quite hot and liquid, pour it over the top layer of graham crackers and smooth quickly (before it begins to set) with an off-set spatula.
Refrigerate a minimum of 4 hours before slicing.