2
2
## Summary
3
3
The Binary String Toolkit or BST for short is a rather simple utility to
4
4
convert binary strings to various formats suitable for later inclusions in
5
- source codes such as those used to develop exploits in the security field.
5
+ source codes, such as those used to develop exploits in the security field.
6
6
7
7
## Features
8
8
* Dump files content to standard output in a binary string format.
9
9
* Convert a plain hexadecimal input to an escaped binary string.
10
- * Output a bad character sequence in various format for inclusion in exploit
11
- codes.
12
- * Limit output binary string width for better readability in source codes.
10
+ * Output a sequence of bad characters for testing proof of concept code.
11
+ * Limit the width of binary strings for better readability in source codes.
13
12
* Format output in your favorite programming language's syntax.
14
- * Perform binary string variable block indentation.
13
+ * Perform binary variable block indentation.
15
14
16
15
## Dependencies
17
16
* POSIX C Library
@@ -22,7 +21,7 @@ source codes such as those used to develop exploits in the security field.
22
21
* Git
23
22
24
23
## Building
25
- To build and install the 'bstrings' binary:
24
+ To build and install the 'bstrings' binary, simply do :
26
25
```
27
26
$ git clone https://github.com/e3prom/bst
28
27
$ cd bst
@@ -34,9 +33,10 @@ $ make install
34
33
## Usage
35
34
The below example show how an assembled shellcode can be quickly dumped (-D)
36
35
to standard output in a hexadecimal escaped (-x) binary string of 16 hexadecimal
37
- digits width (8 bytes), with python syntax formatting and an indentation of 4
38
- space characters:
36
+ digits width (or 8 bytes), with Python syntax formatting and an indentation of
37
+ 4 space characters:
39
38
```
39
+ $ bstrings --verbose -x -D lnx-execve-setreuid-x86_64 -w8 -i 4 --syntax=python
40
40
[*] Convert hexadecimal input to an escaped binary string.
41
41
[+] Binary string width is limited to 8 bytes.
42
42
[+] Output binary string using python language syntax.
@@ -51,8 +51,9 @@ space characters:
51
51
```
52
52
53
53
You can also use bstrings to output an automatically indented bad character
54
- sequence in your favorite programming language:
54
+ sequence, and thus in your favorite programming language:
55
55
```
56
+ $ bstrings --verbose -b -w12 -i 4 --syntax=c -n badchar
56
57
[*] Generating bad character binary string.
57
58
[+] Binary string width is limited to 12 bytes.
58
59
unsigned char badchar[] =
@@ -80,7 +81,7 @@ sequence in your favorite programming language:
80
81
"\xfd\xfe\xff"
81
82
```
82
83
83
- For a list of supported command-line options, simply use the '--help' switch:
84
+ For a list of supported command-line options, simply execute bstrings with the '--help' switch:
84
85
```
85
86
$ bstrings --help
86
87
Usage: ./bstrings [OPTION]...
@@ -108,5 +109,9 @@ Usage: ./bstrings [OPTION]...
108
109
109
110
```
110
111
112
+ ## Contribution
113
+ Feel free to contribute to this project by submitting your codes and by reporting
114
+ issues or bugs.
115
+
111
116
## Software License
112
117
This software is licensed under the terms of the GNU General Public License.
0 commit comments