BroAPT: A system for detecting APT attacks in real-time
2.7K
This work is the detection framework of BroAPT, which is designed to be a flexible and customisable APT detection framework. ML models and their corresponding APIs can be added to this work without any specifications and declarations.
dataclassesPyYAML -- with optional libyamlFor Docker addict, a Dockerfile and a docker-compose.yml are both provided, just hit and go.
For development environment, make and pipenv are the two things playing around my workflow.
SERVER_NAME_HOST -- daemon server port (default: localhost)
SERVER_NAME_PORT -- daemon server port (default: 5000)
BROAPT_APP_CPU -- concurrent process limit (default: 10)
BROAPT_APP_INTERVAL -- sleep interval (default: 10s)
BROAPT_MAX_RETRY -- maximum times of retry for running commands (default: 3)
BROAPT_API_ROOT -- root path to APIs (default: /api/)
BROAPT_API_LOGS -- path to API runtime logs (default: /var/log/bro/api/)
BROAPT_DUMP_PATH -- where extracted files will be stored (default: FileExtract::prefix)
BROAPT_LOGS_PATH -- path to log files (default: /var/log/bro/)
NOTE: the following environment variables are used only for the default API, and can be removed if some other default API introduced
VT_API -- VirusTotal API keyVT_LOG -- path to store VirusTotal file scan reports & runtime logs (/var/log/bro/tmp/)VT_INT -- VirusTotal sleep interval (default: 60s)VT_RETRY -- maximum times of retry for retrieving VirusTotal file scan reports (default: 3)VT_PERCENT -- percentage of positive threshold (default: 50%)$ cd ./source/
$ python3 ./python/
This will run API scripts on extracted files. The mechanism of choosing API scripts is:
${FILE_MIME}${API_ROOT}/${FILE_MIME} exists (say ${API_PATH})
${API_PATH} can either be a file or a directory${API_ROOT}/api.yml${LOGS_PATH}/processed_rate.logThe API should be configured through ${API_ROOT}/api.yml.
See the sample file vendor/api/api.yml for more information.
The final report should be always stored at ${LOGS_PATH}/processed_rate.log. It
should be a one-line JSON string, with following fields:
time -- float, timestamp when the report is generatedpath -- str, path to the extracted filename -- str, name of the extracted filemime -- str, MIME type of the extracted filerate -- bool, malicious or notContent type
Image
Digest
Size
231.1 MB
Last updated
about 5 years ago
docker pull jsnbzh/broapt