Chaotic systems have been used in random number generation, owing to the property of sensitive dependence on initial conditions and hence the possibility to produce unpredictable signals. Within the types of chaotic systems, those which are defined by only one delay-differential equation are attractive due to their simple model. On the other hand, it is possible to synchronize to the future states of a time-delay chaotic system by anticipating synchronization. Therefore, random number generator (RNG), which employs such a system, might not be immune to the attacks. In this paper, attack on a chaos-based random number generator using anticipating synchronization is investigated. The considered time-delay chaotic system produces binary signals, which can directly be used as a source of RNG. Anticipating synchronization is obtained by incorporating other systems appropriately coupled to the original one. Quantification of synchronization is given by the bit error between the streams produced by the original and coupled systems. It is shown that the bit streams generated by the original system can be anticipated by the coupled systems beforehand.