McAfee Sandboxing solution is called McAfee Advanced Threat Defense. This solution has a strong API that allows interesting use cases beyond the out of the box integrations that the solution provides.
In this post I introduce a python application called atdsubmit.py, this is an unofficial not supported application that can help you understanding how the API works enabling you to build your own use cases.
The application is available on github. In nutshell the application gets through command line parameters the credentials to connect to ATD box and the folder to monitor, then it checks for any file creation event on the monitored folder and submit it to the ATD box.
The application is a multi-threaded application with different sets of threads in such a way that every single mayor action is isolated from the rest. The following diagram shows how the application works, colors represent the different sets of threads:
This is the help available on the repository:
atdsubmit
Python app that monitors a folder submitting new files to McAfee ATD Sandboxing solution for inspection.
Usage
atdsubmit.py [-ip ATD_IP_Address] [-u ATD_Username] [-p ATD_Password] [-m folder_to_monitor]
Description
atdsubmit.py is a multi-threaded application that uses a separate sets of threads for the following processes:
The application includes following feautures:
In this post I introduce a python application called atdsubmit.py, this is an unofficial not supported application that can help you understanding how the API works enabling you to build your own use cases.
The application is available on github. In nutshell the application gets through command line parameters the credentials to connect to ATD box and the folder to monitor, then it checks for any file creation event on the monitored folder and submit it to the ATD box.
The application is a multi-threaded application with different sets of threads in such a way that every single mayor action is isolated from the rest. The following diagram shows how the application works, colors represent the different sets of threads:
This is the help available on the repository:
atdsubmit
Python app that monitors a folder submitting new files to McAfee ATD Sandboxing solution for inspection.
Usage
atdsubmit.py [-ip ATD_IP_Address] [-u ATD_Username] [-p ATD_Password] [-m folder_to_monitor]
Description
atdsubmit.py is a multi-threaded application that uses a separate sets of threads for the following processes:
- Monitor the folder passed as an argument for new files.
- Calculate the period of time not connectig to the ATD and manage heartbeats connections to the ATD Server to maintain connection open.
- Submit samples to the ATD server
The application includes following feautures:
- At first execution is able to detect current files on the folder to monitor to not upload them to the ATD box
- When an new file detection event is detected, is able to detect if the file has been partially copied (for instance big files that take a while to complete the copy operation), delegating the submit operation of the file to a second process that executes every 5 minutes.
- Every five minutes, pending files are analyzed and submitted to the ATD server, a maximum size filter (120MB) is also considered
- If in a period of five minutes the application has not submitted any file to the ATD server, it heartbeats the ATD server to maintain conenction open.
- All information related to the execution of the application is stored in a log file in the /log folder on the same path from where the application is launched.
I hope you can build your own use case with this solution
Thanks for reading
Thanks for reading
Comments
Post a Comment