Archive for the “Linux” category

Numbering Each Line in a Text File

by Mark Sanborn on April 21, 2008

Sometimes we are given an error message that references a line number in a text file. We can number each line so we can find the error message right a way. In fact, we can print out the exact line that contains the error. This is often useful for finding errors in PHP. If there (…)

Securely Wipe a File with DD

by Mark Sanborn on April 15, 2008

Sometimes we have sensitive data that we want to get rid of. Since deleting a file doesn’t actually prevent it from being recovered we need to do some extra steps to ensure that it can’t be recovered. In this post we will use DD to complete this task. DD is often the tool digital forensics (…)

Use Rsync for Daily, Weekly and Full Monthly Backups

by Mark Sanborn on April 9, 2008

Today, we will be using rsync to make daily, weekly, incremental backups and then a full compressed/archived backup once a month. We will then use cron to automate the process. Lets face it us humans get lazy sometimes and most backup systems loose complete effectiveness if they are not completely automated.

Make a Backup Image of your Hard Drive with DD

by Mark Sanborn on April 4, 2008

Dd is a tool that is often used in computer forensics because it is extremly low level and effecient at creating exact duplicates of hard drives. For this reason it is often the tool for which all other tools are compared to. But is it useful for us regular Joes?. Can we use dd to (…)

Protecting Linux from Fork Bombs

by Mark Sanborn on April 3, 2008

Fork bombs are basically a never ending loop. They open a processes that opens other processes that open even more processes exponentially. Causing any computer to lock up within a matter of seconds. Although they have to be ran from a logged in user they are still a threat. Users can unintentionally cause a complete (…)

Add Port Knocking to SSH for Extra Security

by Mark Sanborn on April 2, 2008

SSH by default is very strong. It has protection against various hacks and known vulnerabilities. For instance SSH has a password retry wait time of five seconds. This makes the time for brute force attacking an SSH server very long and probably not effective. However, sometimes script kiddies will fork their hacking program making multiple (…)

Changing Permissions with chmod Binary Values

by Mark Sanborn on March 20, 2008

Recently I accidently changed the permissions of one of my files and I didn’t know what the correct permissions were suppose to be. I did know that the other files in the same directory were the correct permission. Using the ls -l command. I was able to see that the permission was set as, -rw-r–r–. (…)

Learning Cron by Example

by Mark Sanborn on March 11, 2008

If you are using a Linux system and want to schedule a task to run in the future you will probably need to know cron. Cron is much like Window’s Scheduled Tasks. The only difference is that cron is conifgured by a simple text file. Although, that text file to the untrained looks very complicated. (…)