-
Notifications
You must be signed in to change notification settings - Fork 505
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a bash shell artifact to support linux. (#292)
- Loading branch information
Showing
9 changed files
with
104 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
name: Linux.Sys.BashShell | ||
description: | | ||
This artifact allows running arbitrary commands through the system | ||
shell. | ||
Since Velociraptor typically runs as root, the commands will also | ||
run as root. | ||
This is a very powerful artifact since it allows for arbitrary | ||
command execution on the endpoints. Therefore this artifact requires | ||
elevated permissions (specifically the `EXECVE` | ||
permission). Typically it is only available with the `administrator` | ||
role. | ||
required_permissions: | ||
- EXECVE | ||
|
||
parameters: | ||
- name: Command | ||
default: "ls -l /" | ||
|
||
sources: | ||
- query: | | ||
SELECT * FROM execve(argv=["/bin/bash", "-c", Command]) |
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
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,12 @@ | ||
// +build darwin | ||
|
||
package utils | ||
|
||
import ( | ||
"io/ioutil" | ||
"os" | ||
) | ||
|
||
func ReadDir(dirname string) ([]os.FileInfo, error) { | ||
return ioutil.ReadDir(dirname) | ||
} |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// +build linux | ||
|
||
/* | ||
Velociraptor - Hunting Evil | ||
Copyright (C) 2019 Velocidex Innovations. | ||
|
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,12 @@ | ||
// +build windows | ||
|
||
package utils | ||
|
||
import ( | ||
"io/ioutil" | ||
"os" | ||
) | ||
|
||
func ReadDir(dirname string) ([]os.FileInfo, error) { | ||
return ioutil.ReadDir(dirname) | ||
} |