Hamiltonian derivation of dual gravitational charges