-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add carver endpoints to doorman #120
Comments
Hey @muffins, thanks for writing up this issue. Only a few questions:
Also, looking at the code - there seems to be a mixup between |
Yo! Sorry for the massive delay in my responses on this. Below is a detailing of how we have it deployed internally, please let me know if there's any points of confusion or issue. 1.) Yes. The way we have the carver configuration setup, you initiate a carve by a query like the following:
The carve=1 component is what kicks off the job, and there's an expectation that you've provided a path or glob pattern. We currently encourage folks to have carves just be ODOS queries, however it's totally do-able with our setup to kick off carves as a scheduled query 2.) The
Once the endpoint receives this session ID, it passes it along with subsequent requests to our reassembly endpoint. With each block that the carver sends up, the endpoint authenticates the client, verifies the entity corresponding to the session_id actually exists, checks how many blocks it's received thus far and ensures it's actually expecting more data, then finally accepts the block data from the client, and caches this for later re-assembly. 3.) The request data should be mostly similar to our normal ODOS query workflow. For our setup, the first endpoint expects to receive the node enrollment authentication data to verify the client is authenticated. After which the initial endpoint expects to recieve the For the "continue" endpoint we again expect the same authentication data used by the distributed endpoints, but then also the
Lastly, the only values the client expects back is an indication of success that the endpoint received the block. Currently we just 4.) The carves are currently pretty naive. We simply copy as much of the data the user has specified to a temp directory, tar it all up, and if you've turned on compression, compress it using zstd. This is the data that's sent back to the endpoints, a simple tar of all of the files you've specificed. Thus a user should be able to untar everything and browse the files normally. 5.) We expire the intermediary blocks, but with our current setup with store the fully reassembled carves forever in an encrypted store, with ACLs around which users are allowed to decrypt the data. |
As of osquery version 2.4.5 osquery has the capability to pull, or "carve", files and directories from remote hosts. The design for what a backend looks like is two endpoints, one for beginning the carve session on the backend and a second for receiving the blocks associated with a carves data.
A simple example of how this is done is as follows, taken from our generic
test_http_server.py
file:I hope that makes sense, if not I'm more than happy to offer more specifics on how we do this internally! Let me know!
The text was updated successfully, but these errors were encountered: