Masters Thesis introduces you to serious research. The purpose is to expose you to the tasks associated with research. It is a training to help you appreciate the steps like finding a problem, scoping the work, conducting a literature survey, studying related work, conducting experiments, devising algorithms, implementing your ideas, conducting comparative evaluation and finally being able to convey all this well to both novice and expert audience.
The specific field or the problem you choose to solve is not very important from the perspective of this training. The focus througout should be to get trained for the above. The problem should not be of your great worry.
But that said, it is important to choose a problem that would set you up for success. Since you are likely to continue on similar ideas later for a PhD, you want to take up something that interests you. Even if not research, you would be asked to explain your thesis at hundreds of job interviews. So, you should be good in the related field. Many of us at this stage do not have a favorite subject. That is sad. Even if we do, it is a favorite subject mostly because we understood everything and see no problems! The way we study is such that we look for solutions, not for problems. You ask a GATE topper. He will tell you, give me any problem in ToC, I can solve it! This thinking is not suitable for research. Instead, you will now need to develop the skill to find a problem with every solution. Let us take an FSM (Finite State Machine). A very simple model, right? There seems to be nothing wrong with it. There seems to be nothing missing in it!? Think again. What if you want to add the notion of time to FSM? That led to timed automata or temporal models. Welcome to the first step of research. Finding problems in the most elegant solutions which you understand thoroughly.
Even if you have a favorite subject, and you throughly understand a part of it, and let us say, you can see possible extensions or fundamental issues with such solution for which there seems to be no alternative. The next thing is to understand if this is a problem you can solve within roughly 6 to 12 months. Given there is so much uncertaintly and lack of skills in the forthcoming steps, your estimate is going to be wrong. You are very likely to come up with overambitious problem which you will not end up solving. This is the top reason why most Masters thesis fail or get delayed.
Let us assume you managed to find a problem whose scope is very reasonable. You may be surprised to see that the solution takes you to a field which you are not comfortable with. My work on finding similarities between code snippets is now taking me to Category Theory! I had identified myself as a systems researcher so long and now, it is impossible to skip theory.
Being able to learn quickly and turn good results is something you young guys specialize in. You can live without sleep, food and easily without bathing for several days. Although I do not recommond these, the point is that your stamina and strength will take you to the solution.
If you defy all these odds and still think you are doing a good job, your Indian English with a Whatsapp accent will kill all your chances of a publication. Inspirational and Scientific writing needs a lot of practice. Most of you hesitate to write. Even after pleading and begging for comments, all I get is one or two lines from a very small subset of students here. Good luck to the rest! You will learn the hard way.
Another issue with publishing your work is related to how many people are solving similar problems. Crowded areas are competitive. Stay out of the crowd wherever possible. There are fields like Programming Language Design, Computer Architectures, Transport Layer Problems which have very few researchers in the country. Areas such as AI, ML and Data Science are flooded. Do not enter crowded areas unless you know what you are doing. One plausible reason could be that you want a job in AI. In that case AI is worth the struggle.
All these make Masters thesis “The perfect devil to beat”. At the end, you get that feeling of having learned useful skills. Yesterday, as I was listening to a Kasparov (Former Chess Champion), he said, “I like the masters of the past because they bring something new to the game”. I believe, our masters thesis is no different. We bring something new to our field. We should do such things for which we are respected.
So, let me now come to the short answer to your question. For the reasons of complexity involved, you need a good guide to steer you to success. So, in the broad areas of your interest, find the best people and get associated with them. Rest will fall in place automatically.
Am sorry for such a disappointing answer to a lovely question. But that is the best I could give with my limited knowledge. Good luck.