Scan Nim malware with Windows Defender #161
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Scan Nim malware with Windows Defender | |
on: | |
pull_request: | |
push: | |
schedule: | |
- cron: '50 8 * * *' | |
jobs: | |
run: | |
runs-on: windows-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: jiro4989/setup-nim-action@v1 | |
with: | |
nim-version: 'stable' | |
- run: git clone https://github.com/penguinite/nimalicious.git | |
- run: cd nimalicious && nimble build -d:yesReallyDestroyMyMachine -d:release -Y | |
- run: powershell Compress-Archive nimalicious\build\ virus.zip | |
- name: start Windows Defender service | |
shell: powershell | |
run: 'Set-Service -Name wuauserv -StartupType Manual -Status Running' | |
- name: update signatures | |
shell: cmd | |
run: '"C:\Program Files\Windows Defender\MpCmdRun.exe" -SignatureUpdate' | |
- name: scan virus built with Nim stable. | |
shell: cmd | |
run: | | |
"C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -DisableRemediation -File "%CD%\virus.zip" | |
- name: VirusTotal Scan | |
uses: crazy-max/ghaction-virustotal@v4 | |
with: | |
vt_api_key: ${{ secrets.VT_API_KEY }} | |
files: | | |
virus.zip |