• 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. AD账号创建日期、最近一次登录时间、最近一次重置密码时间查询

    一:查询此AD域内所有用户的创建日期 Get-ADuser  -filter * -Properties * | Select-Object Name,SID, Created,PasswordLas ...

  2. CSS3 animation 的尝试

    下面是动画效果: .zoombie { width: 55px; height: 85px; background-image: url("http://images2015.cnblogs ...

  3. redis——持久化篇

    众所周知,redis是内存数据库,它把数据存储在内存中,这样在加快读取速度的同时也对数据安全性产生了新的问题,即当redis所在服务器发生宕机后,redis数据库里的所有数据将会全部丢失. 为了解决这 ...

  4. python实验二:字符串排序

    ##统计word中的各个字符的出现的次数,并统计出所有前十名的字符使用次数 # -*- coding:utf-8 -*- word='''awfesdafhjkcasadckjsdackjsadvcn ...

  5. MAC 安装 Protobuf

    1.确认MAC装有g++.make.vim工具 2.安装make工具使用       brew install make 3.安装protobuf brew install protobuf 4.安装 ...

  6. Nginx-->基础-->理论-->002:Nginx进程介绍

    一.Nginx进程介绍

  7. dictionaryWithContentsOfFile:方法

    dictionaryWithContentsOfFile:方法的功能是创建一个字典,将字典中的内容设置为指定文件中的所有内容, 语法:(id)dictionaryWithContentsOffilE. ...

  8. c#输出、输入

    //输出 Console.WriteLine("这是一行文字");  自动回车的. Console.Write("Hello world");  不带回车的. ...

  9. opencv 处女作

    显示一幅图:主要是运用功能:imread namedWindow imshowimread:从字面意思我们就可以看懂,用来读取图片的:namedWindow:显然,我们也可以看到这是用来命名窗口名称的 ...

  10. Oracle中执行存储过程call和exec区别

    Oracle中执行存储过程call和exec区别 在sqlplus中这两种方法都可以使用: exec pro_name(参数1..); call pro_name(参数1..); 区别: 1. 但是e ...