Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
github.com/meinside/telegram-clojure-repl-bot
A Telegram bot for using Clojure REPL, built with golang.
It connects to an existing PREPL connection, or launches a new PREPL and communicates with it.
$ go install github.com/meinside/telegram-clojure-repl-bot@latest
$ git clone https://github.com/meinside/telegram-clojure-repl-bot.git
$ cp telegram-clojure-repl-bot/config.json.sample /path/to/your/config.json
$ vi /path/to/your/config.json
and change values to yours:
{
"api_token": "0123456789:abcdefghijklmnopqrstuvwyz-x-0a1b2c3d4e",
"clojure_bin_path": "/usr/local/bin/clojure",
"repl_host": "localhost",
"repl_port": 8888,
"allowed_ids": [
"telegram_id_1",
"telegram_id_2"
],
"monitor_interval": 1,
"is_verbose": false
}
Execute the installed binary with the path to your config file:
$ telegram-clojure-repl-bot /path/to/your/config.json
$ sudo cp telegram-clojure-repl-bot/systemd/telegram-clojure-repl-bot.service /lib/systemd/system/
$ sudo vi /lib/systemd/system/telegram-clojure-repl-bot.service
and edit User, Group, WorkingDirectory and ExecStart values.
It will launch automatically on boot with:
$ sudo systemctl enable telegram-clojure-repl-bot.service
and will start/stop manually with:
$ sudo systemctl start telegram-clojure-repl-bot.service
$ sudo systemctl stop telegram-clojure-repl-bot.service
$ sudo cp telegram-clojure-repl-bot/launchd/telegram-clojure-repl-bot.plist /Library/LaunchDaemons/
$ sudo vi /Library/LaunchDaemons/telegram-clojure-repl-bot.plist
and edit values:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>telegram-clojure-repl-bot</string>
<key>ProgramArguments</key>
<array>
<string>/path/to/installed/telegram-clojure-repl-bot</string>
<string>/path/to/your/config.json</string>
</array>
<key>UserName</key>
<string>user_name</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
Now load it with:
$ sudo launchctl load /Library/LaunchDaemons/telegram-clojure-repl-bot.plist
and unload with:
$ sudo launchctl unload /Library/LaunchDaemons/telegram-clojure-repl-bot.plist
When running with systemd, the PREPL launched by this bot stops immediately because it is an interactive shell-like application.
So I put StandardInput
and TTYPath
properties in the Service section in systemd .service file:
StandardInput=tty
TTYPath=/dev/tty49
If these would be a problem for you, change them or launch your PREPL manually.
When running with java/clojure installed with asdf, JAVA_HOME
must be specified in the Environment
section of the systemd .service file:
# example
Environment="JAVA_HOME=/home/ubuntu/.asdf/installs/java/zulu-17.32.13"
MIT
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.