Prep the pan and oven. Preheat the oven to 350°F (175°C). Line an 8-inch square baking pan with parchment, leaving overhang for easy lifting.
Lightly grease the parchment.
Melt butter and chocolate. In a medium saucepan over low heat, melt the butter and semi-sweet chocolate, stirring until smooth. Remove from heat and cool for 3–5 minutes so it’s warm, not hot.
Whisk in sugars.
Add the granulated and brown sugar to the warm chocolate mixture and whisk until glossy and combined.
Add eggs and flavoring. Whisk in the eggs one at a time until the batter thickens slightly. Stir in vanilla and peppermint extract.
Fold in dry ingredients.
Sift in flour, cocoa powder, and salt. Gently fold with a spatula until just combined and no dry streaks remain. Don’t overmix.
Bake.
Spread the batter evenly in the prepared pan. Bake for 22–28 minutes, until the edges are set and a toothpick comes out with a few moist crumbs (not wet batter). Err on the fudgy side.
Cool.
Place the pan on a wire rack and let the brownies cool completely in the pan. This helps the topping set cleanly later.
Melt white chocolate. Place chopped white chocolate and oil (if using) in a heatproof bowl.
Microwave in 15–20 second bursts, stirring between each, until smooth. Or melt over a double boiler. Stir in peppermint extract if using.
Top the brownies.
Pour the melted white chocolate over the cooled brownies and spread into an even layer. Immediately sprinkle with crushed candy canes. If using, drizzle melted dark chocolate in thin lines over the top.
Set and slice.
Let the topping set at room temperature for about 30–45 minutes, or chill for 15–20 minutes until firm but not rock hard. Lift out using the parchment, warm a sharp knife under hot water, dry it, and cut into squares.