Package: nprintml
nPrintMLOverviewnPrintML bridges the gap betweennPrint, which generates standard fingerprints for packets, and AutoML, which allows for optimized model training and traffic analysis. nPrintML enables users with network traffic and labels to perform optimized packet-level traffic analysiswithout writing any code.For a high-level overview, installation instructions, and detailed usage information, please visitthe project's homepage.For briefinstallationandusageinstructions, or for theDocker container demo, see below.Set-upDependenciesPython versions 3.6 through 3.8 are supported.You might check what versions of Python are installed on your system,e.g.:ls -1 /usr/bin/python*As needed, consult your package manager orpython.org.Depending on your situation, considerpyenvfor easy installation and management of arbitrary versions of Python.nPrintML further requires nPrint (see below).InstallationnPrintML itself is available for download from thePython Package Index (PyPI)and viapip,e.g.:python -m pip install nprintml(Note: Thepythonorpipexecutable used to install nPrintML depends upon your system and as discussed in thepreceding section. And, for example, your system might supply apython3command, butnotapythoncommand. As such, the above may be adapted to your system.)This downloads, builds and installs thenprintmlconsole command. If you're happy to manage your Python (virtual) environment, you're all set with the above.That said, installation of this command via a tool such aspipxis strongly encouraged. pipx will ensure that nPrintML is installed into its own virtual environment, such that its third-party libraries do not conflict with any others installed on your system.(Note that nPrint and nPrintML are unrelated to the PyPI distribution named "nprint.")Post-installationnPrintML depends on the nPrint command, which may be installed separately, (with reference to thenPrint documentation).For quick-and-easy satisfaction of this requirement, nPrintML supplies the bootstrapping commandnprint-install, which is made available to your environment with nPrintML installed. This command will inspect its execution environment and attempt to retrieve, compile and install nPrint with the most appropriate defaults:nprint-installnPrint may thereby be installed system-globally, to the user environment, to the (virtual) environment to which nPrintML was installed, or to a specified path prefix. Consult the command's--helpfor more information.nprint-installis identically available through its Python module (no different frompipabove):python -m nprintml.net.installFurther set-upnPrintML leveragesAutoGluonto manage AutoML. However, itdoes notby default install additional libraries required forallmodels supported by AutoGluon. If you wish to test these models, you will need to install their requirements manually.AutoGluon will itself note which models it is unable to generate – and how to satisfy their requirements – during operation.For more information, consult theAutoGluon documentation.UsagenPrintML supplies the top-level shell commandnprintml–nprintml ...– as well as its terse aliasnml–nml ...In case of command path ambiguity and in support of debugging, thenprintmlcommand is also available through its Python module:python -m nprintml ...For detailed usage information with full examples of how to run nPrintML, please visit ourhomepage.DemoA Docker container demo is provided of each nPrintML release to aid prospective users in trying out the tool.Note: The container is intended for users of as-yet-unsupported platforms and users of atypically-configured systems. nPrintMLshouldinstall easily for most users, as described in thepreceding section; and, for day-to-day use, it isstrongly recommendedthat nPrintML be installedwithoutvirtualization. nPrintML users requiring support in installing the tool should consultthe project's homepageand then considerreaching out for help. Users of unsupported platforms should consider creating afeature requestor apull request.DependenciesThe container demo requiresDocker.UsageThe container entrypoint is thenprintmlcommand, and as such takes the same arguments:docker run [...] ghcr.io/nprint/nprintml ...Note, however, that any argument references to the host filesystem must be mapped to the container filesystem. For this reason, thenprintml-dockerscript is recommended.Demo scriptThenprintml-dockerscript is the recommended interface to the container demo. Argument references to the host filesystem are mapped and rewritten for the container filesystem; outputs are written to the host filesystem and given user ownership,etc.nprintml-dockerrequires Python v3.6 or greater.The script is available for download from thenPrintML repository. It may be placed anywhere on your system, and made executable or invoked with eitherpythonorpython3.A reasonable installation of the script (globally) might include the following:DEST="/usr/local/bin"

curl --output-dir "$DEST" -O https://raw.githubusercontent.com/nprint/nprintML/main/image/nprintml-docker

chmod +x "$DEST"/nprintml-dockerThe script should then be available for execution, even without reference to its full path, (so long asDESTabove is itself in your environment'sPATH):nprintml-docker ...Note: In the above example, the script is installed to the systemglobally. This will likely requirerootpermission –e.g.sudo curl …andsudo chmod ….Alternatively, set a differentDEST. The script may be placed wherever you have write access – including user directories which are also commonly placed onPATH:$HOME/.local/bin,$HOME/bin,etc.IfDESTis not onPATH, the script may be invoked via its full download path,e.g.:~/Downloads/nprintml-docker ...And if the script is not made executable, it may be invoked via any availablepython(v3.6+):python ~/Downloads/nprintml-docker ...Environment variablesThe script's interface is forwarded tonprintmlwithin the demo container. The script itself may be configured via the following environment variables.NameValuesDescriptionNPRINTML_DOCKER_CHOWN0,1*Outputs owned byrootare given user ownership viachown(1)NPRINTML_DOCKER_DEBUG0*,1Enable debug-level logging to standard output (1)NPRINTML_DOCKER_REMOVE0,1*Container is removed after each run (1)NPRINTML_DOCKER_REPOSITORY(repository:ghcr.io/nprint/nprintml*)nPrintML repository of imageNPRINTML_DOCKER_VERSION(version:latest*)nPrintML image version tag*default valueDevelopmentDevelopment requirements may be installed via thedevextra (below assuming a source checkout):pip install --editable .[dev](Note: The installation flag--editableis also used above to instructpipto place the source checkout directory itself onto the Python path, to ensure that any changes to the source are reflected in Python imports.)Development tasks are then managed viaargcmdrsub-commands ofmanage …, (as defined by the repository modulemanage.py),e.g.:manage version patch -m "initial release of nprintml" \
       --build                                        \
       --releaseCiting nPrintML@inproceedings{10.1145/3460120.3484758,
author = {Holland, Jordan and Schmitt, Paul and Feamster, Nick and Mittal, Prateek},
title = {New Directions in Automated Traffic Analysis},
year = {2021},
isbn = {9781450384544},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3460120.3484758},
doi = {10.1145/3460120.3484758},
pages = {3366–3383},
numpages = {18},
keywords = {machine learning on network traffic, automated traffic analysis, network traffic analysis},
location = {Virtual Event, Republic of Korea},
series = {CCS '21}
}