Server Notifications via Signal

Why Signal?

 I developed a similar project that utilizes email notifications. However, using Signal instead of MSMTP offers significant advantages, including enhanced security and real-time notifications for actions or updates.

In this setup, we don’t need to grant MSMTP access to our Google account; we can create a separate account for our servers. Fortunately, Signal allows account creation with VoIP numbers, including Google Voice numbers, enabling us to set up an additional account distinct from our main Signal account. This approach also eliminates the need for email filters to manage important notifications. All Signal messages from your machines will be sent from one account, keeping everything in a single message thread.

GitHub offical repository 

Instructions

Install wget to download files from the Internet, and tar to extract compressed files using your system's package manager.


Ubuntu/Debian:

    sudo apt-get install wget tar


RHEL/Fedora/CentOS/RockyLinux:

    sudo dnf install wget tar



Download Github tar file. Chose the latest version. At the time of this writing it is v0.13.9. Find the latest version here.

    wget [LATEST] 

Example:

    wget https://github.com/AsamK/signal-cli/releases/download/v0.13.9/signal-cli-0.13.9-Linux-native.tar.gz





Extract the contents of the compressed file you downloaded and move Signal into the /opt directory.

    sudo tar xf signal-cli-XXXXXXXX-.tar.gz -C /opt



Create a symbolic link to the signal-cli executable to call on it globally

    sudo ln -s /opt/signal-cli /usr/local/bin



Register your account. Likely will need to authenticate with CAPTCHA or PIN. Please view signal-cli's documentation on how to register your account on your machine

CAPTCHA Registration Documentation

Test signal-cli by sending a message to your mobile account

    sudo signal-cli send -m "Test message" [PHONENUMBER]
 

To send standard output to your Signal account, use the below command.  

    [COMMAND OR SCRIPT] | sudo signal-cli send --message-from-stdin [PHONENUMBER]

I was able to perform the uptime command and send the output to my phone.You can use this configuration to easily receive health alerts, script output notifications, and other information from your GNU/Linux systems.

Comments

Popular posts from this blog

SOC Analyst: Phishing Email Analysis

Common SPL Commands

Endlessh: SSH Honeypot Analysis