Given RSA public key (e.g. 1024 bits) and decryption oracle that outputs 2 middle bits of decrypted ciphertext
(pow(ciphertext,d,n) >> (1024/2)) & 3, how can we decrypt whole message?
This appears to be homework, and so I won't tell your outright; I will give you a hint.
Suppose you compute:
$$c_1 = c \times 2^e \bmod n$$
How are the decryptions of $c$ and $c_1$ related?
Suppose we compute a long series of:
$$c_i = c \times (2^i)^e \bmod n$$
What does the middle two bits of $c_i$ tell us?
There is a good write up of this task from More Smoked Leet Chicken team.