SANS’ Top 20 Vulnerabilities – Updated!

SANS has released/updated there Top 20 Vulnerabilities. I would advise everyone to at least glance as this report and try to implement some of the recommendations. This report is quite technical but it’s vital that we start looking out for ourselves and protecting our computers and property. Fight back and stand up for what we work hard for.

For those not familiar, SANS is a world wide trusted institute for computer security, training, certification and research. They know what they are talking about and it’s all backed by facts and examples on how the vulnerabilities are exploited.

Source: SANS Top 20 Vulnerabilities

9/11 – Missing You Daddy

I was searching for some technical information one day and ran across this flash movie someone created about 9/11. I know this is old but it’s a very well done flash that in my opinion reminds us all how fragile our lives are. The flash is quite sad and freaked me out thinking of my own daughter and how she would feel. Oh man it hurts even thinking about it. But I had to pass this on as I think it’s important that we don’t forget the past so we can make sure never to repeat our mistakes.

Source: I miss you daddy (Shockwave Flash)

Age Of Empires III Heaven

The sweetest game ever I’ve owned. I’ve had it for about 4 weeks and its great, but they only thing is I still haven’t seen some stuff I saw on Gamespots interview with the makes of Age Of Empires III Heaven. This site will tell you basically all you wanna know and maybe more.

read more | digg story

OpenBSD File System Corruption – Partitions Not Mounting

I came into work one morning and found out that my database server running OpenBSD with MySQL was no longer running and would not boot up. With a little bit of research I determined that the server went down two days before (over the weekend) and that the file system appeared to be corrupted on two partitions. A co-worker found out that the server’s primary channel on the motherboard was damage. So switched the hard drive over to the secondary channel. This I thought was odd but appeared to be true. I looked at the server and tried to get it to boot up myself. No luck as I was receiving two similar error messages as shown below. I apologize for it not being exact I was in a hurry and panicking to get the server back up and running.

Error Messages – (approximate message)

/dev/rwd0e (/var/): incorrect block count I=36484 (6 should be 0) (corr.) 15025024 DUP I=3515543.
/dev/rwd0g (/usr/): incorrect block count I=36484 (6 should be 0) (corr.) 15025024 DUP I=3515543.
Run fsck_ffs manually.

Solution

After moving the hard drive over to the secondary channel I was prompted at boot “Enter pathname of shell or RETURN for Sh:”. Now due to the fact that my CLI was in the damanged partition (/usr/local/bin/bash) I entered at the prompt “/bin/csh” without quotes and pressed enter. Now that I was into the system I ran “fsck_ffs /dev/rwd0e” and “fsck_ffs /dev/rwd0g” without quotes multiple times. It took me roughly 4 hours to resolve the problem. There was a lot of damage but nothing major or anything that was important. The database data was not affected except for a one log file.

As for how to use fsck_ffs after you run the command I just answered each questions it prompted me for. It’s quite interactive. I do ad might that I wasn’t sure what to say on some of them and wish I had a better understand of it. If anyone knows of good material that explains the fsck_ffs better and how the whole BSD file system works, please let me know.

Thanks to users in the IRC channels for OpenBSD

Saying all this I have to say thanks to all the people on IRC EFNet and Freenode in the channel #OpenBSD. Thanks to a few comments I was able to understand how to use fsck_ffs. Prior to this event I never have worked with fsck_ffs before. Again thanks everyone!

CSS – Centering A Table

Centering a table in css is quite simple to achieve however how one would think to center a table is not always the correct way to do so.

Common Mistakes

  • Table align attribute (deprecated)
    • One may say why not just use the table element attribute align? Well this attribute is deprecated and not recommended to be used. This is why we have CSS to separate styling and structuring.
  • Table style text-align: center;
    • One might think to just apply a style on to a table by using text-align: center;. However text-align can only be applied on non-block level element. A table is a block level element.

Solutions

  • Method 1 – Using Margins
    • To center a table one must apply a style with margin-left: auto; margin-right: auto;. This can be done like so:

      table.center { margin-left: auto; margin-right: auto; }

      Then apply the class style like so:

        <table class="center">
          ...
        </table>
        
  • Method 2 – Using Percentages
    • If you desire to have a table with a specific width, you can do this:

      table.center { width: 70%; margin-left: 15%; margin-right: 15%; }

      Then apply the class style like so:

        <table class="center">
          ...
        </table>
        
  • Method 3 – Using Fixed Width
    • If one desires to have a table with a fixed width you can do this:

      div.tablecontainer { width: 98%; margin: 1%; }
      table.center { margin-left: auto; margin-right: auto; width: 200px; }

      Then apply the class style like so:

        <div class="tablecontainer">
        <table class="center">
          ...
        </table>
        </div>
        

      You can set the “width: 200px” to whatever width you desire.

Notes / IE Exception To The Rule

These methods worked perfectly in Mozilla Suite/Firefox, Opera and IE 6. However these methods did not work in IE 5.5 or IE 5.01. You can over come this problem by doing a couple additional styles and the use of a div or span element tag.

  • IE 5.01 & IE 5.5 Additional Solution
    • For these methods to work in IE 5.01 & IE 5.5 one must add some additional styles. First enclose your table with a div or span element tag with a css class such as tablecontainer and then create an additional style to your tr and td element tags like so:

      div.tablecontainer { text-align: center; width: 98%; margin: 1%; }
      div.tablecontainer tr, div.tablecontainer td { text-align: left; }
      table.center { margin-left: auto; margin-right: auto; }

        <div class="tablecontainer">
        <table class="center">
          ...
        </table>
        </div>
      

      The “text-align: center;” is what will cause the table to center in these versions of the IE browser. The tables will not center without it. The draw back of having “text-align: center” is it will center all the text inside your table cells. This is counter acted by applying a style to “tr” and “td” to align left. If you have th element tags, make sure to set a style so it aligns the text entered back to the default behaviour if desired (i.e. table.tablecontainer th { text-align: center; }).

Source: Center a table with CSS by Scott Granneman
Source: Centring using CSS