• 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. jQuery 取消事件冒泡 阻止后续内容执行 闭包函数 (学习笔记)

    1.取消事件冒泡 <title>取消事件冒泡</title> <style> div { border:solid 1px black; } </style& ...

  2. 主从LDAP

    yum -y install compat-openldap必须得安装这个   1:在主上       备份         cp /etc/openldap/slapd.conf /etc/open ...

  3. thinkphp model模块

    1.获取系统常量信息的方法:在控制器DengLuController里面下写入下面的方法,然后调用该方法. public function test() { //echo "这是测试的&qu ...

  4. Linux入门学习 常用命令

    cd命令 功能是切换到指定的目录:命令格式:cd [目录名]有几个符号作为目录名有特殊的含义:"/"代表根目录.".."代表上一级目录."~" ...

  5. 深度学习(dropout)

    other_techniques_for_regularization 随手翻译,略作参考,禁止转载 www.cnblogs.com/santian/p/5457412.html Dropout: D ...

  6. NSDate和NSString相互转换

    一.NSDate转NSString //获取系统当前时间 NSDate *currentDate = [NSDate date]; //用于格式化NSDate对象 NSDateFormatter *d ...

  7. 我 && yii2 (路由优化)

    今天配置了一下yii2 的路由,用 /index.php?r=... 这样的路由,实在是不太习惯,所以我便试着把yii2 的路由,写成laravel 那般,以下为详情 1.环境介绍 lnmp php5 ...

  8. Unity 之 Shader 对Z深度的偏移

    对Z深度的偏移 Offset 指令给了我们一个操作正常的ZTest 检测结果的手段. Offset有两个参数,这两个参数理解起来不是很直观,而且具体实现是和硬件相关的 下面在实际例子中看他的效果 Sh ...

  9. CSS布局(一)

    本节内容: 没有布局 display属性 margin:auto; max-width 盒模型 没有布局 如果想把所有内容都塞进一栏里,那么不用设置任何布局也是可以的.然而,如果用户把浏览器窗口调整的 ...

  10. NSLock线程锁的使用测试

    测试1:NSLock线程锁是不是单例? 打印: 结论1:NSLock不是单例 测试2:同一个线程锁在不同的地方锁定,是否会有锁定两个? 打印为: 结论2:顺序打印,在不同的地方锁定也可以锁定. 测试3 ...