Common vulnerabilities for WinForms applications

家住魔仙堡 提交于 2019-11-30 05:16:04

There is a big difference between a web environment and a desktop environment. When developing web sites and services, the thing you don't trust is the user (user input). When running a desktop application, the thing that isn't trusted is the application itself, or atleast, a system administrator would like to know whether the application itself doesn't do any harm, since code the runs on the local computer is a risk by itself.

So in a sense, for you as a developer of a desktop application, security rules not always apply, since the application you run is not a black box, but a white box. With a web service / site, you expect attacks to not be able to change the internal state, but with any desktop app (Java, .NET, native) it is 'quite' easy to change the state of the application while the application is running and especially with Java and .NET, debugging and decompiling an application is quite easy.

In other words, you must consider the desktop application completely compromised, and if this is a risk, you must extract everything that must be secure (authentication, authorization, validation) to an external (web) service. For this service, the 'normal' OWASP rules apply.

Things you should watch, is that it's really hard to completely secure your data layer, when a desktop application connects directly to a database. For instance, SQL injection is not an issue for your desktop application in this case, since when the application can directly connect to the database, so can the user. And if the user can connect to the database, he can execute any arbitrary query. This is an extreme form of SQL injection, but it completely skips your application.

Trying to secure a 2 tier application, often means the use of stored procedures as intermediate (service) layer (and preventing direct access to tables). Developing and maintaining stored procedures is much more costly than developing a .NET (web) service.

Perhaps you want to investigate on existing tools that check for security vulnerabilities. They have sometimes lists of the flaws they will check.

There are still all possible security risks in managed code, as a developer can open all kinds of holes. The framework (.NET) is not a risk on it's own, but the developer is.

Here you have a list of tools, you can read there which security risks they will check for:

Static code analysis list

But, of course, there are known vulnerabilies, as you can see here:

technet remote code execution

technet elevation of priviledge

There are more known and not solved flaws, which can be found at the well known security sites. (including zero day exploits)

** MORE DETAILED INFORMATION, it was the checklist i mentioned in the comment **

MS Security checklist (do not know why this is "retired" as this are mostly neutral infos

Open Web application security project

MS Anti cross-site-scripting

MS ASP security reference implementation (very good information site)

CAT.NET ... MS static security analysis tool

I'm afraid it's impossible to build a local winform app which is actually secure since the users can always crack your apps.

But there are some techniques to slow the cracking process. Most of the techniques happened on assembly layer, e.g. junk codes and packings.

Another technique is to make your executable codes(i.e. codes that comes into the memory when the program is being executed) varies with time. However you must first ensure that all other codes(which is not executed then) are safe. This can be done by encryption. But you must also make sure that the encryption program is more highly secured. The encryption program is always fixed in ROM and secured by physical means.

Another way is to take the advantage of the network. Update the local apps often and forbid the older versions. In this way, your code may varies quickly enough to beat the cracking process.

oh...am I throwing rubbish or is it just off-topic? My apology.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!