我正在调试一个程序并想使用 windbg 在 Secur32!ImpersonateSecurityContext 设置一个断点。我的高级 Windows 调试 一书告诉我,我应该能够使用此命令 bp Secur32!ImpersonateSecurityContext 设置断点。不幸的是,它对我来说失败了。
我确实检查了我的符号路径,我相信它是正确的。如果我在 windbg 中运行 x Secur32!*,我也会得到一些符号。
000007fe`fd481f28 Secur32!LsaQueryInformationPolicy = <no type information>
000007fe`fd481b18 Secur32!_delayLoadHelper2 = <no type information>
000007fe`fd484098 Secur32!_imp_RtlFreeUnicodeString = <no type information>
000007fe`fd4870c8 Secur32!_security_cookie_complement = <no type information>
000007fe`fd484090 Secur32!_imp_wcsncpy_s = <no type information>
000007fe`fd481070 Secur32!_DllMain = <no type information>
000007fe`fd484118 Secur32!_imp_GetCurrentThreadId = <no type information>
000007fe`fd487078 Secur32!_imp_DsUnBindW = <no type information>
000007fe`fd4840b8 Secur32!_imp_RtlInitUnicodeString = <no type information>
000007fe`fd4839b0 Secur32!GetComputerObjectNameA = <no type information>
000007fe`fd481260 Secur32!SecpTranslateNameExWorker = <no type information>
000007fe`fd484058 Secur32!_imp_RtlUnicodeStringToAnsiString = <no type information>
000007fe`fd4840c0 Secur32!_imp_wcschr = <no type information>
000007fe`fd487000 Secur32!_imp_CredFree = <no type information>
000007fe`fd481e48 Secur32!_imp_load_DsUnBindW = <no type information>
000007fe`fd487a30 Secur32!g_bInitOK = <no type information>
000007fe`fd4840b0 Secur32!_imp_wcsncmp = <no type information>
000007fe`fd48302c Secur32!GetLastError = <no type information>
000007fe`fd4816d0 Secur32!memcpy = <no type information>
000007fe`fd487038 Secur32!_imp_NetpIsUserNameValid = <no type information>
000007fe`fd4840d8 Secur32!_imp_memset = <no type information>
000007fe`fd481f4c Secur32!_imp_load_LsaClose = <no type information>
000007fe`fd485b80 Secur32!_sz_netutils_dll = <no type information>
000007fe`fd481450 Secur32!SecpTranslateNameEx = <no type information>
000007fe`fd4840f0 Secur32!_imp_UnhandledExceptionFilter = <no type information>
000007fe`fd484070 Secur32!_imp_RtlCopyUnicodeString = <no type information>
000007fe`fd487058 Secur32!_imp_DsGetDcNameWithAccountW = <no type information>
000007fe`fd483080 Secur32!_GSHandlerCheckCommon = <no type information>
000007fe`fd483064 Secur32!_imp_load_DsGetDcNameWithAccountW = <no type information>
000007fe`fd487a48 Secur32!g_dwOpenCount = <no type information>
000007fe`fd481e54 Secur32!_imp_load_DsMakeSpnW = <no type information>
000007fe`fd484068 Secur32!_imp_RtlAllocateHeap = <no type information>
000007fe`fd484008 Secur32!_imp_iswdigit = <no type information>
000007fe`fd483058 Secur32!_imp_load_CredFree = <no type information>
000007fe`fd484138 Secur32!_imp_LoadLibraryExA = <no type information>
000007fe`fd4870e0 Secur32!_hmod__logoncli_dll = <no type information>
000007fe`fd481db4 Secur32!_tailMerge_NTDSAPI_dll = <no type information>
000007fe`fd485b70 Secur32!_sz_ADVAPI32_dll = <no type information>
000007fe`fd4840f8 Secur32!_imp_GetCurrentProcess = <no type information>
000007fe`fd481030 Secur32!DllMain = <no type information>
000007fe`fd484020 Secur32!_imp_RtlCaptureContext = <no type information>
000007fe`fd481c10 Secur32!GetProcAddress = <no type information>
000007fe`fd484158 Secur32!_imp_GetLastError = <no type information>
000007fe`fd4830ec Secur32!_GSHandlerCheck = <no type information>
000007fe`fd482240 Secur32!SecpTranslateName = <no type information>
000007fe`fd484038 Secur32!_imp_NtMapViewOfSection = <no type information>
000007fe`fd484110 Secur32!_imp_GetCurrentProcessId = <no type information>
000007fe`fd487010 Secur32!_imp_LsaQueryInformationPolicy = <no type information>
000007fe`fd484060 Secur32!_imp_RtlFreeHeap = <no type information>
000007fe`fd481d9c Secur32!_imp_load_CredUnmarshalCredentialW = <no type information>
000007fe`fd481150 Secur32!CredParseUserNameWithType = <no type information>
000007fe`fd483020 Secur32!wcsncpy_s = <no type information>
000007fe`fd484140 Secur32!_imp_FreeLibrary = <no type information>
000007fe`fd481e3c Secur32!_imp_load_DsFreeNameResultW = <no type information>
000007fe`fd481f70 Secur32!GetComputerObjectNameW = <no type information>
000007fe`fd4819b0 Secur32!StringCchCatNW = <no type information>
000007fe`fd484000 Secur32!_imp_iswspace = <no type information>
000007fe`fd481f14 Secur32!_imp_load_LsaQueryInformationPolicy = <no type information>
000007fe`fd484160 Secur32!_imp_SetLastError = <no type information>
000007fe`fd483320 Secur32!CloseLsaPerformanceData = <no type information>
000007fe`fd481da8 Secur32!_imp_load_NetpIsUserNameValid = <no type information>
000007fe`fd4870d8 Secur32!_hmod__netutils_dll = <no type information>
000007fe`fd484080 Secur32!_imp_RtlEqualUnicodeString = <no type information>
000007fe`fd4841a0 Secur32!$$VProc_ImageExportDirectory = <no type information>
000007fe`fd487068 Secur32!_imp_DsFreeNameResultW = <no type information>
000007fe`fd481c98 Secur32!_tailMerge_ADVAPI32_dll = <no type information>
000007fe`fd484100 Secur32!_imp_TerminateProcess = <no type information>
000007fe`fd481d14 Secur32!_tailMerge_netutils_dll = <no type information>
000007fe`fd487088 Secur32!_imp_DsMakeSpnW = <no type information>
000007fe`fd485b90 Secur32!_sz_logoncli_dll = <no type information>
000007fe`fd484078 Secur32!_imp_RtlNtStatusToDosError = <no type information>
000007fe`fd481e70 Secur32!_imp_load_DsGetDcNameW = <no type information>
000007fe`fd4831f0 Secur32!IsNumberInUnicodeList = <no type information>
000007fe`fd4820a0 Secur32!GetFullMachineName = <no type information>
000007fe`fd484120 Secur32!_imp_GetTickCount = <no type information>
000007fe`fd485bc0 Secur32!_sz_NTDSAPI_dll = <no type information>
000007fe`fd4870d0 Secur32!_hmod__ADVAPI32_dll = <no type information>
000007fe`fd487040 Secur32!_imp_NetApiBufferFree = <no type information>
000007fe`fd483380 Secur32!OpenLsaPerformanceData = <no type information>
000007fe`fd481c1c Secur32!LoadLibraryExA = <no type information>
000007fe`fd487018 Secur32!_imp_LsaFreeMemory = <no type information>
000007fe`fd4840a8 Secur32!_imp_RtlCreateUnicodeString = <no type information>
000007fe`fd485ae8 Secur32!_DELAY_IMPORT_DESCRIPTOR_netutils_dll = <no type information>
000007fe`fd482210 Secur32!_security_check_cookie = <no type information>
000007fe`fd484170 Secur32!_imp_GetProcAddress = <no type information>
000007fe`fd481d90 Secur32!_imp_load_NetApiBufferFree = <no type information>
000007fe`fd485a40 Secur32!_pfnDefaultDliNotifyHook2 = <no type information>
000007fe`fd484108 Secur32!_imp_GetSystemTimeAsFileTime = <no type information>
000007fe`fd484180 Secur32!_imp_LocalAlloc = <no type information>
000007fe`fd484130 Secur32!_imp_DelayLoadFailureHook = <no type information>
000007fe`fd484050 Secur32!_imp_RtlInitAnsiString = <no type information>
000007fe`fd485b08 Secur32!_DELAY_IMPORT_DESCRIPTOR_logoncli_dll = <no type information>
000007fe`fd4870e8 Secur32!_hmod__NTDSAPI_dll = <no type information>
000007fe`fd4834d0 Secur32!CollectLsaPerformanceData = <no type information>
000007fe`fd481e7c Secur32!_tailMerge_logoncli_dll = <no type information>
000007fe`fd483830 Secur32!TranslateNameA = <no type information>
000007fe`fd487780 Secur32!LsaSystemwideDataDefinition = <no type information>
000007fe`fd4879a0 Secur32!LsaPerProcDataDefinition = <no type information>
000007fe`fd487020 Secur32!_imp_LsaClose = <no type information>
000007fe`fd484148 Secur32!_imp_lstrcmpW = <no type information>
000007fe`fd481f0c Secur32!LsaOpenPolicy = <no type information>
000007fe`fd487070 Secur32!_imp_DsCrackNamesW = <no type information>
000007fe`fd487028 Secur32!_imp_CredUnmarshalCredentialW = <no type information>
000007fe`fd483038 Secur32!FreeLibrary = <no type information>
000007fe`fd487a40 Secur32!g_hLsaSharedMemory = <no type information>
000007fe`fd484088 Secur32!_imp_RtlGetNtProductType = <no type information>
000007fe`fd484188 Secur32!_imp_DisableThreadLibraryCalls = <no type information>
000007fe`fd484028 Secur32!_imp_NtClose = <no type information>
000007fe`fd485a40 Secur32!_pfnDliNotifyHook2 = <no type information>
000007fe`fd484018 Secur32!_imp_RtlLookupFunctionEntry = <no type information>
000007fe`fd484128 Secur32!_imp_QueryPerformanceCounter = <no type information>
000007fe`fd484030 Secur32!_imp_NtUnmapViewOfSection = <no type information>
000007fe`fd481f30 Secur32!_imp_load_LsaFreeMemory = <no type information>
000007fe`fd484048 Secur32!_imp_RtlAnsiStringToUnicodeString = <no type information>
000007fe`fd4840c8 Secur32!_imp_RtlVirtualUnwind = <no type information>
000007fe`fd4840d0 Secur32!_imp_wcsrchr = <no type information>
000007fe`fd4816e0 Secur32!SecpFreeMemory = <no type information>
000007fe`fd48124c Secur32!NetpIsUserNameValid = <no type information>
000007fe`fd484168 Secur32!_imp_GetModuleHandleW = <no type information>
000007fe`fd487008 Secur32!_imp_LsaOpenPolicy = <no type information>
000007fe`fd481f60 Secur32!LsaClose = <no type information>
000007fe`fd487050 Secur32!_imp_DsGetDcNameW = <no type information>
000007fe`fd4837e0 Secur32!TranslateNameW = <no type information>
000007fe`fd485ac8 Secur32!_DELAY_IMPORT_DESCRIPTOR_ADVAPI32_dll = <no type information>
000007fe`fd487680 Secur32!HotPatchBuffer = <no type information>
000007fe`fd4840e0 Secur32!_imp_memcpy = <no type information>
000007fe`fd484150 Secur32!_imp_GetComputerNameW = <no type information>
000007fe`fd4870c0 Secur32!_security_cookie = <no type information>
000007fe`fd484178 Secur32!_imp_LocalFree = <no type information>
000007fe`fd484040 Secur32!_imp_NtOpenSection = <no type information>
000007fe`fd481e60 Secur32!_imp_load_DsBindWithSpnExW = <no type information>
000007fe`fd484190 Secur32!_imp_SetUnhandledExceptionFilter = <no type information>
000007fe`fd4816c4 Secur32!NetApiBufferFree = <no type information>
000007fe`fd484010 Secur32!_imp__itow = <no type information>
000007fe`fd483050 Secur32!DelayLoadFailureHook = <no type information>
000007fe`fd4810a0 Secur32!_security_init_cookie = <no type information>
000007fe`fd4840a0 Secur32!_imp_RtlUpcaseUnicodeString = <no type information>
000007fe`fd485b28 Secur32!_DELAY_IMPORT_DESCRIPTOR_NTDSAPI_dll = <no type information>
000007fe`fd481e30 Secur32!_imp_load_DsCrackNamesW = <no type information>
000007fe`fd482f20 Secur32!_report_gsfailure = <no type information>
000007fe`fd481ef8 Secur32!_imp_load_LsaOpenPolicy = <no type information>
000007fe`fd481730 Secur32!ConstructSPN = <no type information>
000007fe`fd481f44 Secur32!LsaFreeMemory = <no type information>
000007fe`fd487660 Secur32!DsNameErrorMap = <no type information>
000007fe`fd487a38 Secur32!g_pCounterBlock = <no type information>
000007fe`fd487080 Secur32!_imp_DsBindWithSpnExW = <no type information>
000007fe`fd4832a0 Secur32!GetQueryType = <no type information>
000007fe`fd481010 Secur32!DllMainCRTStartupForGS2 = <no type information>
000007fe`fd481c90 Secur32!memset = <no type information>
我在那里找不到符号 Secur32!ImpersonateSecurityContext。所以,我认为这就是我无法设置断点的原因。 MSDN确实声称 ImpersonateSecurityContext 位于 Secur32.dll 中。我不敢相信微软故意去掉这个符号,因为它是一个非常受欢迎的功能,许多程序都在使用它。我一定是遗漏了一些简单的东西。
有什么想法吗?
最佳答案
不要无助。您已经有了这些工具。
如果您已经在调试调用 ImpersonateSecurityContext 的程序,请找到对 ImpersonateSecurityContext 的调用并查看调用 的目标> 说明是。
如果您没有调用 ImpersonateSecurityContext 的程序,那么就去做一个吧。
#include <windows.h>
#include <security.h>
int __cdecl main(int, char **)
{
ImpersonateSecurityContext(NULL);
return 0;
}
编译此程序,在 ImpersonateSecurityContext 调用上设置断点,然后运行它。当断点命中时,单步查看它会将您带到哪里。这就是 ImpersonateSecurityContext 所在的位置。
关于windows - 在 Secur32!ImpersonateSecurityContext 处设置断点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8003107/
我有一个Ruby程序,它使用rubyzip压缩XML文件的目录树。gem。我的问题是文件开始变得很重,我想提高压缩级别,因为压缩时间不是问题。我在rubyzipdocumentation中找不到一种为创建的ZIP文件指定压缩级别的方法。有人知道如何更改此设置吗?是否有另一个允许指定压缩级别的Ruby库? 最佳答案 这是我通过查看rubyzip内部创建的代码。level=Zlib::BEST_COMPRESSIONZip::ZipOutputStream.open(zip_file)do|zip|Dir.glob("**/*")d
我需要在客户计算机上运行Ruby应用程序。通常需要几天才能完成(复制大备份文件)。问题是如果启用sleep,它会中断应用程序。否则,计算机将持续运行数周,直到我下次访问为止。有什么方法可以防止执行期间休眠并让Windows在执行后休眠吗?欢迎任何疯狂的想法;-) 最佳答案 Here建议使用SetThreadExecutionStateWinAPI函数,使应用程序能够通知系统它正在使用中,从而防止系统在应用程序运行时进入休眠状态或关闭显示。像这样的东西:require'Win32API'ES_AWAYMODE_REQUIRED=0x0
我在使用omniauth/openid时遇到了一些麻烦。在尝试进行身份验证时,我在日志中发现了这一点:OpenID::FetchingError:Errorfetchinghttps://www.google.com/accounts/o8/.well-known/host-meta?hd=profiles.google.com%2Fmy_username:undefinedmethod`io'fornil:NilClass重要的是undefinedmethodio'fornil:NilClass来自openid/fetchers.rb,在下面的代码片段中:moduleNetclass
我正在查看instance_variable_set的文档并看到给出的示例代码是这样做的:obj.instance_variable_set(:@instnc_var,"valuefortheinstancevariable")然后允许您在类的任何实例方法中以@instnc_var的形式访问该变量。我想知道为什么在@instnc_var之前需要一个冒号:。冒号有什么作用? 最佳答案 我的第一直觉是告诉你不要使用instance_variable_set除非你真的知道你用它做什么。它本质上是一种元编程工具或绕过实例变量可见性的黑客攻击
我想设置一个默认日期,例如实际日期,我该如何设置?还有如何在组合框中设置默认值顺便问一下,date_field_tag和date_field之间有什么区别? 最佳答案 试试这个:将默认日期作为第二个参数传递。youcorrectlysetthedefaultvalueofcomboboxasshowninyourquestion. 关于ruby-on-rails-date_field_tag,如何设置默认日期?[rails上的ruby],我们在StackOverflow上找到一个类似的问
这似乎非常适得其反,因为太多的gem会在window上破裂。我一直在处理很多mysql和ruby-mysqlgem问题(gem本身发生段错误,一个名为UnixSocket的类显然在Windows机器上不能正常工作,等等)。我只是在浪费时间吗?我应该转向不同的脚本语言吗? 最佳答案 我在Windows上使用Ruby的经验很少,但是当我开始使用Ruby时,我是在Windows上,我的总体印象是它不是Windows原生系统。因此,在主要使用Windows多年之后,开始使用Ruby促使我切换回原来的系统Unix,这次是Linux。Rub
我正在玩HTML5视频并且在ERB中有以下片段:mp4视频从在我的开发环境中运行的服务器很好地流式传输到chrome。然而firefox显示带有海报图像的视频播放器,但带有一个大X。问题似乎是mongrel不确定ogv扩展的mime类型,并且只返回text/plain,如curl所示:$curl-Ihttp://0.0.0.0:3000/pr6.ogvHTTP/1.1200OKConnection:closeDate:Mon,19Apr201012:33:50GMTLast-Modified:Sun,18Apr201012:46:07GMTContent-Type:text/plain
我在Rails应用程序中使用CarrierWave/Fog将视频上传到AmazonS3。有没有办法判断上传的进度,让我可以显示上传进度如何? 最佳答案 CarrierWave和Fog本身没有这种功能;你需要一个前端uploader来显示进度。当我不得不解决这个问题时,我使用了jQueryfileupload因为我的堆栈中已经有jQuery。甚至还有apostonCarrierWaveintegration因此您只需按照那里的说明操作即可获得适用于您的应用的进度条。 关于ruby-on-r
之前在培训新生的时候,windows环境下配置opencv环境一直教的都是网上主流的vsstudio配置属性表,但是这个似乎对新生来说难度略高(虽然个人觉得完全是他们自己的问题),加之暑假之后对cmake实在是爱不释手,且这样配置确实十分简单(其实都不需要配置),故斗胆妄言vscode下配置CV之法。其实极为简单,图比较多所以很长。如果你看此文还配不好,你应该思考一下是不是自己的问题。闲话少说,直接开始。0.CMkae简介有的人到大二了都不知道cmake是什么,我不说是谁。CMake是一个开源免费并且跨平台的构建工具,可以用简单的语句来描述所有平台的编译过程。它能够根据当前所在平台输出对应的m
文章目录1.开发板选择*用到的资源2.串口通信(个人理解)3.代码分析(注释比较详细)1.主函数2.串口1配置3.串口2配置以及中断函数4.注意问题5.源码链接1.开发板选择我用的是STM32F103RCT6的板子,不过代码大概在F103系列的板子上都可以运行,我试过在野火103的霸道板上也可以,主要看一下串口对应的引脚一不一样就行了,不一样的就更改一下。*用到的资源keil5软件这里用到了两个串口资源,采集数据一个,串口通信一个,板子对应引脚如下:串口1,TX:PA9,RX:PA10串口2,TX:PA2,RX:PA32.串口通信(个人理解)我就从串口采集传感器数据这个过程说一下我自己的理解,