There are no official rules on grappling hooks.
As you say, neither the PHB nor the DMG say anything about the use of grappling hooks, so it's fully up to the DM.
There are many different ways to rule this (ranged attack roll? Dexterity check?) but I personally like simply using the 3.5 rules for this (d20SRD):
Securing a grappling hook requires a Use Rope check (DC 10, +2 for every 10 feet of distance the grappling hook is thrown, to a maximum DC of 20 at 50 feet). Failure by 4 or less indicates that the hook fails to catch and falls, allowing you to try again. Failure by 5 or more indicates that the grappling hook initially holds, but comes loose after 1d4 rounds of supporting weight. This check is made secretly, so that you don’t know whether the rope will hold your weight.
5e doesn't have a use rope check, but you can replace that with a dexterity check. Interestingly, the DC scaling matches 5e's bounded accuracy pretty well, unlike much of the rest of the system.
As for detaching a grappling hook, there are also many options. A Rope of Climbing could help, or you could use Mage Hand to manually dislodge the hook, for example.