有没有方法可以帮助软件免受病毒侵害?

发布于 2024-10-18 22:51:52 字数 192 浏览 5 评论 0原文

是否有任何已知的方法可以使您的软件免受病毒侵害?更具体地说,开发是在.NET中完成的。 .NET 中是否有内置的东西可以帮助解决这个问题?有人专门问过我这件事,我却毫无头绪。

更新:在这种情况下,免疫意味着免受剥削。至少我相信这是向我提问的人想知道的。

我意识到这是一个极其开放式的问题,软件开发离真正能够免疫病毒的阶段还有很长的路要走。

Are there any known methods that can be used to make your software immune to viruses? To be more specific, the development is done in .NET. Is there anything built into .NET that would help with this? I had someone specifically ask me about this and I did not have the slightest clue.

Update: Immunity in this situation would mean immune to exploitation. At least I believe that's what the person asking the question to me wanted to know.

I realize this is an extremely open ended question and that software development is way off from being at a point where it software developed can really be immune to viruses.

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

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

发布评论

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

评论(1

↙温凉少女 2024-10-25 22:51:52

当您说免受病毒侵害时,您的意思是免受剥削吗?我认为对于任何开发平台来说,任何能够免受病毒侵害的软件都还有一段路要走。

一般来说,有两个重要的活动可以带来安全的软件

  • 1) 设计安全 - 是否
    系统的固有设计允许
    攻击者控制主机。然而,安全的设计并不能防止不安全的编码。
  • 2) 安全编码 - 大多数
    重要的是,不要相信用户输入。然而,安全编码并不能防止不安全的设计。

.NET 的多个功能有助于减少被利用的可能性。

  • 1) .NET 负责内存管理
    分配和销毁。这有助于防止可利用的堆损坏。
  • 2) .NET 默认情况下将边界检查数组访问。在基于 C 的语言中,覆盖或底层写入数组允许攻击者将内存写入目标进程。
  • 3).NET执行模型不是
    容易受到堆栈溢出的影响
    与普通 x86 执行方式相同
    模型。数组分配在
    堆。
  • 4)您可以设置代码访问权限,如果使用得当,这些有助于防止不受信任的代码在主机上执行特权操作。

When you say immune to viruses, do you mean immune to exploitation? I think any software being immune to viruses is some way off for any development platform.

In general, there are two important activities that lead to secure software

  • 1) Safety by design - does the
    inherent design of a system allow an
    attacker to control the host machine. However, a secure design won't protect against insecure coding.
  • 2) Secure coding - most
    importantly, don't trust user input. However, secure coding won't protect against an insecure design.

There are several features of .NET that help reduce the liklihood of exploitation.

  • 1) .NET takes care of memory
    allocation and destruction. This helps prevent exploitable heap corruption.
  • 2) .NET, by default, will bounds check array accesses. In C based languages, overwriting, or underwriting into arrays has allowed attackers to write memory into the target process.
    .
  • 3) .NET execution model is not
    vulnerable to stack overflows in the
    same way as the normal x86 execution
    model. Arrays are allocated on the
    heap.
  • 4) you can set Code Access permissions, if used properly these help prevent untrusted code performing privileged actions on the host machine.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文