Sample File Upload
Will avatar
Written by Will
Updated over a week ago

Overview

Bash script used to upload files of interest to our cloud infrastructure. Generally used for to report things our agent has missed, allowing us to further optimize our detection algorithms. The monarx-sample-upload script is copied into /usr/bin/ when the agent is installed, or alternatively you may download the file below.

Usage

# No arguments example
$ monarx-sample-upload
Upload a sample file to monarx.com for analysis.
Usage:
monarx-sample-upload <path> [--note value]
Options:
-n | --note Optional free form note to include with submission

# Success example (basic)
$ monarx-sample-upload ~/development/shells/RC-SHELL.php
Sample uploaded successfully

# Success example (with custom note)
$ monarx-sample-upload ~/development/shells/RC-SHELL.php --note "Phishing.."
Sample uploaded successfully

# Error example (missing dependency)
$ monarx-sample-upload ~/development/shells/RC-SHELL.php
Error: curl is not installed

# Error example (connection issue)
$ monarx-sample-upload ~/development/shells/RC-SHELL.php
curl: (6) Could not resolve host: api.monarx.com
Error uploading sample

# Error example (remote issue)
$ monarx-sample-upload ~/development/shells/RC-SHELL.php
curl: (22) The requested URL returned error: 500
Error uploading sample

Did this answer your question?