Preheat the oven to 350°F. Grease and line two 8-inch cake pans with parchment paper.
In a large bowl, whisk together the sugar, cocoa powder, flour, baking soda, baking powder, and salt. In a separate bowl, whisk together the oil, vanilla, eggs, and buttermilk.
Gradually pour the wet ingredients into the dry ingredients, whisking until smooth and free of lumps. Add the brewed coffee and stir until just combined.
Pour the batter into the prepared pans and bake for about 30 minutes, or until a toothpick inserted into the center comes out clean. Let the cakes cool completely on a wire rack before frosting.
For the frosting, place the butter and cream cheese in a stand mixer fitted with a paddle attachment (or use an electric hand mixer). Cream the butter and cream cheese on high speed for 1 minute, then reduce the speed to low and add the cocoa powder. Mix until well combined, then add the powdered sugar, brewed coffee, vanilla extract, and salt. Increase the speed to high and cream for 1 minute until the frosting lightens slightly and becomes fluffy.
To frost the cake, place the first cake layer on a cake stand and spread a generous amount of frosting on top. Smooth it evenly, then add the second layer and repeat with more frosting. Use the remaining frosting to cover the sides of the cake. Finally, use the back of a spoon to create a swirling pattern all around the cake for a beautiful finish!