Skip to content

Add MS-TSCH Task Scheduler support - #18

Open
mattmillen15 wants to merge 5 commits into
trustedsec:publicfrom
mattmillen15:tsch
Open

mattmillen15 wants to merge 5 commits into
trustedsec:publicfrom
mattmillen15:tsch

Conversation

@mattmillen15

Copy link
Copy Markdown

Adds Tsch tool and Titanis.Msrpc.Mstsch library for the MS-TSCH Task Scheduler Service.

Library — full ITaskSchedulerService RPC interface (opnums 0–19), TschClient with paginated enumeration, task registration w/ XML error reporting, dynamic TCP / NDR64 / named pipe reauth.

Tool — query, get, create, delete, run, stop, enable, folders. Create supports inline -Command/-Arguments, -RunAs with logon type selection, -OnLogon triggers, -SessionId for targeting RDP sessions.

Base changes — named pipe connections now use PacketIntegrity auth when the client supports reauth (required by TSCH). Suppressed CS1998 on ToAsyncEnumerable.

mattmillen15 and others added 5 commits September 17, 2026 16:51
Native DCE-RPC implementation of MS-TSCH (ITaskSchedulerService)
over \pipe\atsvc. All 20 opnums with NDR encode/decode stubs,
semantic TschClient, and Tsch CLI tool with subcommands:
query, get, create, delete, run, stop, enable, folders.

Fix pre-existing CS1998 in AsyncExtensions.cs (async iterator).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CreateCommand: -RunAs, -RunAsLogon parameters for XML principal.
RunCommand: -SessionId for RDP session targeting, -RunAsUser.
TschClient.RunTask: new overload with sessionId and user params.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RegistrationTrigger for immediate user-context execution,
LogonTrigger when -OnLogon is set. Default to InteractiveToken
logon for non-SYSTEM RunAs. Drop Group/ServiceAccount logon types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Named pipe connections defaulted to RpcAuthLevel.None, causing
ACCESS_DENIED on Task Scheduler operations via SMB. Set PacketIntegrity
when auth is present and the service supports reauth over pipes,
matching the TCP path behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Nest Mstsch lib under existing Msrpc solution folder (matching all other msrpc libs)
- Nest Tsch tool under existing Msrpc solution folder (matching Scm, Sam, etc.)
- Remove 'Titanis' from generated task XML description

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant