2010
09.30

DIY Server Rack

I have so many old computers and weird devices that it was starting to get out of control. Since throwing stuff away wasn’t an option, a server rack was pretty much my only recourse. Buying a factory built rack was way out of my budget, so my next thought was a DIY project. I’ve seen some guides out there for building server racks before. To be honest, I wasn’t very impressed. Many of them looked flimsy or used wood instead of steel. If you don’t want your rack to collapse, or weigh 200lbs, I would suggest going with a steel frame.

So I ordered some server rack rails and went to the hardware store.

The finished DIY server rack.

The finished DIY server rack.

Read More >>

2009
10.23

The pipe is the vertical line above your enter key. It looks like this without the quotes: “|”. Using the pipe character in the Linux shell allows you to string commands together, performing another command on the output from the first. This is a list of 10 things you can do with the pipe that will help you master the command line.

Remember, these commands don’t have to be used as given in the list below, look up the man pages for additional options and arguments. Also, don’t forget that you can string piped commands to use more than one. Stringing piped commands are very powerful when combined.

1. Grep

Grep is one of the most common commands used with the pipe. It allows you to quickly search through the output of another command. For an example, look at the following code. Grep can also take regular expressions as arguments.

ps ux | grep /usr

This command will print every line of the list of processes with “/usr” in it.

2. Head

Head simply displays the first 10 lines of whatever you piped into it. Here’s your example:

ls / -l | head

This example shows the first 10 lines of the directory listing.

Read More >>

2009
10.19

What does XSS look like? How can we determine if a sites has been attacked, or if it’s code is vulnerable? The exploid usually looks something like this:

<script>alert('XSS!');</script>

A normal user should not be able to execute javascript on anyone elses client to the site. If input like that gets stored anywhere in the database and output to the user later, it could mean that their session gets stolen.

Here;s a more specific example:

<html>
<head></head>
<body>
<form action="vuln.php" method="POST">
<input type="text" name="input" />
<input type="submit" value="XSS" />
</form>
 
</body>
</html>

An html form to test the vulnerable code.

< ?php
$input = $_POST['input'];
echo stripslashes($input); //stripslashes just in case magic quotes is on, for demonstration
?>

Read More >>