-
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
11 changed files
with
1,094 additions
and
42,984 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
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,92 @@ | ||
FROM malice/alpine | ||
|
||
LABEL maintainer "https://github.com/blacktop" | ||
|
||
LABEL malice.plugin.repository = "https://github.com/malice-plugins/yara.git" | ||
LABEL malice.plugin.category="av" | ||
LABEL malice.plugin.mime="*" | ||
LABEL malice.plugin.docker.engine="*" | ||
|
||
ENV YARA 3.7.0 | ||
|
||
# Install Yara | ||
COPY . /go/src/github.com/maliceio/malice-yara | ||
RUN apk --update add --no-cache openssl file bison jansson ca-certificates | ||
RUN apk --update add --no-cache -t .build-deps \ | ||
openssl-dev \ | ||
jansson-dev \ | ||
build-base \ | ||
mercurial \ | ||
musl-dev \ | ||
libc-dev \ | ||
file-dev \ | ||
automake \ | ||
autoconf \ | ||
libtool \ | ||
flex \ | ||
bash \ | ||
wget \ | ||
git \ | ||
gcc \ | ||
go \ | ||
git \ | ||
gcc \ | ||
&& echo "===> Install Yara from source..." \ | ||
&& cd /tmp \ | ||
&& git clone --recursive --branch v${YARA} https://github.com/VirusTotal/yara.git \ | ||
&& cd /tmp/yara \ | ||
&& ./bootstrap.sh \ | ||
&& sync \ | ||
&& ./configure --with-crypto \ | ||
--enable-magic \ | ||
--enable-cuckoo \ | ||
--enable-dotnet \ | ||
&& make \ | ||
&& make install \ | ||
&& echo "===> Building scan Go binary..." \ | ||
&& cd /go/src/github.com/maliceio/malice-yara \ | ||
&& export GOPATH=/go \ | ||
&& YARA_SRC="/tmp/yara" \ | ||
&& export CGO_CFLAGS="-I${YARA_SRC}/libyara/include" \ | ||
&& export CGO_LDFLAGS="-L${YARA_SRC}/libyara/.libs -lyara" \ | ||
&& export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" \ | ||
&& go version \ | ||
&& go get -d \ | ||
&& CGO_ENABLED=1 go build -ldflags "-X main.Version=$(cat VERSION) -X main.BuildTime=$(date -u +%Y%m%d)" -o /bin/scan | ||
# && rm -rf /go /usr/local/go /usr/lib/go /tmp/* \ | ||
# && apk del --purge .build-deps | ||
|
||
# Install malice plugin | ||
# COPY . /go/src/github.com/maliceio/malice-yara | ||
# RUN apk --update add --no-cache -t .build-deps \ | ||
# openssl-dev \ | ||
# jansson-dev \ | ||
# build-base \ | ||
# mercurial \ | ||
# musl-dev \ | ||
# openssl \ | ||
# bash \ | ||
# wget \ | ||
# git \ | ||
# gcc \ | ||
# go \ | ||
# && echo "===> Building scan Go binary..." \ | ||
# && cd /go/src/github.com/maliceio/malice-yara \ | ||
# && export GOPATH=/go \ | ||
# && export CGO_CFLAGS="-I/usr/local/include" \ | ||
# && export CGO_LDFLAGS="-L/usr/local/lib -lyara" \ | ||
# && 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 /usr/local/go /usr/lib/go /tmp/* \ | ||
# && apk del --purge .build-deps | ||
|
||
COPY rules /rules | ||
|
||
VOLUME ["/malware"] | ||
VOLUME ["/rules"] | ||
|
||
WORKDIR /malware | ||
|
||
ENTRYPOINT ["su-exec","malice","/sbin/tini","--","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
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,22 @@ | ||
#### Yara | ||
| Rule | Description | Offset | Data | Tags | | ||
|-------------|--------------|-------------|-------------|-------------| | ||
| `Contains_PE_File` | Detect a PE file inside a byte sequence | `0x0` | "MZ" | [] | | ||
| `maldoc_function_prolog_signature` | | `0x1454` | "U\x8b\xec\x81\xec" | [] | | ||
| `maldoc_structured_exception_handling` | | `0x5a55` | "d\xa1\x00\x00\x00\x00" | [] | | ||
| `maldoc_suspicious_strings` | | `0x67ec` | "CloseHandle" | [] | | ||
| `PEiD_00138_Armadillo_v1_71_` | [Armadillo v1.71] | `0x5a46` | "U\x8b\xecj\xffh b@\x00h\xc6[@\x00d\xa1" | [] | | ||
| `PEiD_00497_dUP_v2_x_Patcher_____www_diablo2oo2_cjb_net_` | [dUP v2.x Patcher --> www.diablo2oo2.cjb.net] | `0x4e` | "This program cannot be ru" | [] | | ||
| `PEiD_00729_Free_Pascal_1_06_` | [Free Pascal 1.06] | `0x3a12` | "\xc6\x05\xc0\x84@\x00O\xe8k\x04\x00\x00" | [] | | ||
| `PEiD_01101_Microsoft_Visual_C___v5_0_v6_0__MFC__` | [Microsoft Visual C++ v5.0/v6.0 (MFC)] | `0x5a46` | "U\x8b\xecj\xffh b@\x00h\xc6[@\x00d\xa1\x00\x00\x00\x00P" | [] | | ||
| `PEiD_01108_Microsoft_Visual_C___v6_0_` | [Microsoft Visual C++ v6.0] | `0x5a46` | "U\x8b\xecj\xffh b@\x00h\xc6[@\x00d\xa1\x00\x00\x00\x00Pd\x89%" | [] | | ||
| `PEiD_01110_Microsoft_Visual_C___v6_0_` | [Microsoft Visual C++ v6.0] | `0x5a46` | "U\x8b\xecj\xffh b@\x00h\xc6[@\x00d\xa1\x00\x00\x00\x00Pd\x89%" | [] | | ||
| `PEiD_01125_Microsoft_Visual_C___` | [Microsoft Visual C++] | `0x5a46` | "U\x8b\xecj\xffh b@\x00h\xc6[@\x00d\xa1\x00\x00\x00\x00Pd\x89%" | [] | | ||
| `_dUP_v2x_Patcher__wwwdiablo2oo2cjbnet_` | dUP v2.x Patcher --> www.diablo2oo2.cjb.net | `0x4e` | "This program cannot be ru" | [] | | ||
| `_Microsoft_Visual_Cpp_` | Microsoft Visual C++ | `0x5a46` | "U\x8b\xecj\xffh b@\x00h\xc6[@\x00d\xa1\x00\x00\x00\x00Pd\x89%" | [] | | ||
| `_Free_Pascal_v106_` | Free Pascal v1.06 | `0x3a12` | "\xc6\x05\xc0\x84@\x00O\xe8k\x04\x00\x00" | [] | | ||
| `_Armadillo_v171_` | Armadillo v1.71 | `0x5a46` | "U\x8b\xecj\xffh b@\x00h\xc6[@\x00d\xa1" | [] | | ||
| `_Microsoft_Visual_Cpp_v60_` | Microsoft Visual C++ v6.0 | `0x5a46` | "U\x8b\xecj\xffh b@\x00h\xc6[@\x00d\xa1\x00\x00\x00\x00Pd\x89%" | [] | | ||
| `_Microsoft_Visual_Cpp_v50v60_MFC_` | Microsoft Visual C++ v5.0/v6.0 (MFC) | `0x5a46` | "U\x8b\xecj\xffh b@\x00h\xc6[@\x00d\xa1\x00\x00\x00\x00P" | [] | | ||
> NOTE: **Data** truncated to 25 characters | ||
Oops, something went wrong.