Searching my .NET Solution for spots which need a returnURL vulnerability check

Need to find Redirects throughout multiple solutions so I can check for evil domains.

I have designed the code to parse through a URL to find if a domain is not on a white list. But I need to check more than just the LogOn() function.

How do I scan an entire C#.NET MVC solution to find the places where redirects take place and which could create the need to examine the URL for malicious domains...

I will search for "redirect" and "window.location," in all Javascript files. But I see the following...

What do you suggest about how to find which calls need to have this malicious domain check?

Thanks
newbiewebSr. Software EngineerAsked:
Who is Participating?
 
Ryan ChongConnect With a Mentor Commented:
How do I scan an entire C#.NET MVC solution to find the places where redirects take place and which could create the need to examine the URL for malicious domains...
you should able to use the .NET built-in Search feature to search the relevant keywords (like: "redirect" and "window.location", etc) within the solution.

any advanced file utility program (like: NotePad+, etc) will provide you similar feature do the searching within a directory (you can use it to scan your project folder, for example)
0
 
newbiewebSr. Software EngineerAuthor Commented:
I have no problem using search, but what to search for? Are those two terms, "redirect" and "window.location", comprehensive? Can you think of others to search for as well?

You used "etc" and I am trying to unearth additional words I can search for.

For example, I just found the following I can search for to get a URL that needs to be sanitized...

            var returnUrl = context.HttpContext.Request.RawUrl;
0
 
newbiewebSr. Software EngineerAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.