I’d find a bit of steel of the diagonal diameter, turn the bolt dia, and thread it, part it off, turn it around and rechuck it, then put the filing rest in place and file the square head, then chamfer the corners. You can either screw cut the thread, oruse a die. This is all assuming that you have some sort of lathe, 1/4″ I could make on my Super Adept, it would take a while. Ihave turned a 6 mm bolt by putting the bar in the Jacobs chuck on the vertical mill, and using the machine vice as a tool holder, won’t do that again in a hurry. It was the bolt fot the back gear on my lathe, an the steel was a bit of silver steel.
Ian S C