Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many errors when install #170

Open
wants to merge 484 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
484 commits
Select commit Hold shift + click to select a range
be53ff1
Add shadowprotect exclusion
ion-storm Mar 15, 2018
9419382
add additional exclusions
ion-storm Mar 15, 2018
b3db166
exclusions
ion-storm Mar 15, 2018
1323a46
add additional legit exclusions
ion-storm Mar 15, 2018
6880c64
add labtech from paccess
ion-storm Mar 15, 2018
daaa5dd
add trusteer rapport exclusion
ion-storm Mar 15, 2018
c54a65c
adjust wmiprvse.exe
ion-storm Mar 15, 2018
d2a3079
add spooler exclusions to paccess
ion-storm Mar 15, 2018
d0f022f
Big registry autorun additions
ion-storm Mar 19, 2018
f76159e
DOMStorage hijack detection is too costly for now until better target…
ion-storm Mar 19, 2018
7d8f595
add ip-api detection
ion-storm Mar 19, 2018
fda483e
add additional file created fields.
ion-storm Apr 11, 2018
3d228b0
Persistence using GlobalFlags in Image File Execution Options: [ http…
ion-storm Apr 11, 2018
00ae987
Updates from @olafhartong's config's (great work btw)
ion-storm Apr 14, 2018
bc11b84
change wmi monitoring to exclude
ion-storm Apr 16, 2018
a7b71eb
complements of @subTree for noticing this mistake, reverting noise re…
ion-storm Apr 26, 2018
3b95446
added samsam ransomware file names
ion-storm Jun 27, 2018
ef9cc7b
add nable exceptions
ion-storm Jul 1, 2018
777404d
add exclusions
ion-storm Jul 3, 2018
813277a
Update sysmon auto-installer for 64bit svc change
ion-storm Jul 4, 2018
cafb2b1
New Baseline
ion-storm Jul 6, 2018
76bc020
Big update, more todo, stay tuned
ion-storm Jul 7, 2018
8cf8291
Update Mitre Rules.
ion-storm Jul 9, 2018
492a2fe
update
ion-storm Jul 9, 2018
c26b190
Merge branch 'next'
ion-storm Jul 9, 2018
6325b5a
Update for Sysmon 8.0
ion-storm Jul 9, 2018
64502ee
Merge branch 'master' into develop
ion-storm Jul 9, 2018
a3ce85f
Fix syntax errors
ion-storm Jul 9, 2018
b97604b
Remove testing config
ion-storm Jul 10, 2018
0d14c6a
readme
ion-storm Jul 10, 2018
63c473f
readme
ion-storm Jul 10, 2018
906cf5a
add N-Central exclusion
ion-storm Jul 10, 2018
7295667
add more exclusions
ion-storm Jul 10, 2018
30f451c
N-Able Exclusions
ion-storm Jul 10, 2018
e4404f0
sysmon exclusions
ion-storm Jul 10, 2018
b6b4ecc
more exclusions
ion-storm Jul 10, 2018
e6173c0
exclusions
ion-storm Jul 10, 2018
4f5f3e1
exclude logon scripts
ion-storm Jul 10, 2018
10e3746
Organize into Tactic's & Techniques
ion-storm Jul 10, 2018
cfca001
add some mitre registry identifiers
ion-storm Jul 10, 2018
54b708d
misc updates
ion-storm Jul 10, 2018
6736edd
at.exe fix
ion-storm Jul 10, 2018
c15c830
fix cls
ion-storm Jul 10, 2018
cdbe098
slight tweak for cmd.exe
ion-storm Jul 10, 2018
b04ccf5
net.exe update
ion-storm Jul 10, 2018
26c8234
end with --> is
ion-storm Jul 10, 2018
dd50ab5
save some cpu cycles with more "is"
ion-storm Jul 10, 2018
b925dae
add command line exclusion
ion-storm Jul 11, 2018
c168824
app exclusions
ion-storm Jul 11, 2018
7bdcd32
exclude taskeng.exe, we already detect task creation, task execution …
ion-storm Jul 11, 2018
61db4aa
Add net.exe exclusions and command line additions, net use is too noisy.
ion-storm Jul 11, 2018
66adb24
let no longer flag linode
ion-storm Jul 11, 2018
9fd2df6
add T1055
ion-storm Jul 11, 2018
0a65431
Autorun exclusions
ion-storm Jul 11, 2018
09173b2
excludes
ion-storm Jul 11, 2018
e629916
revert is change
ion-storm Jul 11, 2018
472e0a3
Merge remote-tracking branch 'origin/develop' into develop
ion-storm Jul 11, 2018
78149ff
fix git f-up
ion-storm Jul 11, 2018
4e14b21
bring back end with for now
ion-storm Jul 11, 2018
a064ab1
remove graylog stuff
ion-storm Jul 12, 2018
4751554
finish gl removal
ion-storm Jul 12, 2018
4bdc1ce
ADD: Ransomware File detection & Alerting
ion-storm Jul 12, 2018
b64fe9a
add samsam detection
ion-storm Jul 12, 2018
f6dfbeb
Add Crypto Mining pool detection
ion-storm Jul 12, 2018
6a76cf7
add exclusions
ion-storm Jul 12, 2018
7ea5f64
add Hack command line events/Privilege Escalation
ion-storm Jul 12, 2018
0f76fed
Update version
ion-storm Jul 12, 2018
5837fd3
too much noise, however will restore non-exe network connections with…
ion-storm Jul 12, 2018
da1e596
include unknown process detection
ion-storm Jul 12, 2018
18cd82d
exclude dns lookups
ion-storm Jul 12, 2018
6080f87
exclude inetcache from ads
ion-storm Jul 12, 2018
4090739
more ie cache spam
ion-storm Jul 12, 2018
53e7cc5
exclude ff spam
ion-storm Jul 12, 2018
4f59a11
Add Space in between = and http to allow event viewer to create http …
ion-storm Jul 12, 2018
eb1d876
more updates
ion-storm Jul 13, 2018
cf08083
end with at.exe needs end with \at.exe to not flag apps like acrobat
ion-storm Jul 13, 2018
64593be
Windows firewall modifications
ion-storm Jul 13, 2018
c08faac
ransomware detection false positive removal
ion-storm Jul 13, 2018
45571e5
exclusions and tweaks.
ion-storm Jul 13, 2018
3311184
exclude domain login scripts
ion-storm Jul 13, 2018
535b3b4
add unknown process detection & updates notes/comments
ion-storm Jul 14, 2018
0eb2d75
Update comments, remove excess comments
ion-storm Jul 14, 2018
bcc71aa
Merge branch 'develop'
ion-storm Jul 14, 2018
df62533
Removed Custom Exclusions for Labtech & Solarwinds N-Central for mast…
ion-storm Jul 14, 2018
335bf09
Update alerts
ion-storm Jul 15, 2018
0809966
revert, ref: https://oddvar.moe/2018/04/27/gpscript-exe-another-lolbi…
ion-storm Jul 15, 2018
bac76c1
ignore chrome noise
ion-storm Jul 16, 2018
1c3a63d
Update alerts
ion-storm Jul 15, 2018
fe5d06e
revert, ref: https://oddvar.moe/2018/04/27/gpscript-exe-another-lolbi…
ion-storm Jul 15, 2018
1a9a4ba
ignore chrome noise
ion-storm Jul 16, 2018
093e84a
Detect Remote Desktop Shadow connection
ion-storm Jul 17, 2018
f1922b4
add MitreRef=T1050,Technique=New Service,Tactic=Persistence/Privilege…
ion-storm Jul 18, 2018
a677e63
add detection for Cobalt Strike's payload using netsh.exe helper DLLs
ion-storm Jul 18, 2018
9c263c7
add "MitreRef=T1099,Technique=Timestomp,Tactic=Defense Evasion,Alert=…
ion-storm Jul 18, 2018
b788031
Enable Alerting on more autoruns, and add MitreRef=T1209,Technique=Ti…
ion-storm Jul 18, 2018
c40e20d
update installers
ion-storm Aug 13, 2018
0b33e07
remove space
ion-storm Aug 13, 2018
75d53da
Push updates from @olafhartong for pipe events
ion-storm Aug 15, 2018
d2f9872
Big update/alerting/cleanup etc
ion-storm Aug 21, 2018
ba0d6d0
remove incorrect url not reflecting github changes
ion-storm Aug 21, 2018
00fc760
updates
ion-storm Aug 24, 2018
5108626
add some mitre references
ion-storm Aug 31, 2018
984e2f5
add additional locations for file creation
ion-storm Aug 31, 2018
0cde79d
merge in a few changes and cleanup
ion-storm Dec 14, 2018
0f2e916
Merge branch 'develop'
ion-storm Dec 14, 2018
0e4d97b
readme update regarding Sysmon 8.02 breaking changes. This config ne…
ion-storm Dec 14, 2018
af22386
optimizations, stay on 8.00
ion-storm Dec 14, 2018
18b3b45
more optimizations
ion-storm Dec 14, 2018
08ddc0c
Update README.md
ion-storm Jan 25, 2019
c7c3627
Merge in Sysmon ATT&CK Changes
Sep 1, 2022
0cae025
Add Description, Forensic, CVE & False Positive Tag Descriptions
Sep 1, 2022
bb507c2
Update Readme
Sep 1, 2022
eb931cf
Update Sysmon installer.
Sep 1, 2022
6adec6b
fixed old updater, will convert to powershell in future updates.
Sep 1, 2022
173af9b
Add some missing Tactics, a few new detections.
Sep 6, 2022
7f2d1ae
Misc Updates
Sep 7, 2022
04a0f1e
Improved COM Object Hijack Detection
Sep 8, 2022
c886b23
add a few new detections
Sep 8, 2022
852190d
Add more advanced SilentProcessExit Detection targetting DRWORD's and…
Sep 9, 2022
e29bdb2
add RuntimeExceptionHelperModules detection
Sep 9, 2022
347778f
Add suspicious conhost parent process detection
Sep 9, 2022
7a266eb
Detection Improvements, with added Parent/Child Relationship Monitori…
Sep 9, 2022
32694c0
Add new detections, merge in some of Florian's work, added Author tag…
Sep 13, 2022
e8f9516
remove testing rule
Sep 13, 2022
eff3c87
Push noise reduction and additional detection rules.
Sep 14, 2022
8e3aac5
Add more Forensic monitoring rules, add rpc execution named pipes and…
Sep 14, 2022
0ab2880
removing services from named pipe exclusion list as this can spawn pi…
Sep 14, 2022
75a9293
Improve PoisonTap rule to detect rndis drivers loaded via Details.
Sep 14, 2022
9fa170d
remove services whitelist
Sep 14, 2022
234662c
Add UsageLog/ETW Log tampering rules
Sep 15, 2022
3ca5701
Updated Level 0 background events
cyberkryption Sep 18, 2022
234fe3d
Update sysmonconfig-cyberkryption.xml
cyberkryption Sep 23, 2022
2cdf142
Merge pull request #9 from cyberkryption/master
ion-storm Sep 23, 2022
7ec3de1
merge in changes from cyberkryption
Sep 23, 2022
2c4d896
Fix dupe ='s
Sep 23, 2022
9f7e99a
Revert "merge in changes from cyberkryption"
Sep 23, 2022
ca5c12e
Renove
Sep 23, 2022
42fcf2a
Delete sysmonconfig-cyberkryption.xml
cyberkryption Sep 25, 2022
fcbf2b8
Merge branch 'ion-storm:master' into master
cyberkryption Sep 25, 2022
56e1b07
Update sysmonconfig-export.xml
cyberkryption Sep 25, 2022
7f6cfdf
Updated configuration with rulename field changes
Sep 26, 2022
de39e1a
Merge branch 'pulls/366905285/12'
Sep 26, 2022
f77cc8b
Add Impacket PSExec.py named pipe detection.
Sep 26, 2022
246d73d
Cobalt Strike detection improvements
Sep 26, 2022
35bb328
remove msdt command line options that are not always needed.
Sep 26, 2022
3919a29
Fixed a few typo's, thanks to VadimKutia and PiRomant
Sep 26, 2022
bcf69ff
Add Unsigned GAC Detection and detection of netsh doh encryption
Sep 26, 2022
b544dd6
Add some qbot/qakbot detections with experimental logoncli.dll monito…
Sep 27, 2022
1ca9915
FileBlockExecutable was blocking windows updates due to an issue with…
Sep 29, 2022
553b065
Merge in @frack113's Event Log tampering rule from the Sigma Project.
Sep 29, 2022
5bfe473
Fix tagging for safe paths
Sep 29, 2022
da1e381
Push Updates to Detect Common IOC's found in September 2022 Exchange …
Sep 30, 2022
97b60de
Living in the future lol, fixed the date
Sep 30, 2022
93cb04e
Push update to include Certutil.exe for w3wp.exe subprocesses
Sep 30, 2022
45430a2
Update to Break out IIS Rule from Web Server Exploitation rule to be …
Sep 30, 2022
31c69e3
Improve detection targeting by utilizing image filter rather than con…
Sep 30, 2022
894a4e4
Per @VadimKutia kaspersky AV noise reduction exclusions added. - Than…
Sep 30, 2022
01b73ea
Per @VadimKutia added Opera to browser based detections, thank you fo…
Sep 30, 2022
4be2ec9
Detection accuracy improvement, matching "image" instead of "is", "is…
Sep 30, 2022
b4aeaa9
Target image instead of "contains" round 2
Sep 30, 2022
feabcbc
"end with" -> "image" where applicable for performance/detection impr…
Sep 30, 2022
390ec8f
Split out System.Management.Automation Command line detection to new …
Sep 30, 2022
1cd834a
Block binaries from writing to C:\PerfLogs, add additional detections…
Sep 30, 2022
9baf036
Per @VadimKutia ESET noise reduction Exclusions added - ty!
Sep 30, 2022
2184f79
Fix is any->contains any
Sep 30, 2022
98f9b5e
Comment Cleanup, use name= tags and Author=key value's for attributio…
Oct 3, 2022
adb10ce
Update MITRE ATT&CK tagging round 1.
Oct 3, 2022
cfb24e6
Correct MITRE Tagging for Exploit Public-Facing Applications
Oct 3, 2022
e8898f7
Merge in Sigma Desktop Central CVE from Florian Roth.
Oct 3, 2022
a28488f
Added MITRE ATT&CK Datasource Tag: DS= and tagged most rules to ident…
Oct 3, 2022
2231a8d
Add Missing MITRE Datasources
Oct 3, 2022
7589df6
Add Contribution Guidelines text.
Oct 3, 2022
a917402
Fix Copy/paste after contributor guidelines edit :P
Oct 3, 2022
c77e3c9
Re-enable explorer.exe parentimage logging
Oct 4, 2022
30302ea
Implement FileBlockShredding Protection for C:\Users, event log direc…
Oct 4, 2022
2bfaa05
MITRE Tagging and SIEM Alerting of Data Destruction/File Shred protec…
Oct 4, 2022
867b82f
Tag File Shred Protection with File: File Modification datasource, as…
Oct 4, 2022
3b71ab5
Fix alert text for $mft file
Oct 4, 2022
f10e539
Protect common Office extensions, pdf's, archive files and more.
Oct 4, 2022
828dc04
Protect shredding of common Disk images from Virtual infrastructure, …
Oct 4, 2022
8827231
Sort and remove dupes
Oct 4, 2022
3c1457b
ensure other rules fire before logging user activity launched from ex…
Oct 4, 2022
1f07e30
update readme
Oct 4, 2022
a0e7dd3
update readme
Oct 4, 2022
045d805
update readme
Oct 4, 2022
47a9c1e
update readme..
Oct 4, 2022
a47c6a9
Misc Detection additions and improvements
Oct 4, 2022
e421fec
Add some File Shred Exclusions
Oct 4, 2022
88eaac2
Whitelist C:\Windows for now for file shred protection, just to preve…
Oct 4, 2022
e56e36f
More white listing to be safe, in testing this appears to not cause a…
Oct 4, 2022
e138c5d
Comment Out Program Files/ProgramData Directories as I am unsure how …
Oct 4, 2022
8a9963d
Target specific folders for powershell file block, as this will block…
Oct 4, 2022
7328ab7
More Amcache Forensic logging added
Oct 5, 2022
33d1499
Add additional Data Exfiltration Rules, change order of web browser r…
Oct 5, 2022
5777038
Add additional Detections, expand qbot detection to detect subprocess…
Oct 5, 2022
2888b1b
Add Windows Defender Exclusion registry path, enable alerting
Oct 5, 2022
caa8d68
Add additional Service Monitoring capability with Driver detection ba…
Oct 6, 2022
084b234
Enable MITRE Tagging for drivers, system services, enable alerting.
Oct 6, 2022
89e8cd5
Noise reduction in Class Keys for new hardware detections
Oct 6, 2022
7bd07c1
MITRE Tagging of hardware additions
Oct 7, 2022
995be59
AV Exclusions for performance, noise reduction
Oct 7, 2022
8c78a7d
MITRE Tagging and a few new detections
Oct 7, 2022
e1d603d
Move Double Extensions under masquerading
Oct 7, 2022
0fd0694
add additional office apps
Oct 7, 2022
1d16037
Some new detections to track spearphishing attachments and more
Oct 7, 2022
ede7067
additional mounted devices detection besides mounted devices keys to …
Oct 7, 2022
729b8a9
Add alerting in Amcache for virtual DVD-ROM Mount after iso mount fo…
Oct 7, 2022
5b57c5c
Add Bitlocker Status Monitoring for System drive with alerting enabled.
Oct 7, 2022
7ccb9bd
Add Bitlocker Status Monitoring for System drive with alerting enabled.
Oct 7, 2022
b7d421a
Push Vulnerable Driver detections from Nasreddine Bencherchali
Oct 7, 2022
81679a2
Add Risk Rating to vuln driver loads
Oct 7, 2022
a99afce
Removing Blocking from Config due to reports of interference of windo…
Oct 21, 2022
f93cc99
Updates from @NerbalOne
Jun 27, 2023
d5382ff
Sysmon v15 update schema + 1 test rule for C:\users\*\Downloads
Jun 27, 2023
aa679c7
Added Potential Noisy Rule, exclusions need to be added under global …
Jun 27, 2023
306a628
Unusual File extension written as PE, enabled alerting
Jun 27, 2023
6a5df4c
Big update thanks to Florian Roth, Majority of updates are mirrored a…
Jul 5, 2023
60f27bb
Misc Updates & Tagging
Jul 5, 2023
dac2f47
Break out some Pe Executable rules with MITRE Tagging
Jul 5, 2023
30c2337
Add Spear Phishing detection, add @twitter tagging
Jul 5, 2023
0ab30cc
Add NerbalOne's Powershell Sysmon Installer, add exclusions for asus …
Jul 5, 2023
baaf02d
misc Updates
Jul 6, 2023
00185b9
Fix some inactive/broken rules and filtering
Jul 10, 2023
91c9f54
Re-enable Browser Extension monitoring for Chrome, added MITRE Tagging
Jul 10, 2023
3ee217b
Add files via upload
NerbalOne Sep 6, 2023
ee20ccd
Added changes from @ionstorm config.
NerbalOne Sep 6, 2023
ca6f0aa
Update sysmonconfig-export.xml
NerbalOne Sep 6, 2023
5316d5d
Revert "Added changes from @ion-storm config."
NerbalOne Sep 7, 2023
7449900
Update sysmonconfig-export.xml
NerbalOne Sep 7, 2023
9b94ebd
Delete .gitignore
NerbalOne Sep 7, 2023
3aecb5d
Added PS scripts to install Sysmon with Config
NerbalOne Sep 7, 2023
029f044
Merge branch 'master' of https://github.com/NerbalOne/sysmon-config
NerbalOne Sep 7, 2023
e60c40b
Delete Auto_Update.bat
NerbalOne Sep 7, 2023
729a198
Delete Install Sysmon.bat
NerbalOne Sep 7, 2023
470a8b9
Updating grammar and links.
NerbalOne Sep 8, 2023
3b46203
Update README.md
NerbalOne Sep 8, 2023
559a4e7
Update README.md
NerbalOne Sep 8, 2023
e7830ee
Update README.md
NerbalOne Sep 8, 2023
6c3876d
Update Sysmon Install.ps1
NerbalOne Sep 8, 2023
d34a18e
Added exclusions and fixed some rules.
NerbalOne Sep 8, 2023
dd4d076
Added line to force TLS 1.2
NerbalOne Sep 8, 2023
3264134
Delete sysmonconfig-export_blocking.xml
NerbalOne Sep 8, 2023
98409cd
Add files via upload
NerbalOne Sep 8, 2023
6d3dedc
Changed links Install.ps1
NerbalOne Sep 8, 2023
c2220ef
Update SysmonUpdateConfig.ps1
NerbalOne Sep 8, 2023
b87e261
Update README.md
NerbalOne Sep 8, 2023
d0cfa8a
Merge branch 'master' into master
ion-storm Sep 8, 2023
3f3ccfe
Merge pull request #25 from NerbalOne/master
ion-storm Sep 8, 2023
a656aef
Updated rules and added exclusions.
NerbalOne Sep 11, 2023
94d353f
Merge pull request #26 from NerbalOne/master
NerbalOne Sep 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

504 changes: 504 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

50 changes: 37 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,58 @@
# sysmon-config | A Sysmon configuration file for everybody #
# Sysmon ATT&CK Configuration #
The file provided should function as a great starting point for system monitoring in a self-contained package. This configuration and results should give you a good idea of what's possible for Sysmon. Please beware that you may need to fine tune and add exclusions depending on your environment. High CPU usage may be seen if exclusions are not added and one or more rules are firing off multiple times every second.

This is a Microsoft Sysinternals Sysmon configuration file template with default high-quality event tracing.
      **[sysmonconfig-export.xml](https://github.com/ion-storm/sysmon-config/blob/master/sysmonconfig-export.xml)**

The file provided should function as a great starting point for system monitoring in a self-contained package. This configuration and results should give you a good idea of what's possible for Sysmon.
Pull requests and issue tickets are welcomed. Any new additions will be credited in-line or on Git. Tag your name with Author=YourName within the rulename field.

      **[sysmonconfig-export.xml](https://github.com/SwiftOnSecurity/sysmon-config/blob/master/sysmonconfig-export.xml)**
This Sysmon ATT&CK Configuration is designed "Explicitly" to enrich your SIEM for threat intelligence, forensics, and UEBA use cases. You'll want to create a key-value parser for the
rulename field to create field names per event within your SIEM.
Ideally this is best used with an Alerting Repository/Index where the "Alert=" field is marked and a non-alerting visibility index/repository where threat hunting and investigations can be done
that contains added context and story line information of user behavior and activity leading up to an attack. Non-Alerting visibility rules are tagged with "Desc=" and "Forensic=" and are
meant to provide contextual information for analysts to build cases and identify what is happening with SIEM enrichments. Some of these non-alerting visibility rules can be graduated
to the Alerting rules or can be used with correlation rules within a SIEM/SOAR/XDR.

Because virtually every line is commented and sections are marked with explanations, it should also function as a tutorial for Sysmon and a guide to critical monitoring areas in Windows systems. It demonstrates a lot of what I wish I knew when I began with Sysmon in 2014.
The goal with this configuration is a "Control" configuration that provides ultimate visibility that should be ran in conjunction with an EDR.
As we know, allot of EDR's today provide little contextual information, forensic information that is tagged, categorized, risk rated, and some alerts EDR vendors choose to not alert
on due to the differences between each environment and how hard it is to baseline some detections. There is many use cases where EDR's fall short. They are not the greatest at
identifying suspicious activity that may fall short of being labeled as malicious. The goal here is to detect all common user activity that would lead to exfiltration, infiltration,
malware, malicious activity, and questionable activity. If a user is poking around the registry, sending data to cloud storage, downloading and executing random attachments and files, and/or
copying files, we want to know. We also want to leave an audit trail by monitoring the registry, artifact locations, and provide our forensic analysts as much detail as possible.

Pull requests and issue tickets are welcome, and new additions will be credited in-line or on Git.
If you have forensic registry keys, file locations, artifacts, behavior detections, and anything that may be beneficial here, feel free to put in a pull request.
The goal here is as much visibility as possible with accurate alerts that are not noisy.

Note: Exact syntax and filtering choices are deliberate to catch appropriate entries and to have as little performance impact as possible. Sysmon's filtering abilities are different than the built-in Windows auditing features, so often a different approach is taken than the normal static listing of every possible important area.

You can contact @SwiftOnSecurity on Twitter for any urgent questions or issues.

## Use ##

### Auto Install with Auto Update Script ###
The two below PowerShell scripts that are contained in this repo will download and install Sysmon and the config along with creating a scheduled task to run hourly to update the config.
~~~~
Sysmon Install.ps1
SysmonUpdateConfig.ps1
~~~~

### Install ###
Run with administrator rights
Run with administrator rights.
~~~~
sysmon.exe -accepteula -i sysmonconfig-export.xml
~~~~

### Update existing configuration ###
Run with administrator rights
### Update Existing Configuration ###
Run with administrator rights.
~~~~
sysmon.exe -c sysmonconfig-export.xml
~~~~

### Uninstall ###
Run with administrator rights
Run with administrator rights.
~~~~
sysmon.exe -u
~~~~

## Hide Sysmon from services.msc ##
~~~~
Hide:
sc sdset Sysmon D:(D;;DCLCWPDTSD;;;IU)(D;;DCLCWPDTSD;;;SU)(D;;DCLCWPDTSD;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
Restore:
sc sdset Sysmon D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
60 changes: 60 additions & 0 deletions Sysmon Install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#Author: NerbalOne
#This PowerShell script will first create the Sysmon folder if it does not exist. It will then download Sysmon.exe, which supports both 32 bit and 64 bit, along with the Sysmon config and Sysmon Update script. It will then install Sysmon with the config and create a Scheduled Task to run hourly to update the Sysmon config.

# Define Sysmon URLs
$sysmonURL = "https://live.sysinternals.com/sysmon.exe"
$sysmonConfigURL = "https://raw.githubusercontent.com/ion-storm/sysmon-config/master/sysmonconfig-export.xml"
$sysmonUpdateConfig = "https://raw.githubusercontent.com/ion-storm/sysmon-config/master/SysmonUpdateConfig.ps1"

# Define Local Path for Sysmon File and Sysmon Config
$sysmonPath = "C:\Programdata\Sysmon\sysmon.exe"
$sysmonConfigPath = "C:\Programdata\Sysmon\sysmonconfig-export.xml"
$sysmonUpdatePath = "C:\Programdata\Sysmon\SysmonUpdateConfig.ps1"
$sysmonFolderPath = "C:\ProgramData\Sysmon\"

# Create Sysmon Folder if it Doesn't Exist
if (-not (Test-Path $sysmonFolderPath)) {
# Create the Folder
try {
New-Item -ItemType Directory -Path $sysmonFolderPath -Force
Write-Host "Folder created successfully at $folderPath"
}
catch {
Write-Host "Error creating the folder: $_"
}
}
else {
Write-Host "The folder already exists at $folderPath"
}

# Download Sysmon, Config, and Update Script
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri $sysmonURL -OutFile $sysmonPath
Invoke-WebRequest -Uri $sysmonConfigURL -OutFile $sysmonConfigPath
Invoke-WebRequest -Uri $sysmonUpdateConfig -OutFile $sysmonUpdatePath

# Install Sysmon with Config
Start-Process -FilePath $sysmonPath -ArgumentList "-accepteula -i $sysmonConfigPath" -NoNewWindow -Wait

# Create a New Scheduled Task
Start-Process schtasks.exe -ArgumentList '/Create /RU SYSTEM /RL HIGHEST /SC HOURLY /TN Update_Sysmon_Rules /TR "powershell.exe -ExecutionPolicy Bypass -File "C:\Programdata\Sysmon\SysmonUpdateConfig.ps1"" /f' -Wait -WindowStyle Hidden
Start-Process schtasks.exe -ArgumentList '/Run /TN Update_Sysmon_Rules' -Wait -WindowStyle Hidden

# Define Sysmon service Name
$sysmonServiceName = "Sysmon"

# Check if Sysmon Service Exists
try {
$service = Get-Service -Name $sysmonServiceName -ErrorAction Stop
Write-Output "Sysmon service exists"
} catch {
Throw "Sysmon service does not exist"
}

# Check if Scheduled Task is Created Successfully
try {
$task = Get-ScheduledTask -TaskName "Update_Sysmon_Rules" -ErrorAction Stop
Write-Output "Scheduled task created successfully"
} catch {
Throw "Scheduled task creation failed"
}
24 changes: 24 additions & 0 deletions SysmonUpdateConfig.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#Author: NerbalOne
#This PowerShell script will first download the latest Sysmon config. Then it will apply this config to Sysmon.

# Define Sysmon Path
$sysmonPath = "C:\ProgramData\Sysmon\sysmon.exe"
$sysmonConfigPath = "C:\ProgramData\Sysmon\sysmonconfig-export.xml"

# Define Sysmon Config URL
$sysmonConfigURL = "https://raw.githubusercontent.com/ion-storm/sysmon-config/master/sysmonconfig-export.xml"

# Download the Latest Sysmon Config
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri $sysmonConfigURL -OutFile $sysmonConfigPath

# Run sysmon.exe with Config
& $sysmonPath -c $sysmonConfigPath

# Check the Exit Code of the Previous Command
if ($LASTEXITCODE -eq 0) {
Write-Output "Sysmon executed successfully."
} else {
Write-Output "Sysmon execution failed."
}

82 changes: 82 additions & 0 deletions Sysmon_Installer.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#Author: NerbalOne
#This PowerShell script will first create the Sysmon folder if it does not exist. It will then identify which OS architecture the endpoint is running and download the appropriate Sysmon version along with the Sysmon config and Sysmon Update script. It will then install Sysmon with the config and create a Scheduled Task to run hourly to update the Sysmon config.
#You may have issues while running this script on Windows Server 2012 R2 servers as it seems this server version only works with the Sysmon.exe and not the Sysmon64.exe with the newer Sysmon versions.

# Define Sysmon URLs
$sysmon32URL = "https://live.sysinternals.com/sysmon.exe"
$sysmon64URL = "https://live.sysinternals.com/sysmon64.exe"
$sysmonConfigURL = "https://raw.githubusercontent.com/ion-storm/sysmon-config/master/sysmonconfig-export.xml"
$sysmonUpdateConfig = "https://raw.githubusercontent.com/ion-storm/sysmon-config/master/SysmonUpdateConfig.ps1"

# Define Local Path for Sysmon File and Sysmon Config
$sysmon32Path = "C:\Programdata\Sysmon\sysmon.exe"
$sysmon64Path = "C:\Programdata\Sysmon\sysmon64.exe"
$sysmonConfigPath = "C:\Programdata\Sysmon\sysmonconfig-export.xml"
$sysmonUpdatePath = "C:\Programdata\Sysmon\SysmonUpdateConfig.ps1"
$sysmonFolderPath = "C:\ProgramData\Sysmon\"

# Create Sysmon Folder if it Doesn't Exist
if (-not (Test-Path $sysmonFolderPath)) {
# Create the Folder
try {
New-Item -ItemType Directory -Path $sysmonFolderPath -Force
Write-Host "Folder created successfully at $folderPath"
}
catch {
Write-Host "Error creating the folder: $_"
}
}
else {
Write-Host "The folder already exists at $folderPath"
}

# Check OS Architecture
$OSArchitecture = (Get-WmiObject -Query "Select * from Win32_OperatingSystem").OSArchitecture

# Download Sysmon Update Script
Invoke-WebRequest -Uri $sysmonUpdateConfig -OutFile $sysmonUpdatePath

# Download Sysmon Config
Invoke-WebRequest -Uri $sysmonConfigURL -OutFile $sysmonConfigPath

# Depending on the OS Architecture, Download and Install Sysmon
if ($OSArchitecture -eq "32-bit") {
# Download Sysmon 32 bit
Invoke-WebRequest -Uri $sysmon32URL -OutFile $sysmon32Path

# Install Sysmon with Config
Start-Process -FilePath $sysmon32Path -ArgumentList "-accepteula -i $sysmonConfigPath" -NoNewWindow -Wait

} elseif ($OSArchitecture -eq "64-bit") {
# Download Sysmon 64 bit
Invoke-WebRequest -Uri $sysmon64URL -OutFile $sysmon64Path

# Install Sysmon with Config
Start-Process -FilePath $sysmon64Path -ArgumentList "-accepteula -i $sysmonConfigPath" -NoNewWindow -Wait

} else {
Write-Output "Unsupported architecture: $OSArchitecture"
}

# Create a New Scheduled Task
Start-Process schtasks.exe -ArgumentList '/Create /RU SYSTEM /RL HIGHEST /SC HOURLY /TN Update_Sysmon_Rules /TR "powershell.exe -ExecutionPolicy Bypass -File "C:\Programdata\Sysmon\SysmonUpdateConfig.ps1"" /f' -Wait -WindowStyle Hidden
Start-Process schtasks.exe -ArgumentList '/Run /TN Update_Sysmon_Rules' -Wait -WindowStyle Hidden

# Define Sysmon service Name Based on OS Architecture
$sysmonServiceName = if ($OSArchitecture -eq "64-bit") { "Sysmon64" } else { "Sysmon" }

# Check if Sysmon Service Exists
try {
$service = Get-Service -Name $sysmonServiceName -ErrorAction Stop
Write-Output "Sysmon service exists"
} catch {
Throw "Sysmon service does not exist"
}

# Check if Scheduled Task is Created Successfully
try {
$task = Get-ScheduledTask -TaskName "Update_Sysmon_Rules" -ErrorAction Stop
Write-Output "Scheduled task created successfully"
} catch {
Throw "Scheduled task creation failed"
}
Loading