Skip to main content
The samples/ directory in the Titanis repository contains fully working programs that demonstrate how to use the Titanis libraries. Each sample targets a specific set of protocols and techniques.

SMB samples

Smb2GetSample

Retrieves a file from a remote share over SMB2 using NTLM authentication via SPNEGO. Demonstrates Smb2Client, ClientCredentialDictionary, DictionaryNameResolver, and PlatformSocketService.Protocols: SMB2Location: samples/smb2/Smb2GetSample/

MSRPC samples

EnumUsers

Enumerates user accounts on a remote Windows system using the SAM RPC interface over NTLM-authenticated SMB.Protocols: NTLM, RPC, SAM serviceLocation: samples/msrpc/EnumUsers/

WeakServices

Enumerates Windows services and checks each service’s DACL for overly permissive entries. Uses LSA to translate SIDs to account names.Protocols: NTLM, RPC, SMB, LSA, SCMLocation: samples/msrpc/WeakServices/

DCOM samples

MmcExec

Executes a lateral movement technique using MMC over DCOM with OLE Automation and dynamic IDispatch invocation.Protocols: RPC, NTLM, DCOM, OLE AutomationLocation: samples/dcom/MmcExec/

ShellDcomExec

Executes a lateral movement technique using the Windows Shell over DCOM.Protocols: RPC, NTLM, DCOM, OLE AutomationLocation: samples/dcom/ShellDcomExec/

WordMacroExec

Adds a VBA macro to a Word document over DCOM using OLE Automation.Protocols: RPC, NTLM, DCOM, OLE AutomationLocation: samples/dcom/WordMacroExec/

WMI samples

WmiExec

Executes a process on a remote system by invoking Win32_Process.Create via WMI over DCOM.Protocols: RPC, DCOM, WMI, dynamic dispatchLocation: samples/wmi/WmiExec/

WmiRegistry

Reads and writes Windows registry keys on a remote system using the WMI StdRegProv provider.Protocols: RPC, DCOM, WMI, dynamic dispatchLocation: samples/wmi/WmiRegistry/

CLI and workflow samples

CommandSample

Demonstrates the full Titanis.Cli parameter framework: positional and named parameters, switch flags, array parameters, custom type converters, parameter validation, and parameter groups.Location: samples/CommandSample/

WorkflowSample

Demonstrates Titanis.Cli.Workflow for step-based task execution including error continuation and rollback.Location: samples/WorkflowSample/

TerminalLogSample

Demonstrates the Titanis logging API: writing messages at all severity levels (Error, Warning, Info, Verbose, Diagnostic, Debug) using this.Log.WriteMessage and LogMessage.Location: samples/TerminalLogSample/

PDU struct sample

PduStructSample

Shows how to use every attribute supported by the PDU source generator: [PduStruct], [PduField], [PduIgnore], [PduByteOrder], [PduString], [PduArraySize], [PduConditional], [PduPosition], and custom read/write methods.Location: samples/PduStructSample/
All samples use <ProjectReference> elements pointing directly at the library source rather than NuGet packages. When writing your own tools against published NuGet packages, replace the <ProjectReference> elements with <PackageReference> elements as shown in the developer guide overview.

Build docs developers (and LLMs) love