-
Notifications
You must be signed in to change notification settings - Fork 14
/
bruteforce-crc.1
78 lines (53 loc) · 3.47 KB
/
bruteforce-crc.1
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.TH bruteforce-crc 1 "April 7, 2017" "Version 0.3"
.SH NAME
bruteforce-crc \- Brute-forcing parameters of a Cycling Redundancy Check (CRC)
.SH SYNOPSIS
.B bruteforce-crc [options]
.SH DESCRIPTION
There are situations when you obtained a set of messages or commands, you can clearly identify the part that is likely a checksum and you want to derive the CRC algorithm, because you want to generate own messages with valid checksums or you want to ensure that received messages are valid. You can use bruteforce-crc to calculate the parameters of a CRC.
.SH OPTIONS
.IP "--help | -h"
Show a summary of command line options.
.IP "--version | -v"
Show a version information.
.IP "--file FILENAME"
The input file that contains messages. The file is a text file with messages specified as sequences of zeros and ones. Each line represents a single message including the CRC. The sequence of zeros and ones must start at the beginning of a line and spaces are not allowed. Each message must have the same length.
To transform input data to a proper format, you may use the helper script rewrite-as.pl.
.IP "--output FILENAME"
Log models to an output file.
.IP "--verbose BOOL"
Enable or disbale debug output.
.IP --threads NUM
Set the number of threads to bruteforce CRC parameters. Per default four threads are used.
.IP "--width NUM"
Specify the CRC width in bits, for example 16. The CRC width is the length of the truncated polynom.
.IP "--offs-crc OFFSET"
Specify the offset where the CRC starts. Since the input file contains bits instead of bytes, the offset should be given as a bit index.
.IP "--start OFFSET"
Specify the offset where the message starts. Usually the message will start at the beginning of each input file line. But you may want to alter this value, for example when your input file containts a sync sequence or message header bytes that are not part of the CRC calucaltion.
.IP "--end OFFSET"
Specify the offset where the message ends.
.IP "--initial VALUE"
A CRC register may be initialized with a certain value.
.IP "--probe-initial BOOL"
Bruteforce the intial value (default true). This option overrides --initial.
.IP "--final-xor VALUE"
Use a certain value als final XOR value. The default value is 0.
.IP "--probe-final-xor BOOL"
Bruteforce the final XOR value. It overrides a fixed final XOR value (--final-xor). Per default this option is false.
.IP "--poly VALUE"
Set a fixed (truncated) polymominal for the tests. If not specified, the polynomial is brute-forced.
.IP "--probe-reflected-input BOOL"
Probe for reflect input (default: false)
.IP "--probe-reflected-output BOOL"
Probe for reflect remainder output (default: false)
.IP "--feed-type arg"
Specify how message bits are feeded into the CRC. Possible value are:
auto: This is the default. Bits are usually feed bit-wise from left to right into the CRC, except if input reflection is enabled. Then, the bits are feed byte-wise reversed and if messages are not byte-aligned, then the entire message is feed from right to left into the CRC.
linear-forward: The entire message is feed bit-wise from left to right into the CRC.
linear-reversed: The entire message is feed bit-wise from right to left into the CRC.
bytewise-reversed: The bits from each byte were feed from LSB to MSB into the CRC register. That means the least significant bit is treated first and at the end, the most significant bit is processed.
.SH AUTHOR
Martin Schobert <[email protected]>
.SH SEE ALSO
Project website: https://github.com/sitsec/bruteforce-crc