-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
674 additions
and
0 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,6 @@ | ||
# Ignore .git folder | ||
.git* | ||
|
||
.gitignore | ||
README.md | ||
LICENSE |
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,38 @@ | ||
FROM gliderlabs/alpine:3.3 | ||
|
||
MAINTAINER blacktop, https://github.com/blacktop | ||
|
||
COPY . /go/src/github.com/maliceio/malice-yara | ||
RUN apk-install python openssl file jansson | ||
RUN apk-install -t build-deps go git mercurial autoconf automake file-dev flex gcc git jansson-dev libc-dev libtool make openssl-dev python-dev\ | ||
&& set -x \ | ||
&& cd /tmp/ \ | ||
&& git clone --recursive --branch v3.4.0 git://github.com/plusvic/yara \ | ||
&& cd /tmp/yara \ | ||
&& ./bootstrap.sh \ | ||
&& ./configure --enable-cuckoo \ | ||
--enable-magic \ | ||
--with-crypto \ | ||
&& make \ | ||
&& make install \ | ||
&& cd yara-python \ | ||
&& python setup.py build install \ | ||
&& && rm -rf /tmp/* | ||
&& echo "Building info Go binary..." \ | ||
&& cd /go/src/github.com/maliceio/malice-yara \ | ||
&& export GOPATH=/go \ | ||
&& go version \ | ||
&& go get \ | ||
&& go build -ldflags "-X main.Version=$(cat VERSION) -X main.BuildTime=$(date -u +%Y%m%d)" -o /bin/scan \ | ||
&& rm -rf /go \ | ||
&& rm -rf /tmp/* \ | ||
&& apk del --purge build-deps | ||
|
||
VOLUME ["/malware"] | ||
VOLUME ["/rules"] | ||
|
||
WORKDIR /malware | ||
|
||
ENTRYPOINT ["/bin/scan"] | ||
|
||
CMD ["--help"] |
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 |
---|---|---|
@@ -1,2 +1,90 @@ | ||
 | ||
# malice-yara | ||
|
||
[](http://doge.mit-license.org) | ||
[][hub] | ||
[][hub] | ||
[](https://imagelayers.io/?images=malice/yara:latest) | ||
[](https://imagelayers.io/?images=malice/yara:latest) | ||
|
||
Malice Yara Plugin | ||
|
||
This repository contains a **Dockerfile** of **malice/yara** for [Docker](https://www.docker.io/)'s [trusted build](https://index.docker.io/u/malice/yara/) published to the public [DockerHub](https://index.docker.io/). | ||
|
||
> **WARNING:** Work in progress. Not ready yet. | ||
### Dependencies | ||
|
||
* [gliderlabs/alpine:3.3](https://index.docker.io/_/gliderlabs/alpine/) | ||
|
||
|
||
### Installation | ||
|
||
1. Install [Docker](https://www.docker.io/). | ||
2. Download [trusted build](https://hub.docker.com/r/malice/yara/) from public [DockerHub](https://hub.docker.com): `docker pull malice/yara` | ||
|
||
### Usage | ||
|
||
docker run --rm malice/yara FILE | ||
|
||
```bash | ||
Usage: yara [OPTIONS] COMMAND [arg...] | ||
|
||
Malice yara Plugin | ||
|
||
Version: v0.1.0, BuildTime: 20160214 | ||
|
||
Author: | ||
blacktop - <https://github.com/blacktop> | ||
|
||
Options: | ||
--table, -t output as Markdown table | ||
--post, -p POST results to Malice webhook [$MALICE_ENDPOINT] | ||
--proxy, -x proxy settings for Malice webhook endpoint [$MALICE_PROXY] | ||
--help, -h show help | ||
--version, -v print the version | ||
|
||
Commands: | ||
help Shows a list of commands or help for one command | ||
|
||
Run 'yara COMMAND --help' for more information on a command. | ||
``` | ||
|
||
This will output to stdout and POST to malice results API webhook endpoint. | ||
|
||
### Sample Output JSON: | ||
```json | ||
{ | ||
"yara": { | ||
} | ||
} | ||
``` | ||
### Sample Output STDOUT (Markdown Table): | ||
--- | ||
#### yara | ||
|
||
--- | ||
### To Run on OSX | ||
- Install [Homebrew](http://brew.sh) | ||
|
||
```bash | ||
$ brew install caskroom/cask/brew-cask | ||
$ brew cask install virtualbox | ||
$ brew install docker | ||
$ brew install docker-machine | ||
$ docker-machine create --driver virtualbox malice | ||
$ eval $(docker-machine env malice) | ||
``` | ||
|
||
### Documentation | ||
|
||
### Issues | ||
|
||
Find a bug? Want more features? Find something missing in the documentation? Let me know! Please don't hesitate to [file an issue](https://github.com/maliceio/malice-av/issues/new) and I'll get right on it. | ||
|
||
### Credits | ||
|
||
### License | ||
MIT Copyright (c) 2016 **blacktop** | ||
|
||
[hub]: https://hub.docker.com/r/malice/yara/ |
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 @@ | ||
v0.1.0 |
Oops, something went wrong.