@port139 Blog

基本的にはデジタル・フォレンジックの技術について取り扱っていますが、記載内容には高確率で誤りが含まれる可能性があります。

Windows ID 4648 "A logon was attempted using explicit credentials"

Note:I translated Japanese into English using Google Translate.
Thank you, Google.

Summary:

  • Check when the ID 4648 occurs.
  • Runas,Overpass-the-Hash,NET USE,Task Scheduler(schtasks),PsExec,WMIC,PowerShell,Remote Desktop(mstsc)
  • If authentication fails, it differs depending on whether you specify a computer name or IP address.
  • If you specify an IP address instead of a computer name, the contents of "Additional Information" will differ.

f:id:hideakii:20190317093403p:plain

----------

What kind of user operation is event ID 4648 recorded?

The conditions for recording event ID 4648 are described by Microsoft at the following URL.

4648(S) A logon was attempted using explicit credentials. (Windows 10) | Microsoft Docs

Event Description:

This event is generated when a process attempts an account logon by explicitly specifying that account’s credentials.

This most commonly occurs in batch-type configurations such as scheduled tasks, or when using the “RUNAS” command.

I would like to try some of the operations described above.

logged on to PC1 with Example\administrator. Confirm the ID 4648 by switching from the administrator account to the Alice account.

f:id:hideakii:20190313204957p:plain

(1)Runas

First, change the account to Alice with the Runas command. (Alice account is a user of domain. Also, Alice account is included in Domain Admins.)

f:id:hideakii:20190313205554p:plain

Entered Alice's password and RunAs succeeded.

f:id:hideakii:20190313205639p:plain

ID 4648 is recorded in the security log.

f:id:hideakii:20190313205908p:plain

What happens if the authentication fails?

f:id:hideakii:20190316070202p:plain

If the Runas command was not successful, I could not find ID 4648 in the security log. 

(2)Overpass-the-Hash

Execute Overpass-the-Hash using Alice's NTLM hash value. ID 4648 has not occurred in this operation.

f:id:hideakii:20190313210415p:plain

Execute the DIR command on the PtH CMD. By this operation, ID 4648 is recorded in the security log of PC1.

f:id:hideakii:20190313210945p:plain

f:id:hideakii:20190313211224p:plain

Connect to DC1 using the wrong hash value.

f:id:hideakii:20190316073433p:plain

DIR command failed, but the ID 4648 was recorded.

f:id:hideakii:20190316073634p:plain

(3)NET USE

I started Administrator's CMD newly and executed the NET USE command. Specify Alice account with /user option. (The command line specifies the computer name. Kerberos authentication is used.)

ID 4648 is recorded in the security log of PC1.

f:id:hideakii:20190313211757p:plain

f:id:hideakii:20190313212234p:plain

If the command was not successful, I could not find ID 4648 in the security log.

However, if you specify an IP address other than computer name, ID 4648 will be recorded.

f:id:hideakii:20190316072607p:plain

(4)Task Scheduler(schtasks)

Use the schtasks command to register a job on the remote system.
(I got an error a little ;-)

f:id:hideakii:20190313213922p:plain

ID 4648 is recorded in the security log of PC1. The contents of "Additional Information" is "host/DC1".

f:id:hideakii:20190313214031p:plain

If the command was not successful, I could not find ID 4648 in the security log.

f:id:hideakii:20190316070814p:plain

If you specify an IP address and authentication fails, ID 4648 will be recorded.

f:id:hideakii:20190316075426p:plain

f:id:hideakii:20190316075437p:plain

(5)PsExec

Execute ipconfig command on DC1 using PsExec command.  Specify Alice account with -u option.

f:id:hideakii:20190314205845p:plain

ID 4648 is recorded in the security log of PC1. The contents of "Additional Information" is "cifs/DC1". 

f:id:hideakii:20190314205730p:plain

If the command was not successful, I could not find ID 4648 in the security log.

f:id:hideakii:20190316071029p:plain

If you specify an IP address and authentication fails, ID 4648 will be recorded.

f:id:hideakii:20190316074146p:plain

(6)WMIC

Execute ipconfig command on DC1 using WMIC command.  Specify Alice account with /user option. 

f:id:hideakii:20190314211013p:plain

ID 4648 is recorded in the security log of PC1. The contents of "Additional Information" is "RestrictedKrbHost/DC1". 

f:id:hideakii:20190314211117p:plain

f:id:hideakii:20190318213847p:plain

If the command was not successful, I could not find ID 4648 in the security log.

f:id:hideakii:20190316071401p:plain

If you specify an IP address and authentication fails, ID 4648 was not recorded.

f:id:hideakii:20190316075016p:plain

(7)PowerShell

Execute Powershell and Enter-PSSession.  Specify Alice account with -Credential option. 

f:id:hideakii:20190314211628p:plain

ID 4648 is recorded in the security log of PC1. The contents of "Additional Information" is "HTTP/DC1". 

f:id:hideakii:20190314211717p:plain

If the command was not successful, I could not find ID 4648 in the security log.

f:id:hideakii:20190316071545p:plain

If you specify an IP address and authentication fails, ID 4648 was not recorded.

f:id:hideakii:20190316074559p:plain

(8)Remote Desktop(mstsc)

Execute mstsc command. Specify Alice account.
(NLA is enabled on DC1.)

f:id:hideakii:20190314212551p:plain

ID 4648 is recorded in the security log of PC1. The contents of "Additional Information" is "TERMSRV/dc1". 

f:id:hideakii:20190314212649p:plain

If the connection was not successful, I could not find ID 4648 in the security log.

f:id:hideakii:20190316071928p:plain

If you specified an IP address as the computer name, ID 4648 was recorded in the security log even if authentication failed.

f:id:hideakii:20190316072310p:plain

f:id:hideakii:20190316072236p:plain

The details of RDP and ID 4648 are described in "Event Log Analysis" of IIJ-SECT.

It also explains the case where ID 4648 is not recorded when using "Restricted Admin mode". Please refer to the following URL.

https://sect.iij.ad.jp/d/2018/05/044132/training_material_sample_for_eventlog_analysis.pdf

 

Verification environment: Windows Server 2019 1809, Windows 10 1809, Time zone UTC

Reference URL:

docs.microsoft.com

blog.menasec.net

 

https://sect.iij.ad.jp/d/2018/05/044132/training_material_sample_for_eventlog_analysis.pdf

f:id:hideakii:20190313203256j:plain