Underground localization is considered a key technology for controlling underground equipment such as directional drilling equipment. However, most sensors for localization such as vision sensors, range sensors, and wireless sensors cannot be utilized in an underground environment. Moreover, vibration by the drill bit and distortion of the geomagnetic field by the surrounding material adversely affect localization performance. To accurately estimate the pose for directional drilling, a resilient underground localization method using concurrent normalized cross-correlation (CNCC) and magnetic field vector is proposed in this paper. In the underground environment, a different magnetic field is distributed at each region. Since the drilling system moves only inside the borehole, the magnetic field distribution can be re-measured. Therefore, the constraint between the poses is detected by comparing the magnetic field distribution. A comparison method based on CNCC is proposed to resolve the ambiguity of the magnetic field. Moreover, to reduce the orientation error, magnetic field vector matching is used. The constraint can correct the pose estimation of the system using pose graph optimization. To validate the performance of the proposed method, two types of field tests are carried out in this study.