> Windows Syscalls
ntoskrnl.exeT1055.013T1106

NtOpenTransaction

Opens an existing KTM transaction object by name or unit-of-work GUID.

Prototype

NTSTATUS NtOpenTransaction(
  PHANDLE            TransactionHandle,
  ACCESS_MASK        DesiredAccess,
  POBJECT_ATTRIBUTES ObjectAttributes,
  LPGUID             Uow,
  HANDLE             TmHandle
);

Arguments

NameTypeDirDescription
TransactionHandlePHANDLEoutReceives a handle to the opened transaction.
DesiredAccessACCESS_MASKinRequested access rights (TRANSACTION_QUERY_INFORMATION, TRANSACTION_COMMIT, TRANSACTION_ROLLBACK, …).
ObjectAttributesPOBJECT_ATTRIBUTESinObject attributes containing the transaction object name (when opening by name).
UowLPGUIDinOptional unit-of-work GUID used when ObjectAttributes->ObjectName is NULL.
TmHandleHANDLEinOptional handle to the Transaction Manager that hosts the transaction. NULL = default TM.

Syscall IDs by Windows version

Windows versionSyscall IDBuild
Win10 15070x11Bwin10-1507
Win10 16070x121win10-1607
Win10 17030x125win10-1703
Win10 17090x127win10-1709
Win10 18030x129win10-1803
Win10 18090x12Awin10-1809
Win10 19030x12Bwin10-1903
Win10 19090x12Bwin10-1909
Win10 20040x130win10-2004
Win10 20H20x130win10-20h2
Win10 21H10x130win10-21h1
Win10 21H20x131win10-21h2
Win10 22H20x131win10-22h2
Win11 21H20x137win11-21h2
Win11 22H20x139win11-22h2
Win11 23H20x139win11-23h2
Win11 24H20x13Bwin11-24h2
Server 20160x121winserver-2016
Server 20190x12Awinserver-2019
Server 20220x136winserver-2022
Server 20250x13Bwinserver-2025

Kernel module

ntoskrnl.exeNtOpenTransaction

Related APIs

OpenTransactionNtCreateTransactionNtCommitTransactionNtRollbackTransactionNtQueryInformationTransaction

Syscall stub

4C 8B D1            mov r10, rcx
B8 3B 01 00 00      mov eax, 0x13B     ; Win11 24H2 SSN
F6 04 25 08 03 FE 7F 01   test byte ptr [0x7FFE0308], 1
75 03               jne short +3
0F 05               syscall
C3                  ret
CD 2E               int 2Eh
C3                  ret

Undocumented notes

Counterpart to `NtCreateTransaction`. The transaction can be opened either by name (when the creator placed it in `\BaseNamedObjects` or another directory) or by UoW GUID — every KTM transaction has a globally-unique unit-of-work GUID enrolled with the Transaction Manager. Once opened, the handle can be used to enlist further resource managers, query state via `NtQueryInformationTransaction`, or to commit/rollback if access was requested.

Common malware usage

Less central than `NtCreateTransaction` for Process Doppelgänging, but useful in multi-stage chains where one component creates the transaction (e.g. a service-context loader) and another stage opens it by UoW GUID to perform the rollback after the section has been created in a different process. Also appears in inter-process Doppelgänging variants where the dropper hands the UoW GUID to a child via IPC, lets the child reopen the transaction, and only then triggers rollback — this splits the suspicious sequence across two PIDs and defeats simple per-process detections.

Detection opportunities

Same telemetry surface as `NtCreateTransaction` — `Microsoft-Windows-Kernel-File` and `Microsoft-Windows-TxF` ETW providers. Specifically watch for unrelated processes opening the *same* UoW GUID within a short window: legitimate transactional apps (SQL Server, NTFS journaling) almost never span the create-open-rollback sequence across unrelated PIDs. Listing `\BaseNamedObjects` with WinObj will reveal named transactions, but most attacker-created transactions are unnamed and rely on UoW GUIDs.

Direct syscall examples

cOpen by UoW GUID

// Open an existing transaction by its unit-of-work GUID.
GUID uow = { /* received via IPC from the creator */ };
HANDLE hTx = NULL;
OBJECT_ATTRIBUTES oa = { sizeof(oa) };

NTSTATUS s = NtOpenTransaction(
    &hTx,
    TRANSACTION_COMMIT | TRANSACTION_ROLLBACK,
    &oa,
    &uow,
    NULL);

if (NT_SUCCESS(s)) {
    // Take ownership of the transaction — commit or rollback as needed.
    NtRollbackTransaction(hTx, TRUE);
    NtClose(hTx);
}

asmx64 direct stub (Win11 24H2)

; NtOpenTransaction direct stub — SSN 0x13B on Win11 24H2
NtOpenTransaction PROC
    mov  r10, rcx
    mov  eax, 13Bh
    syscall
    ret
NtOpenTransaction ENDP

rustOpen via ntapi crate

use ntapi::ntxcapi::NtOpenTransaction;
use winapi::shared::guiddef::GUID;
use winapi::shared::ntdef::{HANDLE, OBJECT_ATTRIBUTES};
use std::{mem, ptr::null_mut};

unsafe fn open_by_uow(mut uow: GUID) -> HANDLE {
    let mut h: HANDLE = null_mut();
    let mut oa: OBJECT_ATTRIBUTES = mem::zeroed();
    oa.Length = mem::size_of::<OBJECT_ATTRIBUTES>() as u32;
    let s = NtOpenTransaction(&mut h, 0x0008 | 0x0010, &mut oa, &mut uow, null_mut());
    assert!(s >= 0);
    h
}

MITRE ATT&CK mappings

Last verified: 2026-05-20