zoukankan      html  css  js  c++  java
  • pageheap检查对操作错误

     char *p =(char*)malloc(1024);
     p[1024]=1;

    pageheap /enable test.exe /full

     char *p =(char*)malloc(1023);
     p[1023]=1;

    pageheap /enable test.exe /unaligned

     

    char *p=new char[1023];

    p[-1]='c';

    pageheap /enable test.exe /backwards

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\test.exe]

    pageheap - Page heap utility, v 3.04
    Copyright (c) Microsoft Corporation. All rights reserved.

    pageheap [OPTION [OPTION ...]]

        /enable PROGRAM         Enable page heap with default settings.
        /disable PROGRAM        Disable page heap.
        /full                   Page heap for all allocations.
        /size START END         Page heap allocations for size range.
        /address START END      Page heap allocations for address range.
        /dlls DLL ...           Page heap allocations for target dlls.
        /random PROBABILITY     Page heap allocations with PROBABILITY.
        /debug                  Launch under debugger `ntsd -g -G -x'.
        /kdebug                 Launch under debugger `ntsd -g -G -d -x'.
        /backwards              Catch backwards overruns.
        /unaligned              No alignment for allocations.
        /decommit               Decommit guard pages (lower memory use).
        /notraces               Do not collect stack traces.
        /fault RATE [TIMEOUT]   Probability (1..10000) for heap calls failures
                                and time during process initialization (in second
                                when faults are not allowed.
        /leaks                  Check for heap leaks when process shuts down.
        /protect                Protect heap internal structures. Can be
                                used to detect random corruptions but
                                execution is slower.
        /no_sync                Check for unsynchronized access. Do not
                                use this flag for an MPheap process.
        /no_lock_checks         Disable critical section verifier.


    PROGRAM      Name of the binary with extension (.exe or something else).
    DLL          Name of the binary with extension (.dll or something else).
    PROBABILITY  Decimal integer in range [0..100] representing probability.
                 to make page heap allocation vs. a normal heap allocation.
    START..END   For /size option these are decimal integers.
                 For /address option these are hexadecimal integers.

    If no option specified the program will print all page heap enabled
    applications and their specific options.

    The `/leaks' option is effective only when normal page heap is enabled
    (i.e. not full page heap) therefore all flags that will force full
    page heap will be disabled if /leaks is specified.

    Note. Enabling page heap does not affect currently running
    processes. If you need to use page heap for processes that are
    already running and cannot be restarted (csrss.exe, winlogon.exe),
    a reboot is needed after the page heap has been enabled for
    that process.

    https://files.cnblogs.com/ahuo/pageheap.zip

  • 相关阅读:
    Ubuntu格式化分区时的一个小错误
    VS 2013中的新特性browser link
    回车登录,兼容
    ASP.NET MVC 站点设置.html 为起始页
    WebBrowser 禁用右键
    C# 获取时间差(几天前,几小时前,几分钟前,几秒前)
    JavaScrip操作Cookie
    JS生成GUID算法
    老李推荐: 第3章2节《MonkeyRunner源码剖析》脚本编写示例: MonkeyDevice API使用示例 4
    老李推荐: 第3章2节《MonkeyRunner源码剖析》脚本编写示例: MonkeyDevice API使用示例 3
  • 原文地址:https://www.cnblogs.com/ahuo/p/1455257.html
Copyright © 2011-2022 走看看