sfc.exe
- File Path:
C:\WINDOWS\system32\sfc.exe
- Description: System Integrity Check and Repair
Hashes
Type | Hash |
---|---|
MD5 | 5E5EC9C796513D7184DEDAE6B3BDDB00 |
SHA1 | 25CB664712594999FCF168D44EA8C527C6F6FE27 |
SHA256 | 60C693FF38CB19EA9FAAFA76A0CCFCC84196EE6212CA5A6C8B94E970C3E97A09 |
SHA384 | F3AC731E68B2AC8C4FBD5741F5927251E82D48EC8A83DD3F4C16DF561BACD2021C1E983602EACE27F18B38067089E75F |
SHA512 | E930DA09644DE65A0D71CFA56BF34C6858B26F41F2DF38F8620678CAB55929AFEDEB95AD356E28668391F58981328B3310F94473027A7285FBDC352ADA956316 |
SSDEEP | 1536:wLEfcntZpXt6JnpXEiEnCNXRnFi75e7q/NjXQGqtM:wLVrpjnCNXRnFi7cOuGQM |
IMP | AD608491141A21A86DACBE39AF382F27 |
PESHA1 | 9885E265C1BA68442F25D8664B03AEDD7486B9BD |
PE256 | A3F180392EE57223617594282716DFDCB211B6E973F043524B874A50294B7650 |
Runtime Data
Usage (stdout):
Microsoft (R) Windows (R) Resource Checker Version 6.0
Copyright (C) Microsoft Corporation. All rights reserved.
Scans the integrity of all protected system files and replaces incorrect versions with
correct Microsoft versions.
SFC [/SCANNOW] [/VERIFYONLY] [/SCANFILE=<file>] [/VERIFYFILE=<file>]
[/OFFWINDIR=<offline windows directory> /OFFBOOTDIR=<offline boot directory> [/OFFLOGFILE=<log file path>]]
/SCANNOW Scans integrity of all protected system files and repairs files with
problems when possible.
/VERIFYONLY Scans integrity of all protected system files. No repair operation is
performed.
/SCANFILE Scans integrity of the referenced file, repairs file if problems are
identified. Specify full path <file>
/VERIFYFILE Verifies the integrity of the file with full path <file>. No repair
operation is performed.
/OFFBOOTDIR For offline repair, specify the location of the offline boot directory
/OFFWINDIR For offline repair, specify the location of the offline windows directory
/OFFLOGFILE For offline repair, optionally enable logging by specifying a log file path
e.g.
sfc /SCANNOW
sfc /VERIFYFILE=c:\windows\system32\kernel32.dll
sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows
sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows /OFFLOGFILE=c:\log.txt
sfc /VERIFYONLY
Loaded Modules:
Path |
---|
C:\WINDOWS\System32\KERNEL32.DLL |
C:\WINDOWS\System32\KERNELBASE.dll |
C:\WINDOWS\SYSTEM32\ntdll.dll |
C:\WINDOWS\system32\sfc.exe |
Signature
- Status: Signature verified.
- Serial:
33000002ED2C45E4C145CF48440000000002ED
- Thumbprint:
312860D2047EB81F8F58C29FF19ECDB4C634CF6A
- Issuer: CN=Microsoft Windows Production PCA 2011, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
- Subject: CN=Microsoft Windows, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
File Metadata
- Original Filename: sfc.exe.mui
- Product Name: Microsoft Windows Operating System
- Company Name: Microsoft Corporation
- File Version: 10.0.22000.1 (WinBuild.160101.0800)
- Product Version: 10.0.22000.1
- Language: English (United States)
- Legal Copyright: Microsoft Corporation. All rights reserved.
- Machine Type: 64-bit
File Scan
- VirusTotal Detections: 0/74
- VirusTotal Link: https://www.virustotal.com/gui/file/60c693ff38cb19ea9faafa76a0ccfcc84196ee6212ca5a6c8b94e970c3e97a09/detection
Possible Misuse
The following table contains possible examples of sfc.exe
being misused. While sfc.exe
is not inherently malicious, its legitimate functionality can be abused for malicious purposes.
Source | Source File | Example | License |
---|---|---|---|
signature-base | apt_poisonivy.yar | $s4 = “\sfc.exe” fullword ascii /* score: ‘11.005’ */ | CC BY-NC 4.0 |
Additional Info*
*The information below is copied from MicrosoftDocs, which is maintained by Microsoft. Available under CC BY 4.0 license.
sfc
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012
Scans and verifies the integrity of all protected system files and replaces incorrect versions with correct versions. If this command discovers that a protected file has been overwritten, it retrieves the correct version of the file from the systemroot\system32\dllcache folder, and then replaces the incorrect file.
[!IMPORTANT] You must be logged on as a member of the Administrators group to run this command.
Syntax
sfc [/scannow] [/verifyonly] [/scanfile=<file>] [/verifyfile=<file>] [/offwindir=<offline windows directory> /offbootdir=<offline boot directory>]
Parameters
Parameter | Description |
---|---|
/scannow | Scans the integrity of all protected system files and repairs files with problems when possible. |
/verifyonly | Scans the integrity of all protected system files, without performing repairs. |
/scanfile <file> |
Scans the integrity of the specified file (full path and filename) and attempts to repair any problems if they’re detected. |
/verifyfile <file> |
Verifies the integrity of the specified file (full path and filename), without performing repairs. |
/offwindir <offline windows directory> |
Specifies the location of the offline windows directory, for offline repair. |
/offbootdir <offline boot directory> |
Specifies the location of the offline boot directory for offline repair. |
/? | Displays help at the command prompt. |
Examples
To verify the kernel32.dll file, type:
sfc /verifyfile=c:\windows\system32\kernel32.dll
To set up the offline repair of the kernel32.dll file with an offline boot directory set to D:* and an offline windows directory set to *D:\windows, type:
sfc /scanfile=D:\windows\system32\kernel32.dll /offbootdir=D:\ /offwindir=d:\windows
Additional References
MIT License. Copyright (c) 2020-2021 Strontic.