Do you find that when you work with a new technology that you're never quite sure what security gaps your leaving in your code?
I've been working with ASP.Net Web Forms for about 5 years now and am fairly confident my code is at least secure enough to stop most known attacks. Looking back a lot of my early code I have unknowingly left gaps in a lot of the security areas especially query strings and viewstate but I feel over time I learnt what the vulnerabilities were and made sure I didn't make the same mistakes again.
However I've recently started a new project in ASP.Net MVC and I really have no idea what security holes I'm leaving open. This reason alone is almost putting me off going forth with this. I'm reading up on it like crazy at the minute but am sure I've not learnt nearly enough to make it as secure as I could with Web Forms. What do you guys do to make sure you don't leave yourself open to attack?
Edit : Starting Bounty as Curious to see if there are any more opinions
Companies face many types of technology risks, such as information security incidents, cyber attacks, password theft, service outages, and more. Without an appropriate incident response, every type of technology risk has the potential to cause financial, reputational, regulatory, or strategic risk.
The main types of information security threats are: Malware attack. Social engineering attacks. Software supply chain attacks.
This is a very difficult question with probably no great answer. However, there are a couple things you can do to increase the possibility of keeping yourself safe when using new technologies.
So in short: Handle user input carefully, read the existing documentation, determine what security you require, and figure out how the framework mitigates common vulnerability classes. Being aware that security is a priority and paying attention is 50% of the fight.
I think a LOT of what you learned about with ASP.NET is transferable to ASP.NET MVC. It's still HTML (exploits: XSS) over HTTP (exploits: all input [cookies, URL parameters, form input, headers] can be forged, session hijacking, CSRF) with a database back end (exploits: SQL injection).
I would recommend Steve Sanderson's book on ASP.NET MVC titled Pro ASP.NET MVC Framework. It has an entire chapter dedicated to these topics.
Check out Chapter 13 'Security and Vulnerability' from the Table of Contents for the book.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With