Re: new xtables-addons implementation of XOR target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 2014-01-18 11:25, Andrew Smith wrote:
>
>I had a requirement for some proof of concept work I was performing to
>have a very simple layer 3 obfuscation so it was useful to me and 
>perhaps others

If you can give more details, others could actually ascertain this 
usefulness.
1.47 is basically unmaintained but you can send pull requests,
which seems also preferable given Gmail corrupts everybody's patches.

>+{
>+ printf(
>+ "XOR target options:\n"
>+ "    --key <string>\n"
>+ "    --block-size <size>\n"
>+ );
>+}
>+
>+static int
>+xor_parse(int c, char **argv, int invert, unsigned int *flags,
>+                  const void *entry, struct xt_entry_target **target)
>+{
>+ struct xt_xor_info *info = (void *)(*target)->data;
>+        unsigned long v;
>+
>+ switch (c) {
>+ case 'k':
>+                if (strlen(optarg) > sizeof(info->key))
>+ xtables_error(PARAMETER_PROBLEM, "XOR: Maximum key size is
>%zu",sizeof(info->key));
>+ strncpy(info->key, optarg, sizeof(info->key));
>+                *flags |= FLAGS_KEY;
>+ return true;
>+        case 'b':
>+ if (!xtables_strtoul(optarg, NULL, &v, 1, 5))
>+ xtables_param_act(XTF_BAD_VALUE, "XOR",
>+ "--block-size", optarg);
>+                info->block_size = v;
>+                *flags |= FLAGS_BLOCK;
>+                return true;
>+ }
>+ return false;
>+}
>+static void xor_check(unsigned int flags)
>+{
>+ if (!(flags & FLAGS_KEY))
>+ xtables_error(PARAMETER_PROBLEM, "XOR: "
>+ "\"--key\" is required.");
>+ if (!(flags & FLAGS_BLOCK))
>+ xtables_error(PARAMETER_PROBLEM, "XOR: "
>+ "\"--block-size\" is required.");
>+}
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux