The introduction of the MAD sensor (magnetic anomaly detection) posed a problem with the current anti-submarine weapon of the day, the depth charge or depth bomb. US Navy squadron VP-63 got its Consolidated PBY-5A Catalina flying boats modified with MAD stingers in 1942. As the Catalina had to fly low over the surface of the water to detect the magnetic signature of a submerged U-boat, by the time the depth bomb was released, the aircraft's forward motion would carry the bomb ahead of the intended target.
As a solution, scientists at CalTech designed the "Retrorocket" which was an air-launched rocket based on the ship-launched Hedgehog antisubmarine rocket. The retrorocket weight 65 lbs with a 35 lb warhead and solid rocket motor in the tail with a ring fin assembly for stability. The retrorocket was mounted under the Catalina's wings pointed aft. Once the MAD sensor detected the U-boat, the rockets fired aft to fall vertically at the point where it had been fired as the forward facing rocket canceled out the forward speed of the launching aircraft.
Flying only 100 feet above the sea, the Catalinas of VP-63 based at Port Lyautey, Morocco, partrolled the Strait of Gibraltar to prevent U-boats from reinforcing the Mediterranean. In 1944 U-761 was the first casualty of the MAD Cats of VP-63. U-618 tried to run the Strait but turned back to France. Then U-392 tried to run the gauntlet and fell to a combined attack by MAD Cats and surface ships. Three U-boats would later sneak in successfully by avoiding the deep water channels altogether. U-731 then was sunk again and following that, one more U-boat made it past the strait, but the German effort proved excessively costly as by this point in the war every U-boat was valuable.
Source: Aeroplane, October 2009. "Mad Cats and Mousetraps" by Dr. Alfred Price, p17-21.