INCLUDE_DATA

Archive for September, 2008

OOO Flame

Monday, September 15th, 2008

Apologies for not posting recently. I’ve been pretty busy (and still am) with a couple of new projects that require a lot of PR work from me.

Anyways, recently, there was an OOO flame on the SecurityFocus Pen-Test mailing list. Following that, a “real life scenario” was shared by Jon R. Kibler, CTO of Advanced Systems Engineering Technology, Inc.

I was teaching a pen-test bootcamp several years ago. One of the students (who I will call ‘Joe’) pooh-poohed the whole OOO message issue. He even indicated that he used them all the time, that they were harmless, and they saved him from getting calls to his cell phone at roaming rates when he was out of town. (This was back in the days before nationwide calling plans.)

I then sent Joe a test email message at his work email address. I got back an OOO message saying that he would be out of the office for two weeks of training and would only have very limited email at night. His
signature line showed that he was the dep-CSO for his organization.

I then displayed the email for the whole class to discuss. Next, I proposed that we demonstrate why OOO messages are an issue.

What I proposed was to social engineer the help desk into providing sensitive information. Rather arrogantly, he said, “Sure, why not? Those guys are well trained and would never fall for anything you could contrive.” We then got permission (in writing) from the CIO, the CSO, and the organization’s legal department to do the social engineering attack.

Next, I wrote up a script for a secretary (who I will call ‘Sue’) at that ed center to use to call the organization’s help desk. It basically went as follows:

Sue: “Hi, I’m Sue with abc training company. One of your employees, Joe, is taking a security course from us and he forgot that he was supposed to bring the /etc/shadow file from the user file store server. He needs it to use in class to test password cracking. He asked that you please gzip it and email it to him.”

Help Desk: “Okay, but I will have to check with his manager first.”

Sue: “Oh, Joe said that if you needed to verify that he was taking a course from us, just send him an email and the OOO reply it will have everything you need to know.”

Help Desk: “Alright, give me a minute. (Pause) Okay, I guess this has everything I need. But, it says that he has limited email access; does he want it sent to his office email address?”

(This just shows that help desks are trained to be helpful!!! Despite continual security awareness training, the possibility that this might be social engineering attack never even occurred to this guy!)

Sue: “No, I was just about to tell you that he asked to have you it send to his Hotmail address, which is: joe….@hotmail.com.”

Help Desk: “Okay, no problem, he should have it in about 5 minutes.”

Needless to say, we had just created the hotmail account a few minutes prior to the phone call.

In just a couple of minutes, we owned the shadow file from the file server where all user accounts have their data stored. In other words, we now pwned the passwords for every one of his users.

After that b-slap with a clue-by-4, Joe started singing a different tune.

Looks like an interesting story, except that I find a number of seeming loopholes in it. Or perhaps it’s just my bad understanding.

- The helpdesk operator knows how to operate Linux and retrieve the /etc/shadow file
- The helpdesk operator has access to the /etc/shadow file =O
- I don’t see any link between “having limited email at night” and the need to send it to a different email account.

Maybe it’s just me. Let’s see how the conversation evolves…

Deleting Files

Monday, September 1st, 2008

Yesterday, I read at Hacking Truths, an article entitled Delete an “UnDeletable” File. I largely disagree with the post and am thus making a post on how to delete most “undeletable” files on Windows systems.

Die, file, DIE!!!

Access Denied
Cannot delete file: Cannot read from soruce file or disk
There has been a sharing violation
The source or desination file may be in use
The file is in use by another program or user
Make sure the disk is not full or write-protected and that the file is not currently in use

Usually, these error messages occur when another process is accessing the file, with or without you knowing it. However, Windows does have its false-detection times. Below are some methods that may assist you -

1. AUTOEXEC.BAT is your best friend

Windows, by default, includes a file called AUTOEXEC.BAT in your Windows root drive (C:\ by default). The .BAT extension refers to a MSDOS batch file and the file is executed right before a user logs on. In prior versions of Windows (Windows 95, Windows 98, Windows ME) executed AUTOEXEC.BAT right after Windows has booted up and CONFIG.SYS loaded. It is usually used to set environment variables and initiate drivers. This means that the file is run before any process starts.

Simply edit your AUTOEXEC.BAT file and include, on the first line -

del /s/f/q [Drive]:\[Folder]\[File].[Extension]

For example,

del /s/f/q C:\Unwanted\File.doc

Save it and restart your computer afterwards.

2. Processed misery

If you don’t feel like restarting your computer, you can, of course, attempt to identify the source of your misery and terminate it. ;)

Enabler is a tool whereby all processes running in the background are shown. It detects all dialogs/windows that are displayed and hidden and allows you to terminate them. If you have good idea of what process is causing your file to be “undeletable”, this might be your solution.

Unlocker is a tool which “unlocks” a file and avails it for deletion.  It is much more detailed and suited for file deletion than Enabler, showing you all the processes that are currently using your file, then allowing you to delete the file and even unload a DLL. Highly recommended!

Of course, if the above two methods are too elaborated for your liking, there’s always the Windows Task Manager and the option of ending explorer.exe. That might work for you too. :)

3. Being attached is tricky

This is something which I have learnt in my experiences of dealing with viruses and their un-terminate-able status. Apparently, processes can be “attached” to another. This particular virus I was trying to get rid of was attached to winlogon.exe, a SYSTEM process which cannot be terminated.

To solve this, use Process Explorer from Winternals (Microsoft). You can suspend the process in question, detatch the malicious bugger, terminate it and resume the process afterwards. Nifty, eh?