Denyhosts Assists

Every so often a legitimate user will get blocked by deny hosts.  When this happens you can re-enable their access with these 8 simple steps (UPDATE: or use the faster version, see below): Stop DenyHosts # service denyhosts stop Remove the IP address from /etc/hosts.deny Edit /var/lib/denyhosts/hosts and remove the lines containing the IP address. […]

read more

SSH – weak ciphers and mac algorithms

A security scan turned up two SSH vulnerabilities: SSH Server CBC Mode Ciphers Enabled SSH Weak MAC Algorithms Enabled To correct this problem I changed the /etc/sshd_config file to: # default is aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128, # aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc, # aes256-cbc,arcfour # you can removed the cbc ciphers by adding the line Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,arcfour # default is hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 # […]

read more

Crontab Sudo Shenanigans

OK, here is a situation I haven’t seen in a while and it tripped me.  There I admitted it! We have an application that requires a restart of Apache everyday (that is a different discussion).  Regardless I gave them sudo access so they could script the job to run with their process.  Obviously I thought […]

read more

Picking a Strong Password

Not sure of the origin of this but it is a great explanation of what makes a great password and why.  

read more

Putting ‘lsof’ to use

lsof is a powerful tool that has proven very userful over the years in troubleshooting and forensic investigations.  Here are some useful lsof command examples: In this example we are looking at all the files a given process has open (pid=1655 here this is the zabbix agent) lsof -p 1767 Note you can clean up […]

read more

Extended ACLs

To remove permanently ACL from a file: # setfacl -bn file.txt To remove permanently ACL from an entire directory: # setfacl -b –remove-all directory.name To overwrite permissions, setting them to rw for files and rwx for dirs $ find . ( -type f -exec setfacl -m g:mygroup:rw ‘{}’ ‘;’ ) -o ( -type d -exec […]

read more

Fixing Authentication refused: bad ownership or modes for directory

When this error: Authentication refused: bad ownership or modes for directory Shows up in /var/log/messages When trying to setup public key authenticated automatic logins, the problem is a permissions one. You’ll need to perform the following commands on the user account you are trying to setup: chmod go-w ~/ chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys

read more

NBC site redirecting to Exploit kit

We became aware that the NBC[.]com website is redirecting to malicious websites that contains exploit kit.  At this point it seems like most of the pages contains an iframe that is redirecting to the first stage of the RedKit exploit kit.  Some twitter users are already poiting out some of these bad pages.  Some of […]

read more

Aaron Swartz suicide sparks Anonymous to hack US Government Sites

Hackers working under the name of the Anonymous hacktivist collective hit a U.S. government website on Saturday, replacing its home page with a 1,340 word text detailing its frustrations with the way the American legal system works and a threat to release “secrets” gathered from U.S. government websites. The website of the U.S. Sentencing Commission, […]

read more