An adversary may compress or encrypt data that is collected prior to exfiltration using 3rd party libraries. Many libraries exist that can archive data, including [Python](https://attack.mitre.org/techniques/T1059/006) rarfile (Citation: PyPI RAR), libzip (Citation: libzip), and zlib (Citation: Zlib Github). Most libraries include functionality to encrypt and/or compress data.

Some archival libraries are preinstalled on systems, such as bzip2 on macOS and Linux, and zip on Windows. Note that the libraries are different from the utilities. The libraries can be linked against when compiling, while the utilities require spawning a subshell, or a similar execution mechanism.
Archive via Library
source_name: mitre-attack  url: https://attack.mitre.org/techniques/T1560/002  external_id: T1560.002     source_name: PyPI RAR  description: mkz. (2020). rarfile 3.1. Retrieved February 20, 2020.  url: https://pypi.org/project/rarfile/     source_name: libzip  description: D. Baron, T. Klausner. (2020). libzip. Retrieved February 20, 2020.  url: https://libzip.org/     source_name: Zlib Github  description: madler. (2017). zlib. Retrieved February 20, 2020.  url: https://github.com/madler/zlib     source_name: Wikipedia File Header Signatures  description: Wikipedia. (2016, March 31). List of file signatures. Retrieved April 22, 2016.  url: https://en.wikipedia.org/wiki/List_of_file_signatures     