Разрядность ключа «Image File Execution Options».

???? «Image File Execution Options» ??????, ????????, ???? ??? ???????? ??????? ????? ??????? ?? ??????? ??????????. ? ?????????, ? ??? ??????? ????? ??????? ??????? ?????? ????????? ???????????? ??????? ??? ??????????. ? ???? ?? ????? ??????? gflags.exe ????????? ????????? ?????????? ????? ? ?.?. ?? ????????????? ?????????? ?????????? ? Google, ??? ???? ????? ?????????.

? ?? ???? ???????????? ?? ?????? ??????????? ????? ?????. ?? 64-? ?????? ???????, ??, ??? ? ??????????? ?????? ?????? ? ????? «HKLM\SOFTWARE», ?????????? ? ???? ???????????. 64-? ?????? ?????????? ?????????? « HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options», ? 32-? ?????? – «HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Image File Execution Options». ???? ??? ??? ?????? ? ????????. ????????? ??????????, ????? ??????? ?????????? ???????? ?? .NET ? ?????????????? ??? AnyCPU ??????. ????? .exe ??????????? ??? 32-? ?????? ??????? ?? 32-? ????????? ?????? ? ??? 64-? ?????? – ?? 64-? ????????? ???????. ???? ?? ?????????? ????????? ??? ?????????? ??? ??????????, ???????????????? 64-? ?????? ??????? ????? «Image File Execution Options»:

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\foobar.exe]
"Debugger"="c:\\dbg\\windbg.exe"

…?? ? ??? ?????? ?? ??????.

???? ?? ??????? ????? ????? ?? ???????? ? 32-? ????????? ????? ???????:

 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\foobar.exe]
"Debugger"="c:\\dbg\\windbg.exe"

…?? ??? ?????????? ??? ?? ??????????. ? ??? ??? ????? ???? ???? ?????????? ??????????? ??? 64-? ?????? ????????

??? ???? ? PE ?????????. ???? ?? ???????, AnyCPU ?????? ????????? x86 ? ???????? ??????? ??????????? ? ????????? ???????????? ?????. ???????? «Debugger» ???????? ???????????? ?????????, ??????? ????????? PE ????????? ???????????? ???????, ????? ?????????? ????? ?? ?????? «Image File Execution Options» ???????????? – 32-? ??? 64-? ??????. ? ? ?????? AnyCPU ??? ???????? ???? ????.

?????? ?? ???? ????????? ?? ?????????????. ???? ?? ??????????? ?????? ??????????? ????????, ???????? «GlobalFlags», ??? ??????????? ???????? gflags.exe, ???, ? ?????-??, ???? ? ?? ??, ?? ??? AnyCPU ?????? ?? ?????? ????????? ?? ? 64-? ?????? ?????? ????? «Image File Execution Options». ? ??????? ?? «Debugger», «GlobalFlags» ? ?????? ???????? ???????? ????? ?????????, ? ????????? ??????? 64-? ??????, ?? ? ???????? ??? ????? ?? 64-? ??????? ?????.

?????? ????? «?????????? ????????» ???????? ??? ???:

  1. ???? (? ?????? NtCreateUserProcess) ????????? ??????? ????? «Image File Execution Options» ??? ??????? ???????????? ?????. ??? ???? ??????????? ???? «machine» ? PE ?????????. ? ??????????? ?? ??????????? ???????? ??????????? 32-? ?????? ??? 64-? ?????? ????;
  2. ???????????? ???????? ????????? ????????? ????? ?? NtCreateUserProcess ? ???? ???????? «Debugger» ????????????, ?? ? ????????? ?????? ??????????? ??????? ??? ?????? ????????? ? NtCreateUserProcess ?????????? ?? ?????. ?? ???? ????? ??????????? ???????????? ????? «Image File Execution Options» ??-???????? ???????????? ????? «machine» ? PE ?????????;
  3. ????? ????????? ??????? ?????? ????????? ???? «Image File Execution Options» ? ?????? ??? ????????? ????????. ?? ???? ??? ??????????? ????? ???????????? ????????? ???????????? ????????.

? ?????, ??? ??? ??? ????????.

Cross-posted from blog.not-a-kernel-guy.com.