12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_secur32.rb', line 12
def self.create_library(constant_manager, library_path = 'secur32')
dll = Library.new(library_path, constant_manager)
dll.add_function('LsaCallAuthenticationPackage', 'NTSTATUS', [
['HANDLE', 'LsaHandle', 'in'],
['ULONG', 'AuthenticationPackage', 'in'],
['PBLOB', 'ProtocolSubmitBuffer', 'in'],
['ULONG', 'SubmitBufferLength', 'in'],
['PLPVOID', 'ProtocolReturnBuffer', 'out'],
['PULONG', 'ReturnBufferLength', 'out'],
['PULONG', 'ProtocolStatus', 'out']
])
dll.add_function('LsaConnectUntrusted', 'NTSTATUS', [
['PHANDLE', 'LsaHandle', 'out']
])
dll.add_function('LsaDeregisterLogonProcess', 'NTSTATUS', [
['HANDLE', 'LsaHandle', 'in']
])
dll.add_function('LsaEnumerateLogonSessions', 'NTSTATUS', [
['PULONG', 'LogonSessionCount', 'out'],
['PLPVOID', 'LogonSessionList', 'out']
])
dll.add_function('LsaFreeReturnBuffer', 'NTSTATUS', [
['LPVOID', 'Buffer', 'in']
])
dll.add_function('LsaGetLogonSessionData', 'NTSTATUS', [
['PBLOB', 'LogonId', 'in'],
['PLPVOID', 'ppLogonSessionData', 'out']
])
dll.add_function('LsaLookupAuthenticationPackage', 'NTSTATUS', [
['HANDLE', 'LsaHandle', 'in'],
['PBLOB', 'PackageName', 'in'],
['PULONG', 'AuthenticationPackage', 'out']
])
dll.add_function('LsaRegisterLogonProcess', 'NTSTATUS', [
['PBLOB', 'LogonProcessName', 'in'],
['PHANDLE', 'LsaHandle', 'out'],
['PULONG', 'SecurityMode', 'out']
])
return dll
end
|