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.
After you got nodejs (which includes npm now), you can just:
`npm install -g chronos`
After this you may need to link node and chronos in your /bin
or /usr/bin
directory. Otherwise your cronjob may not be able to find them. To check, just create a cron like which node
and look into your mailbox.
chronos should be compatible with every service that supports AMQP. You can configure chronos by placing a JSON file in /etc/chronos.json
or /usr/local/etc/chronos.json
. Example:
{
"mode" : "amqp",
"amqp" : {
"host" : "10.0.13.1",
"port" : 5672,
"login" : "guest",
"password" : "guest",
"vhost" : "/",
"key" : "somekey"
},
"stage" : "production"
}
If you don't set one of those, the defaults apply. They mean that chronos will communicate with graylog2 directly, using a GELF service running locally on port 12201 (which is the default for a fresh install of graylog2).
{
"mode" : "graylog2",
"graylog2" : {
"host" : "127.0.0.1",
"port" : 12201
},
"amqp" : {
"host" : "127.0.0.1",
"port" : 5672,
"login" : "guest",
"password" : "guest",
"vhost" : "/",
"key" : "logging"
},
"stage" : false
}
Let's say your current crontab looks something like this:
0 * * * * date >> /var/log/cronjobs/myjob.log && php /var/www/myapp/cli/index.php --some=bar
If you just replace this by:
0 * * * * chronos -s mystage -j myjob 'php /var/www/myapp/cli/index.php --some=bar'
From now on chronos will log the results of your cronjobs to graylog2.
The cli options of chronos are:
/etc/chronos.json
is addedchronos -oj job1 'printf "This output will be added to the log"'
chronos -j job2 'printf "This will trigger an Error-level message"; exit 1;'
FAQs
Log cronjob results to graylog2
The npm package chronos receives a total of 7 weekly downloads. As such, chronos popularity was classified as not popular.
We found that chronos demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.