source: wiki/Overview.wiki @ 29

Last change on this file since 29 was 29, checked in by tmorgan, 11 years ago

more docs

File size: 3.9 KB
Line 
1Bletchley provides a variety of tools that make black box
2cryptanalysis easier by taking care of some of the more tedious
3engineering challenges. Bletchley is maintained by <a href="http://vsecurity.com/">VSR</a>.
4Bletchley is currently in the early stages of development, which means
5documentation may be lacking.  Contributions are welcome.
6
7*Contents*
8<wiki:toc max_depth="2" />
9
10
11= Command Line Tools =
12
13== bletchley-analyze ==
14
15Analyzes samples of encrypted data in an attempt to decode samples to
16binary and identify patterns useful in cryptanalysis.  The purpose of
17the tool is to provide an cryptanalyst with a variety of information
18that is useful in determining how a token is encoded, encrypted and
19formatted.
20<br />
21bletchley-analyze currently performs two primary functions: iterative
22encoding detection and ciphertext-only block analysis.  Encrypted tokens
23are processed in multiple rounds. Within each round, the following
24occurs:
25<ul>
26 <li>Token length analysis is performed to attempt to determine possible
27 ciphertext block sizes, where applicable</li>
28 <li>The tokens are analyzed for blocks of data that are repeated
29 throughout any of the tokens</li>
30 <li>A hexadecimal dump and escaped binary/ascii string is printed for
31 each token with repeated blocks highlighted</li>
32 <li>The full set of all known and possible data encodings is
33 determined<sup>1</sup></li>
34 <li>An educated guess is made as to the most likely encoding is</li>
35 <li>All tokens are decoded using the most likely encoding, and then the
36 process is repeated until no further encodings are detected</li>
37</ul>
38
39<code>bletchley-analyze</code> can read from stdin or from a file.  Tokens are
40delimited with newlines.  Various options are provided to give the
41analyst control over the block sizes and encoding used during analysis.
42See the tool's usage statement for more information.
43
44As an example, several tokens were encrypted using ECB mode and encoded
45using base64, and then percent (URL) encoded:
46{{{
47zRW5bHxcRYHHqi0nriqOzg%3D%3D
48meU8SyxVHE3Hqi0nriqOzg%3D%3D
49vTA9eA4hhbFlktsbYI4hIg%3D%3D
50meU8SyxVHE1lktsbYI4hIg%3D%3D
51}}}
52
53These tokens were then fed to <code>bletchley-analyze</code>:
54<img src="http://bletchley.googlecode.com/svn/wiki/images/bletchley-analyze.png" />
55
561. <i>Bletchley's blobtools module currently supports 33 encoding variants,
57including various forms of hexadecimal, base32, base64, and percent
58encodings. Try '<code>-e ?</code>' to list them.</i>
59
60
61== bletchley-encode ==
62A simple tool to encode arbitrary data using a specified encoding chain.
63See the usage statement for more information.  A quick example:
64{{{
65$ echo 'Mallory Is My Friend.' | bletchley-encode -e percent/upper-plus,base64/rfc3548
66TWFsbG9yeSBJcyBNeSBGcmllbmQuCg%3D%3D
67}}}
68
69NOTE: The encoding chain is applied from right to left in order to be consistent with other tools. 
70That is, one can use the same encoding chain ordering for
71<code>bletchley-encode</code>, <code>bletchley-decode</code>, and <code>bletchley-analyze</code>.
72
73
74== bletchley-decode ==
75A simple tool to decode data using a specified encoding chain.  See the
76usage statement for more information.  A quick example:
77{{{
78$ echo 'TWFsbG9yeSBJcyBNeSBGcmllbmQuCg%3D%3D' | bletchley-decode -e percent/upper-plus,base64/rfc3548
79Mallory Is My Friend.
80}}}
81
82== bletchley-http2py ==
83This script parses an HTTP request (provided via stdin or as a text
84file) and generates a Python script that sends (approximately) the same
85request.  This is useful when one wants to repeatedly send variations of
86a request that was observed to be sent by an application or web
87browser.  For more information, see the script's usage statement.
88
89== bletchley-nextrand ==
90A simple program which computes the state of a Java Random class
91instance given two sequential outputs of
92<code><a href="http://docs.oracle.com/javase/6/docs/api/java/util/Random.html#nextInt()">nextInt()</a></code>.
93For more information, see the usage statement.
94
95
96= Libraries =
97
98TODO
99
100(Hint: start with 'pydoc bletchley')
Note: See TracBrowser for help on using the repository browser.