Understanding Diffie-Hellman - Choosing a bad g
There are two tricks that Evan could have played in selecting the $g$:


She could have selected a $g$ that has a small order; that is, $g^x$ could take on a small number of possible values.
She could have selected a $g$ that has a large but smooth order; that is, $g^x$ could take on a number of possible values, but that total number is a product of small primes.


Here's why Evan could take advantage of this second point: if the order $g$ has a prime factor $r$, then given $g^x$, it's possible to determine $x \bmod r$ in $O(\sqrt{r})$ time.  Hence, if the order of $g$ consists only of small factors, then Eve can compute $x \bmod r$ for all the small prime factors, and from that, reconstruct $x$.

In either case, the question is: what's the order of the value $g$ that Evan picked?  Well, one important thing that helps us determine that value; the order is always a factor of $p-1$.  So, the very first step is factoring $p-1$.  Then, you can go through all the prime factors of $p-1$, and use this fact: if $r$ is a factor of $p-1$, the order of $g$ is a multiple of $r$ if $g^{(p-1)/r} \ne 1$.  That should let you determine the order of $g$ without a huge amount of pain.