Red Teamers: Obfuscate! Simple XOR for enc/decoding in C/C++:
void XOR(char* d, size_t d_len) {
const char k[] = "abc";
int j = 0;
for (int i = 0; i < d_len; i++) {
if (j == sizeof(k) - 1) j = 0;
d[i] = d[i] ^ k[j];
j++;
}
}
#redteam
Conversation
Fun fact: on constants the compiler will just optimize this out and it's as good as if you didn't use it at all
3
Bookmarks
