aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoni <matzeton@googlemail.com>2014-11-23 04:25:32 +0100
committertoni <matzeton@googlemail.com>2014-11-23 04:25:32 +0100
commit6b20dd49d40aabd06d1b836c7dc1eaf7c6022563 (patch)
tree499a77da30a2ed771522d53e5128a807668f57b0
parent9f91febc22f9e0c8e79f5a9d4de4298f1320c29e (diff)
- most simple working crypter
-rw-r--r--crypter/simple_encoder.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/crypter/simple_encoder.c b/crypter/simple_encoder.c
index bbedaf3..5ab4f66 100644
--- a/crypter/simple_encoder.c
+++ b/crypter/simple_encoder.c
@@ -76,6 +76,7 @@ main(int argc, char **argv)
printf("// decoder[%d] = %u (%02x)\n", i, (unsigned char) decoder[i], (unsigned char) decoder[i]);
}
}
+ printf("\n");
do {
if (nullbyte == 1) {
@@ -88,9 +89,17 @@ main(int argc, char **argv)
shellcode[i] += number;
if (shellcode[i] == '\x00') {
nullbyte = 1;
+ printf("Recode!\n");
}
}
} while (nullbyte == 1);
+ result = malloc(ldecoder + lshellcode + 1);
+ memcpy(result, (const void *) decoder, ldecoder);
+ memcpy(result + ldecoder, shellcode, lshellcode);
+ *(result + ldecoder + lshellcode) = '\0';
+ print_code("result", result, ldecoder + lshellcode);
+
+ free(result);
return (0);
}