Iron forms cubic crystals under the proper conditions (mainly temperature). Iron pyrite (iron disulfide) can display a cubic form as well, which in a pure state often appears as gold colored cubes, usually in a matrix. Your piece could also contain magnetite (iron oxide), which is magnetic.