Lightly grease bottoms of two 8x1-1/2-inch round cake pans. Line bottoms of pans with waxed paper. Grease and lightly flour bottoms and sides of pans. Set pans aside. Preheat oven to 350 degree F.
In a medium mixing bowl, stir together the flour, cocoa powder, baking soda, baking powder, and salt; set aside.
In a large mixing bowl, beat butter with an electric mixer on medium to high speed for 30 seconds. In a small bowl, combine granulated and brown sugar. Gradually add sugar mixture, about 1/4 cup at a time, beating on medium speed until well combined (3 to 4 minutes). Scrape sides of bowl; continue beating on medium speed for 2 minutes. Add eggs, one at a time, beating well after each addition. Beat in vanilla.
Add flour mixture and buttermilk alternately to beaten mixture, beating on low speed just until combined after each addition. Beat on medium to high speed for 20 seconds more. Spread batter evenly into the prepared pans.
. Bake for 30 to 35 minutes or until a wooden toothpick inserted in the center comes out clean. Cool cake layers in pans for 10 minutes on wire rack. Remove from pans. Peel off waxed paper. Cool thoroughly on wire racks.
Place the cream cheese and butter in a large mixing bowl. Blend with an electric mixer on low speed until combined, 30 seconds. Stop the machine. Add the cocoa powder, extract, and confectioners' sugar and blend with the mixer on low speed until the ingredients are moistened, 30 seconds. Increase the speed to medium and beat until the frosting is fluffy, 2 minutes more.
Use at once to frost your cake or cover and keep refrigerated till you are ready to frost.