To get you started:
The Ghost uses similes in his interview with Hamlet in Act 1, Scene 5.
"Make thy two eyes, like stars, start from their spheres" (17)
"Like quills upon the fretful porpentine [porcupine]" (20)
Hamlet's soliloquy in Act 2, Scene 2:
"Must like a whore unpack my heart with words,
And fall a-cursing like a very drab" (571-572)
Line numbers are different in different editions. Check yours.
You can find answers pretty quickly by going to an online full-text version and using your browser's 'Find' feature (under the 'Edit' menu, or Alt + E, then F). Type in ' as ' or ' like ' and browse the results.
Here's one good version with act, scene, and line numbers: http://www.opensourceshakespeare.org/views/plays/play_view.php?WorkID=hamlet&Scope=entire&pleasewait=1&msg=pl#a1,s1.
And here's some of what you'll find:
"As thou art to thyself." I.i.75 (The ghost is as much like the dead king as Marcellus is like Marcellus himself.)
"For it is as the air, invulnerable" I.i.168 (The ghost can't be hurt by weapons; it's like the air.)
if, like a crab, you could go backward..." II.ii.1306 (Hamlet is intentionally confusing Polonius; he says Polonius would grow younger if he could reverse time. Don't worry, it's not supposed to make much sense.)
Make sure to check the line numbers in the copy of the play you're reading; it should be fairly close to what you find online, but might not be identical.