If you're talking about square corners, you need a broach, which is a square tool with steps cut to cut increasingly larger as it is pushed through. We used to use a milling machine to cut the square holes for the Colt 1911 front sight. Leave the machine turned off, using it (or a drillpress) as an arbor press, not a spinning cutter. Just keep the spindle oriented to the direction you want the sides to face. If the spindle can be locked from rotating, all the better..