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

Use Github Actions to generate config #51

Merged
merged 3 commits into from
Jul 13, 2020
Merged

Conversation

j91321
Copy link
Contributor

@j91321 j91321 commented Jul 13, 2020

Hello,

I created a very basic PoC how could Github Actions workflow be used in order to have a reliable way to always have the latest config available as an artifact instead of having the generated config in repository.

There are a few advantages/disadvantages to this approach.
Advantages:

  • syntax testing on pull requests to master
  • less error prone (currently there is a typo on line 487 in sysmonconfig.xml dbgore.dll instead of correct dbgcore.dll, even though this is fixed in 10_process_access/include_debugging.xml)
  • possible to create workflows for different branches/older versions of sysmon
  • maybe possible to automate ATT&CK Navigator json file generation

Disadvantages:

  • currently artifacts download is allowed only for registered users upload-artifacts issue #51
  • As far as I know there is not one predictable artifact URL with latest attribute, user has to list artifacts through API and then pick the latest.

Hopefully these disadvantages will be fixed in foreseeable future (other platforms e.g. GitLab CI/CD support these use-cases). There is a workaround by using eine/tip, which creates one static pre-release and modifies the files for it on successful build, although I haven't tested it.

Example of passing build
Example of failing build (due to missing ending tag)

Not sure if this is necessary or if it will actually help in maintaining the repository, but I think it may open some interesting possibilities, I'm sure there are other ways to extend/improve the pipeline I haven't thought of.

@olafhartong
Copy link
Owner

Hey Ján, this looks pretty cool, thanks for this!

As I understand it, merging would let it generate the sysmonconfig.xml on each push but will also require people to log in to GitHub in order to download it ?

@j91321
Copy link
Contributor Author

j91321 commented Jul 13, 2020

Yes, that is the case. (for now at least)

I guess you could keep the manually generated sysmonconfig.xml in the repository, for those that don't have github account. It depends on how people use the repo.

@olafhartong
Copy link
Owner

Oh nice, I've seen the result in your fork, pretty cool.
Technically it should also be possible then to spawn a windows box and validate it loads as a next step

@olafhartong olafhartong merged commit 848152a into olafhartong:master Jul 13, 2020
@j91321
Copy link
Contributor Author

j91321 commented Jul 13, 2020

Thanks for the merge,

Yes, that is probably possible, but it needs to be a full VM not just a Windows container, since there is currently no way on how to load drivers in Windows containers. It can be probably done with actions/azure and Action runner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants