mirror-ac/server/Types.cs

135 lines
4.2 KiB
C#
Raw Normal View History

2023-09-08 20:41:11 +02:00
using Org.BouncyCastle.Utilities;
using Serilog;
2023-09-02 17:56:46 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace server
{
namespace Types
{
2023-09-08 20:41:11 +02:00
namespace ClientSend
2023-09-02 17:56:46 +02:00
{
2023-09-08 20:41:11 +02:00
struct CLIENT_SEND_PACKET_HEADER
2023-09-02 17:56:46 +02:00
{
2023-09-08 20:41:11 +02:00
public int RequestId;
public int PacketSize;
2023-09-02 17:56:46 +02:00
};
2023-09-08 20:41:11 +02:00
2023-09-11 16:14:21 +02:00
public enum USER_BAN_REASONS
{
HARDWARE_BAN = 10,
USER_BAN = 20
}
2023-09-10 18:30:46 +02:00
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
2023-09-08 20:41:11 +02:00
public unsafe struct PACKET_CLIENT_HARDWARE_INFORMATION
{
2023-09-11 06:53:46 +02:00
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
2023-09-10 18:30:46 +02:00
public string MotherboardSerialNumber;
2023-09-11 06:53:46 +02:00
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
2023-09-10 18:30:46 +02:00
public string DeviceDriver0Serial;
2023-09-08 20:41:11 +02:00
}
2023-09-02 17:56:46 +02:00
}
2023-09-08 20:41:11 +02:00
namespace ClientReport
2023-09-02 17:56:46 +02:00
{
2023-09-10 19:32:12 +02:00
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public unsafe struct PROCESS_MODULE_INTEGRITY_CHECK_FAILURE
2023-09-02 17:56:46 +02:00
{
public int ReportCode;
public UInt64 ModuleBaseAddress;
2023-09-22 14:29:51 +02:00
public int ModuleSize;
2023-09-10 19:32:12 +02:00
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string ModuleName;
2023-09-02 17:56:46 +02:00
}
public struct PROCESS_THREAD_START_FAILURE
{
public int ReportCode;
2023-09-22 14:29:51 +02:00
public int ThreadId;
public long StartAddress;
2023-09-02 17:56:46 +02:00
}
public struct PAGE_PROTECTION_FAILURE
{
public int ReportCode;
public UInt64 PageBaseAddress;
public long AllocationProtection;
public long AllocationState;
public long AllocationType;
}
public struct PATTERN_SCAN_FAILURE
{
public int ReportCode;
public int SignatureId;
public UInt64 Address;
}
public struct NMI_CALLBACK_FAILURE
{
public int ReportCode;
public int WereNmisDisabled;
public UInt64 KThreadAddress;
public UInt64 InvalidRip;
}
2023-09-10 19:32:12 +02:00
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
2023-09-02 17:56:46 +02:00
public unsafe struct MODULE_VALIDATION_FAILURE
{
public int ReportCode;
public int ReportType;
public long DriverBaseAddress;
public long DriverSize;
2023-09-10 19:32:12 +02:00
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
public string ModuleName;
2023-09-02 17:56:46 +02:00
}
2023-09-10 18:30:46 +02:00
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
2023-09-22 14:29:51 +02:00
public unsafe struct OPEN_HANDLE_FAILURE
2023-09-02 17:56:46 +02:00
{
public int ReportCode;
public int IsKernelHandle;
public uint ProcessId;
public uint ThreadId;
public uint DesiredAccess;
2023-09-10 18:30:46 +02:00
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
2023-09-11 19:39:00 +02:00
public string ProcessName;
2023-09-02 17:56:46 +02:00
}
2023-09-22 14:29:51 +02:00
2023-09-23 14:27:02 +02:00
[StructLayout(LayoutKind.Sequential)]
public unsafe struct INVALID_PROCESS_ALLOCATION_FAILURE
2023-09-22 14:29:51 +02:00
{
public int ReportCode;
2023-09-23 14:27:02 +02:00
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4096)]
2023-09-22 14:29:51 +02:00
public byte[] ProcessStructure;
}
2023-09-23 14:27:02 +02:00
[StructLayout(LayoutKind.Sequential)]
2023-09-22 14:29:51 +02:00
public struct HIDDEN_SYSTEM_THREAD_FAILURE
{
public int ReportCode;
public int FoundInKThreadList;
public int FoundInPspCidTable;
public long ThreadAddress;
public int ThreadId;
2023-09-23 14:27:02 +02:00
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4096)]
2023-09-22 14:29:51 +02:00
public byte[] ThreadStructure;
}
public struct ATTACH_PROCESS_FAILURE
{
public int ReportCode;
public int ThreadId;
public long ThreadAddress;
}
2023-09-02 17:56:46 +02:00
}
}
}