Preheat the oven to 350 degrees. Line cupcake pans with paper liners.
To make the cupcakes, combine the flour, baking soda, baking powder and salt in a medium bowl. Whisk and set aside. In another bowl, whisk together the cocoa powder and hot water until smooth.
Melt the butter with the sugar in a medium saucepan over medium-low heat, stirring occasionally, until the butter is completely melted. Remove from heat, and transfer the mixture to the bowl of an electric mixer fitted with the paddle attachment. Beat on medium-low speed until the mixture is cooled, about 4 to 5 minutes. Add eggs, one at a time, beating until each is incorporated, scraping down sides of bowl as needed. Blend in the vanilla and then the cocoa mixture until smooth. Reduce speed to low. Add flour mixture in three additions alternating with sour cream, beginning and ending with the dry ingredients and mixing each addition just until incorporated.
Divide the batter evenly between the prepared liners, filling each about ¾-full. Bake until a toothpick inserted in the center comes out clean, about 18 minutes, rotating the pans halfway through baking. Let cool in the pan about 5 to 10 minutes, then transfer to a wire rack to cool completely.
To make the frosting, in the bowl of an electric mixer fitted with the paddle attachment, beat the butter on medium speed for about 5 minutes. Turn the mixer down to low speed and gradually add in the confectioners’ sugar until incorporated. Add in the vanilla and salt and mix until incorporated. Turn the mixer back up to medium-high speed and beat for an additional 4 minutes, or until light and fluffy. Pipe as desired onto each cupcake.