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

Adding BITS Scanner #208

Merged
merged 2 commits into from
Sep 23, 2022
Merged

Adding BITS Scanner #208

merged 2 commits into from
Sep 23, 2022

Conversation

phutelmyer
Copy link
Contributor

@phutelmyer phutelmyer commented May 17, 2022

Describe the change
Adding Microsoft BITs file parser. Likely not going to be a file you come across during network scanning,
but can be used in incident response or direct / enterprise fileshotting from a Windows host.

This PR adds in quite a few requirements + complexity as it is based off of FireEye's BitsParser.
Unlike BitsParser, this scanner does not support deleted job extraction (BITS jobs are stored in the db, even if they're deleted from BITSAdmin) due to the size of arrays identified during testing (some arrays were seen to be 200+ records).
This can likely
be turned into an option to enable, though.

Describe testing procedures
Works, but could likely use additional tuning + cleanup as noted by the amount of file changes required.
Tested on several BITS files. Rebuilt Strelka using this PR and ran against several BITS db files.

Sample output

...
  },
  "scan": {
    "bits": {
      "elapsed": 0.041891,
      "jobs": [
        {
          "CreationTime": "2022-05-16T13:53:31Z",
          "JobDesc": "1cfd2d17-ff51-425d-9ca0-e400f3d930c6",
          "JobId": "26f51a10-ba58-4e3a-b43e-1ae4fca29c9e",
          "JobName": "Edge Component Updater",
          "JobPriority": "normal",
          "JobState": "transferred",
          "JobType": "download",
          "ModifiedTime": "2022-05-16T18:26:13Z",
          "OwnerSID": "S-1-5-21-2579307479-883959776-3753017356-1001"
        },
        {
          "CreationTime": "2022-05-15T22:37:24Z",
          "JobDesc": "hfnkpimlhhgieaddgfemjhofmfblmnib_7339_all_fknafaeudafn6nqldnkw35c4w4.crx3",
          "JobId": "f9189f6d-a130-4687-84fc-5ac6c9c4ee6c",
          "JobName": "Chrome Component Updater",
          "JobPriority": "normal",
          "JobState": "transferred",
          "JobType": "download",
          "ModifiedTime": "2022-05-16T18:31:36Z",
          "OwnerSID": "S-1-5-21-2579307479-883959776-3753017356-1001"
        },
        {
          "CommandExecuted": "c:\\ADS\\1.txt:cmd.exe",
          "CreationTime": "2022-05-16T18:27:29Z",
          "JobId": "513c0a32-1736-48f7-8a0b-d5c87d327ad9",
          "JobName": "myfile",
          "JobPriority": "normal",
          "JobState": "suspended",
          "JobType": "download",
          "ModifiedTime": "2022-05-16T18:28:54Z",
          "OwnerSID": "S-1-5-21-2579307479-883959776-3753017356-1001"
        }
      ]
    },
...

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of and tested my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@phutelmyer phutelmyer linked an issue May 17, 2022 that may be closed by this pull request
@phutelmyer phutelmyer added enhancement New feature or request dependencies Pull requests that update a dependency file labels May 17, 2022
@phutelmyer phutelmyer self-assigned this May 17, 2022
@phutelmyer phutelmyer merged commit 87edad8 into master Sep 23, 2022
@phutelmyer phutelmyer deleted the scanner_ScanBITS branch September 23, 2022 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create BITS Scanner (FireEye BitsParser)
1 participant