rats – source code analysis

I stublemed across this recently so thought of sharing this for you 🙂

sudo yum install rats

And some details about rats

RATS(Rough Auditing Tool for Security) scans through code, finding potentially
dangerous function calls. The goal of this tool is not to definitively find
bugs (yet). The current goal is to provide a reasonable starting point for
performing manual security audits.
The initial vulnerability database is taken directly from things that could be
easily found when starting with the forthcoming book, "Building Secure
Software" by Viega and McGraw.

 

systemctl enable and start service

Most of the times when I want to enable the service, I find myself enabling it immediately or it is vice versa. So, the commands I used to use were:

systemctl enable sshd.service
systemctl start sshd.service

But recently I learned that I do not need the 2 commands and this can be done in single command like below

1
 

systemctl enable --now sshd.service

ssh – host hopping (with Jump host)

Most of the times I need to jump hosts with ssh. What do I mean by that. Let me try to explain :

Host Hopping

If I need to got to host h3 then I need to first login to h1 and from there to host h2 and finally to host h3. This can be done with .ssh/config file but for that I need to have some program like nc installed on all the hosts in between which might not be practical in all cases. So, here is something that I found very useful.

ssh -tt h1 ssh -tt h2 ssh -tt h3

In the above command, we can add usernames, if needed. And now for the best part, if we add entry for h2 in h1 and h3 in h2 in the .ssh/config file, then we don’t need to add usernames. Similarly setup passwordless ssh from h2 to h3 and h1 to h2 and you don’t need password for any of the hosts, how cool is that 🙂