The detection of metallic objects is an important application in state-of-the-art security technology. In particular, for humanitarian mine detection the task is to detect objects that are buried in soil. Usually hand-held mine detectors create an electromagnetic pulse via a current in some wire loop and evaluate the scattered electromagnetic field via induction in a receiver loop that is moved together with the sender loop. This receiver signal can then be employed in identifying the location and the shape of metallic objects. Here, we model the full electromagnetic scattering problem in a two-layered medium from a perfectly conducting obstacle using boundary integral equations. The scattered field is modeled via a boundary layer approach and for its kernel the Green's matrix for the two-layered medium is constructed. We establish uniqueness and existence for the solution of the corresponding boundary integral equation.In the second part of the paper, we employ a direct search method for parameter estimation to find the location and size of some simple metallic objects from measurements of the induced voltage for a number of sender-receiver-loop positions.