Wild Galois representations of elliptic and hyperelliptic curves