保护本地 .NET 应用程序免受病毒侵害

发布于 2024-10-03 00:10:25 字数 196 浏览 0 评论 0原文

我确信没有明确的方法来防范病毒,但我想知道在编写本地桌面应用程序时是否可以采取任何防御机制来加强对病毒的防御。具体来说,我正在编写一个小型 WPF 会计应用程序,该应用程序连接到本地服务器上的 SQL Express 数据库。在数据库加密、安全字符串等方面是否有任何步骤可以在本地 PC 感染蠕虫/木马/病毒/混合威胁时提供帮助?我同样担心腐败和数据盗窃。

谢谢

I'm sure there is no definitive way to guard against viruses but I was wondering if there are any defensive mechanisms that can be put in place when writing a local desktop application to reinforce defenses against viruses. Specifically, I am writing a small WPF accounting application that connects to a SQL Express database on the local server. Are there any steps when it comes to DB encryption, secure strings, etc. that would help in the eventuality that that local PC was infected with a worm/trojan/virus/blended threat? I am equally concerned with corruption and data theft.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

神经大条 2024-10-10 00:10:25

一旦您的计算机受到损害,您实际上无法采取任何措施来保证 100% 的安全 - 如果您可以读取数据库,那么病毒(或通过后门登录的用户)就可以窃听数据库登录信息。如果您使用密钥加密数据库并将密钥嵌入到您的应用程序中,理论上病毒可以读取您的二进制文件并访问该密钥。

您可以尝试使用隐匿性安全措施,以使您的数据在系统受到威胁时不会被盗。这在某些情况下会有所帮助,但不会阻止坚定且熟练的对手。最重要的是首先确保病毒/蠕虫/任何东西不会进入您的系统。您可以采取的一些措施示例:

  • 编写应用程序时使用良好的编程实践(不允许 SQL 注入攻击)。
  • 仅运行您需要的服务。
  • 使用所需的最低权限运行服务。
  • 使用防火墙。
  • 使用入侵者检测软件,以便您知道自己何时遭到黑客攻击并快速使系统离线。

There's not really anything you can do that gives you 100% safety once your machine has been compromised - if you can read the database then a virus (or a user logged in via a backdoor) can eavesdrop on the database login. If you encrypt the database with a key and embed the key into your application a virus in theory could read your binary file and get access to the key.

You can attempt to use security by obscurity to make it unlikely that your data will be stolen should your system be compromised. This will help in some situations but it won't stop a determined and skilled adversary. The most important thing is to make sure the virus / worm / whatever doesn't get onto your system in the first place. Some examples of measures you can take:

  • Use good programming practices when writing your application (don't allow SQL injection attacks).
  • Run only the services you need.
  • Run services with the minimum permissions they need.
  • Use a firewall.
  • Use intruder detection software so that you know when you have been hacked and quickly take the system offline.
带刺的爱情 2024-10-10 00:10:25

作为一个“小型会计包”,您应该远离雷达,从而远离任何黑客的注意力。

最担心的应该是你的Sql Server。如果系统的任何部分成为目标(除了操作系统本身),它将是数据库服务器(记住 slammer 蠕虫.)为了真正保证它的安全,您可以将您的 Sql Server 放在一个单独的子域上,并通过 SSL 加密从您的应用程序到它的通信。

As a "small accounting package" you should be off the radar and therefore away any hackers' attention.

The biggest worry should be your Sql Server. If any part of your system gets targeted (besides the OS iteself) it will be the db server (remember the slammer worm.) To really secure it you could place your Sql Server on a separate subdomain and encrypt the communication to it from your application over SSL.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文