Sunday, December 13, 2020

Security Onion Syslog-NG Console Logging

Goal1

By default so only logs into elkstack, not to a file!  We want a file too so we can tail -f file|ccze on a console and look cool like in the movies!

Goal is minimal editing of /etc/syslog-ng.conf which gets blown away after so updates, so

 make sure security onion /etc/syslog-ng.conf has

@include "/etc/syslog-ng/conf.d/*.conf"
add a /etc/syslog-ng/conf.d/cool.conf file:

destination d_remotesyslog { file("/var/log/remotesyslog"); };
log {
source(s_network);
destination(d_remotesyslog);

};

then tail -f /var/log/remotesyslog|ccze shows remote systems logs on console

sources:

https://serverfault.com/questions/825556/avoid-logging-in-var-log-syslog-only-using-etc-syslog-ng-conf-d

Thursday, July 16, 2020

rc.local on kali2020

I love old school /etc/rc.local files to run scripts at boot.
This fixes some bugs from the last one I posted.  Still learning systemd...


$ cat rc.local.sh

cat <<'EOF' > /etc/systemd/system/rc-local.service
 [Unit] 
  Description=/etc/rc.local Compatibility 
  ConditionPathExists=/etc/rc.local 
 [Service] 
  Type=forking 
  ExecStart=/etc/rc.local start 
  TimeoutSec=0 
  StandardOutput=tty 
  RemainAfterExit=yes 
  SysVStartPriority=99 
 [Install] 
  WantedBy=multi-user.target 
EOF

printf '%s\n' '#!/bin/bash' 'exit 0' | tee -a /etc/rc.local 
chmod +x /etc/rc.local
systemctl enable rc-local 
systemctl start rc-local.service 
systemctl status rc-local.service

Saturday, March 21, 2020

Fight Coronavirus with BOINC Rosetta@Home

Rosetta@Home is fighting Corona Virus with protein folding research.

Here is how to help:

1 download client for your computer:

https://boinc.berkeley.edu/download.php

If running windows just follow the gui for the screen saver, if linux manual follow step 2b, for auto 2a.

2a
#install it
apt-get install boinc-manager boinc-client
#start it at boot
update-rc.d boinc-client enable
#start it as a service
service boinc-client start
#start gui manager
boincmgr
click to bar -> tools -> add project, add your account username/password registered via the boincmgr or on the projects website

I add rosetta@home and gpugrid


2b

Sign up for account at https://boinc.bakerlab.org/rosetta/

3

Get your account key
https://boinc.bakerlab.org/rosetta/weak_auth.php

Its the string inside  <authenticator>YOURKEYHERE</authenticator>


4
Run boinc client with the account key attached to rosetta, to do it from command line run this:

boinc -attach_project  https://boinc.bakerlab.org/rosetta/ YOURKEYHERE

There are modes of BOINC for windows where it can run as a screensaver.
https://boinc.berkeley.edu/wiki/BOINC_screensaver

5
Check your progress here, it can take hours to update once it starts running
https://boinc.bakerlab.org/rosetta/home.php

If you arn't sure its running, check your CPU usage, when running right it should use 100% CPU on all cores so make sure your fan works well.