Measure the width between the posts. Cut two pieces of 2-by-4-inch board to this length with a table saw.
Place the first board 2-inch side up along the underside of the hand rail on the inside or staircase side edge of the handrail. Align the edges. Screw the board to the posts using long wood screws at a 45-degree angle. Use two screws per end.
Attach the second board 4 inches above the attic floor positioned the same way as the first board. The board should be upright with the 2-inch side at the top and flush to the inside or staircase side of the post. Make sure the board is horizontally level. Screw the board to the posts.
Place a piece of scrap 2-by-4-inch board against the outside of your new boards with the 2-inch side touching the side of the post. Use this scrap as a 4-inch spacer between your pickets. Place a picket on the other side of the scrap. Pickets are 1-by-1-inch boards designed for exterior decks with an angled cut on one end. Place the angled cut at the bottom facing the attic.
Tuck the top of the picket up against the new top board and the underside of the railing. Screw through the top of the picket into the new top board. Screw through the bottom of the picket into the new bottom board. Move your scrap to the other side of the picket. Position a new picket tucked up against the top board. Screw it the same as the first. Continue spacing and adding pickets the entire length of the railing. Repeat for each railing around the stairwell.