Ignorance is Bliss - How not to restore a hacked server…

Posted in Coding, On the Intertron, Rant by Will on July 20, 2006.

This article - How to restore a hacked Linux server is being dugg quite a lot.

Anyone who does this is being (to put it mildly) silly.

You want reasons? OK, I’ll give you reasons. Infact, I only need one reason: You can never trust what the operating system is doing, or is reporting.

But I’ll just run a comparison between the files and known good copies
Nope - if the OS is compromised, then it could simply be redirecting access requests to a copy of the real files.

…then I’ll check that it’s not running any services/etc that it shouldn’t
Who’s to say that the OS won’t simply hide that it’s running more

I’ll just leave it online while I copy all my data. I’ll even set up iptables rules to block all access except to/from the machine I’m backing it up to.
Same thing — you can’t trust that the machine isn’t still reporting*/recording sensitive information (or simply corrupting your precious data).

* = OK, so if you are running ethereal or something from another machine, then you can see all the traffic… without this, there’s no guarantees.

But they don’t have any backups! (or they want to recover some data which hadnt been backed up yet)
Pull the drive and swap it out for a new one. (Even expensive drives are still cheaper than a second lot of call-out fees and down-time)

If worst comes to worst, and the data is compromised/corrupted you might need to send the drive off to a data recovery lab.

Alternatively (but only as a fall-back option) back it all up before formatting the drive. Note: DONT use the compromised machine to access the data, while it’s still running the compromised OS.

But we don’t have another drive to copy it all over to
If this is for a company, they’ll have atleast one other machine, hijack it for a while to use as data storage until you can burn it to DVD or similar.

But I don’t have physical access to the machine because it’s co-located/hosted in a remote datacentre
Contact your datacentre, explain the situation, ask them what it’ll cost to have them pull the drive and put in a new one.

If you are being paid to do a system restore for a client, you should never ever allow the machine to keep running after a compromise. Ever.

How to ask Questions the Smart Way

Posted in Coding, On the Intertron by Will on July 20, 2006.

Very good (not so little) article written by Eric Raymond and Rick Moen about How to ask questions the smart way.

It’s aimed at people asking questions about software, but really it could apply to anything which has a good deal of information available online (and that list is rapidly shrinking).

What we are, unapologetically, is hostile to people who seem to be unwilling to think or to do their own homework before asking questions. People like that are time sinks — they take without giving back, and they waste time we could have spent on another question more interesting and another person more worthy of an answer. We call people like this “losers” (and for historical reasons we sometimes spell it “lusers”).

On a side note… anyone remember using the Oasis Library system back in the late 80s, early 90s? The default lookup account was “luser” at
one of the schools I went to. It supposedly stood for “Library User” — but it does make me wonder :)

Databases, Databases and Photography.

Posted in Coding, On the Intertron, Photography by Will on July 20, 2006.

Looks like my web host has been having a few issues with one of the servers they host a database of mine on (specificly, the one that runs this blog and the gallery) - so the site has been unavailable and giving some weird error messages (Why can’t the site deliver up the last copy from cache? C’mon WP-Cache people!)

So, Two interesting articles I’ve found today…

First up is a coding/database article asking why
databases can’t automaticly create indexes
.

This is an idea which I’ve always kind of had in the back of my mind when creating indexes, but never sat down and thought about (tbh, I don’t maintain big databases, so it’s not of critical importance for my current line of work).

It appears its not quite as simple you might think, and there could be some nasty repercussions if this automatic optimiser were allowed to go run rampant through your database.

There should be automaticly functionality in the DBMS though, to enable you to get 80 or 90% of the hard work done immediately, when you’re designing your queries/views/sp’s.
Thought provoking, certainly!

The second article I havn’t read fully yet, but it seems quite good - A Beginners Guide to Manual Photography (i.e: how to use your camera without it set to fully automatic).
It gives good coverage of the basics of what the various major items in a camera do, and how it will impact upon the end result. They give good picture examples of what Apeture, Shutter Speed, and ISO do.

Most of this stuff I know well enough to use the camera… but it’s still useful to know for some.