Security

Shell script to Finding Accounts with No Password

Shell script to Finding Accounts with No Password listuserwopassword.bash #!/bin/bash # Shell script to Finding Accounts with No Password # Useful to improve system security # Copyright (c) 2005 nixCraft project # This script is licensed under GNU GPL version 2.0 or above # For more info, please visit: # http://cyberciti.biz/shell_scripting/bmsinstall.php # TODO # – […]

Read More
Security

Shell script for search for no password entries and lock all accounts

Shell script for search for no password entries and lock all accounts find-account-no-password.sh #!/bin/bash # Shell script for search for no password entries and lock all accounts # ————————————————————————- # Copyright (c) 2005 nixCraft project # This script is licensed under GNU GPL version 2.0 or above # ————————————————————————- # This script is part of […]

Read More
Security

Tunneling ports with SSH

Using -L on the command line with SSh will bind a remote port to a local one. For instance, if you wanted to tunnel the port for a remote desktop (usually 5901) to a local machine, you would type the following ssh -L 5901:localhost:5901 remote_ip You could then access your remote desktop by connecting your […]

Read More
Scripting

Script to unmount Busy Devices

First the script tries to umount the drive normally. If that fails, it tries to restart famd which is the most common problem. If that fails it tries to restart xinetd. If that fails it uses the command fuser -ki which asks you if you want to kill each process that’s using that folder. Be […]

Read More
Scripting

SSH Dictionary Attack Prevention with iptables

It is ideal to slow down the SSH dictionary attack when the infested host started to brute force the SSH authentication. There are many scripts/user-land daemons that perform monitoring and blocking. I prefer to use something that has less demand in memory/CPU usage. IPTables module provides a kernel level solution with little overhead.

Read More