App-Spoor

Ease integration with the Spoor API for cPanel installations.

WHAT IS SPOOR?

Spoor is a service that helps to lessen the impact of email compromises by providing early warning of compromised 
mailboxes. If you would like access to the API, mail rorymckinley@capefox.co and with 'Spoor Access' in the subject.

INSTALLING

To install this module, run the following commands:

	perl Build.PL
	./Build
	./Build test
	./Build install

POST-INSTALLATION

For Spoor to provide maximum functionality it needs to capture to successful logins. cPanel does not do this by default.
To enable it in cPanel, go to Server Configuration -> Tweak Settings -> Logging and switch on 'Log successful logins'.

  # Run as root
  spoor_installer
  systemctl enable spoor-access-follower.service
  systemctl enable spoor-error-follower.service
  systemctl enable spoor-login-follower.service
  systemctl enable spoor-transmitter.service
  systemctl start spoor-access-follower.service
  systemctl start spoor-error-follower.service
  systemctl start spoor-login-follower.service
  systemctl start spoor-transmitter.service
  cd /usr/local/cpanel/bin/
  ./manage_hooks add module SpoorForwardHook 

UNINSTALLING

  # Run as root
  cd /usr/local/cpanel/bin/
  ./manage_hooks delete module SpoorForwardHook
  systemctl stop spoor-access-follower.service
  systemctl stop spoor-error-follower.service
  systemctl stop spoor-login-follower.service
  systemctl stop spoor-transmitter.service
  systemctl disable spoor-access-follower.service
  systemctl disable spoor-error-follower.service
  systemctl disable spoor-login-follower.service
  systemctl disable spoor-transmitter.service
  cpanm --uninstall App::Spoor # Assuming you are using cpanminus

  # Optionally, you can choose to remove the following, if you are confident that you no longer need them

  rm -fr /etc/spoor
  rm -fr /var/lib/spoor
  rm /etc/systemd/system/spoor-login-follower.service
  rm /etc/systemd/system/spoor-access-follower.service
  rm /etc/systemd/system/spoor-error-follower.service
  rm /etc/systemd/system/spoor-transmitter.service
  rm /var/cpanel/perl5/lib/SpoorForwardHook.pm

UPDATING

When updating App::Spoor, it is recommended that you stop the asorted Spoor services that are running and restart them
afterwards.

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
perldoc command.

    perldoc App::Spoor

You can also look for information at:

    RT, CPAN's request tracker (report bugs here)
        https://rt.cpan.org/NoAuth/Bugs.html?Dist=App-Spoor

    AnnoCPAN, Annotated CPAN documentation
        http://annocpan.org/dist/App-Spoor

    CPAN Ratings
        https://cpanratings.perl.org/d/App-Spoor

    Search CPAN
        https://metacpan.org/release/App-Spoor


LICENSE AND COPYRIGHT

Copyright (C) 2019 Rory McKinley

This program is free software; you can redistribute it and/or modify it
under the terms of the the Artistic License (2.0). You may obtain a
copy of the full license at:

L<http://www.perlfoundation.org/artistic_license_2_0>

Any use, modification, and distribution of the Standard or Modified
Versions is governed by this Artistic License. By using, modifying or
distributing the Package, you accept this license. Do not use, modify,
or distribute the Package, if you do not accept this license.

If your Modified Version has been derived from a Modified Version made
by someone other than you, you are nevertheless required to ensure that
your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service
mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge
patent license to make, have made, use, offer to sell, sell, import and
otherwise transfer the Package with respect to any patent claims
licensable by the Copyright Holder that are necessarily infringed by the
Package. If you institute patent litigation (including a cross-claim or
counterclaim) against any party alleging that the Package constitutes
direct or contributory patent infringement, then this Artistic License
to you shall terminate on the date that such litigation is filed.

Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.