The same way you magnetise a screwdriver. Wrap coiled insulated wire on the socket, leave enough excess to
touch a 12 volt battery on the positive and negative
posts just till you get a arc. This works on ferrus
metals only. Do not use the battery in your car for
this, and do it in a well ventilated area. You can also use a lantern battery for this also.