• 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. nginx实现动静分离

    环境信息如下: 测试目的: 访问jpg文件的时候,会请求到192.168.1.106上面 访问其他文件会请求到192.168.1.103上面 nginx的安装详见前面的文章 nginx的配置如下 wo ...

  2. [转]hp电脑重装win7 64位 后 所有软件都装不上问题

    hp 电脑重装后 所有软件都装不上问题 装了近100来次机,第一次遇到这样的. bug描述: 新笔记本刚装了纯净版的64位旗舰版win7,想装软件,就弹出已停止工作.比如装火狐浏览器,弹出火狐浏览器网 ...

  3. JavaWeb---通过ServletConfig获取Servlet的初始化参数

    package com.zyz; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import j ...

  4. iOS 根据字符串内容动态计算行高

    + (CGFloat)textHeightFromTextString:(NSString *)text width:(CGFloat)textWidth fontSize:(CGFloat)size ...

  5. NPOI 2.0版本的使用

    详细教程: http://blog.csdn.net/xxs77ch/article/details/50216033 using System; using System.Collections.G ...

  6. sql.date and util.Date

    注意: 1.用 bean 接受 数据库查询的结果 sql.date 会自动转换为 util.date 2.想数据库插入date 类型,必须是要 sql.date 一.字符串 转 util.date S ...

  7. (转)oracle中用户删除不了,ORA-01940提示 “无法删除当前已连接用户”

    Oracle删除用户的提示无法删除当前已连接用户两种解决方法如下: 1.先锁定用户.然后查询进程号,最后删除对应的进程.在删除对应的用户 SQLalter user XXX account lock; ...

  8. hibernateTemplate中常用查询方法的使用(原文地址: http://dongruan00.iteye.com/blog/1772311)

    一.find(String queryString); 示例:this.getHibernateTemplate().find("from bean.User"); 返回所有Use ...

  9. Cookie的Secure属性

    基于安全的考虑,需要给cookie加上Secure和HttpOnly属性,HttpOnly比较好理解,设置HttpOnly=true的cookie不能被js获取到,无法用document.cookie ...

  10. webpack 的简单使用

    p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px "Helvetica Neue"; color: #323333 } p. ...