• Compile flags:

    • /GS: Stack protection from buffer overrun.
    • /SDL: Subset of W3&W4 security warnings as errors.
    • Use warning 4.
    • /WX: Treat Warnings As Errors.
  • Linker flags:
    • /DYNAMICBASE: Randomize module base address to ensure that our code is at different location each time it is loaded.
    • /NXCOMPAT: Data Execution Prevention to ensure that data is difficult to execute.
    • /SAFESEH: Secure Exception Handling. Project->Properties->Linker->Advanced->Image has Safe Exception Handlers.
  • Using VS Code Analysis to find vulnerability.
  • Including Banned.h in projects to find unsafe methods which are listed in Banned.h.
  • Using BannedAPIextension to flag banned api use in editor. (only available for VS2010)
  • Enable /SEHOP in registry setting:
      1. Click Start, click Run, type regedit, and
        then press ENTER.
      2. Locate the following registry subkey:
        HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\DisableExceptionChainValidation

        Note If you cannot find the DisableExceptionChainValidation registry entry under the

        HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\

        subkey, follow these steps to create it:

        1. Right-click kernel, point to New, and then click DWORD Value.
        2. Type DisableExceptionChainValidation, and then press ENTER.
      3. Double-click DisableExceptionChainValidation.
      4. Change the value of the DisableExceptionChainValidation registry entry to 0 to enable it, and then click OK. 



        Note A value of 1 disables the registry entry. A value of 0 enables it.

Add more security in Visual Studio 2012的更多相关文章

  1. 在Visual Studio 2012中使用VMSDK开发领域特定语言(二)

    本文为<在Visual Studio 2012中使用VMSDK开发领域特定语言>专题文章的第二部分,在这部分内容中,将以实际应用为例,介绍开发DSL的主要步骤,包括设计.定制.调试.发布以 ...

  2. SQL Server Data Tools – Business Intelligence for Visual Studio 2012安装时提示“The CPU architecture....”的解决方法

    SQL Server Data Tools – Business Intelligence for Visual Studio 2012,一个很强大的工具,下载地址:http://www.micros ...

  3. 【转载】在 Visual Studio 2012 中创建 ASP.Net Web Service

    在 Visual Studio 2012 中创建 ASP.Net Web Service,步骤非常简单.如下: 第一步:创建一个“ASP.Net Empty Web Application”项目 创建 ...

  4. [Visual Studio] 开启Visual Studio 2012通过右键菜单创建单元测试(Unit Test)

    Visual Studio 2012可以说是迄今为止微软VS开发工具中用户体验最好的产品,无论是速度还是体验以及功能,都非常出色,但是,使用了一段时间后发现有一个之前版本VS都有的功能却在Visual ...

  5. Xamarin开发Android时Visual Studio 2012没有智能提示解决办法

    Most of the people who work with Xamarin’s Mono for Android in Visual Studio 2012 face a bug where I ...

  6. win8下在microsoft visual studio 2012利用ODP.NET连接ORACLE 12c

    老板要求我搭个ASP.NET框架,并且连接上ORACLE数据库,听起来好像挺简单的,但就是连第一步连接ORACLE我都搞了两天╮(╯▽╰)╭ 首先,项目书上要求用ORACLE 10G,可我自己的本本装 ...

  7. Zen Coding in Visual Studio 2012

    http://www.johnpapa.net/zen-coding-in-visual-studio-2012 Zen Coding is a faster way to write HTML us ...

  8. Visual Studio 2012使用水晶报表Crystal Report

    原文:Visual Studio 2012使用水晶报表Crystal Report SAP在 2013年1月14日 released SAP Crystal Reports,developer ver ...

  9. .NET Memory Allocation Profiling with Visual Studio 2012

    .NET Memory Allocation Profiling with Visual Studio 2012 This post was written by Stephen Toub, a fr ...

随机推荐

  1. 双系统下(Ubuntu + win7)windows 无法连接无线网络

    双系统下(Ubuntu + win7)windows 无法连接无线网络 今天开机登录win7,突然发现无法使用无线网络(WiFi信号标志有个大红叉),于是查看设备驱动,一切正常,这就奇怪了:用Wind ...

  2. Linux中多线程信号的处理

    1. 博文:Linux多线程中使用信号-1  http://blog.csdn.net/qq276592716/article/details/7325250 2. 博文:Linux多线程信号总结  ...

  3. man curl_easy_setopt(原创)

    中文翻译: curl_easy_setopt(3) libcurl 手册 curl_easy_setopt(3) 名称 curl_easy_setopt -curl的设置选项概要 #include & ...

  4. CodeFirst进行数据迁移之添加字段

    一.为模型更改设置 Code First 数据迁移 1.工具->库程序包管理器->程序包管理器控制台->输入"Enable-Migrations"  或者 Ena ...

  5. clr via c# 读书笔记

    WOW64 WOW64 (Windows 位应用程序提供了 位的模拟,可以使大多数 位应用程序在无需修改的情况下运行在 Windows 位版本上. com对象 COM:The Component Ob ...

  6. HYSBZ 4551 (树状数组) 采花

    题目:这里 题意: 在2016年,佳媛姐姐刚刚学习了树,非常开心.现在他想解决这样一个问题:给定一颗有根树(根为1),有以下 两种操作:1. 标记操作:对某个结点打上标记(在最开始,只有结点1有标记, ...

  7. M2事后分析汇报总结

    学霸网站项目Postmortem结果 M2之于M1的改进 文档和问答的整合 完成webservice 完成数据库触发器设计与完整性约束依赖(大规模) 优化学霸UI 资源的搜索 外部问题的搜索 文档的上 ...

  8. python操作系统环境变量

    获取整个系统变量的方法是os.environ,这是一个os的class类型,使用的时候可以转换为字典类型 environ_value = dict(os.environ) 这样就可以看所有的key,e ...

  9. git使用--git命令项目提交问题总结

    提交遇到Error  "remote ref does not exist"解决办法:git fetch -p MY_REMOTE    eg.    git fetch -p o ...

  10. 【Mail】JavaMail发送带附件的邮件(二)

    上一篇讲了使用JavaMail发送普通邮件([Mail]JavaMail介绍及发送邮件(一)),本例讲发送复杂的邮件(带有附件的邮件) 生成一封复杂的邮件 新建一个JavaWeb的Maven工程,引入 ...