There are devices that are arrays of microphones that can be used to detect what direction a noise comes from. The Army uses one to triangulate rifle fire, and Boeing started using one circa the 787 to locate cabin noises (planes have a sound insulation budget, and positively identifying the ingress points allows for better ambient noise levels).