Skip to content

fix(scanner/windows): remove unnecessary cab #1793

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

Merged
merged 1 commit into from
Nov 20, 2023
Merged

Conversation

MaineK00n
Copy link
Collaborator

@MaineK00n MaineK00n commented Nov 16, 2023

What did you implement:

When you specify a CabPath and scan, the Cab is extracted and saved to C:\Windows\SoftwareDistribution\ScanFile\<Update Service.ServiceID>.
To remove this, it is necessary to release the UpdateService, but that task was missing.
This PR adds the task.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

before

C:\Program Files\vuls>vuls scan
time="Nov 20 11:22:52" level=info msg="vuls--build-20230926_105414_f5d2fad"
time="Nov 20 11:22:52" level=info msg="Start scanning"
time="Nov 20 11:22:52" level=info msg="config: C:\\Program Files\\vuls\\config.toml"
time="Nov 20 11:22:52" level=info msg="Validating config..."
time="Nov 20 11:22:52" level=info msg="Detecting Server/Container OS... "
time="Nov 20 11:22:52" level=info msg="Detecting OS of servers... "
time="Nov 20 11:22:53" level=info msg="(1/1) Detected: localhost: windows Windows 10 Version 22H2 for x64-based Systems"
time="Nov 20 11:22:53" level=info msg="Detecting OS of containers... "
time="Nov 20 11:22:53" level=info msg="Checking Scan Modes... "
time="Nov 20 11:22:53" level=info msg="Detecting Platforms... "
time="Nov 20 11:22:54" level=info msg="(1/1) localhost is running on other"
time="Nov 20 11:29:27" level=info msg="Scanning listen port..."
time="Nov 20 11:29:27" level=info msg="Using Port Scanner: Vuls built-in Scanner"


Scan Summary
================
localhost       windowsWindows 10 Version 22H2 for x64-based Systems    43 installed, 0 updatable





To view the detail, vuls tui is useful.
To send a report, run vuls report -h.

C:\Program Files\vuls-saas>cd C:\Windows\SoftwareDistribution\ScanFile\

C:\Windows\SoftwareDistribution\ScanFile>dir
2023/11/20  11:27    <DIR>          .
2023/11/20  11:27    <DIR>          ..
2023/11/17  11:51    <DIR>          0edf0ec9-d419-439a-915d-8c1cdeac3e69
2023/11/19  11:53    <DIR>          235556e7-9380-4be3-9f00-34059e935427
2023/11/20  11:27    <DIR>          44817a47-72a9-4c17-abb5-85aac0f7b807
2023/11/20  11:23    <DIR>          492862b9-d6a4-4fa9-a3ae-80a285b82e30
2023/11/19  11:49    <DIR>          7e77b91b-c10d-4bc2-a3f8-05d8c0b47604
2023/11/17  11:49    <DIR>          87230f39-bfa3-44c8-92e1-db784a553b6e
2023/11/20  11:25    <DIR>          927ebd32-9154-48f5-9020-b077cfbe2216
2023/11/18  11:51    <DIR>          9a1b85dc-bc36-4c30-b113-195582f9a675
2023/11/18  11:49    <DIR>          ce21c3d7-188c-48f3-b7ef-08c1e720e2e4
2023/11/19  11:51    <DIR>          d8bbda55-f181-468a-a80c-e227caabe8da
2023/11/17  11:54    <DIR>          dd2e9699-5189-4205-8fcf-57852ee25741
2023/11/18  11:53    <DIR>          f5314aa7-a1ac-4e75-bb71-be952b5de105

after

C:\Program Files\vuls>vuls scan
time="Nov 20 11:36:26" level=info msg="vuls-v0.24.4-build-20231120_101610_a8fab57"
time="Nov 20 11:36:26" level=info msg="Start scanning"
time="Nov 20 11:36:26" level=info msg="config: C:\\Program Files\\vuls\\config.toml"
time="Nov 20 11:36:26" level=info msg="Validating config..."
time="Nov 20 11:36:26" level=info msg="Detecting Server/Container OS... "
time="Nov 20 11:36:26" level=info msg="Detecting OS of servers... "
time="Nov 20 11:36:27" level=info msg="(1/1) Detected: localhost: windows Windows 10 Version 22H2 for x64-based Systems"
time="Nov 20 11:36:27" level=info msg="Detecting OS of containers... "
time="Nov 20 11:36:27" level=info msg="Checking Scan Modes... "
time="Nov 20 11:36:27" level=info msg="Detecting Platforms... "
time="Nov 20 11:36:28" level=info msg="(1/1) localhost is running on other"
time="Nov 20 11:43:12" level=info msg="Scanning listen port..."
time="Nov 20 11:43:12" level=info msg="Using Port Scanner: Vuls built-in Scanner"


Scan Summary
================
localhost       windowsWindows 10 Version 22H2 for x64-based Systems    43 installed, 0 updatable





To view the detail, vuls tui is useful.
To send a report, run vuls report -h.

C:\Program Files\vuls-saas>cd C:\Windows\SoftwareDistribution\ScanFile\

C:\Windows\SoftwareDistribution\ScanFile>dir
2023/11/20  11:43    <DIR>          .
2023/11/20  11:43    <DIR>          ..

Checklist:

You don't have to satisfy all of the following.

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES

Reference

@MaineK00n MaineK00n self-assigned this Nov 16, 2023
@kotakanbe kotakanbe marked this pull request as ready for review November 20, 2023 02:59
@kotakanbe kotakanbe merged commit ef29afb into master Nov 20, 2023
@kotakanbe kotakanbe deleted the MaineK00n/rm-oldcab branch November 20, 2023 03:01
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