Hardware/Software
. existing HP notebook with Win7 32bit
Symptoms
. to diagnose a virus attack, it helps to know, to the second, when a file
appears. With only a sorted ADMIN DIR output B 4 the restore, it could
only log to the minute. Tho I eventually saw the files it created, seconds
are more accurate in tracking the events THAT AREN’T SUPPRESSED!
Attempts to address
. many; …
… DIR; looked in help, tried /t? w/DIRCMD, searched around; nothing.
… explorer/prop just said “within x hours”, eventually (days/weeks?)
showing the second. HARDLY USEFUL AT THE TIME!!
… powershell.exe looked promising:
1. Get-ChildItem -Path C:xxx -Recurse -Include *.pad >c:DADtempPWR.txt
Directory: C:xxx
Mode LastWriteTime Length Name
—- ————- —— —-
-a— 11/2/2012 7:19 AM 83023306 netdislw.pad
This infected possible data collection file is apx 99% trailing NULLS (00h).
…… unfortunately, when I specify just the root DIR, it gets many
‘denied’ msgs, even under ADMIN, & quits B 4 it gives the answer. Perhaps
there’s some limit somewhere that could be increased to allow an answer.
…… further, the date doesn’t line up (so can’t use sort), is not
military time (sort again) and no seconds, and I really won’t know what
I’m looking for unless/until it happens. Perhaps a script could be
modified/created somehow to do this and print a fixed-column TOD w/seconds.
…… also, if I make some kind of error (ie: looking for *.xyz), it just
says nothing, even w/no REDIR O/P; no clue on what to fix. Even running as
ADMIN fails. Perhaps it says nothing because there are no DSNs.
2. (Get-Item C:xxxnetdislw.pad).lastwritetime.timeofday
Days : 0
Hours : 7
Minutes : 19
Seconds : 30
Milliseconds : 872
…… at least HERE it shows the seconds & more, so, if the DSN still
exists after running rstrui.exe, it could be used. I used this to
verify my new program (below).
Solution
FINALLY addressed it after an all-nighter !!!!!!
I wrote an MASM assembler program using INT21h/4E&Fh with an IBM
mainframe/server flavor (a la VSAM) to chain, then swap multiple “active”
DTA requests per DIR (like RPLs after POINTs), looking for DSNs/DIRs having a
current date. Using CMSort.exe w/the thousand or so I get daily, I make a
.txt file, for example, sorted to the descending second, which runs surprisingly
quick (<1min tho very CPU-intensive w/many PROCMON entries) against the root
drive:
2012/12/17 14:57:22 0000015181 CMSORT.BAT C:DADCMSORT*.*
There is an architected 2-second max discrepency since the # of seconds
provided is / 2. However, that's 30x closer than DIR can provide.
Further, in some instances, for some reason, I'm only provided a CREATE TOD,
as opposed to the typical TIME-LAST-MODIFIED. Finally, by sorting seconds
(or any column), I can find any "invalid" (ie: "already infected") values.
I'd like to hear any other solutions anyone else found for this issue…