Which of the following protocols is susceptible to replay attack? I have a hard time understandin which of the following protocols is susceptible to replay attack:


A   ----->  B username, password 
A   ----->  B username, h(timestamp,password)
A   -----> B username timestamp, h(password)
A   -----> B username, h(timestamp), h(password)


I think the answer is 1 and 3

I know 2) is secure because the password and time-stamp are hashed together, 
I know 1) is definitely insecure. 3) is insecure if somehow the intruder gets to know the time-stamp he may replay it. 
I am slightly confused about 4) while it is true that we can't get the time-stamp from hash. 
I was wondering if it is possible to brute force a time stamp. 
I think there wouldn't be a lot of time difference between when the packet was sent and the time intruder intercepted it. Is it possible and send all possible timestamps until B accepts it?
Insecure, you just replay $\text{username}$ and $\text{password}$. Password is also sent in clear text.
Secure, if the hash function $H$ used is strong enough to resist bruteforcing of the password. However you'll also need to send the timestamp so that the server can check the auth, so this scheme is better portrayed as $\text{username, timestamp, }H(\text{timestamp}||\text{password})$.
Insecure, you replay $\text{username}$, $\text{timestamp_now}\ $ and $\text{password}$. Password is also sent in clear text.
Insecure, you replay $\text{username}$, $H(\text{timestamp_now})\ $ and $\text{H(password)}$. Password is also sent in clear text.


Make sure to use a secure PBKDF for password hashing, like $scrypt$.