cyberchef 9.47.5 → 9.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -13,6 +13,12 @@ All major and minor version changes will be documented in this file. Details of
13
13
 
14
14
  ## Details
15
15
 
16
+ ### [9.49.0] - 2022-11-11
17
+ - Added 'LZ4 Compress' and 'LZ4 Decompress' operations [@n1474335] | [31a7f83]
18
+
19
+ ### [9.48.0] - 2022-10-14
20
+ - Added 'LM Hash' and 'NT Hash' operations [@n1474335] [@brun0ne] | [#1427]
21
+
16
22
  ### [9.47.0] - 2022-10-14
17
23
  - Added 'LZMA Decompress' and 'LZMA Compress' operations [@mattnotmitt] | [#1421]
18
24
 
@@ -318,6 +324,8 @@ All major and minor version changes will be documented in this file. Details of
318
324
 
319
325
 
320
326
 
327
+ [9.49.0]: https://github.com/gchq/CyberChef/releases/tag/v9.49.0
328
+ [9.48.0]: https://github.com/gchq/CyberChef/releases/tag/v9.48.0
321
329
  [9.47.0]: https://github.com/gchq/CyberChef/releases/tag/v9.47.0
322
330
  [9.46.0]: https://github.com/gchq/CyberChef/releases/tag/v9.46.0
323
331
  [9.45.0]: https://github.com/gchq/CyberChef/releases/tag/v9.45.0
@@ -454,6 +462,7 @@ All major and minor version changes will be documented in this file. Details of
454
462
  [@crespyl]: https://github.com/crespyl
455
463
  [@thomasleplus]: https://github.com/thomasleplus
456
464
  [@valdelaseras]: https://github.com/valdelaseras
465
+ [@brun0ne]: https://github.com/brun0ne
457
466
 
458
467
  [8ad18b]: https://github.com/gchq/CyberChef/commit/8ad18bc7db6d9ff184ba3518686293a7685bf7b7
459
468
  [9a33498]: https://github.com/gchq/CyberChef/commit/9a33498fed26a8df9c9f35f39a78a174bf50a513
@@ -461,6 +470,7 @@ All major and minor version changes will be documented in this file. Details of
461
470
  [e9ca4dc]: https://github.com/gchq/CyberChef/commit/e9ca4dc9caf98f33fd986431cd400c88082a42b8
462
471
  [dd18e52]: https://github.com/gchq/CyberChef/commit/dd18e529939078b89867297b181a584e8b2cc7da
463
472
  [a895d1d]: https://github.com/gchq/CyberChef/commit/a895d1d82a2f92d440a0c5eca2bc7c898107b737
473
+ [31a7f83]: https://github.com/gchq/CyberChef/commit/31a7f83b82e78927f89689f323fcb9185144d6ff
464
474
 
465
475
  [#95]: https://github.com/gchq/CyberChef/pull/299
466
476
  [#173]: https://github.com/gchq/CyberChef/pull/173
@@ -557,4 +567,5 @@ All major and minor version changes will be documented in this file. Details of
557
567
  [#1250]: https://github.com/gchq/CyberChef/pull/1250
558
568
  [#1308]: https://github.com/gchq/CyberChef/pull/1308
559
569
  [#1421]: https://github.com/gchq/CyberChef/pull/1421
570
+ [#1427]: https://github.com/gchq/CyberChef/pull/1427
560
571
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyberchef",
3
- "version": "9.47.5",
3
+ "version": "9.49.0",
4
4
  "description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.",
5
5
  "author": "n1474335 <n1474335@gmail.com>",
6
6
  "homepage": "https://gchq.github.io/CyberChef",
@@ -134,6 +134,7 @@
134
134
  "loglevel": "^1.8.0",
135
135
  "loglevel-message-prefix": "^3.0.0",
136
136
  "lz-string": "^1.4.4",
137
+ "lz4js": "^0.2.0",
137
138
  "markdown-it": "^13.0.1",
138
139
  "moment": "^2.29.3",
139
140
  "moment-timezone": "^0.5.34",
@@ -142,6 +143,7 @@
142
143
  "node-md6": "^0.1.0",
143
144
  "nodom": "^2.4.0",
144
145
  "notepack.io": "^3.0.1",
146
+ "ntlm": "^0.1.3",
145
147
  "nwmatcher": "^1.4.4",
146
148
  "otp": "0.1.3",
147
149
  "path": "^0.12.7",
@@ -170,7 +172,7 @@
170
172
  "build": "npx grunt prod",
171
173
  "node": "npx grunt node",
172
174
  "repl": "node --experimental-modules --experimental-json-modules --experimental-specifier-resolution=node --no-warnings src/node/repl.mjs",
173
- "test": "npx grunt configTests && node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation tests/node/index.mjs && node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation tests/operations/index.mjs",
175
+ "test": "npx grunt configTests && node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation --openssl-legacy-provider tests/node/index.mjs && node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation --openssl-legacy-provider tests/operations/index.mjs",
174
176
  "testnodeconsumer": "npx grunt testnodeconsumer",
175
177
  "testui": "npx grunt testui",
176
178
  "testuidev": "npx nightwatch --env=dev",
@@ -333,7 +333,9 @@
333
333
  "LZString Decompress",
334
334
  "LZString Compress",
335
335
  "LZMA Decompress",
336
- "LZMA Compress"
336
+ "LZMA Compress",
337
+ "LZ4 Decompress",
338
+ "LZ4 Compress"
337
339
  ]
338
340
  },
339
341
  {
@@ -369,6 +371,8 @@
369
371
  "Bcrypt compare",
370
372
  "Bcrypt parse",
371
373
  "Scrypt",
374
+ "NT Hash",
375
+ "LM Hash",
372
376
  "Fletcher-8 Checksum",
373
377
  "Fletcher-16 Checksum",
374
378
  "Fletcher-32 Checksum",
@@ -8010,6 +8010,16 @@
8010
8010
  }
8011
8011
  ]
8012
8012
  },
8013
+ "LM Hash": {
8014
+ "module": "Crypto",
8015
+ "description": "An LM Hash, or LAN Manager Hash, is a deprecated way of storing passwords on old Microsoft operating systems. It is particularly weak and can be cracked in seconds on modern hardware using rainbow tables.",
8016
+ "infoURL": "https://wikipedia.org/wiki/LAN_Manager#Password_hashing_algorithm",
8017
+ "inputType": "string",
8018
+ "outputType": "string",
8019
+ "flowControl": false,
8020
+ "manualBake": false,
8021
+ "args": []
8022
+ },
8013
8023
  "LS47 Decrypt": {
8014
8024
  "module": "Crypto",
8015
8025
  "description": "This is a slight improvement of the ElsieFour cipher as described by Alan Kaminsky. We use 7x7 characters instead of original (barely fitting) 6x6, to be able to encrypt some structured information. We also describe a simple key-expansion algorithm, because remembering passwords is popular. Similar security considerations as with ElsieFour hold.<br>The LS47 alphabet consists of following characters: <code>_abcdefghijklmnopqrstuvwxyz.0123456789,-+*/:?!'()</code><br>An LS47 key is a permutation of the alphabet that is then represented in a 7x7 grid used for the encryption or decryption.",
@@ -8057,6 +8067,26 @@
8057
8067
  }
8058
8068
  ]
8059
8069
  },
8070
+ "LZ4 Compress": {
8071
+ "module": "Compression",
8072
+ "description": "LZ4 is a lossless data compression algorithm that is focused on compression and decompression speed. It belongs to the LZ77 family of byte-oriented compression schemes.",
8073
+ "infoURL": "https://wikipedia.org/wiki/LZ4_(compression_algorithm)",
8074
+ "inputType": "ArrayBuffer",
8075
+ "outputType": "ArrayBuffer",
8076
+ "flowControl": false,
8077
+ "manualBake": false,
8078
+ "args": []
8079
+ },
8080
+ "LZ4 Decompress": {
8081
+ "module": "Compression",
8082
+ "description": "LZ4 is a lossless data compression algorithm that is focused on compression and decompression speed. It belongs to the LZ77 family of byte-oriented compression schemes.",
8083
+ "infoURL": "https://wikipedia.org/wiki/LZ4_(compression_algorithm)",
8084
+ "inputType": "ArrayBuffer",
8085
+ "outputType": "ArrayBuffer",
8086
+ "flowControl": false,
8087
+ "manualBake": false,
8088
+ "args": []
8089
+ },
8060
8090
  "LZMA Compress": {
8061
8091
  "module": "Compression",
8062
8092
  "description": "Compresses data using the Lempel–Ziv–Markov chain algorithm. Compression mode determines the speed and effectiveness of the compression: 1 is fastest and less effective, 9 is slowest and most effective",
@@ -8742,6 +8772,16 @@
8742
8772
  "manualBake": false,
8743
8773
  "args": []
8744
8774
  },
8775
+ "NT Hash": {
8776
+ "module": "Crypto",
8777
+ "description": "An NT Hash, sometimes referred to as an NTLM hash, is a method of storing passwords on Windows systems. It works by running MD4 on UTF-16LE encoded input. NTLM hashes are considered weak because they can be brute-forced very easily with modern hardware.",
8778
+ "infoURL": "https://wikipedia.org/wiki/NT_LAN_Manager",
8779
+ "inputType": "string",
8780
+ "outputType": "string",
8781
+ "flowControl": false,
8782
+ "manualBake": false,
8783
+ "args": []
8784
+ },
8745
8785
  "Normalise Image": {
8746
8786
  "module": "Image",
8747
8787
  "description": "Normalise the image colours.",
@@ -9,6 +9,8 @@ import Bzip2Compress from "../../operations/Bzip2Compress.mjs";
9
9
  import Bzip2Decompress from "../../operations/Bzip2Decompress.mjs";
10
10
  import Gunzip from "../../operations/Gunzip.mjs";
11
11
  import Gzip from "../../operations/Gzip.mjs";
12
+ import LZ4Compress from "../../operations/LZ4Compress.mjs";
13
+ import LZ4Decompress from "../../operations/LZ4Decompress.mjs";
12
14
  import LZMACompress from "../../operations/LZMACompress.mjs";
13
15
  import LZMADecompress from "../../operations/LZMADecompress.mjs";
14
16
  import LZStringCompress from "../../operations/LZStringCompress.mjs";
@@ -29,6 +31,8 @@ OpModules.Compression = {
29
31
  "Bzip2 Decompress": Bzip2Decompress,
30
32
  "Gunzip": Gunzip,
31
33
  "Gzip": Gzip,
34
+ "LZ4 Compress": LZ4Compress,
35
+ "LZ4 Decompress": LZ4Decompress,
32
36
  "LZMA Compress": LZMACompress,
33
37
  "LZMA Decompress": LZMADecompress,
34
38
  "LZString Compress": LZStringCompress,
@@ -34,12 +34,14 @@ import JWTDecode from "../../operations/JWTDecode.mjs";
34
34
  import JWTSign from "../../operations/JWTSign.mjs";
35
35
  import JWTVerify from "../../operations/JWTVerify.mjs";
36
36
  import Keccak from "../../operations/Keccak.mjs";
37
+ import LMHash from "../../operations/LMHash.mjs";
37
38
  import LS47Decrypt from "../../operations/LS47Decrypt.mjs";
38
39
  import LS47Encrypt from "../../operations/LS47Encrypt.mjs";
39
40
  import MD2 from "../../operations/MD2.mjs";
40
41
  import MD4 from "../../operations/MD4.mjs";
41
42
  import MD5 from "../../operations/MD5.mjs";
42
43
  import MD6 from "../../operations/MD6.mjs";
44
+ import NTHash from "../../operations/NTHash.mjs";
43
45
  import RIPEMD from "../../operations/RIPEMD.mjs";
44
46
  import SHA0 from "../../operations/SHA0.mjs";
45
47
  import SHA1 from "../../operations/SHA1.mjs";
@@ -85,12 +87,14 @@ OpModules.Crypto = {
85
87
  "JWT Sign": JWTSign,
86
88
  "JWT Verify": JWTVerify,
87
89
  "Keccak": Keccak,
90
+ "LM Hash": LMHash,
88
91
  "LS47 Decrypt": LS47Decrypt,
89
92
  "LS47 Encrypt": LS47Encrypt,
90
93
  "MD2": MD2,
91
94
  "MD4": MD4,
92
95
  "MD5": MD5,
93
96
  "MD6": MD6,
97
+ "NT Hash": NTHash,
94
98
  "RIPEMD": RIPEMD,
95
99
  "SHA0": SHA0,
96
100
  "SHA1": SHA1,
@@ -34,6 +34,8 @@ import BLAKE2b from "./BLAKE2b.mjs";
34
34
  import BLAKE2s from "./BLAKE2s.mjs";
35
35
  import Streebog from "./Streebog.mjs";
36
36
  import GOSTHash from "./GOSTHash.mjs";
37
+ import LMHash from "./LMHash.mjs";
38
+ import NTHash from "./NTHash.mjs";
37
39
  import OperationError from "../errors/OperationError.mjs";
38
40
 
39
41
  /**
@@ -107,6 +109,8 @@ class GenerateAllHashes extends Operation {
107
109
  {name: "Streebog-256", algo: (new Streebog), inputType: "arrayBuffer", params: ["256"]},
108
110
  {name: "Streebog-512", algo: (new Streebog), inputType: "arrayBuffer", params: ["512"]},
109
111
  {name: "GOST", algo: (new GOSTHash), inputType: "arrayBuffer", params: ["D-A"]},
112
+ {name: "LM Hash", algo: (new LMHash), inputType: "str", params: []},
113
+ {name: "NT Hash", algo: (new NTHash), inputType: "str", params: []},
110
114
  {name: "SSDEEP", algo: (new SSDEEP()), inputType: "str"},
111
115
  {name: "CTPH", algo: (new CTPH()), inputType: "str"}
112
116
  ];
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @author n1474335 [n1474335@gmail.com]
3
+ * @copyright Crown Copyright 2022
4
+ * @license Apache-2.0
5
+ */
6
+
7
+ import Operation from "../Operation.mjs";
8
+ import {smbhash} from "ntlm";
9
+
10
+ /**
11
+ * LM Hash operation
12
+ */
13
+ class LMHash extends Operation {
14
+
15
+ /**
16
+ * LMHash constructor
17
+ */
18
+ constructor() {
19
+ super();
20
+
21
+ this.name = "LM Hash";
22
+ this.module = "Crypto";
23
+ this.description = "An LM Hash, or LAN Manager Hash, is a deprecated way of storing passwords on old Microsoft operating systems. It is particularly weak and can be cracked in seconds on modern hardware using rainbow tables.";
24
+ this.infoURL = "https://wikipedia.org/wiki/LAN_Manager#Password_hashing_algorithm";
25
+ this.inputType = "string";
26
+ this.outputType = "string";
27
+ this.args = [];
28
+ }
29
+
30
+ /**
31
+ * @param {string} input
32
+ * @param {Object[]} args
33
+ * @returns {string}
34
+ */
35
+ run(input, args) {
36
+ return smbhash.lmhash(input);
37
+ }
38
+
39
+ }
40
+
41
+ export default LMHash;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @author n1474335 [n1474335@gmail.com]
3
+ * @copyright Crown Copyright 2022
4
+ * @license Apache-2.0
5
+ */
6
+
7
+ import Operation from "../Operation.mjs";
8
+ import lz4 from "lz4js";
9
+
10
+ /**
11
+ * LZ4 Compress operation
12
+ */
13
+ class LZ4Compress extends Operation {
14
+
15
+ /**
16
+ * LZ4Compress constructor
17
+ */
18
+ constructor() {
19
+ super();
20
+
21
+ this.name = "LZ4 Compress";
22
+ this.module = "Compression";
23
+ this.description = "LZ4 is a lossless data compression algorithm that is focused on compression and decompression speed. It belongs to the LZ77 family of byte-oriented compression schemes.";
24
+ this.infoURL = "https://wikipedia.org/wiki/LZ4_(compression_algorithm)";
25
+ this.inputType = "ArrayBuffer";
26
+ this.outputType = "ArrayBuffer";
27
+ this.args = [];
28
+ }
29
+
30
+ /**
31
+ * @param {ArrayBuffer} input
32
+ * @param {Object[]} args
33
+ * @returns {ArrayBuffer}
34
+ */
35
+ run(input, args) {
36
+ const inBuf = new Uint8Array(input);
37
+ const compressed = lz4.compress(inBuf);
38
+ return compressed.buffer;
39
+ }
40
+
41
+ }
42
+
43
+ export default LZ4Compress;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @author n1474335 [n1474335@gmail.com]
3
+ * @copyright Crown Copyright 2022
4
+ * @license Apache-2.0
5
+ */
6
+
7
+ import Operation from "../Operation.mjs";
8
+ import lz4 from "lz4js";
9
+
10
+ /**
11
+ * LZ4 Decompress operation
12
+ */
13
+ class LZ4Decompress extends Operation {
14
+
15
+ /**
16
+ * LZ4Decompress constructor
17
+ */
18
+ constructor() {
19
+ super();
20
+
21
+ this.name = "LZ4 Decompress";
22
+ this.module = "Compression";
23
+ this.description = "LZ4 is a lossless data compression algorithm that is focused on compression and decompression speed. It belongs to the LZ77 family of byte-oriented compression schemes.";
24
+ this.infoURL = "https://wikipedia.org/wiki/LZ4_(compression_algorithm)";
25
+ this.inputType = "ArrayBuffer";
26
+ this.outputType = "ArrayBuffer";
27
+ this.args = [];
28
+ }
29
+
30
+ /**
31
+ * @param {ArrayBuffer} input
32
+ * @param {Object[]} args
33
+ * @returns {ArrayBuffer}
34
+ */
35
+ run(input, args) {
36
+ const inBuf = new Uint8Array(input);
37
+ const decompressed = lz4.decompress(inBuf);
38
+ return decompressed.buffer;
39
+ }
40
+
41
+ }
42
+
43
+ export default LZ4Decompress;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @author brun0ne [brunonblok@gmail.com]
3
+ * @copyright Crown Copyright 2022
4
+ * @license Apache-2.0
5
+ */
6
+
7
+ import Operation from "../Operation.mjs";
8
+
9
+ import cptable from "codepage";
10
+ import {runHash} from "../lib/Hash.mjs";
11
+
12
+ /**
13
+ * NT Hash operation
14
+ */
15
+ class NTHash extends Operation {
16
+
17
+ /**
18
+ * NTHash constructor
19
+ */
20
+ constructor() {
21
+ super();
22
+
23
+ this.name = "NT Hash";
24
+ this.module = "Crypto";
25
+ this.description = "An NT Hash, sometimes referred to as an NTLM hash, is a method of storing passwords on Windows systems. It works by running MD4 on UTF-16LE encoded input. NTLM hashes are considered weak because they can be brute-forced very easily with modern hardware.";
26
+ this.infoURL = "https://wikipedia.org/wiki/NT_LAN_Manager";
27
+ this.inputType = "string";
28
+ this.outputType = "string";
29
+ this.args = [];
30
+ }
31
+
32
+ /**
33
+ * @param {string} input
34
+ * @param {Object[]} args
35
+ * @returns {string}
36
+ */
37
+ run(input, args) {
38
+ const format = 1200; // UTF-16LE
39
+ const encoded = cptable.utils.encode(format, input);
40
+ const hashed = runHash("md4", encoded);
41
+
42
+ return hashed.toUpperCase();
43
+ }
44
+ }
45
+
46
+ export default NTHash;
@@ -194,8 +194,11 @@ import JavaScriptMinify from "./JavaScriptMinify.mjs";
194
194
  import JavaScriptParser from "./JavaScriptParser.mjs";
195
195
  import Jump from "./Jump.mjs";
196
196
  import Keccak from "./Keccak.mjs";
197
+ import LMHash from "./LMHash.mjs";
197
198
  import LS47Decrypt from "./LS47Decrypt.mjs";
198
199
  import LS47Encrypt from "./LS47Encrypt.mjs";
200
+ import LZ4Compress from "./LZ4Compress.mjs";
201
+ import LZ4Decompress from "./LZ4Decompress.mjs";
199
202
  import LZMACompress from "./LZMACompress.mjs";
200
203
  import LZMADecompress from "./LZMADecompress.mjs";
201
204
  import LZStringCompress from "./LZStringCompress.mjs";
@@ -215,6 +218,7 @@ import MicrosoftScriptDecoder from "./MicrosoftScriptDecoder.mjs";
215
218
  import MultipleBombe from "./MultipleBombe.mjs";
216
219
  import Multiply from "./Multiply.mjs";
217
220
  import NOT from "./NOT.mjs";
221
+ import NTHash from "./NTHash.mjs";
218
222
  import NormaliseImage from "./NormaliseImage.mjs";
219
223
  import NormaliseUnicode from "./NormaliseUnicode.mjs";
220
224
  import Numberwang from "./Numberwang.mjs";
@@ -581,8 +585,11 @@ export {
581
585
  JavaScriptParser,
582
586
  Jump,
583
587
  Keccak,
588
+ LMHash,
584
589
  LS47Decrypt,
585
590
  LS47Encrypt,
591
+ LZ4Compress,
592
+ LZ4Decompress,
586
593
  LZMACompress,
587
594
  LZMADecompress,
588
595
  LZStringCompress,
@@ -602,6 +609,7 @@ export {
602
609
  MultipleBombe,
603
610
  Multiply,
604
611
  NOT,
612
+ NTHash,
605
613
  NormaliseImage,
606
614
  NormaliseUnicode,
607
615
  Numberwang,
@@ -197,8 +197,11 @@ import {
197
197
  JWTSign as core_JWTSign,
198
198
  JWTVerify as core_JWTVerify,
199
199
  Keccak as core_Keccak,
200
+ LMHash as core_LMHash,
200
201
  LS47Decrypt as core_LS47Decrypt,
201
202
  LS47Encrypt as core_LS47Encrypt,
203
+ LZ4Compress as core_LZ4Compress,
204
+ LZ4Decompress as core_LZ4Decompress,
202
205
  LZMACompress as core_LZMACompress,
203
206
  LZMADecompress as core_LZMADecompress,
204
207
  LZStringCompress as core_LZStringCompress,
@@ -216,6 +219,7 @@ import {
216
219
  MultipleBombe as core_MultipleBombe,
217
220
  Multiply as core_Multiply,
218
221
  NOT as core_NOT,
222
+ NTHash as core_NTHash,
219
223
  NormaliseImage as core_NormaliseImage,
220
224
  NormaliseUnicode as core_NormaliseUnicode,
221
225
  Numberwang as core_Numberwang,
@@ -584,8 +588,11 @@ function generateChef() {
584
588
  "JWTSign": _wrap(core_JWTSign),
585
589
  "JWTVerify": _wrap(core_JWTVerify),
586
590
  "keccak": _wrap(core_Keccak),
591
+ "LMHash": _wrap(core_LMHash),
587
592
  "LS47Decrypt": _wrap(core_LS47Decrypt),
588
593
  "LS47Encrypt": _wrap(core_LS47Encrypt),
594
+ "LZ4Compress": _wrap(core_LZ4Compress),
595
+ "LZ4Decompress": _wrap(core_LZ4Decompress),
589
596
  "LZMACompress": _wrap(core_LZMACompress),
590
597
  "LZMADecompress": _wrap(core_LZMADecompress),
591
598
  "LZStringCompress": _wrap(core_LZStringCompress),
@@ -603,6 +610,7 @@ function generateChef() {
603
610
  "multipleBombe": _wrap(core_MultipleBombe),
604
611
  "multiply": _wrap(core_Multiply),
605
612
  "NOT": _wrap(core_NOT),
613
+ "NTHash": _wrap(core_NTHash),
606
614
  "normaliseImage": _wrap(core_NormaliseImage),
607
615
  "normaliseUnicode": _wrap(core_NormaliseUnicode),
608
616
  "numberwang": _wrap(core_Numberwang),
@@ -986,8 +994,11 @@ const javaScriptMinify = chef.javaScriptMinify;
986
994
  const javaScriptParser = chef.javaScriptParser;
987
995
  const jump = chef.jump;
988
996
  const keccak = chef.keccak;
997
+ const LMHash = chef.LMHash;
989
998
  const LS47Decrypt = chef.LS47Decrypt;
990
999
  const LS47Encrypt = chef.LS47Encrypt;
1000
+ const LZ4Compress = chef.LZ4Compress;
1001
+ const LZ4Decompress = chef.LZ4Decompress;
991
1002
  const LZMACompress = chef.LZMACompress;
992
1003
  const LZMADecompress = chef.LZMADecompress;
993
1004
  const LZStringCompress = chef.LZStringCompress;
@@ -1007,6 +1018,7 @@ const microsoftScriptDecoder = chef.microsoftScriptDecoder;
1007
1018
  const multipleBombe = chef.multipleBombe;
1008
1019
  const multiply = chef.multiply;
1009
1020
  const NOT = chef.NOT;
1021
+ const NTHash = chef.NTHash;
1010
1022
  const normaliseImage = chef.normaliseImage;
1011
1023
  const normaliseUnicode = chef.normaliseUnicode;
1012
1024
  const numberwang = chef.numberwang;
@@ -1375,8 +1387,11 @@ const operations = [
1375
1387
  javaScriptParser,
1376
1388
  jump,
1377
1389
  keccak,
1390
+ LMHash,
1378
1391
  LS47Decrypt,
1379
1392
  LS47Encrypt,
1393
+ LZ4Compress,
1394
+ LZ4Decompress,
1380
1395
  LZMACompress,
1381
1396
  LZMADecompress,
1382
1397
  LZStringCompress,
@@ -1396,6 +1411,7 @@ const operations = [
1396
1411
  multipleBombe,
1397
1412
  multiply,
1398
1413
  NOT,
1414
+ NTHash,
1399
1415
  normaliseImage,
1400
1416
  normaliseUnicode,
1401
1417
  numberwang,
@@ -1768,8 +1784,11 @@ export {
1768
1784
  javaScriptParser,
1769
1785
  jump,
1770
1786
  keccak,
1787
+ LMHash,
1771
1788
  LS47Decrypt,
1772
1789
  LS47Encrypt,
1790
+ LZ4Compress,
1791
+ LZ4Decompress,
1773
1792
  LZMACompress,
1774
1793
  LZMADecompress,
1775
1794
  LZStringCompress,
@@ -1789,6 +1808,7 @@ export {
1789
1808
  multipleBombe,
1790
1809
  multiply,
1791
1810
  NOT,
1811
+ NTHash,
1792
1812
  normaliseImage,
1793
1813
  normaliseUnicode,
1794
1814
  numberwang,
@@ -123,7 +123,7 @@ import "./tests/CaesarBoxCipher.mjs";
123
123
  import "./tests/UnescapeString.mjs";
124
124
  import "./tests/LS47.mjs";
125
125
  import "./tests/LZString.mjs";
126
-
126
+ import "./tests/NTLM.mjs";
127
127
 
128
128
  // Cannot test operations that use the File type yet
129
129
  // import "./tests/SplitColourChannels.mjs";
@@ -75,4 +75,34 @@ TestRegister.addTests([
75
75
  }
76
76
  ],
77
77
  },
78
+ {
79
+ name: "LZ4 Compress",
80
+ input: "The cat sat on the mat.",
81
+ expectedOutput: "04224d184070df170000805468652063617420736174206f6e20746865206d61742e00000000",
82
+ recipeConfig: [
83
+ {
84
+ "op": "LZ4 Compress",
85
+ "args": []
86
+ },
87
+ {
88
+ "op": "To Hex",
89
+ "args": ["None", 0]
90
+ }
91
+ ],
92
+ },
93
+ {
94
+ name: "LZ4 Decompress",
95
+ input: "04224d184070df170000805468652063617420736174206f6e20746865206d61742e00000000",
96
+ expectedOutput: "The cat sat on the mat.",
97
+ recipeConfig: [
98
+ {
99
+ "op": "From Hex",
100
+ "args": ["None"]
101
+ },
102
+ {
103
+ "op": "LZ4 Decompress",
104
+ "args": []
105
+ }
106
+ ],
107
+ },
78
108
  ]);
@@ -50,6 +50,8 @@ BLAKE2s-256: f308fc02ce9172ad02a7d75800ecfc027109bc67987ea32aba9b8dcc7b10150e
50
50
  Streebog-256: 12a50838191b5504f1e5f2fd078714cf6b592b9d29af99d0b10d8d02881c3857
51
51
  Streebog-512: 7200bf5dea560f0d7960d07fdc8874ad9f3b86ece2e45f5502ae2e176f2c928e0e581152281f5aee818318bed7cbe6aa69999589234723ceb33175598365b5c8
52
52
  GOST: ee67303696d205ddd2b2363e8e01b4b7199a80957d94d7678eaad3fc834c5a27
53
+ LM Hash: 01FC5A6BE7BC6929AAD3B435B51404EE
54
+ NT Hash: 0CB6948805F797BF2A82807973B89537
53
55
  SSDEEP: 3:Hn:Hn
54
56
  CTPH: A:E:E
55
57
 
@@ -79,6 +81,8 @@ MD5: 098f6bcd4621d373cade4e832627b4f6
79
81
  RIPEMD-128: f1abb5083c9ff8a9dbbca9cd2b11fead
80
82
  BLAKE2b-128: 44a8995dd50b6657a037a7839304535b
81
83
  BLAKE2s-128: e9ddd9926b9dcb382e09be39ba403d2c
84
+ LM Hash: 01FC5A6BE7BC6929AAD3B435B51404EE
85
+ NT Hash: 0CB6948805F797BF2A82807973B89537
82
86
  `,
83
87
  recipeConfig: [
84
88
  {
@@ -0,0 +1,34 @@
1
+ /**
2
+ * NTLM test.
3
+ *
4
+ * @author brun0ne [brunonblok@gmail.com]
5
+ * @copyright Crown Copyright 2022
6
+ * @license Apache-2.0
7
+ */
8
+ import TestRegister from "../../lib/TestRegister.mjs";
9
+
10
+ TestRegister.addTests([
11
+ {
12
+ name: "NT Hash",
13
+ input: "QWERTYUIOPASDFGHJKLZXCVBNM1234567890!@#$%^&*()_+.,?/",
14
+ expectedOutput: "C5FA1C40E55734A8E528DBFE21766D23",
15
+ recipeConfig: [
16
+ {
17
+ op: "NT Hash",
18
+ args: [],
19
+ },
20
+ ],
21
+ },
22
+ {
23
+ name: "LM Hash",
24
+ input: "QWERTYUIOPASDFGHJKLZXCVBNM1234567890!@#$%^&*()_+.,?/",
25
+ expectedOutput: "6D9DF16655336CA75A3C13DD18BA8156",
26
+ recipeConfig: [
27
+ {
28
+ op: "LM Hash",
29
+ args: [],
30
+ },
31
+ ],
32
+ },
33
+
34
+ ]);