Hacktor is a versatile tool designed for:
GenAI Apps Security Testing should cover various Vulnerability Categories (OWASP LLM Top 10), including:
Refer to the Features and Use Case Section for more details.
To get started with Hacktor, first clone the repository and install dependencies:
git clone https://github.com/detoxio/hacktor.git
cd hacktor
poetry install
Alternatively, you can install Hacktor and its dependencies using pip:
pip install hacktor \
detoxio-ai-api-protocolbuffers-python detoxio-ai-api-grpc-python \
--upgrade --extra-index-url https://buf.build/gen/python
or the latest code
pip install hacktor@git+https://github.com/detoxio/hacktor@main \
detoxio-ai-api-protocolbuffers-python detoxio-ai-api-grpc-python \
--upgrade --extra-index-url https://buf.build/gen/python
To assist in crawling GenAI web app features, install Playwright:
playwright install
Various browsers, including Chromium, should be installed. Ignore the error at the end.
Set up the Detoxio API Key, which is required for using Hacktor:
export DETOXIO_API_KEY=xxxx
Optionally, you can specify the Detoxio remote endpoint and your OpenAI API key:
export DETOXIO_API_HOST=xxx
export OPENAI_API_KEY=xxx
poetry run hacktor webapps https://medusa.detoxio.dev/ --use_ai --max_crawling_steps 10 --no_of_tests 10 --attack_module OWASP-LLM-APP --json report.json --markdown report.md -v
Hacktor works as follows:
poetry run hacktor webapps <URL>
to start crawling web applications.[FUZZ]
or [HACKTOR]
in relevant text areas.To run Hacktor:
poetry run hacktor webapps <URL>
To record a crawling session:
hacktor webapps <URL> -s session.har --skip_testing
cat session.har | grep [FUZZ] | wc -l
The above command will open the browser. Specify the Fuzzing Marker [FUZZ]
in a chat box. Close the browser window to save the session.
To run tests using a recorded session:
hacktor webapps <URL> -s session.har --skip_crawling --markdown report.md --json report.json
No browser will open. The recorded crawling session will be used to perform security testing, and the report will be saved to markdown and JSON files.
You can specify a particular attack module for more targeted testing:
poetry run hacktor webapps <URL> --use_ai --max_crawling_steps 10 --no_of_tests 10 --attack_module OWASP-LLM-APP --json report.json --markdown report.md -v
Test any burp recorded http request testing:
poetry run hacktor burp <URL> -r <Request file path>
to start testing.poetry run hacktor burp <URL> -r <Request file path>
Craft toxic prompts to test the resilience of your GenAI chatbots against adversarial attacks. Hacktor aids in evaluating your chatbot's ability to handle unexpected or malicious inputs.
Fortify the security of your GenAI mobile apps. By combining Hacktor with Burpsuite:
Streamline GenAI security testing into your CI/CD pipeline, ensuring continuous security throughout the development lifecycle. Hacktor integrates with Playwright to:
The AI Assisted Chat Crawler in Hacktor leverages advanced AI capabilities to enhance the security testing of GenAI chat applications. By using the --use_ai option, Hacktor intelligently analyzes and interacts with chat interfaces to identify potential vulnerabilities that may not be easily detectable through traditional methods. The AI-driven approach allows for more sophisticated crawling and testing, making it ideal for evaluating the robustness and security of chatbots and other conversational AI systems.
Hacktor involves detecting fuzzing locaiton in web applications with human assistance, which is essential for modern web frameworks. This approach involves using a browser to record crawled data and inserting markers like [FUZZ]
for fuzzing or testing purposes.
Hacktor generates various prompts, sends them to a GenAI chatbot, collects responses, and evaluates them, focusing on testing the chatbot's responses against OWASP TOP 10 categories.
Hacktor enables saving crawled sessions and running tests as part of the DevOps regression testing process, focusing on the regression security testing of GenAI chatbots.
Hacktor leverages Detoxio SDK and APIs for features like:
Hacktor uses Playwright to record crawled data.
git clone https://github.com/detoxio/hacktor
pip install poetry
cd hacktor
poetry install
Start developing and running Hacktor:
poetry run hacktor
Ensure that you set the Detoxio AI API key before running.
This project is distributed under
the Apache License, Version 2.0. See the LICENSE file for details.
© Detoxio