@night 1803 access accessdata active directory admissibility ads aduc aim aix ajax alex levinson alissa torres amcache analysis anjp anssi answer key antiforensics apfs appcompat appcompatflags applocker april fools argparse arman gungor arsenal artifact extractor attachments attacker tools austin automating automation awards aws azure azuread back to basics backstage bam base16 best finds beta bias bitcoin bitlocker blackbag blackberry enterprise server blackhat blacklight blade blanche lagny book book review brute force bsides bulk extractor c2 carved carving case ccdc cd burning ceic cfp challenge champlain chat logs Christmas Christmas eve chrome cit client info cloud forensics command line computer forensics computername conference schedule consulting contest cool tools. tips copy and paste coreanalytics cortana court approved credentials cryptocurrency ctf cti summit cut and paste cyberbox Daily Blog dbir deep freeze defcon defender ata deviceclasses dfa dfir dfir automation dfir exposed dfir in 120 seconds dfir indepth dfir review dfir summit dfir wizard dfrws dfvfs dingo stole my baby directories directory dirty file system disablelastaccess discount download dropbox dvd burning e01 elastic search elcomsoft elevated email recovery email searching emdmgmt Encyclopedia Forensica enfuse eric huber es eshandler esxi evalexperience event log event logs evidence execution exfat ext3 ext4 extended mapi external drives f-response factory access mode false positive fat fde firefox for408 for498 for500 for526 for668 forenisc toolkit forensic 4cast forensic lunch forensic soundness forensic tips fraud free fsutil ftk ftk 2 full disk encryption future gcfe gcp github go bag golden ticket google gsuite guardduty gui hackthebox hal pomeranz hashlib hfs honeypot honeypots how does it work how i use it how to howto IE10 imaging incident response indepth information theft infosec pro guide intern internetusername Interview ios ip theft iphone ir itunes encrypted backups jailbreak jeddah jessica hyde joe sylve journals json jump lists kali kape kevin stokes kibana knowledgec korman labs lance mueller last access last logon lateral movement leanpub libtsk libvshadow linux linux forensics linux-3g live systems lnk files log analysis log2timeline login logs london love notes lznt1 mac mac_apt macmini magnet magnet user summit magnet virtual summit mari degrazia mathias fuchs md viewer memorial day memory forensics metaspike mft mftecmd mhn microsoft milestones mimikatz missing features mlocate mobile devices mojave mount mtp multiboot usb mus mus 2019 mus2019 nccdc netanalysis netbios netflow new book new years eve new years resolutions nominations nosql notifications ntfs ntfsdisablelastaccessupdate nuc nw3c objectid offensive forensics office office 2016 office 365 oleg skilkin osx outlook outlook web access owa packetsled paladin pancake viewer path specification pdf perl persistence pfic plists posix powerforensics powerpoint powershell prefetch psexec py2exe pyewf pyinstaller python pytsk rallysecurity raw images rdp re-c re-creation testing reader project recipes recon recursive hashing recycle bin redteam regipy registry registry explorer registry recon regripper remote research reverse engineering rhel rootless runas sample images san diego SANS sans dfir summit sarah edwards saturday Saturday reading sbe sccm scrap files search server 2008 server 2008 r2 server 2012 server 2019 setmace setupapi sha1 shadowkit shadows shell items shellbags shimcache silv3rhorn skull canyon skype slow down smb solution solution saturday sop speed sponsors sqlite srum ssd stage 1 stories storport sunday funday swgde syscache system t2 takeout telemetry temporary files test kitchen thanksgiving threat intel timeline times timestamps timestomp timezone tool tool testing training transaction logs triage triforce truecrypt tsk tun naung tutorial typed paths typedpaths uac unc understanding unicorn unified logs unread updates usb usb detective usbstor user assist userassist usnjrnl validation vhd video video blog videopost vlive vmug vmware volatility vote vss web2.0 webcast webinar webmail weekend reading what are you missing what did they take what don't we know What I wish I knew whitfield windows windows 10 windows 2008 windows 7 windows forensics windows server winfe winfe lite winscp wmi write head xboot xfs xways yarp yogesh zimmerman zone.identifier

Daily Blog #296: Domain lastlogin timestamps and tracking recon

Hello Reader,
         Normally I would save something like this for Saturday Reading but the following two articles brought enough interesting thoughts that they deserved their own post. The first is from 2009 and if you are doing any work within an Active Directory environment deserves your attention, read it here:
http://blogs.technet.com/b/askds/archive/2009/04/15/the-lastlogontimestamp-attribute-what-it-was-designed-for-and-how-it-works.aspx

What's important to take away from this article is that Active Directory since the introduction of Windows 2003 Domain Function Level provides a synchronized timestamp across domain servers called 'lastlogontimestamp'. This first of the two articles we will talk about today is important if you are interested in two things:

1. When the last time all users interacted with the domain, the article specifies levels of interaction as interactive, network, and service logins. However as you'll see in the second article that isn't exactly true. However what is going to be true is that this timestamp is sync'd across all domain controllers within the domain.
2. That the timestamp itself does not reflect the actual true last logon time of a user. It just reflects if that user account has logged in within the last 14 days.

The second part may seem like it makes the first part and its caveat less useful but I would say to you don't give up on it just yet. Take a look at the second article linked here:
http://blogs.technet.com/b/askpfeplat/archive/2014/04/14/how-lastlogontimestamp-is-updated-with-kerberos-s4u2self.aspx

where we learn that not only is the timestamp synchronized across domain controllers but applications that are trying to query across the domain count towards this logon event. So why is this useful to us? What should you taken away from this?

1. If an attacker or a rogue insider is trying to gather intelligence across you enterprise by querying different groups, service accounts and the like that it will in fact trigger a logon event that will change the lastlogon timestamp. This means that if you quickly preserve these timestamps today you can find the last logon values of service accounts that don't do domain logins. Then moving forward if that timestamp changes you can act on it to determine who is suddenly enumerating information about your domain.
2. That if you extended auditing rules setup, as mentioned in the second article, you can catch which account is actually going out and enumerating. The enumeration does not require that the account in question has the credentials of the resource being queried and does not actually login into the account. Instead its just a by product of how the querying is being done within the api itself.

So there you go, Internal IR people go petition IT to change your Domains by adding additional event logging and preserving the current state of your lastlogon timestamps now to take advantage of this to its full extent.
Consultants start querying this across the domain to start getting additional intelligence regarding when recon may have taken place. If you start noticing that a large number of old service accounts and unused accounts all have recent last logon timestamps that should be a clue that this timestamp may relate to some domain recon within the environment.

Let me know your thoughts!

Post a Comment

[blogger][disqus][facebook][spotim]

Author Name

Contact Form

Name

Email *

Message *

Powered by Blogger.