You can do it, it's not cost effective compared with buying extension cords with multiple outlets on the far end, or 2 extension cords, or a 3-1 adapter or several other options. You need:
- Extension cord (14ga at least; 12ga if using 20A receptacles) $10-30
- listed steel strain relief for your cord and 1/2" knockout - $3
- 4" 2-gang all steel box $2
- 2-gang 2 or 4 outlet steel box cover $2
- 1 or 2 duplex receptacles, $1-4
- 1 foot black, white, green solid core 12ga wire, $1
- 3 wire nuts, red $1
Put 6" pigtails on each of the receptacles using side screws or clamp-and-screw (found on better receptacles). Lop the extension cord and push the strain relief down it, gasket side out. Knock out a 1/2" hole on the 2-gang box and bolt the strain relief through it, gasket out. Wire-nut the 3 black wires together, ditto white and green/bare, careful as you are mixing solid and stranded. Cram everything into the box and button it up. Test carefully, done.
You need at least 14ga wire if you have 15A outlets and 12ga wire if any 20A outlets. Doing this with 16ga is unsafe.
A GFCI outlet is a good idea, you can slave the second duplex outlet off the "load" side. If you don't use a GFCI, you must attach the cable ground to the outlet, that will attach it to the metal box, but test this just the same.