forked from outflanknl/C2-Tool-Collection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKerbHash.cna
35 lines (27 loc) · 928 Bytes
/
KerbHash.cna
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#KerbHash
#author Cornelis de Plaa
#@outflank.nl
#register help
beacon_command_register("KerbHash", "Hash passwords to kerberos keys.",
"Calculate rc4_hmac, aes128_cts_hmac_sha1, aes256_cts_hmac_sha1, and des_cbc_md5 hashes.\n\n" .
"Synopsis: KerbHash [password] [username] [domain.fqdn]\n\n");
alias KerbHash {
$bid = $1;
$input = substr($0, 9);
@args = split(' ', $input);
$password = @args[0];
$username = @args[1];
$domain = @args[2];
if ($password eq "" || $username eq "" || $domain eq "") {
berror($bid, "Please specify password, username and domain.");
return;
}
# Read in the right BOF file
$handle = openf(script_resource("KerbHash." . barch($bid) . ".o"));
$data = readb($handle, -1);
closef($handle);
# Pack our arguments
$arg_data = bof_pack($bid, "ZZZ", $password, $username, $domain);
blog($bid, "KerbHash BOF by Outflank");
beacon_inline_execute($bid, $data, "go", $arg_data);
}