forked from Velocidex/velociraptor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a lockdown mode to the server config. (Velocidex#2619)
When a server is locked down certain permissions are removed (even from admins). The lockdown is set in the config file. This helps to mitigate the risk of a Velociraptor server admin account compromise. After initial deployment, the administrator can set the server in lockdown by adding the following config directive: lockdown: true to the server.config.yaml. After this the following permissions will be denied: - ARTIFACT_WRITER - SERVER_ARTIFACT_WRITER - EXECVE - SERVER_ADMIN - FILESYSTEM_WRITE - FILESYSTEM_READ - MACHINE_STATE During an active IR the server may be taken out of lockdown by removing the directive from the config file and restarting the service. Usually the config file is only writable by root and the Velociraptor server is running as a low privilege account which can not write to the config file. Also added Content-Length to VFS download handler.
- Loading branch information
Showing
28 changed files
with
483 additions
and
228 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package acls | ||
|
||
import ( | ||
"sync" | ||
|
||
acl_proto "www.velocidex.com/golang/velociraptor/acls/proto" | ||
) | ||
|
||
var ( | ||
mu sync.Mutex | ||
lockdown_token *acl_proto.ApiClientACL | ||
) | ||
|
||
func LockdownToken() *acl_proto.ApiClientACL { | ||
mu.Lock() | ||
defer mu.Unlock() | ||
return lockdown_token | ||
} | ||
|
||
func SetLockdownToken(token *acl_proto.ApiClientACL) { | ||
mu.Lock() | ||
defer mu.Unlock() | ||
lockdown_token = token | ||
} |
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
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
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
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
Oops, something went wrong.