Skip to content

The hydrabus framework core [Not maintained anymore - see readme]

License

Notifications You must be signed in to change notification settings

hydrabus-framework/framework

Repository files navigation

Build Status Python 3.6|3.7|3.7-dev License

hydrabus-framework [v0.0.1]

This project is not maintained anymore. I am now maintaining an equivalent framework, but for an upcoming alternative hardware tool: Octowire. The Octowire hardware tool is not yet available for retail, more details coming soon. The main reasons for this decision are a better communication protocol between the hardware and the host, more interfaces available and a more powerful tool.

Description

This project is a framework around the hydrabus project. It provides multiple modules allowing you to work efficiently and save time on any hardware project.

asciicast

Installation

Clone this repository or get the latest release, then:

python3 setup.py install

Usage

This framework work like metasploit. Simply run hbfconsole, load any available modules and enjoy!

Use Docker image

Build the image

docker build -t hbf .

Run the instance

docker run --rm -it -v /local/folder/:/remote/folder --device=/dev/ttyACM0:/dev/hydrabus hbf

Configuration explanation

[HYDRABUS]
port = /dev/ttyACM0 # Hydrabus device
baudrate = 115200 # baudrate value to communicate with hydrabus device
read_timeout = 1 # The read timeout value

[MINITERM]
parity = N # set parity (hydrabus communication, not device). one of {N, E, O, S, M}
xonxoff = False # enable software flow control
echo = False # enable local echo
filters = default # Text transformation, see Miniterm man
raw = False # Do no apply any encodings/transformations if True
quiet = False # suppress non-error messages
exit_char = 29 # Unicode of special character that is used to exit the application, default ctrl+] (29)
menu_char = 20 # Unicode code of special character that is used to control miniterm (menu), default ctrl+t (20)**
serial_port_encoding = UTF-8 # set the encoding for the serial port (Latin1, UTF-8, ...)
eol = CR # end of line mode (CR, LF, CRLF)

[THEME] # You can use HTML color code. For all possible theme value, see promp_toolkit manual https://python-prompt-toolkit.readthedocs.io/en/master/pages/advanced_topics/styling.html#style-strings
base = #3399ff # Base prompt color [hbf]
pound = #3399ff # Pound prompt color >
module = #ff0000 bold # Selected module name color (baudrate)
category = #ffffff # Selected module category color uart()

Contributing

Follow the guideline on the CONTRIBUTING.md files

Thanks

I would like to thanks @Nitr4x for his code review and ideas helping me to improve this framework.

FAQ

How to list available modules ?

[hbf] > show modules

What's a global options ?

A global option is an option who will be used for every module loaded. Setting the options with the setg command will set the specified options globally for every module loaded. Unset a specific global option with unsetg command. It is also possible to print the previously defined global using show global command.

Can you give me a typical example of use?

You identify an SPI flash chip on a hardware device. You want to dump his memory. Simply run hbfconsole from a shell and follow these instructions:

  1. List available module:

[hbf] > show modules

  1. Select the correct module:

[hbf] > use spi/dump_eeprom

  1. Show available options

[hbf] spi(dump_eeprom) > show options

  1. Set necessary options

[hbf] spi(dump_eeprom) > set dump_file dump.bin

  1. Run the module

[hbf] spi(dump_eeprom) > run

How to properly remove the framework along with installed modules?

Manually method

run hbfconsole and execute the show modules command to list installed modules. The module name returned by the framework is something like that (protocol/module_name).

For each module, run pip3 uninstall hbfmodules.<protocol>.<module_name>.

Then, run pip3 uninstall hydrabus_framework.

Finally, delete the .hbf directory in your home folder.

hbfremove

Coming soon