Climb up into the attic and pull the stairs up after you.
Sweep the area around the stair opening with a broom to remove any dust or debris.
Measure the height of the stairs as they rise above the attic floor and add 2 inches. This is measurement A.
Determine the length of the stair opening and add 2 inches. This is measurement B.
Measure the width of the stair opening and add 2 inches. This is measurement C.
Transfer measurements A and B to a piece of foam board and cut two rectangles with a utility knife.
Cut two rectangles of foam board with measurements that correspond with measurements A and C with the utility knife.
Tape the four rectangles together into a box that sits squarely around the stair opening with duct tape.
Secure the box to the basement floor with duct tape.
Cut a rectangle of foam board with measurements that correspond to measurements B and C with the utility knife. This is the lid of your box.
Set the new rectangle squarely on top of the box and run a line of duct tape along one side to hinge it to the box below. You can open and close this lid as you enter and exit the attic.