I found out my master's thesis topic has already been done (exactly), and my advisor didn't mention this when suggesting it to me - how to proceed? I am really frustrated, I have started my research for my master thesis 6 months ago and I have to submit the final draft after 2 months.

I was interested in a specific topic and I looked for a supervisor with the same research interests.

I was looking for something related to internet security (Botnet Detection); luckily, my supervisor gave me a research plan exactly about what I wanted to do. However, a month later and after I submitted the proposal and started to read deeply about the topic; I found that exactly the same research had already done by another two PhD students and what I was supposed to do was 100% repeating what they already had done 2 years ago.

I directly contacted my supervisor explaining to him the situation. I discovered that my research plan is exactly the same (word by word, someone copied from other). Moreover, the topic itself is very specific and is not easy to build or modify on it, he said "No problem, you just repeat it and we will try to slightly modify something.", then he added "If you can not do that, it is enough to repeat it." and I just agreed (trying to be positive and avoiding problems).

Now, after I started my writing I found myself repeating the same ideas and the same experiments, the same statements and the same conclusions. Later on, I discovered that this research supposed to be done by adviser with the group who already published the work and for some reasons they excluded him.

In short, the supervisor did not mention that this work is already published and did not mention that he was team member with them.

What I shall do?

Now I feel this work is 100% not original and I will not add and contribute anything. I am not feeling happy by wasting my time doing something like that.

Shall I escalate the story to the general adviser for master's students? Should I change the topic or should I continue and defend others work claiming that this is my own work?

I am not scared of rejecting my thesis, I am totally not satisfied about what I do write now. I am doing my masters to add something to my knowledge, experience and to feel really I will be one step a head.

Note: I work in industry field and I have no experience in academic and research fields.
Note that there is no way anyone knows about your precise situation, except you and your advisor, so I am making some wild guesses on what actually happened.

Perhaps your advisor is hoping to have an efficient implementation of the ideas / algorithms already expressed on the past paper, with the notion that he (or you and him) may later build on your implementation to create something new. In order to create anything new, you have to compare with existing approaches and therefore you still have to implement previous methods. He has given you two options a) Try to expand the ideas of the past paper b) If you cannot do that, just creating a NEW implementation of the original paper is enough for him. This is a MSc thesis and not all MSc theses lead to publishable results. But it still seems like an important project and as such, it seems it could still turn out to be a good MSc thesis and you will have a lot to learn from it.   

So, your main problem is that you think that you cannot expand the original paper to new directions. But if you want to do research this is exactly what you are going to have to do. You should find a topic that interests you ("my supervisor gave a research plan exactly about what i want to do"), study previous literature (which you should have done before choosing the topic) and then expand on previous ideas. Note that since you have worked in industry, you may as well be a better programmer than those 2 PHD students and therefore your implementation might be much more efficient than theirs. This is still a significant contribution which may eventually be published.

My advice: 


Talk to your advisor and state your doubts and clarify the situation.
Implement the paper's ideas as fast and efficient as possible 
Compare your implementation with the paper's results. You should at least aim for a more efficient implementation 
Check related literature that cites this paper. Is this paper, still state-of-the-art? Is this paper cited by anyone? This will show if this project has been picked up by anyone. If it is not, it is reasonable that your advisor wants to build upon the previous paper to further expand it. If someone has extended it or applied it to other use-cases, your assumption that it cannot be improved is wrong and you should think what you can do to further expand it. Either way, you will have an answer about how to proceed. 
Think of any other possible improvements, what else could be done better, in a more efficient way or how this idea could be used in other use-cases.  


Also, you have learnt a valuable lesson. What you want to do in research should correlate with what is already been done. You should study previous research very carefully and exhaustively. If you believe that previous works have already done everything to perfection (which BTW is rarely the case) then you should choose a new topic. Otherwise you are the one that should think what can be improved. I think you pretty much expected that your advisor had a new research idea waiting just for you and all you needed to do was just to implement it. But this was really an unrealistic expectation on your part.