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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.