Preheat the oven to 350°F (175°C).
Line a muffin tin with cupcake liners.
In a large bowl, mix together the dry ingredients: flour, sugar, cocoa powder, baking powder, baking soda, and salt.
In another bowl, whisk the eggs, then add the oil, buttermilk, and vanilla extract, mixing until combined.
Gradually add the wet ingredients to the dry ingredients, mixing until just combined.
Spoon the batter into the prepared cupcake liners, filling them about two-thirds full.
Bake for 18-20 minutes, or until a toothpick inserted into the center comes out clean.
Let cupcakes cool in the pan for 5 minutes, then transfer to a wire rack to cool completely.
Frost each cupcake generously with buttercream frosting using a piping bag.
Place a chocolate wafer cookie on top of each frosted cupcake to create the base of the witch hat.
Finally, add a candy corn piece to the top of each cookie to complete the witch hat look.