Brute Ratel v2.2 (codename Rinnegan) is now available for download. This release introduces several new features to the badger, so it’s strongly recommended to review the private release videos, and the documentation before using it. The Badger component was rewritten to support several new evasion functionalities. The user interface - Commander has also undergone changes to the core and now supports all the latest Debian/Ubuntu/Kali distribution as the core is now QT6.9, instead of the earlier 5.15. This means there would be full support for Ubuntu 24.04 Out-Of-Box or any latest distro with Gnome/KDE/Xfce etc.
In addition to the updates to the Badger showcased in the private 2.2 release video, this blog highlights the publicly shareable aspects of the release. These details have been carefully selected to ensure they do not compromise the confidentiality of sensitive Badger features, features that, in the past, have been leveraged by certain cybersecurity EDR vendors to develop detection signatures against the product.
SERVICE_START
access flag when initiating services.Several heavy internal changes were made to the badger’s architecture to make it harder to detect. However, one of the main highlight of this release is the python library ‘bruteratel.py’. This library, alongside the 32 API scripts are now available in the api directory within the BRc4 package. The scripts released with this package are:
api_add_badger_profile.py | api_build_stage.py | api_list_badger_profile.py | api_list_listener.py |
api_add_badger.py | api_download_file.py | api_list_badgers.py | api_manage_autoruns.py |
api_add_listener.py | api_host_file.py | api_list_cmd_queue.py | api_manage_clickscript.py |
api_build_badger.py | api_list_archive.py | api_list_hosted.py | api_manage_creds.py |
api_manage_stager.py | api_mitre_activity.py | api_remove_badger_profile.py | api_remove_badger.py |
api_remove_cmd_queue.py | api_remove_hosted_file.py | api_remove_listener.py | api_riot_control.py |
api_send_badger_cmd.py | api_server_backup.py | api_user_activity.py |
All these APIs are self-explanatory when executed. For example, the api_list_listener.py, when executed returns the following information:
ninja@darkvortex: python3 api_list_listener.py -h usage: api_list_listener.py [-h] -user -password -handler List available listeners on the ratel server optional arguments: -h, --help show this help message and exit -user api server username -password api server password -handler api server handler host and port. Eg: 127.0.0.1:8443 Example: python3 api_list_listener.py -user ninja -password pass@123 -handler 172.16.219.1:8443 ninja@darkvortex: python3 api_list_listener.py -u ninja -p pass@123 -handler 172.16.219.1:8443 [+] Authentication success [+] listeners: - doh-c2 - primary-c2
The API scripts serve as lightweight wrappers around the core bruteratel.py library. A quick inspection reveals that the script simply imports the bruteratel module and invokes the br_connect_handler and br_list_listeners functions from it.
import argparse import asyncio import bruteratel async def main(): parser = argparse.ArgumentParser( description="List available listeners on the ratel server", epilog="Example:\n python3 api_list_listener.py -user ninja -password pass@123 -handler 172.16.219.1:8443", formatter_class=argparse.RawTextHelpFormatter ) parser.add_argument('-user', type=str, required=True, help="api server username", metavar='') parser.add_argument('-password', type=str, required=True, help="api server password", metavar='') parser.add_argument('-handler', type=str, required=True, help="api server handler host and port. Eg: 127.0.0.1:8443", metavar='') args = parser.parse_args() wsClient = await bruteratel.br_connect_handler(args.user, args.password, args.handler) print("[+] Authentication success") listenerlist = await bruteratel.br_list_listeners(wsClient) if listenerlist is not None: print("[+] listeners:") for i in listenerlist: print(" - ", i) else: print("[-] Error listing listeners") await wsClient.close(1000) if __name__ == "__main__": asyncio.run(main())
The br_connect_handler function accepts the username, password, and connection details, and uses AsyncIO to establish a WebSocket connection with the Ratel server. Upon successful connection, it returns a WebSocket client object, which can be passed to other functions within the library to perform various actions. Each function may return a different type of output depending on its purpose.
This is as hard as it gets to call a function from the bruteratel library. The other features are described in more detail in the private discord channel of BRc4 and the documentation. Stay tuned and Happy Hacking.