Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/SubmissionProfiles (master) #1756

Closed
wants to merge 107 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
66978b7
Handle partial results
gdesmar Sep 6, 2023
78054db
add monitored keys
cccs-douglass Nov 24, 2023
b7004c4
small additional changes
cccs-douglass Nov 27, 2023
4fd9e2d
fix use of depricated interface
cccs-douglass Dec 8, 2023
d868dbc
add config for special temporary keys
cccs-douglass Dec 8, 2023
7bcc745
Add a new `poweruser` role type that can do more than a normal user
cccs-rs Jul 10, 2024
d3794da
Add a submission profile configuration for basic user usage
cccs-rs Jul 10, 2024
e49f48b
Omit `runtime_excluded` from ServiceSelection model (unused)
cccs-rs Jul 30, 2024
a8a03ea
Create a SubmissionProfileParams model for submission profiles
cccs-rs Jul 30, 2024
6af6eb0
Add params to Static Analysis profile
cccs-rs Jul 30, 2024
2b9755e
Remove unused submission parameter from v3
cccs-rs Jul 31, 2024
116afd6
Add `generate_alert` and `ttl` as enforced parameters
cccs-rs Jul 31, 2024
f9808e9
Update SubmissionProfileParams model to all be optional fields
cccs-rs Aug 9, 2024
25733c7
Allow users to change some properties of submission profiles
cccs-rs Oct 11, 2024
7a8b82a
Merge branch 'master' into AL-2646
cccs-nr Oct 15, 2024
29dfce2
Merge branch 'master' into AL-2646
cccs-nr Oct 22, 2024
4e2f261
Added the public key in the APIProxies that contains properties to be…
cccs-nr Oct 22, 2024
f1be7a4
Allow for configuring core params
cccs-rs Oct 23, 2024
3a06d20
Prevent binary files from being identified as au3
cccs-jh Oct 23, 2024
783958a
Merge branch 'master' into AL-2646
cccs-nr Oct 24, 2024
067deac
Identify csv when first identified not text/plain
gdesmar Oct 29, 2024
9d34089
Merge pull request #1824 from CybercentreCanada/identify_unknown_csv
gdesmar Oct 29, 2024
5b6725c
Identify python pickle files
gdesmar Oct 29, 2024
52134cd
Merge pull request #1827 from CybercentreCanada/identify_pickle
gdesmar Oct 30, 2024
168db81
Adding text/rdp Identification
gdesmar Oct 30, 2024
2937ecb
Merge pull request #1829 from CybercentreCanada/identify_rdp
gdesmar Oct 30, 2024
86d73fc
Support validation of lists that have been JSON encoded
cccs-rs Oct 30, 2024
1c274ad
Add floats to metadata validation
cccs-rs Oct 31, 2024
c75a9ca
Identify html that starts and/or end with an html comment
gdesmar Oct 31, 2024
6e50b51
Merge pull request #1832 from CybercentreCanada/identify_html_with_co…
gdesmar Oct 31, 2024
02361d3
Allow suggestions from the system to merge with the list of values fo…
cccs-rs Nov 1, 2024
9d25f51
Merge remote-tracking branch 'origin/master' into partial_results
cccs-douglass Nov 5, 2024
1fab191
Merge pull request #1817 from CybercentreCanada/au3_fix
cccs-jh Nov 5, 2024
dcf3563
simplify and document temporary key config options
cccs-douglass Nov 8, 2024
568a30c
Fallback to mimetype when yara identification yielded no conclusive r…
gdesmar Nov 18, 2024
52cb8f7
Adding lzma executor and diverse python indicators
gdesmar Nov 18, 2024
3fa961c
Add a flag in the config to move success and failure logs to the audi…
sgaron-msft Nov 18, 2024
a896b2a
Add params to file source to select specific service and to skip the …
sgaron-msft Nov 18, 2024
9b27d79
Switching from mandatory base64 to one-of base64,zlib,lzma
gdesmar Nov 18, 2024
fe82e8c
Apply suggestions from code review
sgaron-msft Nov 19, 2024
52bb66d
Change select_as_service from a bool to a list of selected services (…
sgaron-msft Nov 19, 2024
b0f3d66
Merge pull request #1837 from CybercentreCanada/untrusted_mimes
gdesmar Nov 21, 2024
462c7a7
Merge pull request #1839 from CybercentreCanada/identify_lzma_executor
gdesmar Nov 21, 2024
dedde1b
Fix redis connection hangs even if using retries
sgaron-msft Nov 22, 2024
e57ff62
Add retry call to psubscribe in event watcher
sgaron-msft Nov 22, 2024
f802b6f
Merge pull request #1840 from sgaron-msft/login_audit
cccs-douglass Nov 22, 2024
de89609
Merge pull request #1842 from sgaron-msft/url_to_specific_service
cccs-douglass Nov 22, 2024
b544b20
Merge pull request #1844 from sgaron-msft/redis_retry_fix
cccs-douglass Nov 22, 2024
d1fd0d6
More RDP file settings
gdesmar Nov 22, 2024
77c801e
Merge pull request #1847 from CybercentreCanada/identify_more_rdp
gdesmar Nov 25, 2024
fc2ca47
typo
cccs-douglass Nov 26, 2024
f85f815
Update assemblyline/odm/models/config.py
cccs-douglass Nov 26, 2024
a490f43
Add a field to keep the identity ID of a user
sgaron-msft Nov 27, 2024
1700cf6
Tell oauth provider which field to use for identity ID
sgaron-msft Nov 27, 2024
b2ad1af
Update priority ranges to be consistent with UI
cccs-rs Dec 4, 2024
f9a404b
Update models to define value ranges with respect to priority constants
cccs-rs Dec 4, 2024
83b2b67
Update range to use constant for the minimum
cccs-rs Dec 4, 2024
7f6be62
Update randomizer to leverage field min/max values
cccs-rs Dec 4, 2024
f930c69
Update constants.py
cccs-rs Dec 4, 2024
6ff369d
add defaults to temporary_key config
cccs-douglass Dec 4, 2024
b591047
Merge branch 'partial_results' of github.com:CybercentreCanada/assemb…
cccs-douglass Dec 4, 2024
2186f58
Merge pull request #1830 from CybercentreCanada/metadata_validation
cccs-rs Dec 6, 2024
464f099
Merge pull request #1851 from CybercentreCanada/bugfixes/priority
cccs-rs Dec 6, 2024
0b2a298
Update S3 testing to use minio instead of Amazon
cccs-rs Dec 6, 2024
9834b98
Add new configuration options for UpdateSource model
cccs-rs Dec 6, 2024
49cc8ae
Merge pull request #1855 from CybercentreCanada/hotfix/update_s3_tests
cccs-rs Dec 6, 2024
225fbd2
Fix model for ServiceDelta
cccs-rs Dec 6, 2024
6a98b4f
Add a configuration to ignore source update caching; remove `data` co…
cccs-rs Dec 9, 2024
4a93791
Merge pull request #1811 from CybercentreCanada/update/borealis
cccs-nr Dec 9, 2024
f528f87
Merge pull request #1346 from CybercentreCanada/partial_results
cccs-douglass Dec 12, 2024
c29f5f7
Merge pull request #1856 from CybercentreCanada/improvements/update_s…
cccs-rs Dec 12, 2024
3dabed1
Formatted the submission profiles models
cccs-nr Dec 17, 2024
61fb1a9
Update README
cccs-rs Dec 18, 2024
a3f80eb
Fix link to licence
cccs-rs Dec 18, 2024
a858868
Merge pull request #1859 from CybercentreCanada/readme_update
cccs-rs Dec 20, 2024
3a6566d
Prevent END IF; as strong indicator for VBS
cccs-jh Jan 8, 2025
704b453
Add CREATE OR REPLACE as strong sql indicator
cccs-jh Jan 8, 2025
6e816cc
Merge pull request #1861 from CybercentreCanada/bugfix/identify_sql_vbs
cccs-jh Jan 9, 2025
09328a1
Add identification for javascript functions without parameters
cccs-jh Jan 9, 2025
926f1a6
Merge pull request #1862 from CybercentreCanada/identify_javascript_f…
cccs-jh Jan 9, 2025
1b7b447
Prevent methods ending in Execute from being identified as VBS
cccs-jh Jan 10, 2025
7c345e9
Merge pull request #1863 from CybercentreCanada/identify_java_vbs
cccs-jh Jan 10, 2025
c42edb2
Merge pull request #1849 from sgaron-msft/login_mi_token
cccs-rs Jan 13, 2025
96cb47e
Remving `copy` from small batch identification
gdesmar Jan 14, 2025
3c2509e
Merge pull request #1864 from CybercentreCanada/remove_copy_small_bat…
gdesmar Jan 14, 2025
7e24b8b
Improve CSV identification
gdesmar Jan 28, 2025
0d0f31f
Rewind the file if we need to retry csv identification
gdesmar Jan 28, 2025
ba1addb
Fix typo in comment
cccs-rs Jan 28, 2025
2cf8759
Update azure-tests.yaml
cccs-rs Jan 28, 2025
be3bd33
Merge pull request #1872 from CybercentreCanada/improve_csv_ident
gdesmar Jan 28, 2025
1bdaf0d
Add addtional fields to SubmissionProfiles
cccs-rs Jan 28, 2025
1825cc5
Update models
cccs-rs Feb 1, 2025
9815a3b
Add a new `poweruser` role type that can do more than a normal user
cccs-rs Jul 10, 2024
c9a1a5a
Add a submission profile configuration for basic user usage
cccs-rs Jul 10, 2024
80a2bc3
Omit `runtime_excluded` from ServiceSelection model (unused)
cccs-rs Jul 30, 2024
5144bcf
Create a SubmissionProfileParams model for submission profiles
cccs-rs Jul 30, 2024
1a49574
Add params to Static Analysis profile
cccs-rs Jul 30, 2024
6a7d0c9
Remove unused submission parameter from v3
cccs-rs Jul 31, 2024
088775c
Add `generate_alert` and `ttl` as enforced parameters
cccs-rs Jul 31, 2024
a91f2f1
Update SubmissionProfileParams model to all be optional fields
cccs-rs Aug 9, 2024
255d4b6
Allow users to change some properties of submission profiles
cccs-rs Oct 11, 2024
d700c1c
Allow for configuring core params
cccs-rs Oct 23, 2024
1cd81f0
Formatted the submission profiles models
cccs-nr Dec 17, 2024
1c2fce9
Add addtional fields to SubmissionProfiles
cccs-rs Jan 28, 2025
a3e9afe
Update models
cccs-rs Feb 1, 2025
9b2c905
Merge remote-tracking branch 'refs/remotes/origin/AL-2646' into AL-2646
cccs-rs Feb 1, 2025
8053537
Fix merge conflicts
cccs-rs Feb 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 64 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,80 @@
# Assemblyline 4 - Automated malware analysis framework
[![Discord](https://img.shields.io/badge/chat-on%20discord-7289da.svg?sanitize=true)](https://discord.gg/GUAy9wErNu)
[![](https://img.shields.io/discord/908084610158714900)](https://discord.gg/GUAy9wErNu)
[![Static Badge](https://img.shields.io/badge/github-assemblyline-blue?logo=github)](https://github.com/CybercentreCanada/assemblyline)
[![Static Badge](https://img.shields.io/badge/github-assemblyline--base-blue?logo=github)](https://github.com/CybercentreCanada/assemblyline-base)
[![GitHub Issues or Pull Requests by label](https://img.shields.io/github/issues/CybercentreCanada/assemblyline/base)](https://github.com/CybercentreCanada/assemblyline/issues?q=is:issue+is:open+label:base)
[![License](https://img.shields.io/github/license/CybercentreCanada/assemblyline-base)](./LICENCE.md)

AssemblyLine 4 is an open source malware analysis framework. It leverages Kubernetes and Docker to adapt to many use cases; from a small appliance for supporting manual malware analysis and security teams to large-scale enterprise security operations scanning millions of files a day and providing triage capabilities.
# Assemblyline 4 - Base Package

AssemblyLine can be easily integrated in your environment using it’s powerful rest API and web interfaces. The platform comes with dozens of services to provide deep file analysis and enable integration with other security platforms such as anti-virus, malware-detonation sandboxes and threat knowledge bases. Best of all, with a little bit of Python code you can extend it yourself by creating new analysis and integration services.
This repository provides Assemblyline with common libraries, cachestore, datastore, filestore, ODM and remote datatypes.

### Repository information
## Image variants and tags

This is Assemblyline 4 base repository. It provides Assemblyline with common libraries, cachestore, datastore, filestore, ODM and remote datatypes.
| **Tag Type** | **Description** | **Example Tag** |
| :----------: | :----------------------------------------------------------------------------------------------- | :------------------------: |
| latest | The most recent build (can be unstable). | `latest` |
| build_type | The type of build used. `dev` is the latest unstable build. `stable` is the latest stable build. | `stable` or `dev` |
| series | Complete build details, including version and build type: `version.buildType`. | `4.5.stable`, `4.5.1.dev3` |

#### System requirements
## System requirements

Assemblyline 4 will only work on systems running python3.11 and was only tested on linux systems.
Assemblyline 4 will only work on systems running Python 3.11 and was only officially tested on Linux systems by the Assemblyline team.

#### Installation requirements
## Installation requirements

If used outside of our normal container this library requires outside linux libraries.
The following Linux libraries are required for this library:

- libffi8 (dev)
- libfuxxy2 (dev)
- libmagic1
- python3.11 (dev)

Here is an example on how you would get those libraries on a `Ubuntu 20.04+` system:
```bash
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install libffi8 libfuzzy2 libmagic1 build-essential libffi-dev python3.11 python3.11-dev python3-pip libfuzzy-dev
```

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install libffi8 libfuzzy2 libmagic1 build-essential libffi-dev python3.11 python3.11-dev python3-pip libfuzzy-dev
**Note:** Installation of the libraries are not required if using the `cccs/assemblyline` container image

## Documentation

For more information about these Assemblyline components, follow this [overview](https://cybercentrecanada.github.io/assemblyline4_docs/overview/architecture/) of the system's architecture.

# Assemblage 4 - Paquet de base

Ce dépôt fournit à Assemblyline les bibliothèques communes, le cachestore, le datastore, le filestore, l'ODM et les types de données à distance.

## Variantes et étiquettes d'image

| **Type d'étiquette** | **Description** | **Exemple d'étiquette** |
| :------------------: | :--------------------------------------------------------------------------------------------------------------- | :------------------------: |
| dernière | La version la plus récente (peut être instable). | `latest` |
| build_type | Le type de compilation utilisé. `dev` est la dernière version instable. `stable` est la dernière version stable. | `stable` ou `dev` |
| séries | Le détail de compilation utilisé, incluant la version et le type de compilation : `version.buildType`. | `4.5.stable`, `4.5.1.dev3` |

## Système requis

Assemblyline 4 ne fonctionnera que sur des systèmes utilisant Python 3.11 et n'a été officiellement testé que sur des systèmes Linux par l'équipe Assemblyline.

## Configuration requise pour l'installation

Les bibliothèques Linux suivantes sont requises pour cette bibliothèque :

- libffi8 (dev)
- libfuxxy2 (dev)
- libmagic1
- python3.11 (dev)

Voici un exemple de la manière dont vous obtiendrez ces bibliothèques sur un système `Ubuntu 20.04+` :
```bash
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install libffi8 libfuzzy2 libmagic1 build-essential libffi-dev python3.11 python3.11-dev python3-pip libfuzzy-dev
```

**Note:** L'installation des bibliothèques n'est pas nécessaire si vous utilisez l'image conteneur `cccs/assemblyline`.

## Documentation

Pour plus d'informations sur ces composants Assemblyline, suivez ce [overview](https://cybercentrecanada.github.io/assemblyline4_docs/overview/architecture/) de l'architecture du système.
4 changes: 2 additions & 2 deletions assemblyline/common/caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def keys(self):
return self.cache.keys()


def generate_conf_key(service_tool_version: Optional[str] = None, task: Optional[Task] = None) -> str:
def generate_conf_key(service_tool_version: Optional[str] = None, task: Optional[Task] = None, partial_result: bool = False) -> str:
ignore_salt = None
service_config = None
submission_params_str = None
Expand All @@ -164,7 +164,7 @@ def generate_conf_key(service_tool_version: Optional[str] = None, task: Optional
}
submission_params_str = json.dumps(sorted(submission_params.items()))

if task.ignore_cache:
if task.ignore_cache or partial_result:
ignore_salt = get_random_id()

if service_tool_version is None and \
Expand Down
24 changes: 15 additions & 9 deletions assemblyline/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,27 @@ class ServiceStatus(enum.IntEnum):
DEFAULT_SERVICE_ACCEPTS = ".*"
DEFAULT_SERVICE_REJECTS = "empty|metadata/.*"

# Priority used to drop tasks in the ingester
DROP_PRIORITY = 0

# Maximum priority that can be assigned to a submission
MAX_PRIORITY = 1500

# Queue priority values for each bucket in the ingester
PRIORITIES = {
'low': 100, # 0 -> 100
'medium': 200, # 101 -> 200
'high': 300,
'critical': 400,
'user-low': 500,
'user-medium': 1000,
'user-high': 1500
'low': 100, # 1 -> 100
'medium': 200, # 101 -> 200
'high': 300, # 201 -> 300
'critical': 400, # 301 -> 400
'user-low': 500, # 401 -> 500
'user-medium': 1000, # 501 -> 1000
'user-high': MAX_PRIORITY # 1001 -> 1500
}
MAX_PRIORITY = 2000


# The above priority values presented as a range for consistency
PRIORITY_RANGES = {}
_start = -1
_start = DROP_PRIORITY
for _end, _level in sorted((val, key) for key, val in PRIORITIES.items()):
PRIORITY_RANGES[_level] = (_start + 1, _end)
_start = _end
Expand Down
9 changes: 9 additions & 0 deletions assemblyline/common/custom.magic
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,12 @@
0 string \#\!\/usr\/bin\/python custom: code/python
0 string \#\!\/usr\/local\/bin\/python custom: code/python
0 string \#\!\/usr\/bin\/env\ python custom: code/python
# Pickle files: Starts with specific bytes, and end with a STOP (period ".")
0 beshort 0x8002
>-1 byte 0x2e custom: resource/pickle/v2
0 beshort 0x8003
>-1 byte 0x2e custom: resource/pickle/v3
0 string \x80\x04\x95
>-1 byte 0x2e custom: resource/pickle/v4
0 string \x80\x05\x95
>-1 byte 0x2e custom: resource/pickle/v5
Loading