Dear Tim,
As you're probably aware, this is part of the 'anabelian' etcetera.
It suffices to recover all intertia subgroups $I_v\subset H$, because their union will then be a normal subgroup $N$ such that $H/N$ is the Galois group of the maximal extension of $K$ unramified everywhere. We can get the ideal class group then by (topological) abelianization. The fact that we can get all the decomposition groups $D_v\subset G$ is Neukirch's theorem (together with Artin-Schreier at infinity). This says the maximal subgroups isomorphic to a local Galois group are exactly the decomposition groups. If you want to make this purely group-theoretic for the finite places, you invoke the theorem of Jannsen-Wingberg that lays out a presentation for all local Galois groups and consider maximal elements in the lattice of subgroups isomorphic to such an explicit presentation. Once you have the $D_v$, there is a standard group-theoretic recipe for $I_v$, which escapes me for the moment. But I'll get back to you with it, if you don't figure it out in the meanwhile.
Added:
OK, so here is the easy part. Now let $F$ be a finite extension of $\mathbb{Q}_p$ and
$D=Gal(\bar{F}/F)$. We know that $D^{ab}$ fits into an exact sequence
$$0\rightarrow U_F\rightarrow D^{ab}\rightarrow \hat{\mathbb{Z}}\rightarrow 0,$$
so we recover $p$ as the unique prime such that the topological $\mathbb{Z}_p$-rank of
$D^{ab}$ is $r_D\geq 2$. The order $q_D$ of the residue field is 1 greater than the order of
the prime-to-$p$ torsion subgroup of $D^{ab}$. Also, we know
$r_D=1+[F:\mathbb{Q}_p]$. Now we apply the same reasoning to the subgroups of finite index in
$D$ to figure out those corresponding to unramified extensions. That is, consider
the subgroups $E$ of finite index such that $q^{r_D-1}_E=q_D^{r_E-1}$. Then the inertia subgroup
of $D$ is the intersection of all of these.